CubbyFlow::GridDiffusionSolver3 Class Referenceabstract

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

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

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

Public Member Functions

 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...
 
virtual 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() })=0
 
virtual 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() })=0
 
virtual 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() })=0
 

Detailed Description

Abstract base class for 3-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

◆ GridDiffusionSolver3() [1/3]

CubbyFlow::GridDiffusionSolver3::GridDiffusionSolver3 ( )
default

Default constructor.

◆ GridDiffusionSolver3() [2/3]

CubbyFlow::GridDiffusionSolver3::GridDiffusionSolver3 ( const GridDiffusionSolver3 )
delete

Deleted copy constructor.

◆ GridDiffusionSolver3() [3/3]

CubbyFlow::GridDiffusionSolver3::GridDiffusionSolver3 ( GridDiffusionSolver3 &&  )
deletenoexcept

Deleted move constructor.

◆ ~GridDiffusionSolver3()

virtual CubbyFlow::GridDiffusionSolver3::~GridDiffusionSolver3 ( )
virtualdefault

Default virtual destructor.

Member Function Documentation

◆ operator=() [1/2]

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

Deleted copy assignment operator.

◆ operator=() [2/2]

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

Deleted move assignment operator.

◆ Solve() [1/3]

virtual void CubbyFlow::GridDiffusionSolver3::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() } 
)
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::GridBackwardEulerDiffusionSolver3, and CubbyFlow::GridForwardEulerDiffusionSolver3.

◆ Solve() [2/3]

virtual void CubbyFlow::GridDiffusionSolver3::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() } 
)
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::GridBackwardEulerDiffusionSolver3, and CubbyFlow::GridForwardEulerDiffusionSolver3.

◆ Solve() [3/3]

virtual void CubbyFlow::GridDiffusionSolver3::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() } 
)
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::GridBackwardEulerDiffusionSolver3, and CubbyFlow::GridForwardEulerDiffusionSolver3.


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