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

This commit is contained in:
sjplimp
2013-03-07 17:32:03 +00:00
parent 3d25c94f33
commit 91b7613960
4 changed files with 11 additions and 1 deletions

View File

@ -270,6 +270,8 @@ void Atom::create_avec(const char *style, int narg, char **arg, char *suffix)
vfrac_flag = spin_flag = eradius_flag = ervel_flag = erforce_flag = 0; vfrac_flag = spin_flag = eradius_flag = ervel_flag = erforce_flag = 0;
// create instance of AtomVec // create instance of AtomVec
// use grow to initialize atom-based arrays to length 1
// so that x[0][0] can be referenced even if proc has no atoms
int sflag; int sflag;
avec = new_avec(style,suffix,sflag); avec = new_avec(style,suffix,sflag);

View File

@ -449,7 +449,7 @@ LAMMPS::~LAMMPS()
void LAMMPS::create() void LAMMPS::create()
{ {
// Comm class must be created before Atom // Comm class must be created before Atom class
// so that nthreads is defined when create_avec invokes grow() // so that nthreads is defined when create_avec invokes grow()
if (cuda) comm = new CommCuda(this); if (cuda) comm = new CommCuda(this);

View File

@ -560,6 +560,11 @@ void Respa::recurse(int ilevel)
timer->stamp(TIME_COMM); timer->stamp(TIME_COMM);
} }
// force computations
// important that ordering is same as Verlet
// so that any order dependencies are the same
// when potentials are invoked at same level
force_clear(newton[ilevel]); force_clear(newton[ilevel]);
if (modify->n_pre_force_respa) if (modify->n_pre_force_respa)
modify->pre_force_respa(vflag,ilevel,iloop); modify->pre_force_respa(vflag,ilevel,iloop);

View File

@ -263,6 +263,9 @@ void Verlet::run(int n)
} }
// force computations // force computations
// important for pair to come before bonded contributions
// since some bonded potentials tally pairwise energy/virial
// and Pair:ev_tally() needs to be called before any tallying
force_clear(); force_clear();
if (n_pre_force) modify->pre_force(vflag); if (n_pre_force) modify->pre_force(vflag);