Class Simulation¶
Defined in File Simulation.h
Class Documentation¶
-
class
SPH::Simulation: public ParameterObject¶ Class to manage the current simulation time and the time step size. This class is a singleton.
Public Types
-
typedef PrecomputedKernel<CubicKernel, 10000>
PrecomputedCubicKernel¶
Public Functions
-
Simulation()¶
-
Simulation(const Simulation&) = delete¶
-
Simulation &
operator=(const Simulation&) = delete¶
-
~Simulation()¶
-
void
reset()¶
-
void
addFluidModel(const std::string &id, const unsigned int nFluidParticles, Vector3r *fluidParticles, Vector3r *fluidVelocities, const unsigned int nMaxEmitterParticles)¶
-
FluidModel *
getFluidModel(const unsigned int index)¶
-
FluidModel *
getFluidModelFromPointSet(const unsigned int pointSetIndex)¶
-
const unsigned int
numberOfFluidModels() const¶
-
void
addBoundaryModel(BoundaryModel *bm)¶
-
BoundaryModel *
getBoundaryModel(const unsigned int index)¶
-
BoundaryModel *
getBoundaryModelFromPointSet(const unsigned int pointSetIndex)¶
-
const unsigned int
numberOfBoundaryModels() const¶
-
void
updateBoundaryVolume()¶
-
AnimationFieldSystem *
getAnimationFieldSystem()¶
-
BoundaryHandlingMethods
getBoundaryHandlingMethod() const¶
-
void
setBoundaryHandlingMethod(BoundaryHandlingMethods val)¶
-
int
getKernel() const¶
-
void
setKernel(int val)¶
-
int
getGradKernel() const¶
-
void
setGradKernel(int val)¶
-
FORCE_INLINE Real W_zero () const
-
FORCE_INLINE Real W (const Vector3r &r) const
-
FORCE_INLINE Vector3r gradW (const Vector3r &r)
-
int
getSimulationMethod() const¶
-
void
setSimulationMethod(const int val)¶
-
void
setSimulationMethodChangedCallback(std::function<void()> const &callBackFct)¶
-
bool
is2DSimulation()¶
-
bool
zSortEnabled()¶
-
void
updateTimeStepSize()¶ Update time step size depending on the chosen method.
-
void
updateTimeStepSizeCFL()¶ Update time step size by CFL condition.
-
void
performNeighborhoodSearch()¶ Perform the neighborhood search for all fluid particles.
-
void
performNeighborhoodSearchSort()¶
-
void
computeNonPressureForces()¶
-
void
animateParticles()¶
-
void
emitParticles()¶
-
void
emittedParticles(FluidModel *model, const unsigned int startIndex)¶
-
NeighborhoodSearch *
getNeighborhoodSearch()¶
-
void
saveState(BinaryFileWriter &binWriter)¶
-
void
loadState(BinaryFileReader &binReader)¶
-
FORCE_INLINE unsigned int numberOfPointSets () const
-
FORCE_INLINE unsigned int numberOfNeighbors (const unsigned int pointSetIndex, const unsigned int neighborPointSetIndex, const unsigned int index) const
-
FORCE_INLINE unsigned int getNeighbor (const unsigned int pointSetIndex, const unsigned int neighborPointSetIndex, const unsigned int index, const unsigned int k) const
-
FORCE_INLINE const unsigned int * getNeighborList (const unsigned int pointSetIndex, const unsigned int neighborPointSetIndex, const unsigned int index) const
Public Static Functions
-
Simulation *
getCurrent()¶
-
void
setCurrent(Simulation *tm)¶
-
bool
hasCurrent()¶
Public Static Attributes
-
int
SIM_2D= -1¶
-
int
PARTICLE_RADIUS= -1¶
-
int
GRAVITATION= -1¶
-
int
CFL_METHOD= -1¶
-
int
CFL_FACTOR= -1¶
-
int
CFL_MIN_TIMESTEPSIZE= -1¶
-
int
CFL_MAX_TIMESTEPSIZE= -1¶
-
int
ENABLE_Z_SORT= -1¶
-
int
KERNEL_METHOD= -1¶
-
int
GRAD_KERNEL_METHOD= -1¶
-
int
ENUM_KERNEL_CUBIC= -1¶
-
int
ENUM_KERNEL_WENDLANDQUINTICC2= -1¶
-
int
ENUM_KERNEL_POLY6= -1¶
-
int
ENUM_KERNEL_SPIKY= -1¶
-
int
ENUM_KERNEL_PRECOMPUTED_CUBIC= -1¶
-
int
ENUM_KERNEL_CUBIC_2D= -1¶
-
int
ENUM_KERNEL_WENDLANDQUINTICC2_2D= -1¶
-
int
ENUM_GRADKERNEL_CUBIC= -1¶
-
int
ENUM_GRADKERNEL_WENDLANDQUINTICC2= -1¶
-
int
ENUM_GRADKERNEL_POLY6= -1¶
-
int
ENUM_GRADKERNEL_SPIKY= -1¶
-
int
ENUM_GRADKERNEL_PRECOMPUTED_CUBIC= -1¶
-
int
ENUM_GRADKERNEL_CUBIC_2D= -1¶
-
int
ENUM_GRADKERNEL_WENDLANDQUINTICC2_2D= -1¶
-
int
SIMULATION_METHOD= -1¶
-
int
ENUM_CFL_NONE= -1¶
-
int
ENUM_CFL_STANDARD= -1¶
-
int
ENUM_CFL_ITER= -1¶
-
int
ENUM_SIMULATION_WCSPH= -1¶
-
int
ENUM_SIMULATION_PCISPH= -1¶
-
int
ENUM_SIMULATION_PBF= -1¶
-
int
ENUM_SIMULATION_IISPH= -1¶
-
int
ENUM_SIMULATION_DFSPH= -1¶
-
int
ENUM_SIMULATION_PF= -1¶
-
int
BOUNDARY_HANDLING_METHOD= -1¶
-
int
ENUM_AKINCI2012= -1¶
-
int
ENUM_KOSCHIER2017= -1¶
-
int
ENUM_BENDER2019= -1¶
Protected Functions
-
void
initParameters()¶
Protected Attributes
-
std::vector<FluidModel*>
m_fluidModels¶
-
std::vector<BoundaryModel*>
m_boundaryModels¶
-
NeighborhoodSearch *
m_neighborhoodSearch¶
-
AnimationFieldSystem *
m_animationFieldSystem¶
-
int
m_cflMethod¶
-
int
m_kernelMethod¶
-
int
m_gradKernelMethod¶
-
SimulationMethods
m_simulationMethod¶
-
bool
m_sim2D¶
-
bool
m_enableZSort¶
-
std::function<void()>
m_simulationMethodChanged¶
-
int
m_boundaryHandlingMethod¶
-
typedef PrecomputedKernel<CubicKernel, 10000>