Go to the documentation of this file.
7 #ifndef INCLUDE_JET_GRID_BOUNDARY_CONDITION_SOLVER2_H_
8 #define INCLUDE_JET_GRID_BOUNDARY_CONDITION_SOLVER2_H_
70 unsigned int extrapolationDepth = 5) = 0;
103 typedef std::shared_ptr<GridBoundaryConditionSolver2>
108 #endif // INCLUDE_JET_GRID_BOUNDARY_CONDITION_SOLVER2_H_
const Vector2D & gridOrigin() const
Returns the origin of the velocity grid to be constrained.
Abstract base class for 2-D boundary condition solver for grids.
Definition: grid_boundary_condition_solver2.h:26
void setClosedDomainBoundaryFlag(int flag)
Sets the closed domain boundary flag.
const Collider2Ptr & collider() const
Returns associated collider.
constexpr int kDirectionAll
All direction.
Definition: constants.h:333
2-D face-centered (a.k.a MAC or staggered) grid.
Definition: face_centered_grid2.h:26
const Size2 & gridSize() const
Returns the size of the velocity grid to be constrained.
virtual ScalarField2Ptr colliderSdf() const =0
Returns the signed distance field of the collider.
Definition: advection_solver2.h:18
std::shared_ptr< ScalarField2 > ScalarField2Ptr
Shared pointer for the ScalarField2 type.
Definition: scalar_field2.h:40
const Vector2D & gridSpacing() const
Returns the spacing of the velocity grid to be constrained.
virtual void onColliderUpdated(const Size2 &gridSize, const Vector2D &gridSpacing, const Vector2D &gridOrigin)=0
Invoked when a new collider is set.
virtual ~GridBoundaryConditionSolver2()
Default destructor.
2-D vector class.
Definition: vector2.h:24
std::shared_ptr< Collider2 > Collider2Ptr
Shared pointer type for the Collider2.
Definition: collider2.h:118
GridBoundaryConditionSolver2()
Default constructor.
2-D size class.
Definition: size2.h:19
int closedDomainBoundaryFlag() const
Returns the closed domain boundary flag.
std::shared_ptr< VectorField2 > VectorField2Ptr
Shared pointer for the VectorField2 type.
Definition: vector_field2.h:40
void updateCollider(const Collider2Ptr &newCollider, const Size2 &gridSize, const Vector2D &gridSpacing, const Vector2D &gridOrigin)
Applies new collider and build the internals.
virtual void constrainVelocity(FaceCenteredGrid2 *velocity, unsigned int extrapolationDepth=5)=0
std::shared_ptr< GridBoundaryConditionSolver2 > GridBoundaryConditionSolver2Ptr
Shared pointer type for the GridBoundaryConditionSolver2.
Definition: grid_boundary_condition_solver2.h:104
virtual VectorField2Ptr colliderVelocityField() const =0
Returns the velocity field of the collider.