fix temperature initialization bug in KOKKOS nose-hoover code

This commit is contained in:
Axel Kohlmeyer
2022-03-24 11:41:47 -04:00
parent 79c047487d
commit 6edaf42b3d

View File

@ -88,6 +88,11 @@ void FixNHKokkos<DeviceType>::init()
template<class DeviceType>
void FixNHKokkos<DeviceType>::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<LMPDeviceType>;
template class FixNHKokkos<LMPHostType>;
#endif
}