GridPressureSolver3.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: GridPressureSolver3.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: Abstract base class for 3-D grid-based pressure solver.
6 > Created Time: 2017/08/10
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 #ifndef CUBBYFLOW_GRID_PRESSURE_SOLVER3_H
10 #define CUBBYFLOW_GRID_PRESSURE_SOLVER3_H
11 
16 
17 namespace CubbyFlow
18 {
28  {
29  public:
32 
34  virtual ~GridPressureSolver3();
35 
58  virtual void Solve(
59  const FaceCenteredGrid3& input,
60  double timeIntervalInSeconds,
61  FaceCenteredGrid3* output,
62  const ScalarField3& boundarySDF = ConstantScalarField3(std::numeric_limits<double>::max()),
63  const VectorField3& boundaryVelocity = ConstantVectorField3({ 0, 0, 0 }),
64  const ScalarField3& fluidSDF = ConstantScalarField3(-std::numeric_limits<double>::max()),
65  bool useCompressed = false) = 0;
66 
75  };
76 
78  using GridPressureSolver3Ptr = std::shared_ptr<GridPressureSolver3>;
79 }
80 
81 #endif
virtual void Solve(const FaceCenteredGrid3 &input, double timeIntervalInSeconds, FaceCenteredGrid3 *output, const ScalarField3 &boundarySDF=ConstantScalarField3(std::numeric_limits< double >::max()), const VectorField3 &boundaryVelocity=ConstantVectorField3({ 0, 0, 0 }), const ScalarField3 &fluidSDF=ConstantScalarField3(-std::numeric_limits< double >::max()), bool useCompressed=false)=0
Solves the pressure term and apply it to the velocity field.
3-D constant vector field.
Definition: ConstantVectorField3.h:17
std::shared_ptr< GridPressureSolver3 > GridPressureSolver3Ptr
Shared pointer type for the GridPressureSolver3.
Definition: GridPressureSolver3.h:78
std::shared_ptr< GridBoundaryConditionSolver3 > GridBoundaryConditionSolver3Ptr
Shared pointer type for the GridBoundaryConditionSolver3.
Definition: GridBoundaryConditionSolver3.h:104
3-D face-centered (a.k.a MAC or staggered) grid.
Definition: FaceCenteredGrid3.h:25
virtual ~GridPressureSolver3()
Default destructor.
Definition: pybind11Utils.h:24
3-D constant scalar field.
Definition: ConstantScalarField3.h:17
Abstract base class for 3-D vector field.
Definition: VectorField3.h:21
Abstract base class for 3-D scalar field.
Definition: ScalarField3.h:21
Abstract base class for 2-D grid-based pressure solver.
Definition: GridPressureSolver3.h:27
GridPressureSolver3()
Default constructor.
virtual GridBoundaryConditionSolver3Ptr SuggestedBoundaryConditionSolver() const =0
Returns the best boundary condition solver for this solver.