Unverified Commit 79460bf6 authored by Peter Eastman's avatar Peter Eastman Committed by GitHub
Browse files

Made some flaky tests a little less flaky (#3048)

parent b2dacffd
...@@ -158,7 +158,7 @@ void testWater() { ...@@ -158,7 +158,7 @@ void testWater() {
// Compute the internal and center of mass temperatures. // Compute the internal and center of mass temperatures.
double ke = 0; double ke = 0;
int numSteps = 4000; int numSteps = 8000;
for (int i = 0; i < numSteps; i++) { for (int i = 0; i < numSteps; i++) {
integ.step(1); integ.step(1);
ke += context.getState(State::Energy).getKineticEnergy(); ke += context.getState(State::Energy).getKineticEnergy();
...@@ -281,8 +281,8 @@ void testInitialTemperature() { ...@@ -281,8 +281,8 @@ void testInitialTemperature() {
} }
double comTemperature = (2*comKineticEnergy / (nDoF*BOLTZ)); double comTemperature = (2*comKineticEnergy / (nDoF*BOLTZ));
double relTemperature = (2*relKineticEnergy / (nDoF*BOLTZ)); double relTemperature = (2*relKineticEnergy / (nDoF*BOLTZ));
ASSERT_USUALLY_EQUAL_TOL(targetTemperature, comTemperature, 0.01); ASSERT_USUALLY_EQUAL_TOL(targetTemperature, comTemperature, 0.02);
ASSERT_USUALLY_EQUAL_TOL(drudeTemperature, relTemperature, 0.01); ASSERT_USUALLY_EQUAL_TOL(drudeTemperature, relTemperature, 0.02);
} }
void setupKernels(int argc, char* argv[]); void setupKernels(int argc, char* argv[]);
......
...@@ -527,7 +527,7 @@ void testWithBarostat() { ...@@ -527,7 +527,7 @@ void testWithBarostat() {
// Check the temperature. // Check the temperature.
const int numSteps = 500; const int numSteps = 1000;
integ.step(100); integ.step(100);
vector<double> ke(numCopies, 0.0); vector<double> ke(numCopies, 0.0);
for (int i = 0; i < numSteps; i++) { for (int i = 0; i < numSteps; i++) {
......
...@@ -528,7 +528,7 @@ void testWithBarostat() { ...@@ -528,7 +528,7 @@ void testWithBarostat() {
// Check the temperature. // Check the temperature.
const int numSteps = 500; const int numSteps = 1000;
integ.step(100); integ.step(100);
vector<double> ke(numCopies, 0.0); vector<double> ke(numCopies, 0.0);
for (int i = 0; i < numSteps; i++) { for (int i = 0; i < numSteps; i++) {
......
...@@ -411,7 +411,7 @@ void testWithBarostat() { ...@@ -411,7 +411,7 @@ void testWithBarostat() {
// Check the temperature. // Check the temperature.
const int numSteps = 500; const int numSteps = 1000;
integ.step(100); integ.step(100);
vector<double> ke(numCopies, 0.0); vector<double> ke(numCopies, 0.0);
for (int i = 0; i < numSteps; i++) { for (int i = 0; i < numSteps; i++) {
......
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