Commit 42c7781a authored by Robert McGibbon's avatar Robert McGibbon
Browse files

Vec3 macro changes for CUDA

parent f5058fe4
...@@ -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);
......
...@@ -271,7 +271,7 @@ void testCMMotionRemoval() { ...@@ -271,7 +271,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);
} }
} }
......
...@@ -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(0,0,0)); vector<Vec3> centroids(numParticles, Vec3());
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++)
......
...@@ -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(0,0,0); positions[3*index+2] = Vec3();
} }
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