Go to the documentation of this file.
7 #ifndef INCLUDE_JET_LEVEL_SET_LIQUID_SOLVER2_H_
8 #define INCLUDE_JET_LEVEL_SET_LIQUID_SOLVER2_H_
100 size_t _signedDistanceFieldId;
102 double _minReinitializeDistance = 10.0;
103 bool _isGlobalCompensationEnabled =
false;
104 double _lastKnownVolume = 0.0;
106 void reinitialize(
double currentCfl);
108 void extrapolateVelocityToAir(
double currentCfl);
110 void addVolume(
double volDiff);
132 #endif // INCLUDE_JET_LEVEL_SET_LIQUID_SOLVER2_H_
ScalarField2Ptr fluidSdf() const override
Returns fluid region as a signed-distance field.
static Builder builder()
Returns builder fox LevelSetLiquidSolver2.
LevelSetLiquidSolver2Ptr makeShared() const
Builds shared pointer of LevelSetLiquidSolver2 instance.
Vector2D gridSpacing() const
Returns the grid spacing of the grid system data.
ScalarGrid2Ptr signedDistanceField() const
Returns signed-distance field.
Front-end to create LevelSetLiquidSolver2 objects step by step.
Definition: level_set_liquid_solver2.h:121
LevelSetLiquidSolver2 build() const
Builds LevelSetLiquidSolver2.
std::shared_ptr< LevelSetSolver2 > LevelSetSolver2Ptr
Shared pointer type for the LevelSetSolver2.
Definition: level_set_solver2.h:84
Vector2D gridOrigin() const
Returns the origin of the grid system data.
void setLevelSetSolver(const LevelSetSolver2Ptr &newSolver)
Sets the level set solver.
void onEndAdvanceTimeStep(double timeIntervalInSeconds) override
Called at the end of the time-step.
Abstract base class for grid-based 2-D fluid solver.
Definition: grid_fluid_solver2.h:34
void onBeginAdvanceTimeStep(double timeIntervalInSeconds) override
Called at the beginning of the time-step.
virtual ~LevelSetLiquidSolver2()
Destructor.
Definition: advection_solver2.h:18
std::shared_ptr< ScalarField2 > ScalarField2Ptr
Shared pointer for the ScalarField2 type.
Definition: scalar_field2.h:40
LevelSetLiquidSolver2(const Size2 &resolution, const Vector2D &gridSpacing, const Vector2D &gridOrigin)
Constructs solver with initial grid size.
2-D vector class.
Definition: vector2.h:24
LevelSetSolver2Ptr levelSetSolver() const
Returns the level set solver.
std::shared_ptr< ScalarGrid2 > ScalarGrid2Ptr
Shared pointer for the ScalarGrid2 type.
Definition: scalar_grid2.h:188
2-D size class.
Definition: size2.h:19
double computeVolume() const
Returns liquid volume measured by smeared Heaviside function.
Level set based 2-D liquid solver.
Definition: level_set_liquid_solver2.h:26
void setIsGlobalCompensationEnabled(bool isEnabled)
Enables (or disables) global compensation feature flag.
LevelSetLiquidSolver2()
Default constructor.
void computeAdvection(double timeIntervalInSeconds) override
Customizes advection step.
Size2 resolution() const
Returns the resolution of the grid system data.
void setMinReinitializeDistance(double distance)
Sets minimum reinitialization distance.
std::shared_ptr< LevelSetLiquidSolver2 > LevelSetLiquidSolver2Ptr
Shared pointer type for the LevelSetLiquidSolver2.
Definition: level_set_liquid_solver2.h:114
Base class for grid-based fluid solver builder.
Definition: grid_fluid_solver2.h:300