git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8351 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2012-06-20 14:08:33 +00:00
parent e2d32549ab
commit f55e618e9e
4 changed files with 10 additions and 13 deletions

View File

@ -147,5 +147,6 @@ void FixShearHistoryOMP::pre_exchange()
int flag_all; int flag_all;
MPI_Allreduce(&flag,&flag_all,1,MPI_INT,MPI_SUM,world); MPI_Allreduce(&flag,&flag_all,1,MPI_INT,MPI_SUM,world);
if (flag_all) error->all(FLERR,"Too many touching neighbors - boost MAXTOUCH"); if (flag_all)
error->all(FLERR,"Too many touching neighbors - boost MAXTOUCH");
} }

View File

@ -23,8 +23,7 @@
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace FixConst; using namespace FixConst;
enum{XPLANE=0,YPLANE=1,ZPLANE=2,ZCYLINDER}; // XYZ PLANE need to be 0,1,2
enum{XPLANE,YPLANE,ZPLANE,ZCYLINDER}; // XYZ PLANE need to be 0,1,2
enum{HOOKE,HOOKE_HISTORY,HERTZ_HISTORY}; enum{HOOKE,HOOKE_HISTORY,HERTZ_HISTORY};
#define BIG 1.0e20 #define BIG 1.0e20
@ -75,8 +74,7 @@ void FixWallGranOMP::post_force(int vflag)
const int * const mask = atom->mask; const int * const mask = atom->mask;
const int nlocal = atom->nlocal; const int nlocal = atom->nlocal;
if (update->ntimestep > laststep) shearupdate = 1; shearupdate = (update->setupflag) ? 0 : 1;
else shearupdate = 0;
int i; int i;
#if defined(_OPENMP) #if defined(_OPENMP)
@ -140,8 +138,6 @@ void FixWallGranOMP::post_force(int vflag)
} }
} }
} }
laststep = update->ntimestep;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -41,12 +41,13 @@ void PairGranHertzHistoryOMP::compute(int eflag, int vflag)
ev_setup(eflag,vflag); ev_setup(eflag,vflag);
} else evflag = vflag_fdotr = 0; } else evflag = vflag_fdotr = 0;
const int shearupdate = (update->ntimestep > laststep) ? 1 : 0;
const int nall = atom->nlocal + atom->nghost; const int nall = atom->nlocal + atom->nghost;
const int nthreads = comm->nthreads; const int nthreads = comm->nthreads;
const int inum = list->inum; const int inum = list->inum;
computeflag = 1;
const int shearupdate = (update->setupflag) ? 0 : 1;
#if defined(_OPENMP) #if defined(_OPENMP)
#pragma omp parallel default(none) shared(eflag,vflag) #pragma omp parallel default(none) shared(eflag,vflag)
#endif #endif
@ -66,7 +67,6 @@ void PairGranHertzHistoryOMP::compute(int eflag, int vflag)
reduce_thr(this, eflag, vflag, thr); reduce_thr(this, eflag, vflag, thr);
} // end of omp parallel region } // end of omp parallel region
laststep = update->ntimestep;
} }
template <int EVFLAG, int SHEARUPDATE> template <int EVFLAG, int SHEARUPDATE>

View File

@ -46,7 +46,8 @@ void PairGranHookeHistoryOMP::compute(int eflag, int vflag)
ev_setup(eflag,vflag); ev_setup(eflag,vflag);
} else evflag = vflag_fdotr = 0; } else evflag = vflag_fdotr = 0;
const int shearupdate = (update->ntimestep > laststep) ? 1 : 0; computeflag = 1;
const int shearupdate = (update->setupflag) ? 0 : 1;
const int nall = atom->nlocal + atom->nghost; const int nall = atom->nlocal + atom->nghost;
const int nthreads = comm->nthreads; const int nthreads = comm->nthreads;
@ -71,7 +72,6 @@ void PairGranHookeHistoryOMP::compute(int eflag, int vflag)
reduce_thr(this, eflag, vflag, thr); reduce_thr(this, eflag, vflag, thr);
} // end of omp parallel region } // end of omp parallel region
laststep = update->ntimestep;
} }
template <int EVFLAG, int SHEARUPDATE> template <int EVFLAG, int SHEARUPDATE>
@ -89,7 +89,7 @@ void PairGranHookeHistoryOMP::eval(int iifrom, int iito, ThrData * const thr)
double shrmag,rsht; double shrmag,rsht;
int *ilist,*jlist,*numneigh,**firstneigh; int *ilist,*jlist,*numneigh,**firstneigh;
int *touch,**firsttouch; int *touch,**firsttouch;
double *shear,*allshear,**firstshear; double *allshear,**firstshear;
const double * const * const x = atom->x; const double * const * const x = atom->x;
const double * const * const v = atom->v; const double * const * const v = atom->v;