From 893538cab2f00b2d6d4cfa08f1167c08e3c1bde8 Mon Sep 17 00:00:00 2001
From: sjplimp <sjplimp@f3b2605a-c512-4ea7-a41b-209d697bcdaa>
Date: Fri, 1 Apr 2011 16:30:32 +0000
Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5889
 f3b2605a-c512-4ea7-a41b-209d697bcdaa

---
 src/GRANULAR/pair_gran_hertz_history.cpp | 4 ++--
 src/fix_ave_spatial.cpp                  | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/GRANULAR/pair_gran_hertz_history.cpp b/src/GRANULAR/pair_gran_hertz_history.cpp
index 87e341927a..475506e749 100644
--- a/src/GRANULAR/pair_gran_hertz_history.cpp
+++ b/src/GRANULAR/pair_gran_hertz_history.cpp
@@ -56,8 +56,8 @@ void PairGranHertzHistory::compute(int eflag, int vflag)
   if (eflag || vflag) ev_setup(eflag,vflag);
   else evflag = vflag_fdotr = 0;
 
-  if (eflag || vflag) ev_setup(eflag,vflag);
-  else evflag = vflag_fdotr = 0;
+  int shearupdate = 0;
+  if (update->ntimestep > laststep) shearupdate = 1;
 
   double **x = atom->x;
   double **v = atom->v;
diff --git a/src/fix_ave_spatial.cpp b/src/fix_ave_spatial.cpp
index 18ee268fde..63c366b5cc 100644
--- a/src/fix_ave_spatial.cpp
+++ b/src/fix_ave_spatial.cpp
@@ -168,6 +168,7 @@ FixAveSpatial::FixAveSpatial(LAMMPS *lmp, int narg, char **arg) :
   idregion = NULL;
   fp = NULL;
   ave = ONE;
+  nwindow = 0;
   char *title1 = NULL;
   char *title2 = NULL;
   char *title3 = NULL;