Commit b2d24121 authored by Robert McGibbon's avatar Robert McGibbon
Browse files

Build with Intel compilers

parent bca01957
...@@ -143,6 +143,7 @@ ...@@ -143,6 +143,7 @@
*/ */
#ifndef CL_HPP_ #ifndef CL_HPP_
#define CL_HPP_ #define CL_HPP_
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
#ifdef _WIN32 #ifdef _WIN32
......
...@@ -80,8 +80,8 @@ void testMasslessParticle() { ...@@ -80,8 +80,8 @@ void testMasslessParticle() {
for (int i = 0; i < 1000; ++i) { for (int i = 0; i < 1000; ++i) {
State state = context.getState(State::Positions | State::Velocities | State::Forces); State state = context.getState(State::Positions | State::Velocities | State::Forces);
double time = state.getTime(); double time = state.getTime();
ASSERT_EQUAL_VEC(Vec3(), state.getPositions()[0], 0.0); ASSERT_EQUAL_VEC(Vec3(0, 0, 0), state.getPositions()[0], 0.0);
ASSERT_EQUAL_VEC(Vec3(), state.getVelocities()[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(cos(time), sin(time), 0), state.getPositions()[1], 0.01);
ASSERT_EQUAL_VEC(Vec3(-sin(time), cos(time), 0), state.getVelocities()[1], 0.01); ASSERT_EQUAL_VEC(Vec3(-sin(time), cos(time), 0), state.getVelocities()[1], 0.01);
integrator.step(1); integrator.step(1);
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <cmath> #include <cmath>
#include <cstring> #include <cstring>
#include <sstream> #include <sstream>
#include <cstdlib>
using namespace OpenMM; using namespace OpenMM;
using namespace std; using namespace std;
......
...@@ -194,7 +194,7 @@ void testParaHydrogen() { ...@@ -194,7 +194,7 @@ void testParaHydrogen() {
// Calculate the quantum contribution to the kinetic energy. // Calculate the quantum contribution to the kinetic energy.
vector<Vec3> centroids(numParticles, Vec3()); vector<Vec3> centroids(numParticles, Vec3(0,0,0));
for (int i = 0; i < numCopies; i++) { for (int i = 0; i < numCopies; i++) {
const vector<Vec3>& pos = states[i].getPositions(); const vector<Vec3>& pos = states[i].getPositions();
for (int j = 0; j < numParticles; j++) for (int j = 0; j < numParticles; j++)
...@@ -272,7 +272,7 @@ void testCMMotionRemoval() { ...@@ -272,7 +272,7 @@ void testCMMotionRemoval() {
pos += calcCM(state.getPositions(), system); pos += calcCM(state.getPositions(), system);
} }
pos *= 1.0/numCopies; 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() { ...@@ -155,7 +155,7 @@ void testCMMotionRemoval() {
pos += calcCM(state.getPositions(), system); pos += calcCM(state.getPositions(), system);
} }
pos *= 1.0/numCopies; pos *= 1.0/numCopies;
ASSERT_EQUAL_VEC(Vec3(), pos, 0.5); ASSERT_EQUAL_VEC(Vec3(0,0,0), pos, 0.5);
} }
} }
...@@ -206,7 +206,7 @@ void testVirtualSites() { ...@@ -206,7 +206,7 @@ void testVirtualSites() {
int index = k+gridSize*(j+gridSize*i); int index = k+gridSize*(j+gridSize*i);
positions[3*index] = pos; positions[3*index] = pos;
positions[3*index+1] = Vec3(pos[0]+1.0, pos[1], pos[2]); positions[3*index+1] = Vec3(pos[0]+1.0, pos[1], pos[2]);
positions[3*index+2] = Vec3(); positions[3*index+2] = Vec3(0,0,0);
} }
integ.setPositions(copy, positions); integ.setPositions(copy, positions);
} }
......
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