restore lost changes to fix gpu from upstream

This commit is contained in:
Axel Kohlmeyer
2019-05-18 13:09:25 -04:00
parent 4a4297591e
commit 601746b565

View File

@ -30,6 +30,7 @@
#include "neighbor.h"
#include "citeme.h"
#include "error.h"
#include "utils.h"
using namespace LAMMPS_NS;
using namespace FixConst;
@ -231,21 +232,16 @@ void FixGPU::init()
// make sure fdotr virial is not accumulated multiple times
if (force->pair_match("hybrid",1) != NULL) {
if (force->pair_match("^hybrid",0) != NULL) {
PairHybrid *hybrid = (PairHybrid *) force->pair;
for (int i = 0; i < hybrid->nstyles; i++)
if (strstr(hybrid->keywords[i],"/gpu")==NULL)
force->pair->no_virial_fdotr_compute = 1;
} else if (force->pair_match("hybrid/overlay",1) != NULL) {
PairHybridOverlay *hybrid = (PairHybridOverlay *) force->pair;
for (int i = 0; i < hybrid->nstyles; i++)
if (strstr(hybrid->keywords[i],"/gpu")==NULL)
if (!utils::strmatch(hybrid->keywords[i],"/gpu$"))
force->pair->no_virial_fdotr_compute = 1;
}
// rRESPA support
if (strstr(update->integrate_style,"respa"))
if (utils::strmatch(update->integrate_style,"^respa"))
_nlevels_respa = ((Respa *) update->integrate)->nlevels;
}
@ -276,7 +272,7 @@ void FixGPU::min_setup(int vflag)
/* ---------------------------------------------------------------------- */
void FixGPU::post_force(int vflag)
void FixGPU::post_force(int /* vflag */)
{
if (!force->pair) return;
@ -308,7 +304,7 @@ void FixGPU::min_post_force(int vflag)
/* ---------------------------------------------------------------------- */
void FixGPU::post_force_respa(int vflag, int ilevel, int iloop)
void FixGPU::post_force_respa(int vflag, int /* ilevel */, int /* iloop */)
{
post_force(vflag);
}