GridBoundaryConditionSolver2.h
Go to the documentation of this file.
GridBoundaryConditionSolver2()
Default constructor.
virtual void OnColliderUpdated(const Size2 &gridSize, const Vector2D &gridSpacing, const Vector2D &gridOrigin)=0
Invoked when a new collider is set.
Abstract base class for 2-D boundary condition solver for grids.
Definition: GridBoundaryConditionSolver2.h:26
virtual ~GridBoundaryConditionSolver2()
Default destructor.
std::shared_ptr< Collider2 > Collider2Ptr
Shared pointer type for the Collider2.
Definition: Collider2.h:112
virtual void ConstrainVelocity(FaceCenteredGrid2 *velocity, unsigned int extrapolationDepth=5)=0
virtual ScalarField2Ptr GetColliderSDF() const =0
Returns the signed distance field of the collider.
std::shared_ptr< GridBoundaryConditionSolver2 > GridBoundaryConditionSolver2Ptr
Shared pointer type for the GridBoundaryConditionSolver2.
Definition: GridBoundaryConditionSolver2.h:104
std::shared_ptr< ScalarField2 > ScalarField2Ptr
Shared pointer for the ScalarField2 type.
Definition: ScalarField2.h:44
const Vector2D & GetGridOrigin() const
Returns the origin of the velocity grid to be constrained.
2-D face-centered (a.k.a MAC or staggered) grid.
Definition: FaceCenteredGrid2.h:25
Definition: pybind11Utils.h:24
virtual VectorField2Ptr GetColliderVelocityField() const =0
Returns the velocity field of the collider.
std::shared_ptr< VectorField2 > VectorField2Ptr
Shared pointer for the VectorField2 type.
Definition: VectorField2.h:44
const Collider2Ptr & GetCollider() const
Returns associated collider.
void UpdateCollider(const Collider2Ptr &newCollider, const Size2 &gridSize, const Vector2D &gridSpacing, const Vector2D &gridOrigin)
Applies new collider and build the internals.
const Vector2D & GetGridSpacing() const
Returns the spacing of the velocity grid to be constrained.
int GetClosedDomainBoundaryFlag() const
Returns the closed domain boundary flag.
const Size2 & GetGridSize() const
Returns the size of the velocity grid to be constrained.
void SetClosedDomainBoundaryFlag(int flag)
Sets the closed domain boundary flag.