Move pair potentials and change to traditional Functor
This commit is contained in:
parent
a638c4f388
commit
2d948a7e76
5 changed files with 122 additions and 94 deletions
|
@ -1,4 +1,4 @@
|
|||
#include "pair_potentials.cuh"
|
||||
#include "potentials/pair_potentials.cuh"
|
||||
#include "precision.hpp"
|
||||
#include "gtest/gtest.h"
|
||||
#include <cmath>
|
||||
|
@ -69,6 +69,7 @@ __global__ void lennard_jones_test_kernel(TestResults *results) {
|
|||
auto result = lj.calc_force_and_energy(r);
|
||||
results->energy_values[2] = result.energy;
|
||||
results->force_values[2] = result.force;
|
||||
|
||||
results->at_minimum_pass =
|
||||
(fabs(result.energy + epsilon) < tolerance) &&
|
||||
vec3_near(Vec3<real>{0.0, 0.0, 0.0}, result.force, tolerance);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue