Skip to content

Commit 3125fc0

Browse files
committed
[algorithm] Convert impulse to force when checking for puncture
1 parent 742c678 commit 3125fc0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/CollisionAlgorithm/algorithm/InsertionAlgorithm.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,15 @@ InsertionAlgorithm::AlgorithmOutput InsertionAlgorithm::puncturePhase()
180180
l_tipGeom->getContext()->get<MechStateTipType>();
181181
const auto& lambda =
182182
m_constraintSolver->getLambda()[mstate.get()].read()->getValue();
183+
const auto dt = l_tipGeom->getContext()->getDt();
183184
SReal norm{0_sreal};
184185

185186
for (const auto& l : lambda)
186187
{
187188
norm += l.norm();
188189
}
190+
// Convert impulse to force
191+
norm /= dt;
189192

190193
if (norm > punctureForceThreshold)
191194
{

0 commit comments

Comments
 (0)