CubbyFlow::GridForwardEulerDiffusionSolver2 Class Referencefinal

2-D grid-based forward Euler diffusion solver. More...

#include <Core/Solver/Grid/GridForwardEulerDiffusionSolver2.h>

Inheritance diagram for CubbyFlow::GridForwardEulerDiffusionSolver2:
CubbyFlow::GridDiffusionSolver2

Public Member Functions

 GridForwardEulerDiffusionSolver2 ()
 Default constructor. More...
 
void Solve (const ScalarGrid2 &source, double diffusionCoefficient, double timeIntervalInSeconds, ScalarGrid2 *dest, const ScalarField2 &boundarySDF=ConstantScalarField2(std::numeric_limits< double >::max()), const ScalarField2 &fluidSDF=ConstantScalarField2(-std::numeric_limits< double >::max())) override
 
void Solve (const CollocatedVectorGrid2 &source, double diffusionCoefficient, double timeIntervalInSeconds, CollocatedVectorGrid2 *dest, const ScalarField2 &boundarySDF=ConstantScalarField2(std::numeric_limits< double >::max()), const ScalarField2 &fluidSDF=ConstantScalarField2(-std::numeric_limits< double >::max())) override
 
void Solve (const FaceCenteredGrid2 &source, double diffusionCoefficient, double timeIntervalInSeconds, FaceCenteredGrid2 *dest, const ScalarField2 &boundarySDF=ConstantScalarField2(std::numeric_limits< double >::max()), const ScalarField2 &fluidSDF=ConstantScalarField2(-std::numeric_limits< double >::max())) override
 
- Public Member Functions inherited from CubbyFlow::GridDiffusionSolver2
 GridDiffusionSolver2 ()
 Default constructor. More...
 
virtual ~GridDiffusionSolver2 ()
 Default destructor. More...
 

Detailed Description

2-D grid-based forward Euler diffusion solver.

This class implements 2-D grid-based forward Euler diffusion solver using second-order central differencing spatially. Since the method is relying on explicit time-integration (i.e. forward Euler), the diffusion coefficient is limited by the time interval and grid spacing such as: $\mu < \frac{h}{8\Delta t} $ where $\mu$, $h$, and $\Delta t$ are the diffusion coefficient, grid spacing, and time interval, respectively.

Constructor & Destructor Documentation

◆ GridForwardEulerDiffusionSolver2()

CubbyFlow::GridForwardEulerDiffusionSolver2::GridForwardEulerDiffusionSolver2 ( )

Default constructor.

Member Function Documentation

◆ Solve() [1/3]

void CubbyFlow::GridForwardEulerDiffusionSolver2::Solve ( const ScalarGrid2 source,
double  diffusionCoefficient,
double  timeIntervalInSeconds,
ScalarGrid2 dest,
const ScalarField2 boundarySDF = ConstantScalarField2(std::numeric_limits< double >::max()),
const ScalarField2 fluidSDF = ConstantScalarField2(-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::GridDiffusionSolver2.

◆ Solve() [2/3]

void CubbyFlow::GridForwardEulerDiffusionSolver2::Solve ( const CollocatedVectorGrid2 source,
double  diffusionCoefficient,
double  timeIntervalInSeconds,
CollocatedVectorGrid2 dest,
const ScalarField2 boundarySDF = ConstantScalarField2(std::numeric_limits< double >::max()),
const ScalarField2 fluidSDF = ConstantScalarField2(-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::GridDiffusionSolver2.

◆ Solve() [3/3]

void CubbyFlow::GridForwardEulerDiffusionSolver2::Solve ( const FaceCenteredGrid2 source,
double  diffusionCoefficient,
double  timeIntervalInSeconds,
FaceCenteredGrid2 dest,
const ScalarField2 boundarySDF = ConstantScalarField2(std::numeric_limits< double >::max()),
const ScalarField2 fluidSDF = ConstantScalarField2(-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::GridDiffusionSolver2.


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