Jet  v1.3.3
Public Types | Public Member Functions | List of all members
jet::GridBackwardEulerDiffusionSolver3 Class Referencefinal

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

#include <jet/grid_backward_euler_diffusion_solver3.h>

Inheritance diagram for jet::GridBackwardEulerDiffusionSolver3:
jet::GridDiffusionSolver3

Public Types

enum  BoundaryType { Dirichlet, Neumann }
 

Public Member Functions

 GridBackwardEulerDiffusionSolver3 (BoundaryType boundaryType=Neumann)
 Constructs the solver with given boundary type. More...
 
void solve (const ScalarGrid3 &source, double diffusionCoefficient, double timeIntervalInSeconds, ScalarGrid3 *dest, const ScalarField3 &boundarySdf=ConstantScalarField3(kMaxD), const ScalarField3 &fluidSdf=ConstantScalarField3(-kMaxD)) override
 
void solve (const CollocatedVectorGrid3 &source, double diffusionCoefficient, double timeIntervalInSeconds, CollocatedVectorGrid3 *dest, const ScalarField3 &boundarySdf=ConstantScalarField3(kMaxD), const ScalarField3 &fluidSdf=ConstantScalarField3(-kMaxD)) override
 
void solve (const FaceCenteredGrid3 &source, double diffusionCoefficient, double timeIntervalInSeconds, FaceCenteredGrid3 *dest, const ScalarField3 &boundarySdf=ConstantScalarField3(kMaxD), const ScalarField3 &fluidSdf=ConstantScalarField3(-kMaxD)) override
 
void setLinearSystemSolver (const FdmLinearSystemSolver3Ptr &solver)
 Sets the linear system solver for this diffusion solver. More...
 
- Public Member Functions inherited from jet::GridDiffusionSolver3
 GridDiffusionSolver3 ()
 Default constructor. More...
 
virtual ~GridDiffusionSolver3 ()
 Default destructor. 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()

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

Constructs the solver with given boundary type.

Member Function Documentation

◆ setLinearSystemSolver()

void jet::GridBackwardEulerDiffusionSolver3::setLinearSystemSolver ( const FdmLinearSystemSolver3Ptr solver)

Sets the linear system solver for this diffusion solver.

◆ solve() [1/3]

void jet::GridBackwardEulerDiffusionSolver3::solve ( const CollocatedVectorGrid3 source,
double  diffusionCoefficient,
double  timeIntervalInSeconds,
CollocatedVectorGrid3 dest,
const ScalarField3 boundarySdf = ConstantScalarField3(kMaxD),
const ScalarField3 fluidSdf = ConstantScalarField3(-kMaxD) 
)
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.
boundarySdfShape of the fluid boundary that is full by default.

Implements jet::GridDiffusionSolver3.

◆ solve() [2/3]

void jet::GridBackwardEulerDiffusionSolver3::solve ( const FaceCenteredGrid3 source,
double  diffusionCoefficient,
double  timeIntervalInSeconds,
FaceCenteredGrid3 dest,
const ScalarField3 boundarySdf = ConstantScalarField3(kMaxD),
const ScalarField3 fluidSdf = ConstantScalarField3(-kMaxD) 
)
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.
boundarySdfShape of the fluid boundary that is full by default.

Implements jet::GridDiffusionSolver3.

◆ solve() [3/3]

void jet::GridBackwardEulerDiffusionSolver3::solve ( const ScalarGrid3 source,
double  diffusionCoefficient,
double  timeIntervalInSeconds,
ScalarGrid3 dest,
const ScalarField3 boundarySdf = ConstantScalarField3(kMaxD),
const ScalarField3 fluidSdf = ConstantScalarField3(-kMaxD) 
)
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.
boundarySdfShape of the fluid boundary that is full by default.

Implements jet::GridDiffusionSolver3.


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