From 6edaf42b3dbfa7ef0da4b399e720c4737faef778 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 24 Mar 2022 11:41:47 -0400 Subject: [PATCH] fix temperature initialization bug in KOKKOS nose-hoover code --- src/KOKKOS/fix_nh_kokkos.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/KOKKOS/fix_nh_kokkos.cpp b/src/KOKKOS/fix_nh_kokkos.cpp index 1d32d4f63e..783ae65737 100644 --- a/src/KOKKOS/fix_nh_kokkos.cpp +++ b/src/KOKKOS/fix_nh_kokkos.cpp @@ -88,6 +88,11 @@ void FixNHKokkos::init() template void FixNHKokkos::setup(int /*vflag*/) { + // tdof needed by compute_temp_target() + + t_current = temperature->compute_scalar(); + tdof = temperature->dof; + // t_target is needed by NPH and NPT in compute_scalar() // If no thermostat or using fix nphug, // t_target must be defined by other means. @@ -737,4 +742,3 @@ template class FixNHKokkos; template class FixNHKokkos; #endif } -