Fix bug in Kokkos neighborlist where stencil wasn't updated for occasional list
This commit is contained in:
committed by
Axel Kohlmeyer
parent
6b400fb4bf
commit
21fcdf8c56
@ -29,6 +29,8 @@ namespace LAMMPS_NS {
|
||||
template<class DeviceType, int HALF_NEIGH, int GHOST, int TRI, int SIZE>
|
||||
NPairKokkos<DeviceType,HALF_NEIGH,GHOST,TRI,SIZE>::NPairKokkos(LAMMPS *lmp) : NPair(lmp) {
|
||||
|
||||
last_stencil_old = -1;
|
||||
|
||||
// use 1D view for scalars to reduce GPU memory operations
|
||||
|
||||
d_scalars = typename AT::t_int_1d("neighbor:scalars",2);
|
||||
@ -112,9 +114,11 @@ void NPairKokkos<DeviceType,HALF_NEIGH,GHOST,TRI,SIZE>::copy_stencil_info()
|
||||
NPair::copy_stencil_info();
|
||||
nstencil = ns->nstencil;
|
||||
|
||||
if (ns->last_stencil == update->ntimestep) {
|
||||
if (ns->last_stencil != last_stencil_old) {
|
||||
// copy stencil to device as it may have changed
|
||||
|
||||
last_stencil_old = ns->last_stencil;
|
||||
|
||||
int maxstencil = ns->get_maxstencil();
|
||||
|
||||
if (maxstencil > (int)k_stencil.extent(0))
|
||||
|
||||
@ -138,7 +138,7 @@ class NPairKokkos : public NPair {
|
||||
|
||||
// data from NStencil class
|
||||
|
||||
int nstencil;
|
||||
int nstencil,last_stencil_old;
|
||||
DAT::tdual_int_1d k_stencil; // # of J neighs for each I
|
||||
DAT::tdual_int_1d_3 k_stencilxyz;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user