turn off SVD

This commit is contained in:
Xuchen Han
2019-10-31 12:57:19 -07:00
parent 3f1e061966
commit 93835c195b

View File

@@ -175,6 +175,7 @@ public:
btSoftBody::Tetra& tetra = psb->m_tetras[j]; btSoftBody::Tetra& tetra = psb->m_tetras[j];
btMatrix3x3 P; btMatrix3x3 P;
firstPiola(psb->m_tetraScratches[j],P); firstPiola(psb->m_tetraScratches[j],P);
#if USE_SVD
if (max_p > 0) if (max_p > 0)
{ {
// since we want to clamp the principal stress to max_p, we only need to // since we want to clamp the principal stress to max_p, we only need to
@@ -199,6 +200,7 @@ public:
P = U * Sigma * V.transpose(); P = U * Sigma * V.transpose();
} }
} }
#endif
// btVector3 force_on_node0 = P * (tetra.m_Dm_inverse.transpose()*grad_N_hat_1st_col); // btVector3 force_on_node0 = P * (tetra.m_Dm_inverse.transpose()*grad_N_hat_1st_col);
btMatrix3x3 force_on_node123 = P * tetra.m_Dm_inverse.transpose(); btMatrix3x3 force_on_node123 = P * tetra.m_Dm_inverse.transpose();
btVector3 force_on_node0 = force_on_node123 * grad_N_hat_1st_col; btVector3 force_on_node0 = force_on_node123 * grad_N_hat_1st_col;