diff --git a/src/GRANULAR/fix_pour.cpp b/src/GRANULAR/fix_pour.cpp index a6284d1d5e..27bf4fc707 100644 --- a/src/GRANULAR/fix_pour.cpp +++ b/src/GRANULAR/fix_pour.cpp @@ -37,10 +37,11 @@ using namespace LAMMPS_NS; using namespace FixConst; using namespace MathConst; -#define EPSILON 0.001 - enum{ATOM,MOLECULE}; enum{ONE,RANGE,POLY}; +enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files + +#define EPSILON 0.001 /* ---------------------------------------------------------------------- */ @@ -598,13 +599,25 @@ void FixPour::pre_exchange() if (newcoord[0] >= sublo[0] && newcoord[0] < subhi[0] && newcoord[1] >= sublo[1] && newcoord[1] < subhi[1] && newcoord[2] >= sublo[2] && newcoord[2] < subhi[2]) flag = 1; - else if (dimension == 3 && newcoord[2] >= domain->boxhi[2] && - comm->myloc[2] == comm->procgrid[2]-1 && - newcoord[0] >= sublo[0] && newcoord[0] < subhi[0] && - newcoord[1] >= sublo[1] && newcoord[1] < subhi[1]) flag = 1; - else if (dimension == 2 && newcoord[1] >= domain->boxhi[1] && - comm->myloc[1] == comm->procgrid[1]-1 && - newcoord[0] >= sublo[0] && newcoord[0] < subhi[0]) flag = 1; + else if (dimension == 3 && newcoord[2] >= domain->boxhi[2]) { + if (comm->layout != LAYOUT_TILED) { + if (comm->myloc[2] == comm->procgrid[2]-1 && + newcoord[0] >= sublo[0] && newcoord[0] < subhi[0] && + newcoord[1] >= sublo[1] && newcoord[1] < subhi[1]) flag = 1; + } else { + if (comm->mysplit[2][1] == 1.0 && + newcoord[0] >= sublo[0] && newcoord[0] < subhi[0] && + newcoord[1] >= sublo[1] && newcoord[1] < subhi[1]) flag = 1; + } + } else if (dimension == 2 && newcoord[1] >= domain->boxhi[1]) { + if (comm->layout != LAYOUT_TILED) { + if (comm->myloc[1] == comm->procgrid[1]-1 && + newcoord[0] >= sublo[0] && newcoord[0] < subhi[0]) flag = 1; + } else { + if (comm->mysplit[1][1] == 1.0 && + newcoord[0] >= sublo[0] && newcoord[0] < subhi[0]) flag = 1; + } + } if (flag) { if (mode == ATOM) atom->avec->create_atom(ntype,coords[m]); diff --git a/src/KSPACE/msm.cpp b/src/KSPACE/msm.cpp index 5ce73ee41f..81dbc98b47 100644 --- a/src/KSPACE/msm.cpp +++ b/src/KSPACE/msm.cpp @@ -148,6 +148,9 @@ void MSM::init() triclinic_check(); if (domain->dimension == 2) error->all(FLERR,"Cannot (yet) use MSM with 2d simulation"); + if (comm->style != 0) + error->universe_all(FLERR,"MSM can only currently be used with " + "comm_style brick"); if (!atom->q_flag) error->all(FLERR,"Kspace style requires atom attribute q"); diff --git a/src/KSPACE/pppm.cpp b/src/KSPACE/pppm.cpp index 5f3f8ce2db..095d70b7a2 100644 --- a/src/KSPACE/pppm.cpp +++ b/src/KSPACE/pppm.cpp @@ -183,6 +183,9 @@ void PPPM::init() "slab correction"); if (domain->dimension == 2) error->all(FLERR, "Cannot use PPPM with 2d simulation"); + if (comm->style != 0) + error->universe_all(FLERR,"PPPM can only currently be used with " + "comm_style brick"); if (!atom->q_flag) error->all(FLERR,"Kspace style requires atom attribute q"); diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index 195aa47af3..1dfea3bf77 100755 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -213,6 +213,9 @@ void PPPMDisp::init() triclinic_check(); if (domain->dimension == 2) error->all(FLERR,"Cannot use PPPMDisp with 2d simulation"); + if (comm->style != 0) + error->universe_all(FLERR,"PPPMDisp can only currently be used with " + "comm_style brick"); if (slabflag == 0 && domain->nonperiodic > 0) error->all(FLERR,"Cannot use nonperiodic boundaries with PPPMDisp"); diff --git a/src/MISC/fix_deposit.cpp b/src/MISC/fix_deposit.cpp index a804028397..213d39329b 100644 --- a/src/MISC/fix_deposit.cpp +++ b/src/MISC/fix_deposit.cpp @@ -37,6 +37,7 @@ using namespace FixConst; using namespace MathConst; enum{ATOM,MOLECULE}; +enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files #define EPSILON 1.0e6 @@ -452,13 +453,25 @@ void FixDeposit::pre_exchange() if (newcoord[0] >= sublo[0] && newcoord[0] < subhi[0] && newcoord[1] >= sublo[1] && newcoord[1] < subhi[1] && newcoord[2] >= sublo[2] && newcoord[2] < subhi[2]) flag = 1; - else if (dimension == 3 && newcoord[2] >= domain->boxhi[2] && - comm->myloc[2] == comm->procgrid[2]-1 && - newcoord[0] >= sublo[0] && newcoord[0] < subhi[0] && - newcoord[1] >= sublo[1] && newcoord[1] < subhi[1]) flag = 1; - else if (dimension == 2 && newcoord[1] >= domain->boxhi[1] && - comm->myloc[1] == comm->procgrid[1]-1 && - newcoord[0] >= sublo[0] && newcoord[0] < subhi[0]) flag = 1; + else if (dimension == 3 && newcoord[2] >= domain->boxhi[2]) { + if (comm->layout != LAYOUT_TILED) { + if (comm->myloc[2] == comm->procgrid[2]-1 && + newcoord[0] >= sublo[0] && newcoord[0] < subhi[0] && + newcoord[1] >= sublo[1] && newcoord[1] < subhi[1]) flag = 1; + } else { + if (comm->mysplit[2][1] == 1.0 && + newcoord[0] >= sublo[0] && newcoord[0] < subhi[0] && + newcoord[1] >= sublo[1] && newcoord[1] < subhi[1]) flag = 1; + } + } else if (dimension == 2 && newcoord[1] >= domain->boxhi[1]) { + if (comm->layout != LAYOUT_TILED) { + if (comm->myloc[1] == comm->procgrid[1]-1 && + newcoord[0] >= sublo[0] && newcoord[0] < subhi[0]) flag = 1; + } else { + if (comm->mysplit[1][1] == 1.0 && + newcoord[0] >= sublo[0] && newcoord[0] < subhi[0]) flag = 1; + } + } if (flag) { if (mode == ATOM) atom->avec->create_atom(ntype,coords[m]); diff --git a/src/REPLICA/verlet_split.cpp b/src/REPLICA/verlet_split.cpp index 1ede274a76..a2808251db 100644 --- a/src/REPLICA/verlet_split.cpp +++ b/src/REPLICA/verlet_split.cpp @@ -52,6 +52,9 @@ VerletSplit::VerletSplit(LAMMPS *lmp, int narg, char **arg) : if (universe->procs_per_world[0] % universe->procs_per_world[1]) error->universe_all(FLERR,"Verlet/split requires Rspace partition " "size be multiple of Kspace partition size"); + if (comm->style != 0) + error->universe_all(FLERR,"Verlet/split can only currently be used with " + "comm_style brick"); // master = 1 for Rspace procs, 0 for Kspace procs @@ -214,6 +217,9 @@ VerletSplit::~VerletSplit() void VerletSplit::init() { + if (comm->style != 0) + error->universe_all(FLERR,"Verlet/split can only currently be used with " + "comm_style brick"); if (!force->kspace && comm->me == 0) error->warning(FLERR,"No Kspace calculation with verlet/split"); diff --git a/src/SHOCK/fix_append_atoms.cpp b/src/SHOCK/fix_append_atoms.cpp index 5e7af01f6e..571e77b129 100644 --- a/src/SHOCK/fix_append_atoms.cpp +++ b/src/SHOCK/fix_append_atoms.cpp @@ -29,6 +29,8 @@ using namespace LAMMPS_NS; using namespace FixConst; +enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files + #define BIG 1.0e30 #define EPSILON 1.0e-6 @@ -410,7 +412,15 @@ void FixAppendAtoms::pre_exchange() if (ntimestep % freq == 0) { if (spatflag==1) if (get_spatial()==0) return; - if (comm->myloc[2] == comm->procgrid[2]-1) { + + int addflag = 0; + if (comm->layout != LAYOUT_TILED) { + if (comm->myloc[2] == comm->procgrid[2]-1) addflag = 1; + } else { + if (comm->mysplit[2][1] == 1.0) addflag = 1; + } + + if (addflag) { double bboxlo[3],bboxhi[3]; bboxlo[0] = domain->sublo[0]; bboxhi[0] = domain->subhi[0]; diff --git a/src/SRD/fix_srd.cpp b/src/SRD/fix_srd.cpp index 3db73bab51..37dc068797 100644 --- a/src/SRD/fix_srd.cpp +++ b/src/SRD/fix_srd.cpp @@ -334,9 +334,12 @@ void FixSRD::init() if (bigexist && comm->ghost_velocity == 0) error->all(FLERR,"Fix srd requires ghost atoms store velocity"); if (bigexist && collidestyle == NOSLIP && !atom->torque_flag) - error->all(FLERR,"Fix SRD no-slip requires atom attribute torque"); + error->all(FLERR,"Fix srd no-slip requires atom attribute torque"); if (initflag && update->dt != dt_big) error->all(FLERR,"Cannot change timestep once fix srd is setup"); + if (comm->style != 0) + error->universe_all(FLERR,"Fix srd can only currently be used with " + "comm_style brick"); // orthogonal vs triclinic simulation box // could be static or shearing box