From 6efd2bf08d7da0fb2ca3bd77c1b226720fb56505 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 28 Jun 2013 20:28:22 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10169 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/GPU/pair_gayberne_gpu.cpp | 6 +++--- src/compute_stress_atom.cpp | 2 +- src/output.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/GPU/pair_gayberne_gpu.cpp b/src/GPU/pair_gayberne_gpu.cpp index c4ddc17e38..ec12cdc423 100644 --- a/src/GPU/pair_gayberne_gpu.cpp +++ b/src/GPU/pair_gayberne_gpu.cpp @@ -71,9 +71,6 @@ enum{SPHERE_SPHERE,SPHERE_ELLIPSE,ELLIPSE_SPHERE,ELLIPSE_ELLIPSE}; PairGayBerneGPU::PairGayBerneGPU(LAMMPS *lmp) : PairGayBerne(lmp), gpu_mode(GPU_FORCE) { - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - if (!avec) - error->all(FLERR,"Pair gayberne/gpu requires atom style ellipsoid"); quat_nmax = 0; quat = NULL; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); @@ -152,6 +149,9 @@ void PairGayBerneGPU::compute(int eflag, int vflag) void PairGayBerneGPU::init_style() { + avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + if (!avec) + error->all(FLERR,"Pair gayberne/gpu requires atom style ellipsoid"); if (force->newton_pair) error->all(FLERR,"Cannot use newton pair with gayberne/gpu pair style"); if (!atom->ellipsoid_flag) diff --git a/src/compute_stress_atom.cpp b/src/compute_stress_atom.cpp index 6e48efd626..c9595e899c 100644 --- a/src/compute_stress_atom.cpp +++ b/src/compute_stress_atom.cpp @@ -192,7 +192,7 @@ void ComputeStressAtom::compute_peratom() // communicate ghost virials between neighbor procs - if (force->newton || force->kspace->tip4pflag) + if (force->newton || (force->kspace && force->kspace->tip4pflag)) comm->reverse_comm_compute(this); // zero virial of atoms not in group diff --git a/src/output.cpp b/src/output.cpp index d988d07e1a..f682609059 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -441,7 +441,7 @@ void Output::write_restart(bigint ntimestep) timestep is being changed, called by update->reset_timestep() reset next timestep values for dumps, restart, thermo output reset to smallest value >= new timestep - if next timestep set by varaible evaluation, + if next timestep set by variable evaluation, eval for ntimestep-1, so current ntimestep can be returned if needed no guarantee that variable can be evaluated for ntimestep-1 if it depends on computes, but live with that rare case for now