CubbyFlow::IterativeLevelSetSolver2 Class Referenceabstract

Abstract base class for 2-D PDE-based iterative level set solver. More...

#include <Core/Solver/LevelSet/IterativeLevelSetSolver2.h>

Inheritance diagram for CubbyFlow::IterativeLevelSetSolver2:
CubbyFlow::LevelSetSolver2 CubbyFlow::ENOLevelSetSolver2 CubbyFlow::UpwindLevelSetSolver2

Public Member Functions

 IterativeLevelSetSolver2 ()
 Default constructor. More...
 
virtual ~IterativeLevelSetSolver2 ()
 Default destructor. More...
 
void Reinitialize (const ScalarGrid2 &inputSDF, double maxDistance, ScalarGrid2 *outputSDF) override
 
void Extrapolate (const ScalarGrid2 &input, const ScalarField2 &sdf, double maxDistance, ScalarGrid2 *output) override
 
void Extrapolate (const CollocatedVectorGrid2 &input, const ScalarField2 &sdf, double maxDistance, CollocatedVectorGrid2 *output) override
 
void Extrapolate (const FaceCenteredGrid2 &input, const ScalarField2 &sdf, double maxDistance, FaceCenteredGrid2 *output) override
 
double GetMaxCFL () const
 Returns the maximum CFL limit. More...
 
void SetMaxCFL (double newMaxCfl)
 Sets the maximum CFL limit. More...
 
- Public Member Functions inherited from CubbyFlow::LevelSetSolver2
 LevelSetSolver2 ()
 Default constructor. More...
 
virtual ~LevelSetSolver2 ()
 Default destructor. More...
 

Protected Member Functions

virtual void GetDerivatives (ConstArrayAccessor2< double > grid, const Vector2D &gridSpacing, size_t i, size_t j, std::array< double, 2 > *dx, std::array< double, 2 > *dy) const =0
 Computes the derivatives for given grid point. More...
 

Detailed Description

Abstract base class for 2-D PDE-based iterative level set solver.

This class provides infrastructure for 2-D PDE-based iterative level set solver. Internally, the class implements upwind-style wave propagation and the inheriting classes must provide a way to compute the derivatives for given grid points.

See also
Osher, Stanley, and Ronald Fedkiw. Level set methods and dynamic implicit surfaces. Vol. 153. Springer Science & Business Media, 2006.

Constructor & Destructor Documentation

◆ IterativeLevelSetSolver2()

CubbyFlow::IterativeLevelSetSolver2::IterativeLevelSetSolver2 ( )

Default constructor.

◆ ~IterativeLevelSetSolver2()

virtual CubbyFlow::IterativeLevelSetSolver2::~IterativeLevelSetSolver2 ( )
virtual

Default destructor.

Member Function Documentation

◆ Extrapolate() [1/3]

void CubbyFlow::IterativeLevelSetSolver2::Extrapolate ( const ScalarGrid2 input,
const ScalarField2 sdf,
double  maxDistance,
ScalarGrid2 output 
)
overridevirtual

Extrapolates given scalar field from negative to positive SDF region.

Parameters
inputInput scalar field to be extrapolated.
sdfReference signed-distance field.
maxDistanceMax range of extrapolation.
outputOutput scalar field.

Implements CubbyFlow::LevelSetSolver2.

◆ Extrapolate() [2/3]

void CubbyFlow::IterativeLevelSetSolver2::Extrapolate ( const CollocatedVectorGrid2 input,
const ScalarField2 sdf,
double  maxDistance,
CollocatedVectorGrid2 output 
)
overridevirtual

Extrapolates given collocated vector field from negative to positive SDF region.

Parameters
inputInput collocated vector field to be extrapolated.
sdfReference signed-distance field.
maxDistanceMax range of extrapolation.
outputOutput collocated vector field.

Implements CubbyFlow::LevelSetSolver2.

◆ Extrapolate() [3/3]

void CubbyFlow::IterativeLevelSetSolver2::Extrapolate ( const FaceCenteredGrid2 input,
const ScalarField2 sdf,
double  maxDistance,
FaceCenteredGrid2 output 
)
overridevirtual

Extrapolates given face-centered vector field from negative to positive SDF region.

Parameters
inputInput face-centered field to be extrapolated.
sdfReference signed-distance field.
maxDistanceMax range of extrapolation.
outputOutput face-centered vector field.

Implements CubbyFlow::LevelSetSolver2.

◆ GetDerivatives()

virtual void CubbyFlow::IterativeLevelSetSolver2::GetDerivatives ( ConstArrayAccessor2< double >  grid,
const Vector2D gridSpacing,
size_t  i,
size_t  j,
std::array< double, 2 > *  dx,
std::array< double, 2 > *  dy 
) const
protectedpure virtual

Computes the derivatives for given grid point.

Implemented in CubbyFlow::ENOLevelSetSolver2, and CubbyFlow::UpwindLevelSetSolver2.

◆ GetMaxCFL()

double CubbyFlow::IterativeLevelSetSolver2::GetMaxCFL ( ) const

Returns the maximum CFL limit.

◆ Reinitialize()

void CubbyFlow::IterativeLevelSetSolver2::Reinitialize ( const ScalarGrid2 inputSDF,
double  maxDistance,
ScalarGrid2 outputSDF 
)
overridevirtual

Reinitializes given scalar field to signed-distance field.

Parameters
inputSDFInput signed-distance field which can be distorted.
maxDistanceMax range of reinitialization.
outputSDFOutput signed-distance field.

Implements CubbyFlow::LevelSetSolver2.

◆ SetMaxCFL()

void CubbyFlow::IterativeLevelSetSolver2::SetMaxCFL ( double  newMaxCfl)

Sets the maximum CFL limit.

This function sets the maximum CFL limit for the internal upwind-style PDE calculation. The negative input will be clamped to 0.


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