Merge branch 'lubricate_patch' of github.com:cjknight/lammps into lubricate_patch
This commit is contained in:
@ -633,15 +633,24 @@ void KokkosLMP::accelerator(int narg, char **arg)
|
||||
// set neighbor binsize, same as neigh_modify command
|
||||
|
||||
force->newton = force->newton_pair = force->newton_bond = newtonflag;
|
||||
|
||||
if (neigh_thread && newtonflag)
|
||||
error->all(FLERR,"Must use KOKKOS package option 'newton off' with 'neigh/thread on'");
|
||||
newton_check();
|
||||
|
||||
neighbor->binsize_user = binsize;
|
||||
if (binsize <= 0.0) neighbor->binsizeflag = 0;
|
||||
else neighbor->binsizeflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void KokkosLMP::newton_check()
|
||||
{
|
||||
if (neighflag == FULL && force->newton)
|
||||
error->all(FLERR,"Must use 'newton off' with KOKKOS package option 'neigh full'");
|
||||
|
||||
if (neigh_thread && force->newton)
|
||||
error->all(FLERR,"Must use 'newton off' with KOKKOS package option 'neigh/thread on'");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
called by Finish
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
@ -64,6 +64,7 @@ class KokkosLMP : protected Pointers {
|
||||
static void initialize(const Kokkos::InitializationSettings&, Error *);
|
||||
static void finalize();
|
||||
void accelerator(int, char **);
|
||||
void newton_check();
|
||||
bigint neigh_count(int);
|
||||
|
||||
template<class DeviceType>
|
||||
|
||||
@ -59,6 +59,7 @@ class KokkosLMP {
|
||||
void accelerator(int, char **) {}
|
||||
int neigh_list_kokkos(int) { return 0; }
|
||||
int neigh_count(int) { return 0; }
|
||||
void newton_check() {};
|
||||
};
|
||||
|
||||
class AtomKokkos : public Atom {
|
||||
|
||||
@ -1687,6 +1687,8 @@ void Input::newton()
|
||||
|
||||
if (newton_pair || newton_bond) force->newton = 1;
|
||||
else force->newton = 0;
|
||||
|
||||
if (lmp->kokkos) lmp->kokkos->newton_check();
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user