"platforms/reference/include/ReferenceConstraintAlgorithm.h" did not exist on "07f8d5ce2dde86e32d5338b32f52f741023fe85b"
Commit 7401af02 authored by Peter Eastman's avatar Peter Eastman
Browse files

Made test case slightly more tolerant, since SETTLE can introduce small velocity errors

parent 366d10f7
...@@ -311,14 +311,14 @@ void testConservationLaws() { ...@@ -311,14 +311,14 @@ void testConservationLaws() {
if (i == 0) if (i == 0)
initialMomentum = momentum; initialMomentum = momentum;
else else
ASSERT_EQUAL_VEC(initialMomentum, momentum, 0.01); ASSERT_EQUAL_VEC(initialMomentum, momentum, 0.02);
Vec3 angularMomentum; Vec3 angularMomentum;
for (int j = 0; j < numParticles; j++) for (int j = 0; j < numParticles; j++)
angularMomentum += pos[j].cross(vel[j])*system.getParticleMass(j); angularMomentum += pos[j].cross(vel[j])*system.getParticleMass(j);
if (i == 0) if (i == 0)
initialAngularMomentum = angularMomentum; initialAngularMomentum = angularMomentum;
else else
ASSERT_EQUAL_VEC(initialAngularMomentum, angularMomentum, 0.01); ASSERT_EQUAL_VEC(initialAngularMomentum, angularMomentum, 0.02);
integrator.step(1); integrator.step(1);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment