Jet  v1.3.3
grid_pressure_solver2.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_SOLVER2_H_
8 #define INCLUDE_JET_GRID_PRESSURE_SOLVER2_H_
9 
13 #include <jet/constants.h>
16 #include <jet/scalar_grid2.h>
17 #include <memory>
18 
19 namespace jet {
20 
30  public:
33 
36 
58  virtual void solve(
59  const FaceCenteredGrid2& input, double timeIntervalInSeconds,
60  FaceCenteredGrid2* output,
61  const ScalarField2& boundarySdf = ConstantScalarField2(kMaxD),
62  const VectorField2& boundaryVelocity = ConstantVectorField2({0, 0}),
63  const ScalarField2& fluidSdf = ConstantScalarField2(-kMaxD),
64  bool useCompressed = false) = 0;
65 
74  const = 0;
75 };
76 
78 typedef std::shared_ptr<GridPressureSolver2> GridPressureSolver2Ptr;
79 
80 } // namespace jet
81 
82 #endif // INCLUDE_JET_GRID_PRESSURE_SOLVER2_H_
jet::GridPressureSolver2::~GridPressureSolver2
virtual ~GridPressureSolver2()
Default destructor.
jet::ScalarField2
Abstract base class for 2-D scalar field.
Definition: scalar_field2.h:18
grid_boundary_condition_solver2.h
constant_scalar_field2.h
jet::FaceCenteredGrid2
2-D face-centered (a.k.a MAC or staggered) grid.
Definition: face_centered_grid2.h:26
jet::GridPressureSolver2::solve
virtual void solve(const FaceCenteredGrid2 &input, double timeIntervalInSeconds, FaceCenteredGrid2 *output, const ScalarField2 &boundarySdf=ConstantScalarField2(kMaxD), const VectorField2 &boundaryVelocity=ConstantVectorField2({0, 0}), const ScalarField2 &fluidSdf=ConstantScalarField2(-kMaxD), bool useCompressed=false)=0
Solves the pressure term and apply it to the velocity field.
jet
Definition: advection_solver2.h:18
jet::ConstantScalarField2
2-D constant scalar field.
Definition: constant_scalar_field2.h:15
jet::GridPressureSolver2
Abstract base class for 2-D grid-based pressure solver.
Definition: grid_pressure_solver2.h:29
constant_vector_field2.h
collocated_vector_grid2.h
jet::GridPressureSolver2::GridPressureSolver2
GridPressureSolver2()
Default constructor.
jet::kMaxD
constexpr double kMaxD
Max double.
Definition: constants.h:88
face_centered_grid2.h
jet::GridPressureSolver2::suggestedBoundaryConditionSolver
virtual GridBoundaryConditionSolver2Ptr suggestedBoundaryConditionSolver() const =0
Returns the best boundary condition solver for this solver.
scalar_grid2.h
constants.h
jet::GridPressureSolver2Ptr
std::shared_ptr< GridPressureSolver2 > GridPressureSolver2Ptr
Shared pointer type for the GridPressureSolver2.
Definition: grid_pressure_solver2.h:78
jet::GridBoundaryConditionSolver2Ptr
std::shared_ptr< GridBoundaryConditionSolver2 > GridBoundaryConditionSolver2Ptr
Shared pointer type for the GridBoundaryConditionSolver2.
Definition: grid_boundary_condition_solver2.h:104
jet::VectorField2
Abstract base class for 2-D vector field.
Definition: vector_field2.h:18
jet::ConstantVectorField2
2-D constant vector field.
Definition: constant_vector_field2.h:16