From dc7f1281b83214d360cac981b33fdca2d559f935 Mon Sep 17 00:00:00 2001 From: Tim Mattox Date: Wed, 30 Aug 2017 11:01:17 -0500 Subject: [PATCH] USER-DPD: Kokkos version of Const Temperature DPD isn't implemented yet The Constant Energy DPD (DPDE) was our primary usage case, so only stubs for the Constant Temperature case were included in Kokkos code so far. The non-Kokkos version works fine for Constant Temperature DPD. --- src/KOKKOS/fix_shardlow_kokkos.cpp | 3 ++- src/KOKKOS/fix_shardlow_kokkos.h | 14 +++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/KOKKOS/fix_shardlow_kokkos.cpp b/src/KOKKOS/fix_shardlow_kokkos.cpp index ea7cc21fff..98bbb02714 100644 --- a/src/KOKKOS/fix_shardlow_kokkos.cpp +++ b/src/KOKKOS/fix_shardlow_kokkos.cpp @@ -265,7 +265,8 @@ void FixShardlowKokkos::setup_pre_neighbor() /* ---------------------------------------------------------------------- */ -#ifdef NOTNOW +#ifdef ENABLE_KOKKOS_DPD_CONSTANT_TEMPERATURE +#error "FixShardlowKokkos::ssa_update_dpd() is not functional yet - TIM 20170830" /* ---------------------------------------------------------------------- Perform the stochastic integration and Shardlow update for constant temperature Allow for both per-type and per-atom mass diff --git a/src/KOKKOS/fix_shardlow_kokkos.h b/src/KOKKOS/fix_shardlow_kokkos.h index 1ff94d5eec..70dccf2e2d 100644 --- a/src/KOKKOS/fix_shardlow_kokkos.h +++ b/src/KOKKOS/fix_shardlow_kokkos.h @@ -26,6 +26,9 @@ FixStyle(shardlow/kk/host,FixShardlowKokkos) #include "fix_shardlow.h" #include "kokkos_type.h" #include "neigh_list_kokkos.h" +#ifdef ENABLE_KOKKOS_DPD_CONSTANT_TEMPERATURE +#include "pair_dpd_fdt_kokkos.h" +#endif #include "pair_dpd_fdt_energy_kokkos.h" namespace LAMMPS_NS { @@ -85,7 +88,9 @@ class FixShardlowKokkos : public FixShardlow { int workPhase; double theta_ij_inv,boltz_inv,ftm2v,dt; -// class PairDPDfdt *pairDPD; +#ifdef ENABLE_KOKKOS_DPD_CONSTANT_TEMPERATURE +// class PairDPDfdt *pairDPD; FIXME as per k_pairDPDE below +#endif PairDPDfdtEnergyKokkos *k_pairDPDE; int maxRNG; @@ -138,8 +143,11 @@ class FixShardlowKokkos : public FixShardlow { typename AT::t_int_2d ssa_gitemLoc, ssa_gitemLen; -// template -// void ssa_update_dpd(int, int); // Constant Temperature +#ifdef ENABLE_KOKKOS_DPD_CONSTANT_TEMPERATURE + template + KOKKOS_INLINE_FUNCTION + void ssa_update_dpd(int, int, int) const; // Constant Temperature +#endif template KOKKOS_INLINE_FUNCTION void ssa_update_dpde(int, int, int) const; // Constant Energy