"platforms/brook/src/BrookShakeAlgorithm.cpp" did not exist on "1adaefcc7fab870bf0d097885c3b3e6d6369d4eb"
Commit feb0368f authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed a test case that occasionally failed

parent 9966f134
...@@ -50,7 +50,7 @@ using namespace std; ...@@ -50,7 +50,7 @@ using namespace std;
static OpenCLPlatform platform; static OpenCLPlatform platform;
void testGaussian() { void testGaussian() {
int numAtoms = 5000; int numAtoms = 10000;
System system; System system;
for (int i = 0; i < numAtoms; i++) for (int i = 0; i < numAtoms; i++)
system.addParticle(1.0); system.addParticle(1.0);
...@@ -82,10 +82,10 @@ void testGaussian() { ...@@ -82,10 +82,10 @@ void testGaussian() {
double c2 = var-mean*mean; double c2 = var-mean*mean;
double c3 = skew-3*var*mean+2*mean*mean*mean; double c3 = skew-3*var*mean+2*mean*mean*mean;
double c4 = kurtosis-4*skew*mean-3*var*var+12*var*mean*mean-6*mean*mean*mean*mean; double c4 = kurtosis-4*skew*mean-3*var*var+12*var*mean*mean-6*mean*mean*mean*mean;
ASSERT_EQUAL_TOL(0.0, mean, 3.0/sqrt((double)numValues)); ASSERT_EQUAL_TOL(0.0, mean, 4.0/sqrt((double)numValues));
ASSERT_EQUAL_TOL(1.0, c2, 3.0/pow(numValues, 1.0/3.0)); ASSERT_EQUAL_TOL(1.0, c2, 4.0/pow(numValues, 1.0/3.0));
ASSERT_EQUAL_TOL(0.0, c3, 3.0/pow(numValues, 1.0/4.0)); ASSERT_EQUAL_TOL(0.0, c3, 4.0/pow(numValues, 1.0/4.0));
ASSERT_EQUAL_TOL(0.0, c4, 3.0/pow(numValues, 1.0/4.0)); ASSERT_EQUAL_TOL(0.0, c4, 4.0/pow(numValues, 1.0/4.0));
} }
void testRandomVelocities() { void testRandomVelocities() {
......
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