manage cutghost array for KOKKOS, if requested by pair style command

This commit is contained in:
Axel Kohlmeyer
2025-04-07 18:00:56 -04:00
parent 52ce35adbc
commit 6c337ba655
2 changed files with 3 additions and 0 deletions

View File

@ -57,6 +57,7 @@ PairMLIAPKokkos<DeviceType>::~PairMLIAPKokkos()
memoryKK->destroy_kokkos(k_setflag, setflag);
memoryKK->destroy_kokkos(k_eatom, eatom);
memoryKK->destroy_kokkos(k_vatom, vatom);
if (ghostneigh) memoryKK->destroy_kokkos(k_cutghost, cutghost);
delete model;
delete descriptor;
model=nullptr;
@ -147,6 +148,7 @@ void PairMLIAPKokkos<DeviceType>::allocate()
memoryKK->create_kokkos(k_cutsq, cutsq, n+1, n+1, "pair_mliap:cutsq");
memoryKK->create_kokkos(k_setflag, setflag, n+1, n+1, "pair_mliap:setflag");
if (ghostneigh) memoryKK->create_kokkos(k_cutghost, cutghost, n+1, n+1, "pair_mliap:cutghost");
// this is for the base class so it doesn't double delete
allocated = 1;
}

View File

@ -108,6 +108,7 @@ public:
typename AT::t_f_array f;
DAT::tdual_int_1d k_map;
DAT::tdual_double_2d k_cutsq;
DAT::tdual_double_2d k_cutghost;
DAT::tdual_int_2d k_setflag;
DAT::tdual_efloat_1d k_eatom;
DAT::tdual_double_2d k_vatom;