Class Viscosity_Takahashi2015
Defined in File Viscosity_Takahashi2015.h
Inheritance Relationships
Base Type
public SPH::NonPressureForceBase(Class NonPressureForceBase)
Class Documentation
-
class Viscosity_Takahashi2015 : public SPH::NonPressureForceBase
This class implements a variant of the implicit simulation method for viscous fluids introduced by Takahashi et al. [TDF+15]. In the original work of Takahashi et al. the second-ring neighbors are required to create the matrix of the linear system. In contrast we use a meshless conjugate gradient solver which performs the required matrix-vector multiplication in two sequential loops. In this way only the one-ring neighbors are required in each loop which increases the performance significantly.
Thanks to Anreas Peer who helped us with the implementation.
References:
[TDF+15] T. Takahashi, Y. Dobashi, I. Fujishiro, T. Nishita, and M.C. Lin. Implicit Formulation for SPH-based Viscous Fluids. Computer Graphics Forum, 34(2):493-502, 2015. URL: http://dx.doi.org/10.1111/cgf.12578
Public Functions
-
Viscosity_Takahashi2015(FluidModel *model)
-
virtual ~Viscosity_Takahashi2015(void)
-
inline virtual std::string getMethodName()
returns the name of the method
-
virtual void step()
-
virtual void reset()
-
virtual void performNeighborhoodSearchSort()
- inline FORCE_INLINE const Matrix3r & getViscousStress (const unsigned int i) const
- inline FORCE_INLINE Matrix3r & getViscousStress (const unsigned int i)
- inline FORCE_INLINE void setViscousStress (const unsigned int i, const Matrix3r &val)
- inline FORCE_INLINE const Vector3r & getAccel (const unsigned int i) const
- inline FORCE_INLINE Vector3r & getAccel (const unsigned int i)
- inline FORCE_INLINE void setAccel (const unsigned int i, const Vector3r &val)
Public Static Functions
-
static inline NonPressureForceBase *creator(FluidModel *model)
- static FORCE_INLINE void diagonalMatrixElement (const unsigned int row, Real &result, void *userData)
Public Static Attributes
-
static std::string METHOD_NAME = "Takahashi et al. 2015 (improved)"
-
static int VISCOSITY_COEFFICIENT = -1
-
static int ITERATIONS = -1
-
static int MAX_ITERATIONS = -1
-
static int MAX_ERROR = -1
Protected Types
-
typedef Eigen::ConjugateGradient<MatrixReplacement, Eigen::Lower | Eigen::Upper, Eigen::IdentityPreconditioner> Solver
Protected Functions
-
virtual void initParameters()
Protected Static Functions
-
static void computeViscosityAcceleration(Viscosity_Takahashi2015 *visco, const Real *v)