CubbyFlow::GridBackwardEulerDiffusionSolver3 Class Referencefinal

3-D grid-based backward Euler diffusion solver. More...

#include <Core/Solver/Grid/GridBackwardEulerDiffusionSolver3.hpp>

Inheritance diagram for CubbyFlow::GridBackwardEulerDiffusionSolver3:
CubbyFlow::GridDiffusionSolver3

Public Types

enum  BoundaryType { BoundaryType::Dirichlet, BoundaryType::Neumann }
 

Public Member Functions

 GridBackwardEulerDiffusionSolver3 (BoundaryType boundaryType=BoundaryType::Neumann)
 Constructs the solver with given boundary type. More...
 
 GridBackwardEulerDiffusionSolver3 (const GridBackwardEulerDiffusionSolver3 &)=delete
 Deleted copy constructor. More...
 
 GridBackwardEulerDiffusionSolver3 (GridBackwardEulerDiffusionSolver3 &&) noexcept=delete
 Deleted move constructor. More...
 
 ~GridBackwardEulerDiffusionSolver3 () override=default
 Default virtual destructor. More...
 
GridBackwardEulerDiffusionSolver3operator= (const GridBackwardEulerDiffusionSolver3 &)=delete
 Deleted copy assignment operator. More...
 
GridBackwardEulerDiffusionSolver3operator= (GridBackwardEulerDiffusionSolver3 &&) noexcept=delete
 Deleted move assignment operator. More...
 
void Solve (const ScalarGrid3 &source, double diffusionCoefficient, double timeIntervalInSeconds, ScalarGrid3 *dest, const ScalarField3 &boundarySDF=ConstantScalarField3{ std::numeric_limits< double >::max() }, const ScalarField3 &fluidSDF=ConstantScalarField3{ -std::numeric_limits< double >::max() }) override
 
void Solve (const CollocatedVectorGrid3 &source, double diffusionCoefficient, double timeIntervalInSeconds, CollocatedVectorGrid3 *dest, const ScalarField3 &boundarySDF=ConstantScalarField3{ std::numeric_limits< double >::max() }, const ScalarField3 &fluidSDF=ConstantScalarField3{ -std::numeric_limits< double >::max() }) override
 
void Solve (const FaceCenteredGrid3 &source, double diffusionCoefficient, double timeIntervalInSeconds, FaceCenteredGrid3 *dest, const ScalarField3 &boundarySDF=ConstantScalarField3{ std::numeric_limits< double >::max() }, const ScalarField3 &fluidSDF=ConstantScalarField3{ -std::numeric_limits< double >::max() }) override
 
void SetLinearSystemSolver (const FDMLinearSystemSolver3Ptr &solver)
 Sets the linear system solver for this diffusion solver. More...
 
- Public Member Functions inherited from CubbyFlow::GridDiffusionSolver3
 GridDiffusionSolver3 ()=default
 Default constructor. More...
 
 GridDiffusionSolver3 (const GridDiffusionSolver3 &)=delete
 Deleted copy constructor. More...
 
 GridDiffusionSolver3 (GridDiffusionSolver3 &&) noexcept=delete
 Deleted move constructor. More...
 
virtual ~GridDiffusionSolver3 ()=default
 Default virtual destructor. More...
 
GridDiffusionSolver3operator= (const GridDiffusionSolver3 &)=delete
 Deleted copy assignment operator. More...
 
GridDiffusionSolver3operator= (GridDiffusionSolver3 &&) noexcept=delete
 Deleted move assignment operator. More...
 

Detailed Description

3-D grid-based backward Euler diffusion solver.

This class implements 3-D grid-based forward Euler diffusion solver using second-order central differencing spatially. Since the method is following the implicit time-integration (i.e. backward Euler), larger time interval or diffusion coefficient can be used without breaking the result. Note, higher values for those parameters will still impact the accuracy of the result. To solve the backward Euler method, a linear system solver is used and incomplete Cholesky conjugate gradient method is used by default.

Member Enumeration Documentation

◆ BoundaryType

Enumerator
Dirichlet 
Neumann 

Constructor & Destructor Documentation

◆ GridBackwardEulerDiffusionSolver3() [1/3]

CubbyFlow::GridBackwardEulerDiffusionSolver3::GridBackwardEulerDiffusionSolver3 ( BoundaryType  boundaryType = BoundaryType::Neumann)
explicit

Constructs the solver with given boundary type.

◆ GridBackwardEulerDiffusionSolver3() [2/3]

CubbyFlow::GridBackwardEulerDiffusionSolver3::GridBackwardEulerDiffusionSolver3 ( const GridBackwardEulerDiffusionSolver3 )
delete

Deleted copy constructor.

◆ GridBackwardEulerDiffusionSolver3() [3/3]

CubbyFlow::GridBackwardEulerDiffusionSolver3::GridBackwardEulerDiffusionSolver3 ( GridBackwardEulerDiffusionSolver3 &&  )
deletenoexcept

Deleted move constructor.

◆ ~GridBackwardEulerDiffusionSolver3()

CubbyFlow::GridBackwardEulerDiffusionSolver3::~GridBackwardEulerDiffusionSolver3 ( )
overridedefault

Default virtual destructor.

Member Function Documentation

◆ operator=() [1/2]

GridBackwardEulerDiffusionSolver3& CubbyFlow::GridBackwardEulerDiffusionSolver3::operator= ( const GridBackwardEulerDiffusionSolver3 )
delete

Deleted copy assignment operator.

◆ operator=() [2/2]

GridBackwardEulerDiffusionSolver3& CubbyFlow::GridBackwardEulerDiffusionSolver3::operator= ( GridBackwardEulerDiffusionSolver3 &&  )
deletenoexcept

Deleted move assignment operator.

◆ SetLinearSystemSolver()

void CubbyFlow::GridBackwardEulerDiffusionSolver3::SetLinearSystemSolver ( const FDMLinearSystemSolver3Ptr solver)

Sets the linear system solver for this diffusion solver.

◆ Solve() [1/3]

void CubbyFlow::GridBackwardEulerDiffusionSolver3::Solve ( const ScalarGrid3 source,
double  diffusionCoefficient,
double  timeIntervalInSeconds,
ScalarGrid3 dest,
const ScalarField3 boundarySDF = ConstantScalarField3{ std::numeric_limits< double >::max() },
const ScalarField3 fluidSDF = ConstantScalarField3{ -std::numeric_limits< double >::max() } 
)
overridevirtual

Solves diffusion equation for a scalar field.

Parameters
sourceInput scalar field.
diffusionCoefficientAmount of diffusion.
timeIntervalInSecondsSmall time-interval that diffusion occur.
destOutput scalar field.
boundarySDFShape of the solid boundary that is empty by default.
fluidSDFShape of the fluid boundary that is full by default.

Implements CubbyFlow::GridDiffusionSolver3.

◆ Solve() [2/3]

void CubbyFlow::GridBackwardEulerDiffusionSolver3::Solve ( const CollocatedVectorGrid3 source,
double  diffusionCoefficient,
double  timeIntervalInSeconds,
CollocatedVectorGrid3 dest,
const ScalarField3 boundarySDF = ConstantScalarField3{ std::numeric_limits< double >::max() },
const ScalarField3 fluidSDF = ConstantScalarField3{ -std::numeric_limits< double >::max() } 
)
overridevirtual

Solves diffusion equation for a collocated vector field.

Parameters
sourceInput collocated vector field.
diffusionCoefficientAmount of diffusion.
timeIntervalInSecondsSmall time-interval that diffusion occur.
destOutput collocated vector field.
boundarySDFShape of the solid boundary that is empty by default.
fluidSDFShape of the fluid boundary that is full by default.

Implements CubbyFlow::GridDiffusionSolver3.

◆ Solve() [3/3]

void CubbyFlow::GridBackwardEulerDiffusionSolver3::Solve ( const FaceCenteredGrid3 source,
double  diffusionCoefficient,
double  timeIntervalInSeconds,
FaceCenteredGrid3 dest,
const ScalarField3 boundarySDF = ConstantScalarField3{ std::numeric_limits< double >::max() },
const ScalarField3 fluidSDF = ConstantScalarField3{ -std::numeric_limits< double >::max() } 
)
overridevirtual

Solves diffusion equation for a face-centered vector field.

Parameters
sourceInput face-centered vector field.
diffusionCoefficientAmount of diffusion.
timeIntervalInSecondsSmall time-interval that diffusion occur.
destOutput face-centered vector field.
boundarySDFShape of the solid boundary that is empty by default.
fluidSDFShape of the fluid boundary that is full by default.

Implements CubbyFlow::GridDiffusionSolver3.


The documentation for this class was generated from the following file: