git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12208 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -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]);
|
||||
|
||||
@ -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");
|
||||
|
||||
|
||||
@ -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");
|
||||
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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]);
|
||||
|
||||
@ -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");
|
||||
|
||||
|
||||
@ -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];
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user