2-D PCISPH solver. More...
#include <Core/Solver/Particle/PCISPH/PCISPHSolver2.hpp>
Classes | |
| class | Builder |
| Front-end to create PCISPHSolver2 objects step by step. More... | |
Public Member Functions | |
| PCISPHSolver2 () | |
| Constructs a solver with empty particle set. More... | |
| PCISPHSolver2 (double targetDensity, double targetSpacing, double relativeKernelRadius) | |
| PCISPHSolver2 (const PCISPHSolver2 &)=delete | |
| Deleted copy constructor. More... | |
| PCISPHSolver2 (PCISPHSolver2 &&) noexcept=delete | |
| Deleted move constructor. More... | |
| ~PCISPHSolver2 () override=default | |
| Default virtual destructor. More... | |
| PCISPHSolver2 & | operator= (const PCISPHSolver2 &)=delete |
| Deleted copy assignment operator. More... | |
| PCISPHSolver2 & | operator= (PCISPHSolver2 &&) noexcept=delete |
| Deleted move assignment operator. More... | |
| double | GetMaxDensityErrorRatio () const |
| Returns max allowed density error ratio. More... | |
| void | SetMaxDensityErrorRatio (double ratio) |
| Sets max allowed density error ratio. More... | |
| unsigned int | GetMaxNumberOfIterations () const |
| Returns max number of iterations. More... | |
| void | SetMaxNumberOfIterations (unsigned int n) |
| Sets max number of PCISPH iterations. More... | |
Public Member Functions inherited from CubbyFlow::SPHSolver2 | |
| SPHSolver2 () | |
| Constructs a solver with empty particle set. More... | |
| SPHSolver2 (double targetDensity, double targetSpacing, double relativeKernelRadius) | |
| SPHSolver2 (const SPHSolver2 &)=delete | |
| Deleted copy constructor. More... | |
| SPHSolver2 (SPHSolver2 &&) noexcept=delete | |
| Deleted move constructor. More... | |
| ~SPHSolver2 () override=default | |
| Default virtual destructor. More... | |
| SPHSolver2 & | operator= (const SPHSolver2 &)=delete |
| Deleted copy assignment operator. More... | |
| SPHSolver2 & | operator= (SPHSolver2 &&) noexcept=delete |
| Deleted move assignment operator. More... | |
| double | GetEosExponent () const |
| Returns the exponent part of the equation-of-state. More... | |
| void | SetEosExponent (double newEosExponent) |
| Sets the exponent part of the equation-of-state. More... | |
| double | GetNegativePressureScale () const |
| Returns the negative pressure scale. More... | |
| void | SetNegativePressureScale (double newNegativePressureScale) |
| Sets the negative pressure scale. More... | |
| double | GetViscosityCoefficient () const |
| Returns the viscosity coefficient. More... | |
| void | SetViscosityCoefficient (double newViscosityCoefficient) |
| Sets the viscosity coefficient. More... | |
| double | GetPseudoViscosityCoefficient () const |
| Returns the pseudo viscosity coefficient. More... | |
| void | SetPseudoViscosityCoefficient (double newPseudoViscosityCoefficient) |
| Sets the pseudo viscosity coefficient. More... | |
| double | GetSpeedOfSound () const |
| Returns the speed of sound. More... | |
| void | SetSpeedOfSound (double newSpeedOfSound) |
| Sets the speed of sound. More... | |
| double | GetTimeStepLimitScale () const |
| Multiplier that scales the max allowed time-step. More... | |
| void | SetTimeStepLimitScale (double newScale) |
| Sets the multiplier that scales the max allowed time-step. More... | |
| SPHSystemData2Ptr | GetSPHSystemData () const |
| Returns the SPH system data. More... | |
Public Member Functions inherited from CubbyFlow::ParticleSystemSolver2 | |
| ParticleSystemSolver2 () | |
| Constructs an empty solver. More... | |
| ParticleSystemSolver2 (double radius, double mass) | |
| Constructs a solver with particle parameters. More... | |
| ParticleSystemSolver2 (const ParticleSystemSolver2 &)=delete | |
| Deleted copy constructor. More... | |
| ParticleSystemSolver2 (ParticleSystemSolver2 &&) noexcept=delete | |
| Deleted move constructor. More... | |
| ~ParticleSystemSolver2 () override=default | |
| Default virtual destructor. More... | |
| ParticleSystemSolver2 & | operator= (const ParticleSystemSolver2 &)=delete |
| Deleted copy assignment operator. More... | |
| ParticleSystemSolver2 & | operator= (ParticleSystemSolver2 &&) noexcept=delete |
| Deleted move assignment operator. More... | |
| double | GetDragCoefficient () const |
| Returns the drag coefficient. More... | |
| void | SetDragCoefficient (double newDragCoefficient) |
| Sets the drag coefficient. More... | |
| double | GetRestitutionCoefficient () const |
| Gets the restitution coefficient. More... | |
| void | SetRestitutionCoefficient (double newRestitutionCoefficient) |
| Sets the restitution coefficient. More... | |
| const Vector2D & | GetGravity () const |
| Returns the gravity. More... | |
| void | SetGravity (const Vector2D &newGravity) |
| Sets the gravity. More... | |
| const ParticleSystemData2Ptr & | GetParticleSystemData () const |
| Returns the particle system data. More... | |
| const Collider2Ptr & | GetCollider () const |
| Returns the collider. More... | |
| void | SetCollider (const Collider2Ptr &newCollider) |
| Sets the collider. More... | |
| const ParticleEmitter2Ptr & | GetEmitter () const |
| Returns the emitter. More... | |
| void | SetEmitter (const ParticleEmitter2Ptr &newEmitter) |
| Sets the emitter. More... | |
| const VectorField2Ptr & | GetWind () const |
| Returns the wind field. More... | |
| void | SetWind (const VectorField2Ptr &newWind) |
| Sets the wind. More... | |
Public Member Functions inherited from CubbyFlow::PhysicsAnimation | |
| PhysicsAnimation () | |
| Default constructor. More... | |
| PhysicsAnimation (const PhysicsAnimation &)=default | |
| Default copy constructor. More... | |
| PhysicsAnimation (PhysicsAnimation &&) noexcept=default | |
| Default move constructor. More... | |
| virtual | ~PhysicsAnimation ()=default |
| Default virtual destructor. More... | |
| PhysicsAnimation & | operator= (const PhysicsAnimation &)=default |
| Default copy assignment operator. More... | |
| PhysicsAnimation & | operator= (PhysicsAnimation &&) noexcept=default |
| Default move assignment operator. More... | |
| bool | GetIsUsingFixedSubTimeSteps () const |
| Returns true if fixed sub-timestepping is used. More... | |
| void | SetIsUsingFixedSubTimeSteps (bool isUsing) |
| Sets true if fixed sub-timestepping is used. More... | |
| unsigned int | GetNumberOfFixedSubTimeSteps () const |
| Returns the number of fixed sub-timesteps. More... | |
| void | SetNumberOfFixedSubTimeSteps (unsigned int numberOfSteps) |
| Sets the number of fixed sub-timesteps. More... | |
| void | AdvanceSingleFrame () |
| Advances a single frame. More... | |
| Frame | GetCurrentFrame () const |
| Returns current frame. More... | |
| void | SetCurrentFrame (const Frame &frame) |
| Sets current frame cursor (but do not invoke update()). More... | |
| double | GetCurrentTimeInSeconds () const |
| Returns current time in seconds. More... | |
Public Member Functions inherited from CubbyFlow::Animation | |
| Animation ()=default | |
| Default constructor. More... | |
| Animation (const Animation &)=default | |
| Default copy constructor. More... | |
| Animation (Animation &&) noexcept=default | |
| Default move constructor. More... | |
| virtual | ~Animation ()=default |
| Default virtual destructor. More... | |
| Animation & | operator= (const Animation &)=default |
| Default copy assignment operator. More... | |
| Animation & | operator= (Animation &&) noexcept=default |
| Default move assignment operator. More... | |
| void | Update (const Frame &frame) |
Updates animation state for given frame. More... | |
Static Public Member Functions | |
| static Builder | GetBuilder () |
| Returns builder fox PCISPHSolver2. More... | |
Static Public Member Functions inherited from CubbyFlow::SPHSolver2 | |
| static Builder | GetBuilder () |
| Returns builder fox SPHSolver2. More... | |
Static Public Member Functions inherited from CubbyFlow::ParticleSystemSolver2 | |
| static Builder | GetBuilder () |
| Returns builder fox ParticleSystemSolver2. More... | |
Protected Member Functions | |
| void | AccumulatePressureForce (double timeIntervalInSeconds) override |
| void | OnBeginAdvanceTimeStep (double timeStepInSeconds) override |
| Performs pre-processing step before the simulation. More... | |
Protected Member Functions inherited from CubbyFlow::SPHSolver2 | |
| unsigned int | GetNumberOfSubTimeSteps (double timeIntervalInSeconds) const override |
| Returns the number of sub-time-steps. More... | |
| void | AccumulateForces (double timeStepInSeconds) override |
| Accumulates the force to the forces array in the particle system. More... | |
| void | OnBeginAdvanceTimeStep (double timeStepInSeconds) override |
| Performs pre-processing step before the simulation. More... | |
| void | OnEndAdvanceTimeStep (double timeStepInSeconds) override |
| Performs post-processing step before the simulation. More... | |
| virtual void | AccumulateNonPressureForces (double timeStepInSeconds) |
| void | ComputePressure () |
| Computes the pressure. More... | |
| void | AccumulatePressureForce (const ConstArrayView1< Vector2D > &positions, const ConstArrayView1< double > &densities, const ConstArrayView1< double > &pressures, ArrayView1< Vector2D > pressureForces) |
Accumulates the pressure force to the given pressureForces array. More... | |
| void | AccumulateViscosityForce () |
| void | ComputePseudoViscosity (double timeStepInSeconds) |
| Computes pseudo viscosity. More... | |
Protected Member Functions inherited from CubbyFlow::ParticleSystemSolver2 | |
| void | OnInitialize () override |
| Initializes the simulator. More... | |
| void | OnAdvanceTimeStep (double timeStepInSeconds) override |
| Called to advance a single time-step. More... | |
| void | ResolveCollision () |
| Resolves any collisions occurred by the particles. More... | |
| void | ResolveCollision (ArrayView1< Vector2D > newPositions, ArrayView1< Vector2D > newVelocities) |
| void | SetParticleSystemData (const ParticleSystemData2Ptr &newParticles) |
| Assign a new particle system data. More... | |
Detailed Description
2-D PCISPH solver.
This class implements 2-D predictive-corrective SPH solver. The main pressure solver is based on Solenthaler and Pajarola's 2009 SIGGRAPH paper.
- See also
- Solenthaler and Pajarola, Predictive-corrective incompressible SPH, ACM transactions on graphics (TOG). Vol. 28. No. 3. ACM, 2009.
Constructor & Destructor Documentation
◆ PCISPHSolver2() [1/4]
| CubbyFlow::PCISPHSolver2::PCISPHSolver2 | ( | ) |
Constructs a solver with empty particle set.
◆ PCISPHSolver2() [2/4]
| CubbyFlow::PCISPHSolver2::PCISPHSolver2 | ( | double | targetDensity, |
| double | targetSpacing, | ||
| double | relativeKernelRadius | ||
| ) |
Constructs a solver with target density, spacing, and relative kernel radius.
◆ PCISPHSolver2() [3/4]
|
delete |
Deleted copy constructor.
◆ PCISPHSolver2() [4/4]
|
deletenoexcept |
Deleted move constructor.
◆ ~PCISPHSolver2()
|
overridedefault |
Default virtual destructor.
Member Function Documentation
◆ AccumulatePressureForce()
|
overrideprotectedvirtual |
Accumulates the pressure force to the forces array in the particle system.
Reimplemented from CubbyFlow::SPHSolver2.
◆ GetBuilder()
|
static |
Returns builder fox PCISPHSolver2.
◆ GetMaxDensityErrorRatio()
| double CubbyFlow::PCISPHSolver2::GetMaxDensityErrorRatio | ( | ) | const |
Returns max allowed density error ratio.
◆ GetMaxNumberOfIterations()
| unsigned int CubbyFlow::PCISPHSolver2::GetMaxNumberOfIterations | ( | ) | const |
Returns max number of iterations.
◆ OnBeginAdvanceTimeStep()
|
overrideprotectedvirtual |
Performs pre-processing step before the simulation.
Reimplemented from CubbyFlow::ParticleSystemSolver2.
◆ operator=() [1/2]
|
delete |
Deleted copy assignment operator.
◆ operator=() [2/2]
|
deletenoexcept |
Deleted move assignment operator.
◆ SetMaxDensityErrorRatio()
| void CubbyFlow::PCISPHSolver2::SetMaxDensityErrorRatio | ( | double | ratio | ) |
Sets max allowed density error ratio.
This function sets the max allowed density error ratio during the PCISPH iteration. Default is 0.01 (1%). The input value should be positive.
◆ SetMaxNumberOfIterations()
| void CubbyFlow::PCISPHSolver2::SetMaxNumberOfIterations | ( | unsigned int | n | ) |
Sets max number of PCISPH iterations.
This function sets the max number of PCISPH iterations. Default is 5.
The documentation for this class was generated from the following file:
- Core/Solver/Particle/PCISPH/PCISPHSolver2.hpp
Public Member Functions inherited from
1.8.13