forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12196 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
76f04f7683
commit
6760d0dd57
|
@ -34,7 +34,7 @@ using namespace LAMMPS_NS;
|
||||||
// customize by adding keyword
|
// customize by adding keyword
|
||||||
// also customize compute_atom_property.cpp
|
// also customize compute_atom_property.cpp
|
||||||
|
|
||||||
enum{ID,MOL,TYPE,ELEMENT,MASS,
|
enum{ID,MOL,PROC,TYPE,ELEMENT,MASS,
|
||||||
X,Y,Z,XS,YS,ZS,XSTRI,YSTRI,ZSTRI,XU,YU,ZU,XUTRI,YUTRI,ZUTRI,
|
X,Y,Z,XS,YS,ZS,XSTRI,YSTRI,ZSTRI,XU,YU,ZU,XUTRI,YUTRI,ZUTRI,
|
||||||
XSU,YSU,ZSU,XSUTRI,YSUTRI,ZSUTRI,
|
XSU,YSU,ZSU,XSUTRI,YSUTRI,ZSUTRI,
|
||||||
IX,IY,IZ,
|
IX,IY,IZ,
|
||||||
|
@ -451,6 +451,10 @@ int DumpCustom::count()
|
||||||
for (i = 0; i < nlocal; i++) dchoose[i] = molecule[i];
|
for (i = 0; i < nlocal; i++) dchoose[i] = molecule[i];
|
||||||
ptr = dchoose;
|
ptr = dchoose;
|
||||||
nstride = 1;
|
nstride = 1;
|
||||||
|
} else if (thresh_array[ithresh] == PROC) {
|
||||||
|
for (i = 0; i < nlocal; i++) dchoose[i] = me;
|
||||||
|
ptr = dchoose;
|
||||||
|
nstride = 1;
|
||||||
} else if (thresh_array[ithresh] == TYPE) {
|
} else if (thresh_array[ithresh] == TYPE) {
|
||||||
int *type = atom->type;
|
int *type = atom->type;
|
||||||
for (i = 0; i < nlocal; i++) dchoose[i] = type[i];
|
for (i = 0; i < nlocal; i++) dchoose[i] = type[i];
|
||||||
|
@ -978,6 +982,9 @@ int DumpCustom::parse_fields(int narg, char **arg)
|
||||||
error->all(FLERR,"Dumping an atom property that isn't allocated");
|
error->all(FLERR,"Dumping an atom property that isn't allocated");
|
||||||
pack_choice[i] = &DumpCustom::pack_molecule;
|
pack_choice[i] = &DumpCustom::pack_molecule;
|
||||||
vtype[i] = INT;
|
vtype[i] = INT;
|
||||||
|
} else if (strcmp(arg[iarg],"proc") == 0) {
|
||||||
|
pack_choice[i] = &DumpCustom::pack_proc;
|
||||||
|
vtype[i] = INT;
|
||||||
} else if (strcmp(arg[iarg],"type") == 0) {
|
} else if (strcmp(arg[iarg],"type") == 0) {
|
||||||
pack_choice[i] = &DumpCustom::pack_type;
|
pack_choice[i] = &DumpCustom::pack_type;
|
||||||
vtype[i] = INT;
|
vtype[i] = INT;
|
||||||
|
@ -1384,6 +1391,7 @@ int DumpCustom::modify_param(int narg, char **arg)
|
||||||
|
|
||||||
if (strcmp(arg[1],"id") == 0) thresh_array[nthresh] = ID;
|
if (strcmp(arg[1],"id") == 0) thresh_array[nthresh] = ID;
|
||||||
else if (strcmp(arg[1],"mol") == 0) thresh_array[nthresh] = MOL;
|
else if (strcmp(arg[1],"mol") == 0) thresh_array[nthresh] = MOL;
|
||||||
|
else if (strcmp(arg[1],"proc") == 0) thresh_array[nthresh] = PROC;
|
||||||
else if (strcmp(arg[1],"type") == 0) thresh_array[nthresh] = TYPE;
|
else if (strcmp(arg[1],"type") == 0) thresh_array[nthresh] = TYPE;
|
||||||
else if (strcmp(arg[1],"mass") == 0) thresh_array[nthresh] = MASS;
|
else if (strcmp(arg[1],"mass") == 0) thresh_array[nthresh] = MASS;
|
||||||
|
|
||||||
|
@ -1683,6 +1691,16 @@ void DumpCustom::pack_molecule(int n)
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void DumpCustom::pack_proc(int n)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < nchoose; i++) {
|
||||||
|
buf[n] = me;
|
||||||
|
n += size_one;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
void DumpCustom::pack_type(int n)
|
void DumpCustom::pack_type(int n)
|
||||||
{
|
{
|
||||||
int *type = atom->type;
|
int *type = atom->type;
|
||||||
|
|
|
@ -117,6 +117,7 @@ class DumpCustom : public Dump {
|
||||||
|
|
||||||
void pack_id(int);
|
void pack_id(int);
|
||||||
void pack_molecule(int);
|
void pack_molecule(int);
|
||||||
|
void pack_proc(int);
|
||||||
void pack_type(int);
|
void pack_type(int);
|
||||||
void pack_mass(int);
|
void pack_mass(int);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue