Class TimeIntegration¶
Defined in File TimeIntegration.h
Class Documentation¶
-
class
SPH::TimeIntegration¶ Class for the position-based fluids time integration.
Public Static Functions
-
void
semiImplicitEuler(const Real h, const Real mass, Vector3r &position, Vector3r &velocity, const Vector3r &acceleration)¶ Perform an integration step for a particle using the semi-implicit Euler (symplectic Euler) method:
\[\begin{split}\begin{align*} \mathbf{v}(t+h) &= \mathbf{v}(t) + \mathbf{a}(t) h\\ \mathbf{x}(t+h) &= \mathbf{x}(t) + \mathbf{v}(t+h) h \end{align*}\end{split}\]- Parameters
h: time step sizemass: mass of the particleposition: position of the particlevelocity: velocity of the particleacceleration: acceleration of the particle
-
void
velocityUpdateFirstOrder(const Real h, const Real mass, const Vector3r &position, const Vector3r &oldPosition, Vector3r &velocity)¶ Perform a velocity update (first order) for the linear velocity:
\[\begin{equation*} \mathbf{v}(t+h) = \frac{1}{h} (\mathbf{p}(t+h) - \mathbf{p}(t) \end{equation*}\]- Parameters
h: time step sizemass: mass of the particleposition: new position \(\mathbf{p}(t+h)\) of the particleoldPosition: position \(\mathbf{p}(t)\) of the particle before the time stepvelocity: resulting velocity of the particle
-
void