git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14655 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -451,7 +451,7 @@ int DumpCustom::count()
|
||||
choose[i] = 0;
|
||||
}
|
||||
|
||||
// un-choose if any threshhold criterion isn't met
|
||||
// un-choose if any threshold criterion isn't met
|
||||
|
||||
if (nthresh) {
|
||||
double *ptr;
|
||||
@ -471,7 +471,7 @@ int DumpCustom::count()
|
||||
} else if (thresh_array[ithresh] == MOL) {
|
||||
if (!atom->molecule_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
tagint *molecule = atom->molecule;
|
||||
for (i = 0; i < nlocal; i++) dchoose[i] = molecule[i];
|
||||
ptr = dchoose;
|
||||
@ -740,44 +740,44 @@ int DumpCustom::count()
|
||||
} else if (thresh_array[ithresh] == Q) {
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
ptr = atom->q;
|
||||
nstride = 1;
|
||||
} else if (thresh_array[ithresh] == MUX) {
|
||||
if (!atom->mu_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
ptr = &atom->mu[0][0];
|
||||
nstride = 4;
|
||||
} else if (thresh_array[ithresh] == MUY) {
|
||||
if (!atom->mu_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
ptr = &atom->mu[0][1];
|
||||
nstride = 4;
|
||||
} else if (thresh_array[ithresh] == MUZ) {
|
||||
if (!atom->mu_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
ptr = &atom->mu[0][2];
|
||||
nstride = 4;
|
||||
} else if (thresh_array[ithresh] == MU) {
|
||||
if (!atom->mu_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
ptr = &atom->mu[0][3];
|
||||
nstride = 4;
|
||||
|
||||
} else if (thresh_array[ithresh] == RADIUS) {
|
||||
if (!atom->radius_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
ptr = atom->radius;
|
||||
nstride = 1;
|
||||
} else if (thresh_array[ithresh] == DIAMETER) {
|
||||
if (!atom->radius_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
double *radius = atom->radius;
|
||||
for (i = 0; i < nlocal; i++) dchoose[i] = 2.0*radius[i];
|
||||
ptr = dchoose;
|
||||
@ -785,55 +785,55 @@ int DumpCustom::count()
|
||||
} else if (thresh_array[ithresh] == OMEGAX) {
|
||||
if (!atom->omega_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
ptr = &atom->omega[0][0];
|
||||
nstride = 3;
|
||||
} else if (thresh_array[ithresh] == OMEGAY) {
|
||||
if (!atom->omega_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
ptr = &atom->omega[0][1];
|
||||
nstride = 3;
|
||||
} else if (thresh_array[ithresh] == OMEGAZ) {
|
||||
if (!atom->omega_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
ptr = &atom->omega[0][2];
|
||||
nstride = 3;
|
||||
} else if (thresh_array[ithresh] == ANGMOMX) {
|
||||
if (!atom->angmom_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
ptr = &atom->angmom[0][0];
|
||||
nstride = 3;
|
||||
} else if (thresh_array[ithresh] == ANGMOMY) {
|
||||
if (!atom->angmom_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
ptr = &atom->angmom[0][1];
|
||||
nstride = 3;
|
||||
} else if (thresh_array[ithresh] == ANGMOMZ) {
|
||||
if (!atom->angmom_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
ptr = &atom->angmom[0][2];
|
||||
nstride = 3;
|
||||
} else if (thresh_array[ithresh] == TQX) {
|
||||
if (!atom->torque_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
ptr = &atom->torque[0][0];
|
||||
nstride = 3;
|
||||
} else if (thresh_array[ithresh] == TQY) {
|
||||
if (!atom->torque_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
ptr = &atom->torque[0][1];
|
||||
nstride = 3;
|
||||
} else if (thresh_array[ithresh] == TQZ) {
|
||||
if (!atom->torque_flag)
|
||||
error->all(FLERR,
|
||||
"Threshhold for an atom property that isn't allocated");
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
ptr = &atom->torque[0][2];
|
||||
nstride = 3;
|
||||
|
||||
@ -881,7 +881,7 @@ int DumpCustom::count()
|
||||
nstride = 1;
|
||||
}
|
||||
|
||||
// unselect atoms that don't meet threshhold criterion
|
||||
// unselect atoms that don't meet threshold criterion
|
||||
|
||||
value = thresh_value[ithresh];
|
||||
|
||||
@ -1459,6 +1459,7 @@ int DumpCustom::modify_param(int narg, char **arg)
|
||||
iregion = domain->find_region(arg[1]);
|
||||
if (iregion == -1)
|
||||
error->all(FLERR,"Dump_modify region ID does not exist");
|
||||
delete [] idregion;
|
||||
int n = strlen(arg[1]) + 1;
|
||||
idregion = new char[n];
|
||||
strcpy(idregion,arg[1]);
|
||||
@ -1502,13 +1503,13 @@ int DumpCustom::modify_param(int narg, char **arg)
|
||||
|
||||
if (narg < 4) error->all(FLERR,"Illegal dump_modify command");
|
||||
|
||||
// grow threshhold arrays
|
||||
// grow threshold arrays
|
||||
|
||||
memory->grow(thresh_array,nthresh+1,"dump:thresh_array");
|
||||
memory->grow(thresh_op,(nthresh+1),"dump:thresh_op");
|
||||
memory->grow(thresh_value,(nthresh+1),"dump:thresh_value");
|
||||
|
||||
// set attribute type of threshhold
|
||||
// set attribute type of threshold
|
||||
// customize by adding to if statement
|
||||
|
||||
if (strcmp(arg[1],"id") == 0) thresh_array[nthresh] = ID;
|
||||
@ -1733,7 +1734,7 @@ int DumpCustom::modify_param(int narg, char **arg)
|
||||
|
||||
} else error->all(FLERR,"Invalid dump_modify threshhold operator");
|
||||
|
||||
// set operation type of threshhold
|
||||
// set operation type of threshold
|
||||
|
||||
if (strcmp(arg[2],"<") == 0) thresh_op[nthresh] = LT;
|
||||
else if (strcmp(arg[2],"<=") == 0) thresh_op[nthresh] = LE;
|
||||
@ -1741,9 +1742,9 @@ int DumpCustom::modify_param(int narg, char **arg)
|
||||
else if (strcmp(arg[2],">=") == 0) thresh_op[nthresh] = GE;
|
||||
else if (strcmp(arg[2],"==") == 0) thresh_op[nthresh] = EQ;
|
||||
else if (strcmp(arg[2],"!=") == 0) thresh_op[nthresh] = NEQ;
|
||||
else error->all(FLERR,"Invalid dump_modify threshhold operator");
|
||||
else error->all(FLERR,"Invalid dump_modify threshold operator");
|
||||
|
||||
// set threshhold value
|
||||
// set threshold value
|
||||
|
||||
thresh_value[nthresh] = force->numeric(FLERR,arg[3]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user