GridBlockedBoundaryConditionSolver2.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: GridBlockedBoundaryConditionSolver2.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: Blocked 2-D boundary condition solver for grids.
6 > Created Time: 2017/08/10
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 #ifndef CUBBYFLOW_GRID_BLOCKED_BOUNDARY_CONDITION_SOLVER2_H
10 #define CUBBYFLOW_GRID_BLOCKED_BOUNDARY_CONDITION_SOLVER2_H
11 
13 
14 namespace CubbyFlow
15 {
26  {
27  public:
30 
38  void ConstrainVelocity(
39  FaceCenteredGrid2* velocity,
40  unsigned int extrapolationDepth = 5) override;
41 
43  const Array2<char>& GetMarker() const;
44 
45  protected:
47  void OnColliderUpdated(
48  const Size2& gridSize,
49  const Vector2D& gridSpacing,
50  const Vector2D& gridOrigin) override;
51 
52  private:
53  Array2<char> m_marker;
54  };
55 
57  using GridBlockedBoundaryConditionSolver2Ptr = std::shared_ptr<GridBlockedBoundaryConditionSolver2>;
58 }
59 
60 #endif
2-D point class.
Definition: Point2.h:25
void OnColliderUpdated(const Size2 &gridSize, const Vector2D &gridSpacing, const Vector2D &gridOrigin) override
Invoked when a new collider is set.
void ConstrainVelocity(FaceCenteredGrid2 *velocity, unsigned int extrapolationDepth=5) override
const Array2< char > & GetMarker() const
Returns the marker which is 1 if occupied by the collider.
2-D face-centered (a.k.a MAC or staggered) grid.
Definition: FaceCenteredGrid2.h:25
Fractional 2-D boundary condition solver for grids.
Definition: GridFractionalBoundaryConditionSolver2.h:26
Definition: pybind11Utils.h:24
Blocked 2-D boundary condition solver for grids.
Definition: GridBlockedBoundaryConditionSolver2.h:25
GridBlockedBoundaryConditionSolver2()
Default constructor.
2-D vector class.
Definition: Vector2.h:26
2-D array class.
Definition: Array2.h:42
std::shared_ptr< GridBlockedBoundaryConditionSolver2 > GridBlockedBoundaryConditionSolver2Ptr
Shared pointer type for the GridBlockedBoundaryConditionSolver2.
Definition: GridBlockedBoundaryConditionSolver2.h:57