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

This commit is contained in:
sjplimp
2015-08-29 22:03:12 +00:00
parent 1a435a401c
commit 4bd3fe89c8
10 changed files with 91 additions and 40 deletions

View File

@ -52,11 +52,17 @@ CommTiled::CommTiled(LAMMPS *lmp) : Comm(lmp)
style = 1;
layout = LAYOUT_UNIFORM;
pbc_flag = NULL;
init_buffers();
}
/* ---------------------------------------------------------------------- */
//IMPORTANT: we *MUST* pass "*oldcomm" to the Comm initializer here, as
// the code below *requires* that the (implicit) copy constructor
// for Comm is run and thus creating a shallow copy of "oldcomm".
// The call to Comm::copy_arrays() then converts the shallow copy
// into a deep copy of the class with the new layout.
//
CommTiled::CommTiled(LAMMPS *lmp, Comm *oldcomm) : Comm(*oldcomm)
{
if (lmp->cuda)
@ -66,7 +72,7 @@ CommTiled::CommTiled(LAMMPS *lmp, Comm *oldcomm) : Comm(*oldcomm)
style = 1;
layout = oldcomm->layout;
copy_arrays(oldcomm);
Comm::copy_arrays(oldcomm);
init_buffers();
}