3-D PCISPH solver. More...

#include <Core/Solver/Particle/PCISPH/PCISPHSolver3.hpp>

Inheritance diagram for CubbyFlow::PCISPHSolver3:
CubbyFlow::SPHSolver3 CubbyFlow::ParticleSystemSolver3 CubbyFlow::PhysicsAnimation CubbyFlow::Animation

Classes

class  Builder
 Front-end to create PCISPHSolver3 objects step by step. More...
 

Public Member Functions

 PCISPHSolver3 ()
 Constructs a solver with empty particle set. More...
 
 PCISPHSolver3 (double targetDensity, double targetSpacing, double relativeKernelRadius)
 
 PCISPHSolver3 (const PCISPHSolver3 &)=delete
 Deleted copy constructor. More...
 
 PCISPHSolver3 (PCISPHSolver3 &&) noexcept=delete
 Deleted move constructor. More...
 
 ~PCISPHSolver3 () override=default
 Default virtual destructor. More...
 
PCISPHSolver3operator= (const PCISPHSolver3 &)=delete
 Deleted copy assignment operator. More...
 
PCISPHSolver3operator= (PCISPHSolver3 &&) 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::SPHSolver3
 SPHSolver3 ()
 Constructs a solver with empty particle set. More...
 
 SPHSolver3 (double targetDensity, double targetSpacing, double relativeKernelRadius)
 
 SPHSolver3 (const SPHSolver3 &)=delete
 Deleted copy constructor. More...
 
 SPHSolver3 (SPHSolver3 &&) noexcept=delete
 Deleted move constructor. More...
 
 ~SPHSolver3 () override=default
 Default virtual destructor. More...
 
SPHSolver3operator= (const SPHSolver3 &)=delete
 Deleted copy assignment operator. More...
 
SPHSolver3operator= (SPHSolver3 &&) 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...
 
SPHSystemData3Ptr GetSPHSystemData () const
 Returns the SPH system data. More...
 
- Public Member Functions inherited from CubbyFlow::ParticleSystemSolver3
 ParticleSystemSolver3 ()
 Constructs an empty solver. More...
 
 ParticleSystemSolver3 (double radius, double mass)
 Constructs a solver with particle parameters. More...
 
 ParticleSystemSolver3 (const ParticleSystemSolver3 &)=delete
 Deleted copy constructor. More...
 
 ParticleSystemSolver3 (ParticleSystemSolver3 &&) noexcept=delete
 Deleted move constructor. More...
 
 ~ParticleSystemSolver3 () override=default
 Default virtual destructor. More...
 
ParticleSystemSolver3operator= (const ParticleSystemSolver3 &)=delete
 Deleted copy assignment operator. More...
 
ParticleSystemSolver3operator= (ParticleSystemSolver3 &&) 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 Vector3DGetGravity () const
 Returns the gravity. More...
 
void SetGravity (const Vector3D &newGravity)
 Sets the gravity. More...
 
const ParticleSystemData3PtrGetParticleSystemData () const
 Returns the particle system data. More...
 
const Collider3PtrGetCollider () const
 Returns the collider. More...
 
void SetCollider (const Collider3Ptr &newCollider)
 Sets the collider. More...
 
const ParticleEmitter3PtrGetEmitter () const
 Returns the emitter. More...
 
void SetEmitter (const ParticleEmitter3Ptr &newEmitter)
 Sets the emitter. More...
 
const VectorField3PtrGetWind () const
 Returns the wind field. More...
 
void SetWind (const VectorField3Ptr &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...
 
PhysicsAnimationoperator= (const PhysicsAnimation &)=default
 Default copy assignment operator. More...
 
PhysicsAnimationoperator= (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...
 
Animationoperator= (const Animation &)=default
 Default copy assignment operator. More...
 
Animationoperator= (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 PCISPHSolver3. More...
 
- Static Public Member Functions inherited from CubbyFlow::SPHSolver3
static Builder GetBuilder ()
 Returns builder fox SPHSolver3. More...
 
- Static Public Member Functions inherited from CubbyFlow::ParticleSystemSolver3
static Builder GetBuilder ()
 Returns builder fox ParticleSystemSolver3. 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::SPHSolver3
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< Vector3D > &positions, const ConstArrayView1< double > &densities, const ConstArrayView1< double > &pressures, ArrayView1< Vector3D > 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::ParticleSystemSolver3
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< Vector3D > newPositions, ArrayView1< Vector3D > newVelocities)
 
void SetParticleSystemData (const ParticleSystemData3Ptr &newParticles)
 Assign a new particle system data. More...
 

Detailed Description

3-D PCISPH solver.

This class implements 3-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

◆ PCISPHSolver3() [1/4]

CubbyFlow::PCISPHSolver3::PCISPHSolver3 ( )

Constructs a solver with empty particle set.

◆ PCISPHSolver3() [2/4]

CubbyFlow::PCISPHSolver3::PCISPHSolver3 ( double  targetDensity,
double  targetSpacing,
double  relativeKernelRadius 
)

Constructs a solver with target density, spacing, and relative kernel radius.

◆ PCISPHSolver3() [3/4]

CubbyFlow::PCISPHSolver3::PCISPHSolver3 ( const PCISPHSolver3 )
delete

Deleted copy constructor.

◆ PCISPHSolver3() [4/4]

CubbyFlow::PCISPHSolver3::PCISPHSolver3 ( PCISPHSolver3 &&  )
deletenoexcept

Deleted move constructor.

◆ ~PCISPHSolver3()

CubbyFlow::PCISPHSolver3::~PCISPHSolver3 ( )
overridedefault

Default virtual destructor.

Member Function Documentation

◆ AccumulatePressureForce()

void CubbyFlow::PCISPHSolver3::AccumulatePressureForce ( double  timeIntervalInSeconds)
overrideprotectedvirtual

Accumulates the pressure force to the forces array in the particle system.

Reimplemented from CubbyFlow::SPHSolver3.

◆ GetBuilder()

static Builder CubbyFlow::PCISPHSolver3::GetBuilder ( )
static

Returns builder fox PCISPHSolver3.

◆ GetMaxDensityErrorRatio()

double CubbyFlow::PCISPHSolver3::GetMaxDensityErrorRatio ( ) const

Returns max allowed density error ratio.

◆ GetMaxNumberOfIterations()

unsigned int CubbyFlow::PCISPHSolver3::GetMaxNumberOfIterations ( ) const

Returns max number of iterations.

◆ OnBeginAdvanceTimeStep()

void CubbyFlow::PCISPHSolver3::OnBeginAdvanceTimeStep ( double  timeStepInSeconds)
overrideprotectedvirtual

Performs pre-processing step before the simulation.

Reimplemented from CubbyFlow::ParticleSystemSolver3.

◆ operator=() [1/2]

PCISPHSolver3& CubbyFlow::PCISPHSolver3::operator= ( const PCISPHSolver3 )
delete

Deleted copy assignment operator.

◆ operator=() [2/2]

PCISPHSolver3& CubbyFlow::PCISPHSolver3::operator= ( PCISPHSolver3 &&  )
deletenoexcept

Deleted move assignment operator.

◆ SetMaxDensityErrorRatio()

void CubbyFlow::PCISPHSolver3::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::PCISPHSolver3::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: