From 559637f4bcae6f080b300130887b452431f8b0e7 Mon Sep 17 00:00:00 2001
From: Tim Mattox <timothy.mattox@engilitycorp.com>
Date: Tue, 11 Oct 2016 16:11:29 -0400
Subject: [PATCH] USER-DPD Bugfix: reset_dt() is not called when I thought it
 should be called. Move the calculation of dtsqrt inside
 FixShardlow::initial_integrate()

---
 src/USER-DPD/fix_shardlow.cpp | 9 ++-------
 src/USER-DPD/fix_shardlow.h   | 2 --
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/USER-DPD/fix_shardlow.cpp b/src/USER-DPD/fix_shardlow.cpp
index fd9f4d7d74..409b75b0fb 100644
--- a/src/USER-DPD/fix_shardlow.cpp
+++ b/src/USER-DPD/fix_shardlow.cpp
@@ -169,13 +169,6 @@ void FixShardlow::min_setup_pre_exchange()
 
 /* ---------------------------------------------------------------------- */
 
-void FixShardlow::reset_dt()
-{
-  dtsqrt = sqrt(update->dt);
-}
-
-/* ---------------------------------------------------------------------- */
-
 void FixShardlow::setup(int vflag)
 {
   bool fixShardlow = false;
@@ -452,6 +445,8 @@ void FixShardlow::initial_integrate(int vflag)
   inum = list->inum;
   ilist = list->ilist;
 
+  dtsqrt = sqrt(update->dt);
+
   //Loop over all 14 directions (8 stages)
   for (airnum = 1; airnum <=8; airnum++){
 
diff --git a/src/USER-DPD/fix_shardlow.h b/src/USER-DPD/fix_shardlow.h
index 5d6b1f7c7e..ede0ef4e0b 100644
--- a/src/USER-DPD/fix_shardlow.h
+++ b/src/USER-DPD/fix_shardlow.h
@@ -40,8 +40,6 @@ class FixShardlow : public Fix {
   void copy_arrays(int, int, int);
   void set_arrays(int);
 
-  void reset_dt();
-
   int pack_border(int, int *, double *);
   int unpack_border(int, int, double *);
   int unpack_exchange(int, double *);
-- 
GitLab