Abstract base class for 2-D boundary condition solver for grids. More...
#include <Core/Solver/Grid/GridBoundaryConditionSolver2.hpp>
Public Member Functions | |
GridBoundaryConditionSolver2 ()=default | |
Default constructor. More... | |
GridBoundaryConditionSolver2 (const GridBoundaryConditionSolver2 &)=delete | |
Deleted copy constructor. More... | |
GridBoundaryConditionSolver2 (GridBoundaryConditionSolver2 &&) noexcept=delete | |
Deleted move constructor. More... | |
virtual | ~GridBoundaryConditionSolver2 ()=default |
Default virtual destructor. More... | |
GridBoundaryConditionSolver2 & | operator= (const GridBoundaryConditionSolver2 &)=delete |
Deleted copy assignment operator. More... | |
GridBoundaryConditionSolver2 & | operator= (GridBoundaryConditionSolver2 &&) noexcept=delete |
Deleted move assignment operator. More... | |
const Collider2Ptr & | GetCollider () const |
Returns associated collider. More... | |
void | UpdateCollider (const Collider2Ptr &newCollider, const Vector2UZ &gridSize, const Vector2D &gridSpacing, const Vector2D &gridOrigin) |
Applies new collider and build the internals. More... | |
int | GetClosedDomainBoundaryFlag () const |
Returns the closed domain boundary flag. More... | |
void | SetClosedDomainBoundaryFlag (int flag) |
Sets the closed domain boundary flag. More... | |
virtual void | ConstrainVelocity (FaceCenteredGrid2 *velocity, unsigned int extrapolationDepth=5)=0 |
virtual ScalarField2Ptr | GetColliderSDF () const =0 |
Returns the signed distance field of the collider. More... | |
virtual VectorField2Ptr | GetColliderVelocityField () const =0 |
Returns the velocity field of the collider. More... | |
Protected Member Functions | |
virtual void | OnColliderUpdated (const Vector2UZ &gridSize, const Vector2D &gridSpacing, const Vector2D &gridOrigin)=0 |
Invoked when a new collider is set. More... | |
const Vector2UZ & | GetGridSize () const |
Returns the size of the velocity grid to be constrained. More... | |
const Vector2D & | GetGridSpacing () const |
Returns the spacing of the velocity grid to be constrained. More... | |
const Vector2D & | GetGridOrigin () const |
Returns the origin of the velocity grid to be constrained. More... | |
Detailed Description
Abstract base class for 2-D boundary condition solver for grids.
This is a helper class to constrain the 2-D velocity field with given collider object. It also determines whether to open any domain boundaries. To control the friction level, tune the collider parameter.
Constructor & Destructor Documentation
◆ GridBoundaryConditionSolver2() [1/3]
|
default |
Default constructor.
◆ GridBoundaryConditionSolver2() [2/3]
|
delete |
Deleted copy constructor.
◆ GridBoundaryConditionSolver2() [3/3]
|
deletenoexcept |
Deleted move constructor.
◆ ~GridBoundaryConditionSolver2()
|
virtualdefault |
Default virtual destructor.
Member Function Documentation
◆ ConstrainVelocity()
|
pure virtual |
Constrains the velocity field to conform the collider boundary.
- Parameters
-
velocity Input and output velocity grid. extrapolationDepth Number of inner-collider grid cells that velocity will get extrapolated.
Implemented in CubbyFlow::GridFractionalBoundaryConditionSolver2, and CubbyFlow::GridBlockedBoundaryConditionSolver2.
◆ GetClosedDomainBoundaryFlag()
int CubbyFlow::GridBoundaryConditionSolver2::GetClosedDomainBoundaryFlag | ( | ) | const |
Returns the closed domain boundary flag.
◆ GetCollider()
const Collider2Ptr& CubbyFlow::GridBoundaryConditionSolver2::GetCollider | ( | ) | const |
Returns associated collider.
◆ GetColliderSDF()
|
pure virtual |
Returns the signed distance field of the collider.
Implemented in CubbyFlow::GridFractionalBoundaryConditionSolver2.
◆ GetColliderVelocityField()
|
pure virtual |
Returns the velocity field of the collider.
Implemented in CubbyFlow::GridFractionalBoundaryConditionSolver2.
◆ GetGridOrigin()
|
protected |
Returns the origin of the velocity grid to be constrained.
◆ GetGridSize()
|
protected |
Returns the size of the velocity grid to be constrained.
◆ GetGridSpacing()
|
protected |
Returns the spacing of the velocity grid to be constrained.
◆ OnColliderUpdated()
|
protectedpure virtual |
Invoked when a new collider is set.
Implemented in CubbyFlow::GridFractionalBoundaryConditionSolver2, and CubbyFlow::GridBlockedBoundaryConditionSolver2.
◆ operator=() [1/2]
|
delete |
Deleted copy assignment operator.
◆ operator=() [2/2]
|
deletenoexcept |
Deleted move assignment operator.
◆ SetClosedDomainBoundaryFlag()
void CubbyFlow::GridBoundaryConditionSolver2::SetClosedDomainBoundaryFlag | ( | int | flag | ) |
Sets the closed domain boundary flag.
◆ UpdateCollider()
void CubbyFlow::GridBoundaryConditionSolver2::UpdateCollider | ( | const Collider2Ptr & | newCollider, |
const Vector2UZ & | gridSize, | ||
const Vector2D & | gridSpacing, | ||
const Vector2D & | gridOrigin | ||
) |
Applies new collider and build the internals.
This function is called to apply new collider and build the internal cache. To provide a hint to the cache, info for the expected velocity grid that will be constrained is provided.
- Parameters
-
newCollider New collider to apply. gridSize Size of the velocity grid to be constrained. gridSpacing Grid spacing of the velocity grid to be constrained. gridOrigin Origin of the velocity grid to be constrained.
The documentation for this class was generated from the following file:
- Core/Solver/Grid/GridBoundaryConditionSolver2.hpp