Commit 6ccf4b45 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15481 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent bfba361f
Loading
Loading
Loading
Loading
+10 −16
Original line number Diff line number Diff line
@@ -298,6 +298,9 @@ int Dump::count()

void Dump::write()
{
  imageint *imagehold;
  double **xhold,**vhold;

  // if file per timestep, open new file

  if (multifile) openfile();
@@ -377,15 +380,12 @@ void Dump::write()
      memcpy(&vpbc[0][0],&atom->v[0][0],3*nlocal*sizeof(double));
      memcpy(imagepbc,atom->image,nlocal*sizeof(imageint));
    }
    double **dtmp = atom->x;
    xhold = atom->x;
    vhold = atom->v;
    imagehold = atom->image;
    atom->x = xpbc;
    xpbc = dtmp;
    dtmp = atom->v;
    atom->v = vpbc;
    vpbc = dtmp;
    imageint *itmp = atom->image;
    atom->image = imagepbc;
    imagepbc = itmp;
    domain->pbc();
  }
  
@@ -470,15 +470,9 @@ void Dump::write()
  // restore original x,v,image unaltered by PBC

  if (pbcflag) {
    double **dtmp = atom->x;
    atom->x = xpbc;
    xpbc = dtmp;
    dtmp = atom->v;
    atom->v = vpbc;
    vpbc = dtmp;
    imageint *itmp = atom->image;
    atom->image = imagepbc;
    imagepbc = itmp;
    atom->x = xhold;
    atom->v = vhold;
    atom->image = imagehold;
  }

  // if file per timestep, close file if I am filewriter