From 4347c03459888f192bb72ce9d642cdf0750ec74e Mon Sep 17 00:00:00 2001 From: Xuchen Han Date: Sun, 3 Nov 2019 12:47:08 -0800 Subject: [PATCH] turn on SVD and use fewer CG iterations --- src/BulletSoftBody/btDeformableBodySolver.cpp | 2 +- src/BulletSoftBody/btDeformableNeoHookeanForce.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/BulletSoftBody/btDeformableBodySolver.cpp b/src/BulletSoftBody/btDeformableBodySolver.cpp index 0fb18080f..7b4c06303 100644 --- a/src/BulletSoftBody/btDeformableBodySolver.cpp +++ b/src/BulletSoftBody/btDeformableBodySolver.cpp @@ -18,7 +18,7 @@ #include "btDeformableBodySolver.h" #include "btSoftBodyInternals.h" #include "LinearMath/btQuickprof.h" -static const int kMaxConjugateGradientIterations = 200; +static const int kMaxConjugateGradientIterations = 50; btDeformableBodySolver::btDeformableBodySolver() : m_numNodes(0) , m_cg(kMaxConjugateGradientIterations) diff --git a/src/BulletSoftBody/btDeformableNeoHookeanForce.h b/src/BulletSoftBody/btDeformableNeoHookeanForce.h index f607b8662..d9bb3be61 100644 --- a/src/BulletSoftBody/btDeformableNeoHookeanForce.h +++ b/src/BulletSoftBody/btDeformableNeoHookeanForce.h @@ -175,7 +175,8 @@ public: btSoftBody::Tetra& tetra = psb->m_tetras[j]; btMatrix3x3 P; firstPiola(psb->m_tetraScratches[j],P); -#if USE_SVD +#define USE_SVD 1 +#ifdef USE_SVD if (max_p > 0) { // since we want to clamp the principal stress to max_p, we only need to