Skip to content

Commit cecf559

Browse files
committed
update warnings in mpr
1 parent ba1f300 commit cecf559

File tree

1 file changed

+2
-4
lines changed
  • src/contactDetection/ContactDetectionMPR

1 file changed

+2
-4
lines changed

src/contactDetection/ContactDetectionMPR/mpr.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ function tetrahedronEncloseOrigin(r0::SupportPoint, r1::SupportPoint,
144144
break
145145
end
146146
if success != true
147-
@warn("MPR (phase 2): Max. number of iterations (= $niter_max) is reached. niter_max increased locally by 10 and phase 2 is rerun until counter is bigger than 100.")
148147
if niter_max < 100
148+
@warn("MPR (phase 2): Max. number of iterations (= $niter_max) is reached. niter_max increased locally by 10 and phase 2 is rerun.")
149149
tetrahedronEncloseOrigin(r0, r1org, r2org, r3org, neps, niter_max + 10, shapeA, shapeB, scale)
150150
else
151151
error("MPR (phase 2): Max. number of iterations (= $niter_max) is reached and $niter_max > 100.")
@@ -312,13 +312,11 @@ function phase3(r0::SupportPoint, r1::SupportPoint, r2::SupportPoint, r3::Suppor
312312
end
313313
end
314314
end
315-
@warn("MPR (phase 3): Numerical issues with distance computation between $(Modia3D.fullName(shapeA)) and $(Modia3D.fullName(shapeB)). Max. number of iterations (= $niter_max) is reached. niter_max increased locally by 10 and phase 3 is rerun until counter is bigger than 100.")
316-
317315
if niter_max < 100
316+
@warn("MPR (phase 3): Numerical issues with distance computation between $(Modia3D.fullName(shapeA)) and $(Modia3D.fullName(shapeB)). Max. number of iterations (= $niter_max) is reached. niter_max increased locally by 10 and phase 3 is rerun.")
318317
phase3(r0, r1org, r2org, r3org, neps, niter_max + 10, tol_rel, shapeA, shapeB, scale)
319318
else
320319
@warn("MPR (phase 3): Max. number of iterations (= $niter_max) is reached and $niter_max > 100. tol_rel increased locally for this computation to $new_tol.")
321-
322320
if isTC2
323321
(distance,r1,r2,r3,r4) = finalTC2(r1_new,r2_new,r3_new,r4_new)
324322
return (distance, r4.a, r4.b, r4.n, true, r1.a, r1.b, r2.a, r2.b, r3.a, r3.b)

0 commit comments

Comments
 (0)