GridFractionalBoundaryConditionSolver3.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: GridFractionalBoundaryConditionSolver3.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: Fractional 3-D boundary condition solver for grids.
6 > Created Time: 2017/08/09
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 #ifndef CUBBYFLOW_GRID_FRACTIONAL_BOUNDARY_CONDITION_SOLVER3_H
10 #define CUBBYFLOW_GRID_FRACTIONAL_BOUNDARY_CONDITION_SOLVER3_H
11 
15 
16 namespace CubbyFlow
17 {
27  {
28  public:
31 
34 
42  void ConstrainVelocity(
43  FaceCenteredGrid3* velocity,
44  unsigned int extrapolationDepth = 5) override;
45 
47  ScalarField3Ptr GetColliderSDF() const override;
48 
51 
52  protected:
54  void OnColliderUpdated(
55  const Size3& gridSize,
56  const Vector3D& gridSpacing,
57  const Vector3D& gridOrigin) override;
58 
59  private:
60  CellCenteredScalarGrid3Ptr m_colliderSDF;
61  CustomVectorField3Ptr m_colliderVel;
62  };
63 
65  using GridFractionalBoundaryConditionSolver3Ptr = std::shared_ptr<GridFractionalBoundaryConditionSolver3>;
66 }
67 
68 #endif
3-D vector class.
Definition: Vector3.h:26
std::shared_ptr< CustomVectorField3 > CustomVectorField3Ptr
Shared pointer type for the CustomVectorField3.
Definition: CustomVectorField3.h:76
std::shared_ptr< CellCenteredScalarGrid3 > CellCenteredScalarGrid3Ptr
Shared pointer for the CellCenteredScalarGrid3 type.
Definition: CellCenteredScalarGrid3.h:83
std::shared_ptr< GridFractionalBoundaryConditionSolver3 > GridFractionalBoundaryConditionSolver3Ptr
Shared pointer type for the GridFractionalBoundaryConditionSolver3.
Definition: GridFractionalBoundaryConditionSolver3.h:65
GridFractionalBoundaryConditionSolver3()
Default constructor.
Fractional 3-D boundary condition solver for grids.
Definition: GridFractionalBoundaryConditionSolver3.h:26
std::shared_ptr< ScalarField3 > ScalarField3Ptr
Shared pointer for the ScalarField3 type.
Definition: ScalarField3.h:44
ScalarField3Ptr GetColliderSDF() const override
Returns the signed distance field of the collider.
Abstract base class for 3-D boundary condition solver for grids.
Definition: GridBoundaryConditionSolver3.h:26
std::shared_ptr< VectorField3 > VectorField3Ptr
Shared pointer for the VectorField3 type.
Definition: VectorField3.h:44
3-D face-centered (a.k.a MAC or staggered) grid.
Definition: FaceCenteredGrid3.h:25
3-D point class.
Definition: Point3.h:26
void ConstrainVelocity(FaceCenteredGrid3 *velocity, unsigned int extrapolationDepth=5) override
Definition: pybind11Utils.h:24
void OnColliderUpdated(const Size3 &gridSize, const Vector3D &gridSpacing, const Vector3D &gridOrigin) override
Invoked when a new collider is set.
VectorField3Ptr GetColliderVelocityField() const override
Returns the velocity field of the collider.
virtual ~GridFractionalBoundaryConditionSolver3()
Default destructor.