Commit d28df828 authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed test cases that were overly strict

parent 0b96aa2e
......@@ -118,7 +118,7 @@ void testEwaldPME(bool includeExceptions) {
}
norm = std::sqrt(norm);
const double delta = 1e-3;
const double delta = 5e-3;
double step = delta/norm;
for (int i = 0; i < numParticles; ++i) {
Vec3 p = positions[i];
......@@ -128,7 +128,7 @@ void testEwaldPME(bool includeExceptions) {
cudaContext.reinitialize();
cudaContext.setPositions(positions);
tol = 1e-3;
tol = 1e-2;
State cudaState2 = cudaContext.getState(State::Energy);
ASSERT_EQUAL_TOL(norm, (cudaState2.getPotentialEnergy()-cudaState.getPotentialEnergy())/delta, tol)
......@@ -166,7 +166,7 @@ void testEwaldPME(bool includeExceptions) {
cudaContext.reinitialize();
cudaContext.setPositions(positions);
tol = 1e-3;
tol = 1e-2;
State cudaState3 = cudaContext.getState(State::Energy);
ASSERT_EQUAL_TOL(norm, (cudaState3.getPotentialEnergy()-cudaState.getPotentialEnergy())/delta, tol)
}
......
......@@ -117,7 +117,7 @@ void testEwaldPME(bool includeExceptions) {
}
norm = std::sqrt(norm);
const double delta = 1e-3;
const double delta = 5e-3;
double step = delta/norm;
for (int i = 0; i < numParticles; ++i) {
Vec3 p = positions[i];
......@@ -127,7 +127,7 @@ void testEwaldPME(bool includeExceptions) {
Context clContext2(system, integrator, cl);
clContext2.setPositions(positions);
tol = 1e-3;
tol = 1e-2;
State clState2 = clContext2.getState(State::Energy);
ASSERT_EQUAL_TOL(norm, (clState2.getPotentialEnergy()-clState.getPotentialEnergy())/delta, tol)
......@@ -165,7 +165,7 @@ void testEwaldPME(bool includeExceptions) {
Context clContext3(system, integrator, cl);
clContext3.setPositions(positions);
tol = 1e-3;
tol = 1e-2;
State clState3 = clContext3.getState(State::Energy);
ASSERT_EQUAL_TOL(norm, (clState3.getPotentialEnergy()-clState.getPotentialEnergy())/delta, tol)
}
......
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