use of maspack.matrix.RotationMatrix3d in project artisynth_core by artisynth.
the class LinearMaterialBase method computeStress.
public void computeStress(SymmetricMatrix3d sigma, SolidDeformation def, Matrix3d Q, FemMaterial baseMat) {
RotationMatrix3d R = def.getR();
Matrix3d F = def.getF();
// cauchy strain, rotated if necessary
if (myCorotated) {
if (R == null) {
R = computeRotation(F, sigma);
} else {
// remove rotation from F
sigma.mulTransposeLeftSymmetric(R, F);
}
} else {
sigma.setSymmetric(F);
}
sigma.m00 -= 1;
sigma.m11 -= 1;
sigma.m22 -= 1;
multiplyC(sigma, sigma);
// rotate stress back to original frame
if (isCorotated()) {
sigma.mulLeftAndTransposeRight(R);
}
}
Aggregations