git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1777 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -33,10 +33,10 @@ using namespace LAMMPS_NS;
|
|||||||
// customize by adding keyword to 1st enum
|
// customize by adding keyword to 1st enum
|
||||||
|
|
||||||
enum{TAG,MOL,TYPE,X,Y,Z,XS,YS,ZS,XU,YU,ZU,IX,IY,IZ,
|
enum{TAG,MOL,TYPE,X,Y,Z,XS,YS,ZS,XU,YU,ZU,IX,IY,IZ,
|
||||||
VX,VY,VZ,FX,FY,FZ,
|
VX,VY,VZ,FX,FY,FZ,
|
||||||
Q,MUX,MUY,MUZ,
|
Q,MUX,MUY,MUZ,RADIUS,OMEGAX,OMEGAY,OMEGAZ,
|
||||||
QUATW,QUATI,QUATJ,QUATK,TQX,TQY,TQZ,
|
QUATW,QUATI,QUATJ,QUATK,TQX,TQY,TQZ,
|
||||||
COMPUTE,FIX,VARIABLE};
|
COMPUTE,FIX,VARIABLE};
|
||||||
enum{LT,LE,GT,GE,EQ,NEQ};
|
enum{LT,LE,GT,GE,EQ,NEQ};
|
||||||
enum{INT,DOUBLE};
|
enum{INT,DOUBLE};
|
||||||
|
|
||||||
@ -442,6 +442,18 @@ int DumpCustom::count()
|
|||||||
} else if (thresh_array[ithresh] == MUZ) {
|
} else if (thresh_array[ithresh] == MUZ) {
|
||||||
ptr = &atom->mu[0][2];
|
ptr = &atom->mu[0][2];
|
||||||
nstride = 3;
|
nstride = 3;
|
||||||
|
} else if (thresh_array[ithresh] == RADIUS) {
|
||||||
|
ptr = atom->radius;
|
||||||
|
nstride = 1;
|
||||||
|
} else if (thresh_array[ithresh] == OMEGAX) {
|
||||||
|
ptr = &atom->omega[0][0];
|
||||||
|
nstride = 3;
|
||||||
|
} else if (thresh_array[ithresh] == OMEGAY) {
|
||||||
|
ptr = &atom->omega[0][1];
|
||||||
|
nstride = 3;
|
||||||
|
} else if (thresh_array[ithresh] == OMEGAZ) {
|
||||||
|
ptr = &atom->omega[0][2];
|
||||||
|
nstride = 3;
|
||||||
} else if (thresh_array[ithresh] == QUATW) {
|
} else if (thresh_array[ithresh] == QUATW) {
|
||||||
ptr = &atom->quat[0][0];
|
ptr = &atom->quat[0][0];
|
||||||
nstride = 4;
|
nstride = 4;
|
||||||
@ -683,6 +695,27 @@ void DumpCustom::parse_fields(int narg, char **arg)
|
|||||||
pack_choice[i] = &DumpCustom::pack_muz;
|
pack_choice[i] = &DumpCustom::pack_muz;
|
||||||
vtype[i] = DOUBLE;
|
vtype[i] = DOUBLE;
|
||||||
|
|
||||||
|
} else if (strcmp(arg[iarg],"radius") == 0) {
|
||||||
|
if (!atom->radius_flag)
|
||||||
|
error->all("Dumping an atom quantity that isn't allocated");
|
||||||
|
pack_choice[i] = &DumpCustom::pack_radius;
|
||||||
|
vtype[i] = DOUBLE;
|
||||||
|
} else if (strcmp(arg[iarg],"omegax") == 0) {
|
||||||
|
if (!atom->omega_flag)
|
||||||
|
error->all("Dumping an atom quantity that isn't allocated");
|
||||||
|
pack_choice[i] = &DumpCustom::pack_omegax;
|
||||||
|
vtype[i] = DOUBLE;
|
||||||
|
} else if (strcmp(arg[iarg],"omegay") == 0) {
|
||||||
|
if (!atom->omega_flag)
|
||||||
|
error->all("Dumping an atom quantity that isn't allocated");
|
||||||
|
pack_choice[i] = &DumpCustom::pack_omegay;
|
||||||
|
vtype[i] = DOUBLE;
|
||||||
|
} else if (strcmp(arg[iarg],"omegaz") == 0) {
|
||||||
|
if (!atom->omega_flag)
|
||||||
|
error->all("Dumping an atom quantity that isn't allocated");
|
||||||
|
pack_choice[i] = &DumpCustom::pack_omegaz;
|
||||||
|
vtype[i] = DOUBLE;
|
||||||
|
|
||||||
} else if (strcmp(arg[iarg],"quatw") == 0) {
|
} else if (strcmp(arg[iarg],"quatw") == 0) {
|
||||||
if (!atom->quat_flag)
|
if (!atom->quat_flag)
|
||||||
error->all("Dumping an atom quantity that isn't allocated");
|
error->all("Dumping an atom quantity that isn't allocated");
|
||||||
@ -967,6 +1000,10 @@ int DumpCustom::modify_param(int narg, char **arg)
|
|||||||
else if (strcmp(arg[1],"mux") == 0) thresh_array[nthresh] = MUX;
|
else if (strcmp(arg[1],"mux") == 0) thresh_array[nthresh] = MUX;
|
||||||
else if (strcmp(arg[1],"muy") == 0) thresh_array[nthresh] = MUY;
|
else if (strcmp(arg[1],"muy") == 0) thresh_array[nthresh] = MUY;
|
||||||
else if (strcmp(arg[1],"muz") == 0) thresh_array[nthresh] = MUZ;
|
else if (strcmp(arg[1],"muz") == 0) thresh_array[nthresh] = MUZ;
|
||||||
|
else if (strcmp(arg[1],"radius") == 0) thresh_array[nthresh] = RADIUS;
|
||||||
|
else if (strcmp(arg[1],"omegax") == 0) thresh_array[nthresh] = OMEGAX;
|
||||||
|
else if (strcmp(arg[1],"omegay") == 0) thresh_array[nthresh] = OMEGAY;
|
||||||
|
else if (strcmp(arg[1],"omegaz") == 0) thresh_array[nthresh] = OMEGAZ;
|
||||||
else if (strcmp(arg[1],"quatw") == 0) thresh_array[nthresh] = QUATW;
|
else if (strcmp(arg[1],"quatw") == 0) thresh_array[nthresh] = QUATW;
|
||||||
else if (strcmp(arg[1],"quati") == 0) thresh_array[nthresh] = QUATI;
|
else if (strcmp(arg[1],"quati") == 0) thresh_array[nthresh] = QUATI;
|
||||||
else if (strcmp(arg[1],"quatj") == 0) thresh_array[nthresh] = QUATJ;
|
else if (strcmp(arg[1],"quatj") == 0) thresh_array[nthresh] = QUATJ;
|
||||||
@ -1562,6 +1599,62 @@ void DumpCustom::pack_muz(int n)
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void DumpCustom::pack_radius(int n)
|
||||||
|
{
|
||||||
|
double *radius = atom->radius;
|
||||||
|
int nlocal = atom->nlocal;
|
||||||
|
|
||||||
|
for (int i = 0; i < nlocal; i++)
|
||||||
|
if (choose[i]) {
|
||||||
|
buf[n] = radius[i];
|
||||||
|
n += size_one;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void DumpCustom::pack_omegax(int n)
|
||||||
|
{
|
||||||
|
double **omega = atom->omega;
|
||||||
|
int nlocal = atom->nlocal;
|
||||||
|
|
||||||
|
for (int i = 0; i < nlocal; i++)
|
||||||
|
if (choose[i]) {
|
||||||
|
buf[n] = omega[i][0];
|
||||||
|
n += size_one;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void DumpCustom::pack_omegay(int n)
|
||||||
|
{
|
||||||
|
double **omega = atom->omega;
|
||||||
|
int nlocal = atom->nlocal;
|
||||||
|
|
||||||
|
for (int i = 0; i < nlocal; i++)
|
||||||
|
if (choose[i]) {
|
||||||
|
buf[n] = omega[i][1];
|
||||||
|
n += size_one;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void DumpCustom::pack_omegaz(int n)
|
||||||
|
{
|
||||||
|
double **omega = atom->omega;
|
||||||
|
int nlocal = atom->nlocal;
|
||||||
|
|
||||||
|
for (int i = 0; i < nlocal; i++)
|
||||||
|
if (choose[i]) {
|
||||||
|
buf[n] = omega[i][2];
|
||||||
|
n += size_one;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
void DumpCustom::pack_quatw(int n)
|
void DumpCustom::pack_quatw(int n)
|
||||||
{
|
{
|
||||||
double **quat = atom->quat;
|
double **quat = atom->quat;
|
||||||
|
|||||||
@ -113,6 +113,10 @@ class DumpCustom : public Dump {
|
|||||||
void pack_mux(int);
|
void pack_mux(int);
|
||||||
void pack_muy(int);
|
void pack_muy(int);
|
||||||
void pack_muz(int);
|
void pack_muz(int);
|
||||||
|
void pack_radius(int);
|
||||||
|
void pack_omegax(int);
|
||||||
|
void pack_omegay(int);
|
||||||
|
void pack_omegaz(int);
|
||||||
void pack_quatw(int);
|
void pack_quatw(int);
|
||||||
void pack_quati(int);
|
void pack_quati(int);
|
||||||
void pack_quatj(int);
|
void pack_quatj(int);
|
||||||
|
|||||||
Reference in New Issue
Block a user