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

This commit is contained in:
sjplimp
2009-04-01 22:23:28 +00:00
parent c12b42237c
commit 86b3f60494
8 changed files with 13 additions and 10 deletions

View File

@ -470,7 +470,8 @@ void FixPour::pre_exchange()
// set tag # of new particles beyond all previous atoms // set tag # of new particles beyond all previous atoms
// reset global natoms // reset global natoms
// if global map exists, reset it // if global map exists, reset it now instead of waiting for comm
// since deleting atoms messes up ghosts
if (atom->tag_enable) { if (atom->tag_enable) {
atom->tag_extend(); atom->tag_extend();

View File

@ -214,10 +214,9 @@ void Ewald::compute(int eflag, int vflag)
energy = 0.0; energy = 0.0;
if (vflag) for (n = 0; n < 6; n++) virial[n] = 0.0; if (vflag) for (n = 0; n < 6; n++) virial[n] = 0.0;
// extend size of nlocal-dependent arrays if necessary // extend size of per-atom arrays if necessary
int nlocal = atom->nlocal; if (atom->nlocal > nmax) {
if (nlocal > nmax) {
memory->destroy_2d_double_array(ek); memory->destroy_2d_double_array(ek);
memory->destroy_3d_double_array(cs,-kmax_created); memory->destroy_3d_double_array(cs,-kmax_created);
memory->destroy_3d_double_array(sn,-kmax_created); memory->destroy_3d_double_array(sn,-kmax_created);
@ -240,6 +239,7 @@ void Ewald::compute(int eflag, int vflag)
double **f = atom->f; double **f = atom->f;
double *q = atom->q; double *q = atom->q;
int nlocal = atom->nlocal;
int kx,ky,kz; int kx,ky,kz;
double cypz,sypz,exprl,expim,partial; double cypz,sypz,exprl,expim,partial;

View File

@ -646,7 +646,7 @@ void PPPM::compute(int eflag, int vflag)
domain->x2lamda(atom->nlocal); domain->x2lamda(atom->nlocal);
} }
// extend size of nlocal-dependent arrays if necessary // extend size of per-atom arrays if necessary
if (atom->nlocal > nmax) { if (atom->nlocal > nmax) {
memory->destroy_2d_int_array(part2grid); memory->destroy_2d_int_array(part2grid);

View File

@ -134,7 +134,8 @@ void PairEAM::compute(int eflag, int vflag)
if (eflag || vflag) ev_setup(eflag,vflag); if (eflag || vflag) ev_setup(eflag,vflag);
else evflag = vflag_fdotr = 0; else evflag = vflag_fdotr = 0;
// grow energy array if necessary // grow energy and fp arrays if necessary
// need to be atom->nmax in length
if (atom->nmax > nmax) { if (atom->nmax > nmax) {
memory->sfree(rho); memory->sfree(rho);

View File

@ -167,6 +167,7 @@ void FixBondBreak::post_integrate()
// resize bond partner list and initialize it // resize bond partner list and initialize it
// probability array overlays distsq array // probability array overlays distsq array
// needs to be atom->nmax in length
if (atom->nmax > nmax) { if (atom->nmax > nmax) {
memory->sfree(partner); memory->sfree(partner);

View File

@ -278,6 +278,7 @@ void FixBondCreate::post_integrate()
// resize bond partner list and initialize it // resize bond partner list and initialize it
// probability array overlays distsq array // probability array overlays distsq array
// needs to be atom->nmax in length
if (atom->nmax > nmax) { if (atom->nmax > nmax) {
memory->sfree(partner); memory->sfree(partner);

View File

@ -183,9 +183,9 @@ void PairPeriPMB::compute(int eflag, int vflag)
} }
} }
// bond forces // grow bond forces array if necessary
if (atom->nmax > nmax) { if (nlocal > nmax) {
memory->sfree(s0_new); memory->sfree(s0_new);
nmax = atom->nmax; nmax = atom->nmax;
s0_new = (double *) memory->smalloc(nmax*sizeof(double),"pair:s0_new"); s0_new = (double *) memory->smalloc(nmax*sizeof(double),"pair:s0_new");

View File

@ -269,8 +269,6 @@ double FixBoxRelax::min_energy(double *fextra)
// returned eng = PV must be in units of energy // returned eng = PV must be in units of energy
// returned fextra must likewise be in units of energy // returned fextra must likewise be in units of energy
fextra[0] = fextra[1] = fextra[2] = 0.0;
if (press_couple == XYZ) { if (press_couple == XYZ) {
scale = domain->xprd/xprdinit; scale = domain->xprd/xprdinit;
if (dimension == 3) { if (dimension == 3) {
@ -282,6 +280,7 @@ double FixBoxRelax::min_energy(double *fextra)
} }
} else { } else {
fextra[0] = fextra[1] = fextra[2] = 0.0;
scalex = scaley = scalez = 1.0; scalex = scaley = scalez = 1.0;
if (p_flag[0]) scalex = domain->xprd/xprdinit; if (p_flag[0]) scalex = domain->xprd/xprdinit;
if (p_flag[1]) scaley = domain->yprd/yprdinit; if (p_flag[1]) scaley = domain->yprd/yprdinit;