Unverified Commit 601746b5 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

restore lost changes to fix gpu from upstream

parent 4a429759
Loading
Loading
Loading
Loading
+6 −10
Original line number Diff line number Diff line
@@ -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);
}