"docs-source/api-python/render.py" did not exist on "0923921365f9337e9dad1215e60504e6fae4008a"
Commit 4cde8c54 authored by Michael Sherman's avatar Michael Sherman
Browse files

Fixed some MSVC conversion warnings and moved method-local inclusion of pme.h...

Fixed some MSVC conversion warnings and moved method-local inclusion of pme.h up to start of LJ file -- it wouldn't compile when included locally due to attempt to match extern binding with anonymous struct type.
parent e391509f
...@@ -399,9 +399,9 @@ void ReferenceCalcNonbondedForceKernel::initialize(const System& system, const N ...@@ -399,9 +399,9 @@ void ReferenceCalcNonbondedForceKernel::initialize(const System& system, const N
RealOpenMM my = periodicBoxSize[1]/nonbondedCutoff; RealOpenMM my = periodicBoxSize[1]/nonbondedCutoff;
RealOpenMM mz = periodicBoxSize[2]/nonbondedCutoff; RealOpenMM mz = periodicBoxSize[2]/nonbondedCutoff;
RealOpenMM pi = (RealOpenMM) 3.1415926535897932385; RealOpenMM pi = (RealOpenMM) 3.1415926535897932385;
kmax[0] = std::ceil(-(mx/pi)*std::log(ewaldErrorTol)); kmax[0] = (int)std::ceil(-(mx/pi)*std::log(ewaldErrorTol));
kmax[1] = std::ceil(-(my/pi)*std::log(ewaldErrorTol)); kmax[1] = (int)std::ceil(-(my/pi)*std::log(ewaldErrorTol));
kmax[2] = std::ceil(-(mz/pi)*std::log(ewaldErrorTol)); kmax[2] = (int)std::ceil(-(mz/pi)*std::log(ewaldErrorTol));
if (kmax[0]%2 == 0) if (kmax[0]%2 == 0)
kmax[0]++; kmax[0]++;
if (kmax[1]%2 == 0) if (kmax[1]%2 == 0)
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
#include "ReferenceLJCoulombIxn.h" #include "ReferenceLJCoulombIxn.h"
#include "ReferenceForce.h" #include "ReferenceForce.h"
#include "pme.h"
// In case we're using some primitive version of Visual Studio this will // In case we're using some primitive version of Visual Studio this will
// make sure that erf() and erfc() are defined. // make sure that erf() and erfc() are defined.
#include "MSVC_erfc.h" #include "MSVC_erfc.h"
...@@ -452,8 +454,7 @@ int ReferenceLJCoulombIxn::calculatePMEIxn( int numberOfAtoms, RealOpenMM** atom ...@@ -452,8 +454,7 @@ int ReferenceLJCoulombIxn::calculatePMEIxn( int numberOfAtoms, RealOpenMM** atom
RealOpenMM* fixedParameters, RealOpenMM** forces, RealOpenMM* fixedParameters, RealOpenMM** forces,
RealOpenMM* energyByAtom, RealOpenMM* totalEnergy) const { RealOpenMM* energyByAtom, RealOpenMM* totalEnergy) const {
#include "../SimTKUtilities/RealTypeSimTk.h"
#include "pme.h"
RealOpenMM SQRT_PI = sqrt(PI); RealOpenMM SQRT_PI = sqrt(PI);
static const RealOpenMM one = 1.0; static const RealOpenMM one = 1.0;
......
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