Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
986d88af
"vscode:/vscode.git/clone" did not exist on "4c0121463952305709253948e711aac6eec242dd"
Commit
986d88af
authored
Oct 28, 2009
by
Peter Eastman
Browse files
Increased tolerance on test cases that failed intermittently
parent
394d29a8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
platforms/cuda/tests/TestCudaLangevinIntegrator.cpp
platforms/cuda/tests/TestCudaLangevinIntegrator.cpp
+3
-3
platforms/opencl/tests/TestOpenCLLangevinIntegrator.cpp
platforms/opencl/tests/TestOpenCLLangevinIntegrator.cpp
+3
-3
platforms/reference/tests/TestReferenceLangevinIntegrator.cpp
...forms/reference/tests/TestReferenceLangevinIntegrator.cpp
+3
-3
No files found.
platforms/cuda/tests/TestCudaLangevinIntegrator.cpp
View file @
986d88af
...
@@ -119,14 +119,14 @@ void testTemperature() {
...
@@ -119,14 +119,14 @@ void testTemperature() {
// Now run it for a while and see if the temperature is correct.
// Now run it for a while and see if the temperature is correct.
double
ke
=
0.0
;
double
ke
=
0.0
;
for
(
int
i
=
0
;
i
<
1000
;
++
i
)
{
for
(
int
i
=
0
;
i
<
1000
0
;
++
i
)
{
State
state
=
context
.
getState
(
State
::
Energy
);
State
state
=
context
.
getState
(
State
::
Energy
);
ke
+=
state
.
getKineticEnergy
();
ke
+=
state
.
getKineticEnergy
();
integrator
.
step
(
1
);
integrator
.
step
(
1
);
}
}
ke
/=
1000
;
ke
/=
1000
0
;
double
expected
=
0.5
*
numParticles
*
3
*
BOLTZ
*
temp
;
double
expected
=
0.5
*
numParticles
*
3
*
BOLTZ
*
temp
;
ASSERT_EQUAL_TOL
(
expected
,
ke
,
3
/
std
::
sqrt
(
1000.0
));
ASSERT_EQUAL_TOL
(
expected
,
ke
,
6
/
std
::
sqrt
(
1000
0
.0
));
}
}
void
testConstraints
()
{
void
testConstraints
()
{
...
...
platforms/opencl/tests/TestOpenCLLangevinIntegrator.cpp
View file @
986d88af
...
@@ -119,14 +119,14 @@ void testTemperature() {
...
@@ -119,14 +119,14 @@ void testTemperature() {
// Now run it for a while and see if the temperature is correct.
// Now run it for a while and see if the temperature is correct.
double
ke
=
0.0
;
double
ke
=
0.0
;
for
(
int
i
=
0
;
i
<
1000
;
++
i
)
{
for
(
int
i
=
0
;
i
<
1000
0
;
++
i
)
{
State
state
=
context
.
getState
(
State
::
Energy
);
State
state
=
context
.
getState
(
State
::
Energy
);
ke
+=
state
.
getKineticEnergy
();
ke
+=
state
.
getKineticEnergy
();
integrator
.
step
(
1
);
integrator
.
step
(
1
);
}
}
ke
/=
1000
;
ke
/=
1000
0
;
double
expected
=
0.5
*
numParticles
*
3
*
BOLTZ
*
temp
;
double
expected
=
0.5
*
numParticles
*
3
*
BOLTZ
*
temp
;
ASSERT_EQUAL_TOL
(
expected
,
ke
,
3
/
std
::
sqrt
(
1000.0
));
ASSERT_EQUAL_TOL
(
expected
,
ke
,
6
/
std
::
sqrt
(
1000
0
.0
));
}
}
void
testConstraints
()
{
void
testConstraints
()
{
...
...
platforms/reference/tests/TestReferenceLangevinIntegrator.cpp
View file @
986d88af
...
@@ -119,14 +119,14 @@ void testTemperature() {
...
@@ -119,14 +119,14 @@ void testTemperature() {
// Now run it for a while and see if the temperature is correct.
// Now run it for a while and see if the temperature is correct.
double
ke
=
0.0
;
double
ke
=
0.0
;
for
(
int
i
=
0
;
i
<
1000
;
++
i
)
{
for
(
int
i
=
0
;
i
<
1000
0
;
++
i
)
{
State
state
=
context
.
getState
(
State
::
Energy
);
State
state
=
context
.
getState
(
State
::
Energy
);
ke
+=
state
.
getKineticEnergy
();
ke
+=
state
.
getKineticEnergy
();
integrator
.
step
(
1
);
integrator
.
step
(
1
);
}
}
ke
/=
1000
;
ke
/=
1000
0
;
double
expected
=
0.5
*
numParticles
*
3
*
BOLTZ
*
temp
;
double
expected
=
0.5
*
numParticles
*
3
*
BOLTZ
*
temp
;
ASSERT_EQUAL_TOL
(
expected
,
ke
,
3
/
std
::
sqrt
(
1000.0
));
ASSERT_EQUAL_TOL
(
expected
,
ke
,
6
/
std
::
sqrt
(
1000
0
.0
));
}
}
void
testConstraints
()
{
void
testConstraints
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment