reduced velocity should be updated from i-th iteration instead of from the predicted state, because thexternal force has no memory of the previous iteration

This commit is contained in:
jingyuc
2021-08-16 14:36:35 -04:00
parent 9a17391a9a
commit eacdbe67a0
6 changed files with 92 additions and 54 deletions

View File

@@ -37,6 +37,11 @@ btScalar btDeformableMultiBodyConstraintSolver::solveDeformableGroupIterations(b
// solver body velocity <- rigid body velocity
writeToSolverBody(bodies, numBodies, infoGlobal);
std::cout << "iter: " << iteration << "\tres: " << m_leastSquaresResidual << '\n';
std::cout << "------------------\n";
// std::cout << infoGlobal.m_leastSquaresResidualThreshold << '\n';
// std::cout << maxIterations << '\n';
if (m_leastSquaresResidual <= infoGlobal.m_leastSquaresResidualThreshold || (iteration >= (maxIterations - 1)))
{
#ifdef VERBOSE_RESIDUAL_PRINTF