Jet
v1.3.3
|
2-D grid-based backward Euler diffusion solver. More...
#include <jet/grid_backward_euler_diffusion_solver2.h>
Public Types | |
enum | BoundaryType { Dirichlet, Neumann } |
Public Member Functions | |
GridBackwardEulerDiffusionSolver2 (BoundaryType boundaryType=Neumann) | |
Constructs the solver with given boundary type. More... | |
void | solve (const ScalarGrid2 &source, double diffusionCoefficient, double timeIntervalInSeconds, ScalarGrid2 *dest, const ScalarField2 &boundarySdf=ConstantScalarField2(kMaxD), const ScalarField2 &fluidSdf=ConstantScalarField2(-kMaxD)) override |
void | solve (const CollocatedVectorGrid2 &source, double diffusionCoefficient, double timeIntervalInSeconds, CollocatedVectorGrid2 *dest, const ScalarField2 &boundarySdf=ConstantScalarField2(kMaxD), const ScalarField2 &fluidSdf=ConstantScalarField2(-kMaxD)) override |
void | solve (const FaceCenteredGrid2 &source, double diffusionCoefficient, double timeIntervalInSeconds, FaceCenteredGrid2 *dest, const ScalarField2 &boundarySdf=ConstantScalarField2(kMaxD), const ScalarField2 &fluidSdf=ConstantScalarField2(-kMaxD)) override |
void | setLinearSystemSolver (const FdmLinearSystemSolver2Ptr &solver) |
Sets the linear system solver for this diffusion solver. More... | |
![]() | |
GridDiffusionSolver2 () | |
Default constructor. More... | |
virtual | ~GridDiffusionSolver2 () |
Default destructor. More... | |
2-D grid-based backward Euler diffusion solver.
This class implements 2-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.
|
explicit |
Constructs the solver with given boundary type.
void jet::GridBackwardEulerDiffusionSolver2::setLinearSystemSolver | ( | const FdmLinearSystemSolver2Ptr & | solver | ) |
Sets the linear system solver for this diffusion solver.
|
overridevirtual |
Solves diffusion equation for a collocated vector field.
source | Input collocated vector field. |
diffusionCoefficient | Amount of diffusion. |
timeIntervalInSeconds | Small time-interval that diffusion occur. |
dest | Output collocated vector field. |
boundarySdf | Shape of the solid boundary that is empty by default. |
boundarySdf | Shape of the fluid boundary that is full by default. |
Implements jet::GridDiffusionSolver2.
|
overridevirtual |
Solves diffusion equation for a face-centered vector field.
source | Input face-centered vector field. |
diffusionCoefficient | Amount of diffusion. |
timeIntervalInSeconds | Small time-interval that diffusion occur. |
dest | Output face-centered vector field. |
boundarySdf | Shape of the solid boundary that is empty by default. |
boundarySdf | Shape of the fluid boundary that is full by default. |
Implements jet::GridDiffusionSolver2.
|
overridevirtual |
Solves diffusion equation for a scalar field.
source | Input scalar field. |
diffusionCoefficient | Amount of diffusion. |
timeIntervalInSeconds | Small time-interval that diffusion occur. |
dest | Output scalar field. |
boundarySdf | Shape of the solid boundary that is empty by default. |
boundarySdf | Shape of the fluid boundary that is full by default. |
Implements jet::GridDiffusionSolver2.