9 #include "imstkPbdFemConstraint.h" 31 const Vec3d& p0,
const Vec3d& p1,
const Vec3d& p2,
const Vec3d& p3,
43 double& c, std::vector<Vec3d>& dcdx)
override;
60 bool getInverstionHandling()
const {
return m_handleInversions; }
69 bool m_handleInversions =
true;
std::pair< int, int > PbdParticleId
Index pair that refers to a particle in a PbdState. Index 0 is the body id, Index 1 is the particle i...
void setInverstionHandling(const bool handleInversions)
Set/Get Inversion Handling.
double getRestValue() const
Return the rest configuration for the constraint Note: the implementation currently assumes an initia...
void handleInversions(Mat3d &F, Mat3d &U, Mat3d &Fhat, Mat3d &VT) const
Handle inverted tets with the method described by Irving et. al. in "Invertible Finite Elements For R...
The FEMTetConstraint class class for constraint as the elastic energy computed by linear shape functi...
bool initConstraint(const Vec3d &p0, const Vec3d &p1, const Vec3d &p2, const Vec3d &p3, const PbdParticleId &pIdx0, const PbdParticleId &pIdx1, const PbdParticleId &pIdx2, const PbdParticleId &pIdx3, PbdFemConstraintConfig config)
Initialize the constraint.
The PbdFemConstraint class for constraint as the elastic energy computed by linear shape functions wi...
Provides interface for accessing particles from a 2d array of PbdBody,Particles.
Either mu/lambda used, may be computed from youngs modulus and poissons ratio.
bool computeValueAndGradient(PbdState &bodies, double &c, std::vector< Vec3d > &dcdx) override
Compute value and gradient of constraint function.