19 template<
typename TDataType>
24 typedef typename TDataType::Real
Real;
25 typedef typename TDataType::Coord
Coord;
26 typedef typename TDataType::Matrix
Matrix;
27 typedef typename ::dyno::TBond<TDataType>
Bond;
37 DEF_VAR(
bool, Incompressible,
true,
"Incompressible or not");
39 DEF_VAR(
bool, RenewNeighborhood,
false,
"Whether to renew particle neighbors every time step");
58 Real phi = this->varFrictionAngle()->getValue() *
M_PI;
59 return (
Real)6.0 * this->varCohesion()->getValue() *
cos(phi) / (3.0f +
sin(phi)) / std::sqrt(3.0f);
65 Real phi = this->varFrictionAngle()->getValue() *
M_PI;
66 return (
Real)2.0f *
sin(phi) / (3.0f +
sin(phi)) / std::sqrt(3.0f);
76 std::shared_ptr<IterativeDensitySolver<TDataType>>
mDensityPBD;
#define DECLARE_TCLASS(name, T1)
DEF_VAR(bool, RenewNeighborhood, false, "Whether to renew particle neighbors every time step")
DEF_ARRAYLIST_IN(int, NeighborIds, DeviceType::GPU, "Neighboring particles' ids")
virtual void applyPlasticity()
std::shared_ptr< IterativeDensitySolver< TDataType > > mDensityPBD
DArray< Real > m_yield_J2
void solveElasticity() override
void constrain() override
~ElastoplasticityModule() override
void reconstructRestShape()
::dyno::TBond< TDataType > Bond
DEF_VAR(Real, FrictionAngle, Real(1.0f/3.0f), "Cohesion between particles")
DEF_VAR(Real, Cohesion, 0.0, "Cohesion between particles")
DArray< Real > m_yiled_I1
DEF_VAR(bool, Incompressible, true, "Incompressible or not")
This is an implementation of AdditiveCCD based on peridyno.
Array< T, DeviceType::GPU > DArray
DYN_FUNC Complex< Real > sin(const Complex< Real > &)
DYN_FUNC Complex< Real > cos(const Complex< Real > &)