Jet  v1.3.3
grid_pressure_solver3.h
Go to the documentation of this file.
1 // Copyright (c) 2018 Doyub Kim
2 //
3 // I am making my contributions/submissions to this project solely in my
4 // personal capacity and am not conveying any rights to any intellectual
5 // property of any third parties.
6 
7 #ifndef INCLUDE_JET_GRID_PRESSURE_SOLVER3_H_
8 #define INCLUDE_JET_GRID_PRESSURE_SOLVER3_H_
9 
13 #include <jet/constants.h>
16 #include <jet/scalar_grid3.h>
17 #include <memory>
18 
19 namespace jet {
20 
30  public:
33 
36 
58  virtual void solve(
59  const FaceCenteredGrid3& input, double timeIntervalInSeconds,
60  FaceCenteredGrid3* output,
61  const ScalarField3& boundarySdf = ConstantScalarField3(kMaxD),
62  const VectorField3& boundaryVelocity = ConstantVectorField3({0, 0, 0}),
63  const ScalarField3& fluidSdf = ConstantScalarField3(-kMaxD),
64  bool useCompressed = false) = 0;
65 
74  const = 0;
75 };
76 
78 typedef std::shared_ptr<GridPressureSolver3> GridPressureSolver3Ptr;
79 
80 } // namespace jet
81 
82 #endif // INCLUDE_JET_GRID_PRESSURE_SOLVER3_H_
jet::GridPressureSolver3
Abstract base class for 3-D grid-based pressure solver.
Definition: grid_pressure_solver3.h:29
scalar_grid3.h
jet::ScalarField3
Abstract base class for 3-D scalar field.
Definition: scalar_field3.h:18
jet::GridPressureSolver3Ptr
std::shared_ptr< GridPressureSolver3 > GridPressureSolver3Ptr
Shared pointer type for the GridPressureSolver3.
Definition: grid_pressure_solver3.h:78
jet::GridPressureSolver3::~GridPressureSolver3
virtual ~GridPressureSolver3()
Default destructor.
jet::ConstantVectorField3
3-D constant vector field.
Definition: constant_vector_field3.h:16
grid_boundary_condition_solver3.h
jet
Definition: advection_solver2.h:18
jet::VectorField3
Abstract base class for 3-D vector field.
Definition: vector_field3.h:18
jet::GridPressureSolver3::solve
virtual void solve(const FaceCenteredGrid3 &input, double timeIntervalInSeconds, FaceCenteredGrid3 *output, const ScalarField3 &boundarySdf=ConstantScalarField3(kMaxD), const VectorField3 &boundaryVelocity=ConstantVectorField3({0, 0, 0}), const ScalarField3 &fluidSdf=ConstantScalarField3(-kMaxD), bool useCompressed=false)=0
Solves the pressure term and apply it to the velocity field.
jet::FaceCenteredGrid3
3-D face-centered (a.k.a MAC or staggered) grid.
Definition: face_centered_grid3.h:26
jet::ConstantScalarField3
3-D constant scalar field.
Definition: constant_scalar_field3.h:15
jet::GridPressureSolver3::GridPressureSolver3
GridPressureSolver3()
Default constructor.
jet::GridBoundaryConditionSolver3Ptr
std::shared_ptr< GridBoundaryConditionSolver3 > GridBoundaryConditionSolver3Ptr
Shared pointer type for the GridBoundaryConditionSolver3.
Definition: grid_boundary_condition_solver3.h:104
jet::kMaxD
constexpr double kMaxD
Max double.
Definition: constants.h:88
constant_scalar_field3.h
jet::GridPressureSolver3::suggestedBoundaryConditionSolver
virtual GridBoundaryConditionSolver3Ptr suggestedBoundaryConditionSolver() const =0
Returns the best boundary condition solver for this solver.
constants.h
face_centered_grid3.h
collocated_vector_grid3.h
constant_vector_field3.h