Fix bug in fix_setforce_kokkos

This commit is contained in:
Stan Moore
2019-07-12 11:53:32 -06:00
parent 7109c1013a
commit a51479a62b

View File

@ -47,6 +47,7 @@ FixSetForceKokkos<DeviceType>::FixSetForceKokkos(LAMMPS *lmp, int narg, char **a
memory->destroy(sforce);
memoryKK->create_kokkos(k_sforce,sforce,maxatom,3,"setforce:sforce");
d_sforce = k_sforce.view<DeviceType>();
}
/* ---------------------------------------------------------------------- */
@ -103,6 +104,7 @@ void FixSetForceKokkos<DeviceType>::post_force(int vflag)
maxatom = atom->nmax;
memoryKK->destroy_kokkos(k_sforce,sforce);
memoryKK->create_kokkos(k_sforce,sforce,maxatom,3,"setforce:sforce");
d_sforce = k_sforce.view<DeviceType>();
}
foriginal[0] = foriginal[1] = foriginal[2] = 0.0;