Unverified Commit 735f9ad5 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

address logic error with check for KOKKOS version of hybrid styles

parent 2c64809c
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
#include "respa.h"
#include "utils.h"
#include "suffix.h"
#include "fmt/format.h"

using namespace LAMMPS_NS;

@@ -265,6 +266,9 @@ void PairHybrid::allocate()
void PairHybrid::settings(int narg, char **arg)
{
  if (narg < 1) error->all(FLERR,"Illegal pair_style command");
  if (lmp->kokkos && !utils::strmatch(force->pair_style,"^hybrid.*/kk$"))
    error->all(FLERR,fmt::format("Must use pair_style {}/kk with Kokkos",
                                 force->pair_style));

  // delete old lists, since cannot just change settings

@@ -433,9 +437,6 @@ void PairHybrid::coeff(int narg, char **arg)
  if (narg < 3) error->all(FLERR,"Incorrect args for pair coefficients");
  if (!allocated) allocate();

  if (lmp->kokkos)
    error->all(FLERR,"Must use pair_style hybrid/kk with Kokkos");

  int ilo,ihi,jlo,jhi;
  force->bounds(FLERR,arg[0],atom->ntypes,ilo,ihi);
  force->bounds(FLERR,arg[1],atom->ntypes,jlo,jhi);
+0 −3
Original line number Diff line number Diff line
@@ -33,9 +33,6 @@ void PairHybridOverlay::coeff(int narg, char **arg)
  if (narg < 3) error->all(FLERR,"Incorrect args for pair coefficients");
  if (!allocated) allocate();

  if (lmp->kokkos)
    error->all(FLERR,"Must use pair_style hybrid/overlay/kk with Kokkos");

  int ilo,ihi,jlo,jhi;
  force->bounds(FLERR,arg[0],atom->ntypes,ilo,ihi);
  force->bounds(FLERR,arg[1],atom->ntypes,jlo,jhi);