Jet  v1.3.3
Public Member Functions | List of all members
jet::GridPressureSolver3 Class Referenceabstract

Abstract base class for 3-D grid-based pressure solver. More...

#include <jet/grid_pressure_solver3.h>

Inheritance diagram for jet::GridPressureSolver3:
jet::GridFractionalSinglePhasePressureSolver3 jet::GridSinglePhasePressureSolver3

Public Member Functions

 GridPressureSolver3 ()
 Default constructor. More...
 
virtual ~GridPressureSolver3 ()
 Default destructor. More...
 
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. More...
 
virtual GridBoundaryConditionSolver3Ptr suggestedBoundaryConditionSolver () const =0
 Returns the best boundary condition solver for this solver. More...
 

Detailed Description

Abstract base class for 3-D grid-based pressure solver.

This class represents a 3-D grid-based pressure solver interface which can be used as a sub-step of GridFluidSolver3. Inheriting classes must implement the core GridPressureSolver3::solve function as well as the helper function GridPressureSolver3::suggestedBoundaryConditionSolver.

Constructor & Destructor Documentation

◆ GridPressureSolver3()

jet::GridPressureSolver3::GridPressureSolver3 ( )

Default constructor.

◆ ~GridPressureSolver3()

virtual jet::GridPressureSolver3::~GridPressureSolver3 ( )
virtual

Default destructor.

Member Function Documentation

◆ solve()

virtual void jet::GridPressureSolver3::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 
)
pure virtual

Solves the pressure term and apply it to the velocity field.

This function takes input velocity field and outputs pressure-applied velocity field. It also accepts extra arguments such as boundarySdf and fluidSdf that represent signed-distance representation of the boundary and fluid area. The negative region of boundarySdf means it is occupied by solid object. Also, the positive / negative area of the fluidSdf means it is occupied by fluid / atmosphere. If not specified, constant scalar field with kMaxD will be used for boundarySdf meaning that no boundary at all. Similarly, a constant field with -kMaxD will be used for fluidSdf which means it's fully occupied with fluid without any atmosphere.

Parameters
[in]inputThe input velocity field.
[in]timeIntervalInSecondsThe time interval for the sim.
[in,out]outputThe output velocity field.
[in]boundarySdfThe SDF of the boundary.
[in]fluidSdfThe SDF of the fluid/atmosphere.
[in]useCompressedTrue if it uses compressed system.

Implemented in jet::GridFractionalSinglePhasePressureSolver3, and jet::GridSinglePhasePressureSolver3.

◆ suggestedBoundaryConditionSolver()

virtual GridBoundaryConditionSolver3Ptr jet::GridPressureSolver3::suggestedBoundaryConditionSolver ( ) const
pure virtual

Returns the best boundary condition solver for this solver.

This function returns the best boundary condition solver that works well with this pressure solver. Depending on the pressure solver implementation, different boundary condition solver might be used.

Implemented in jet::GridFractionalSinglePhasePressureSolver3, and jet::GridSinglePhasePressureSolver3.


The documentation for this class was generated from the following file: