Commit 7195f68b authored by peastman's avatar peastman
Browse files

Merge pull request #999 from rmcgibbo/icc

Small fixes to support Intel compilers
parents ca200ea3 42c7781a
......@@ -80,8 +80,8 @@ void testMasslessParticle() {
for (int i = 0; i < 1000; ++i) {
State state = context.getState(State::Positions | State::Velocities | State::Forces);
double time = state.getTime();
ASSERT_EQUAL_VEC(Vec3(), state.getPositions()[0], 0.0);
ASSERT_EQUAL_VEC(Vec3(), state.getVelocities()[0], 0.0);
ASSERT_EQUAL_VEC(Vec3(0,0,0), state.getPositions()[0], 0.0);
ASSERT_EQUAL_VEC(Vec3(0,0,0), state.getVelocities()[0], 0.0);
ASSERT_EQUAL_VEC(Vec3(cos(time), sin(time), 0), state.getPositions()[1], 0.01);
ASSERT_EQUAL_VEC(Vec3(-sin(time), cos(time), 0), state.getVelocities()[1], 0.01);
integrator.step(1);
......
......@@ -143,6 +143,7 @@
*/
#ifndef CL_HPP_
#define CL_HPP_
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
#ifdef _WIN32
......
......@@ -80,8 +80,8 @@ void testMasslessParticle() {
for (int i = 0; i < 1000; ++i) {
State state = context.getState(State::Positions | State::Velocities | State::Forces);
double time = state.getTime();
ASSERT_EQUAL_VEC(Vec3(), state.getPositions()[0], 0.0);
ASSERT_EQUAL_VEC(Vec3(), state.getVelocities()[0], 0.0);
ASSERT_EQUAL_VEC(Vec3(0, 0, 0), state.getPositions()[0], 0.0);
ASSERT_EQUAL_VEC(Vec3(0, 0, 0), state.getVelocities()[0], 0.0);
ASSERT_EQUAL_VEC(Vec3(cos(time), sin(time), 0), state.getPositions()[1], 0.01);
ASSERT_EQUAL_VEC(Vec3(-sin(time), cos(time), 0), state.getVelocities()[1], 0.01);
integrator.step(1);
......
......@@ -39,6 +39,7 @@
#include <cmath>
#include <cstring>
#include <sstream>
#include <cstdlib>
using namespace OpenMM;
using namespace std;
......
......@@ -271,7 +271,7 @@ void testCMMotionRemoval() {
pos += calcCM(state.getPositions(), system);
}
pos *= 1.0/numCopies;
ASSERT_EQUAL_VEC(Vec3(), pos, 0.5);
ASSERT_EQUAL_VEC(Vec3(0,0,0), pos, 0.5);
}
}
......
......@@ -272,7 +272,7 @@ void testCMMotionRemoval() {
pos += calcCM(state.getPositions(), system);
}
pos *= 1.0/numCopies;
ASSERT_EQUAL_VEC(Vec3(), pos, 0.5);
ASSERT_EQUAL_VEC(Vec3(0,0,0), pos, 0.5);
}
}
......
......@@ -155,7 +155,7 @@ void testCMMotionRemoval() {
pos += calcCM(state.getPositions(), system);
}
pos *= 1.0/numCopies;
ASSERT_EQUAL_VEC(Vec3(), pos, 0.5);
ASSERT_EQUAL_VEC(Vec3(0,0,0), pos, 0.5);
}
}
......
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