26    template<
typename TDataType>
 
   32        typedef typename TDataType::Real 
Real;
 
   33        typedef typename TDataType::Coord 
Coord;
 
   34        typedef typename TDataType::Matrix 
Matrix;
 
   56        DEF_VAR(
Real, LowerBoundViscosity, 1.0f, 
"Viscosity lower bound for Non-Newtonian fluid");
 
   58        DEF_VAR(
Real, CrossK, 1, 
"K for Non-Newtonian fluid (Cross model)");
 
   60        DEF_VAR(
Real, CrossN, -1, 
"N for Non-Newtonian fluid (Cross model)");
 
   67        DEF_ENUM(FluidType, FluidType, FluidType::NewtonianFluid, 
"Fluid type.");
 
 
#define DECLARE_TCLASS(name, T1)
 
#define IMPLEMENT_TCLASS(name, T1)
 
DEF_VAR(Real, CrossN, -1, "N for Non-Newtonian fluid (Cross model)")
 
DEF_ARRAY_IN(Attribute, Attribute, DeviceType::GPU, "Input particle velocity")
 
DEF_VAR(Real, SmoothingLength, Real(0.0125), "")
 
DEF_VAR(Real, RestDensity, Real(1000), "Reference density")
 
Arithmetic< Real > * m_arithmetic_v
 
~ApproximateImplicitViscosity() override
 
DEF_VAR(Real, Viscosity, Real(10), "Dynamic Viscosity")
 
DArray< Real > m_viscosity
 
DEF_VAR(Real, SamplingDistance, Real(0.005), "")
 
DEF_ARRAYLIST_IN(int, NeighborIds, DeviceType::GPU, "")
 
DEF_ARRAY_IN(Coord, Velocity, DeviceType::GPU, "Input particle velocity")
 
DECLARE_ENUM(FluidType, NewtonianFluid=0, NonNewtonianFluid=1)
 
DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "Input real particle position")
 
void constrain() override
 
DEF_VAR(Real, LowerBoundViscosity, 1.0f, "Viscosity lower bound for Non-Newtonian fluid")
 
DEF_ENUM(FluidType, FluidType, FluidType::NewtonianFluid, "Fluid type.")
 
DEF_VAR(Real, CrossK, 1, "K for Non-Newtonian fluid (Cross model)")
 
DEF_VAR_IN(Real, TimeStep, "")
 
DArray< Real > m_VelocityReal
 
Reduction< Real > * m_reduce
 
ApproximateImplicitViscosity()
 
particle attribute 0x00000000: [31-30]material; [29]motion; [28]Dynamic; [27-8]undefined yet,...
 
This is an implementation of AdditiveCCD based on peridyno.
 
Array< T, DeviceType::GPU > DArray