CubbyFlow::GridDiffusionSolver2 Class Referenceabstract

Abstract base class for 2-D grid-based diffusion equation solver. More...

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

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

Public Member Functions

 GridDiffusionSolver2 ()
 Default constructor. More...
 
virtual ~GridDiffusionSolver2 ()
 Default destructor. More...
 
virtual 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()))=0
 
virtual 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()))=0
 
virtual 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()))=0
 

Detailed Description

Abstract base class for 2-D grid-based diffusion equation solver.

This class provides functions to solve the diffusion equation for different types of fields. The target equation can be written as $\frac{\partial f}{\partial t} = \mu\nabla^2 f$ where $\mu$ is the diffusion coefficient. The field $f$ can be either scalar or vector field.

Constructor & Destructor Documentation

◆ GridDiffusionSolver2()

CubbyFlow::GridDiffusionSolver2::GridDiffusionSolver2 ( )

Default constructor.

◆ ~GridDiffusionSolver2()

virtual CubbyFlow::GridDiffusionSolver2::~GridDiffusionSolver2 ( )
virtual

Default destructor.

Member Function Documentation

◆ Solve() [1/3]

virtual void CubbyFlow::GridDiffusionSolver2::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()) 
)
pure virtual

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.

Implemented in CubbyFlow::GridBackwardEulerDiffusionSolver2, and CubbyFlow::GridForwardEulerDiffusionSolver2.

◆ Solve() [2/3]

virtual void CubbyFlow::GridDiffusionSolver2::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()) 
)
pure virtual

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.

Implemented in CubbyFlow::GridBackwardEulerDiffusionSolver2, and CubbyFlow::GridForwardEulerDiffusionSolver2.

◆ Solve() [3/3]

virtual void CubbyFlow::GridDiffusionSolver2::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()) 
)
pure virtual

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.

Implemented in CubbyFlow::GridBackwardEulerDiffusionSolver2, and CubbyFlow::GridForwardEulerDiffusionSolver2.


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