From 92209c7adf1a9ce1dcd830ede0c359ffbc5476de Mon Sep 17 00:00:00 2001 From: sjplimp Date: Thu, 19 Aug 2010 16:36:55 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4515 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/respa.cpp | 6 ++++++ src/update.cpp | 1 + src/update.h | 1 + src/verlet.cpp | 6 ++++++ 4 files changed, 14 insertions(+) diff --git a/src/respa.cpp b/src/respa.cpp index f898d88d7d..d80a652c50 100644 --- a/src/respa.cpp +++ b/src/respa.cpp @@ -312,6 +312,8 @@ void Respa::setup() { if (comm->me == 0 && screen) fprintf(screen,"Setting up run ...\n"); + update->setupflag = 1; + // setup domain, communication and neighboring // acquire ghosts // build neighbor lists @@ -362,6 +364,7 @@ void Respa::setup() modify->setup(vflag); sum_flevel_f(); output->setup(1); + update->setupflag = 0; } /* ---------------------------------------------------------------------- @@ -372,6 +375,8 @@ void Respa::setup() void Respa::setup_minimal(int flag) { + update->setupflag = 1; + // setup domain, communication and neighboring // acquire ghosts // build neighbor lists @@ -421,6 +426,7 @@ void Respa::setup_minimal(int flag) modify->setup(vflag); sum_flevel_f(); + update->setupflag = 0; } /* ---------------------------------------------------------------------- diff --git a/src/update.cpp b/src/update.cpp index 2de63f21f8..502aa869f2 100644 --- a/src/update.cpp +++ b/src/update.cpp @@ -42,6 +42,7 @@ Update::Update(LAMMPS *lmp) : Pointers(lmp) whichflag = 0; firststep = laststep = 0; beginstep = endstep = 0; + setupflag = 0; restrict_output = 0; diff --git a/src/update.h b/src/update.h index 7b16ee3e92..b964ec69ef 100644 --- a/src/update.h +++ b/src/update.h @@ -30,6 +30,7 @@ class Update : protected Pointers { int first_update; // 0 before initial update, 1 after int max_eval; // max force evaluations for minimizer int restrict_output; // 1 if output should not write dump/restart + int setupflag; // set when setup() is computing forces int eflag_global,eflag_atom; // timestep global/peratom eng is tallied on int vflag_global,vflag_atom; // ditto for virial diff --git a/src/verlet.cpp b/src/verlet.cpp index c05e3a66b6..c454bdd60b 100644 --- a/src/verlet.cpp +++ b/src/verlet.cpp @@ -81,6 +81,8 @@ void Verlet::setup() { if (comm->me == 0 && screen) fprintf(screen,"Setting up run ...\n"); + update->setupflag = 1; + // setup domain, communication and neighboring // acquire ghosts // build neighbor lists @@ -122,6 +124,7 @@ void Verlet::setup() modify->setup(vflag); output->setup(1); + update->setupflag = 0; } /* ---------------------------------------------------------------------- @@ -132,6 +135,8 @@ void Verlet::setup() void Verlet::setup_minimal(int flag) { + update->setupflag = 1; + // setup domain, communication and neighboring // acquire ghosts // build neighbor lists @@ -172,6 +177,7 @@ void Verlet::setup_minimal(int flag) if (force->newton) comm->reverse_comm(); modify->setup(vflag); + update->setupflag = 0; } /* ----------------------------------------------------------------------