git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5922 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -58,6 +58,7 @@ class Dump : protected Pointers {
|
|||||||
int sortcolm1; // sortcol - 1
|
int sortcolm1; // sortcol - 1
|
||||||
int sortorder; // ASCEND or DESCEND
|
int sortorder; // ASCEND or DESCEND
|
||||||
|
|
||||||
|
char boundstr[9]; // encoding of boundary flags
|
||||||
char *format_default; // default format string
|
char *format_default; // default format string
|
||||||
char *format_user; // format string set by user
|
char *format_user; // format string set by user
|
||||||
char *format; // format string for the file write
|
char *format; // format string for the file write
|
||||||
|
|||||||
@ -57,6 +57,20 @@ void DumpAtom::init_style()
|
|||||||
strcat(format,"\n");
|
strcat(format,"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// setup boundary string
|
||||||
|
|
||||||
|
int m = 0;
|
||||||
|
for (int idim = 0; idim < 3; idim++) {
|
||||||
|
for (int iside = 0; iside < 2; iside++) {
|
||||||
|
if (domain->boundary[idim][iside] == 0) boundstr[m++] = 'p';
|
||||||
|
else if (domain->boundary[idim][iside] == 1) boundstr[m++] = 'f';
|
||||||
|
else if (domain->boundary[idim][iside] == 2) boundstr[m++] = 's';
|
||||||
|
else if (domain->boundary[idim][iside] == 3) boundstr[m++] = 'm';
|
||||||
|
}
|
||||||
|
boundstr[m++] = ' ';
|
||||||
|
}
|
||||||
|
boundstr[8] = '\0';
|
||||||
|
|
||||||
// setup column string
|
// setup column string
|
||||||
|
|
||||||
if (scale_flag == 0 && image_flag == 0)
|
if (scale_flag == 0 && image_flag == 0)
|
||||||
@ -209,7 +223,7 @@ void DumpAtom::header_item(bigint ndump)
|
|||||||
fprintf(fp,BIGINT_FORMAT "\n",update->ntimestep);
|
fprintf(fp,BIGINT_FORMAT "\n",update->ntimestep);
|
||||||
fprintf(fp,"ITEM: NUMBER OF ATOMS\n");
|
fprintf(fp,"ITEM: NUMBER OF ATOMS\n");
|
||||||
fprintf(fp,BIGINT_FORMAT "\n",ndump);
|
fprintf(fp,BIGINT_FORMAT "\n",ndump);
|
||||||
fprintf(fp,"ITEM: BOX BOUNDS\n");
|
fprintf(fp,"ITEM: BOX BOUNDS %s\n",boundstr);
|
||||||
fprintf(fp,"%g %g\n",boxxlo,boxxhi);
|
fprintf(fp,"%g %g\n",boxxlo,boxxhi);
|
||||||
fprintf(fp,"%g %g\n",boxylo,boxyhi);
|
fprintf(fp,"%g %g\n",boxylo,boxyhi);
|
||||||
fprintf(fp,"%g %g\n",boxzlo,boxzhi);
|
fprintf(fp,"%g %g\n",boxzlo,boxzhi);
|
||||||
@ -224,7 +238,7 @@ void DumpAtom::header_item_triclinic(bigint ndump)
|
|||||||
fprintf(fp,BIGINT_FORMAT "\n",update->ntimestep);
|
fprintf(fp,BIGINT_FORMAT "\n",update->ntimestep);
|
||||||
fprintf(fp,"ITEM: NUMBER OF ATOMS\n");
|
fprintf(fp,"ITEM: NUMBER OF ATOMS\n");
|
||||||
fprintf(fp,BIGINT_FORMAT "\n",ndump);
|
fprintf(fp,BIGINT_FORMAT "\n",ndump);
|
||||||
fprintf(fp,"ITEM: BOX BOUNDS xy xz yz\n");
|
fprintf(fp,"ITEM: BOX BOUNDS %s xy xz yz\n",boundstr);
|
||||||
fprintf(fp,"%g %g %g\n",boxxlo,boxxhi,boxxy);
|
fprintf(fp,"%g %g %g\n",boxxlo,boxxhi,boxxy);
|
||||||
fprintf(fp,"%g %g %g\n",boxylo,boxyhi,boxxz);
|
fprintf(fp,"%g %g %g\n",boxylo,boxyhi,boxxz);
|
||||||
fprintf(fp,"%g %g %g\n",boxzlo,boxzhi,boxyz);
|
fprintf(fp,"%g %g %g\n",boxzlo,boxzhi,boxyz);
|
||||||
|
|||||||
@ -182,6 +182,20 @@ void DumpCustom::init_style()
|
|||||||
vformat[i] = strcat(vformat[i]," ");
|
vformat[i] = strcat(vformat[i]," ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// setup boundary string
|
||||||
|
|
||||||
|
int m = 0;
|
||||||
|
for (int idim = 0; idim < 3; idim++) {
|
||||||
|
for (int iside = 0; iside < 2; iside++) {
|
||||||
|
if (domain->boundary[idim][iside] == 0) boundstr[m++] = 'p';
|
||||||
|
else if (domain->boundary[idim][iside] == 1) boundstr[m++] = 'f';
|
||||||
|
else if (domain->boundary[idim][iside] == 2) boundstr[m++] = 's';
|
||||||
|
else if (domain->boundary[idim][iside] == 3) boundstr[m++] = 'm';
|
||||||
|
}
|
||||||
|
boundstr[m++] = ' ';
|
||||||
|
}
|
||||||
|
boundstr[8] = '\0';
|
||||||
|
|
||||||
// setup function ptrs
|
// setup function ptrs
|
||||||
|
|
||||||
if (binary && domain->triclinic == 0)
|
if (binary && domain->triclinic == 0)
|
||||||
@ -293,7 +307,7 @@ void DumpCustom::header_item(bigint ndump)
|
|||||||
fprintf(fp,BIGINT_FORMAT "\n",update->ntimestep);
|
fprintf(fp,BIGINT_FORMAT "\n",update->ntimestep);
|
||||||
fprintf(fp,"ITEM: NUMBER OF ATOMS\n");
|
fprintf(fp,"ITEM: NUMBER OF ATOMS\n");
|
||||||
fprintf(fp,BIGINT_FORMAT "\n",ndump);
|
fprintf(fp,BIGINT_FORMAT "\n",ndump);
|
||||||
fprintf(fp,"ITEM: BOX BOUNDS\n");
|
fprintf(fp,"ITEM: BOX BOUNDS %s\n",boundstr);
|
||||||
fprintf(fp,"%g %g\n",boxxlo,boxxhi);
|
fprintf(fp,"%g %g\n",boxxlo,boxxhi);
|
||||||
fprintf(fp,"%g %g\n",boxylo,boxyhi);
|
fprintf(fp,"%g %g\n",boxylo,boxyhi);
|
||||||
fprintf(fp,"%g %g\n",boxzlo,boxzhi);
|
fprintf(fp,"%g %g\n",boxzlo,boxzhi);
|
||||||
@ -308,7 +322,7 @@ void DumpCustom::header_item_triclinic(bigint ndump)
|
|||||||
fprintf(fp,BIGINT_FORMAT "\n",update->ntimestep);
|
fprintf(fp,BIGINT_FORMAT "\n",update->ntimestep);
|
||||||
fprintf(fp,"ITEM: NUMBER OF ATOMS\n");
|
fprintf(fp,"ITEM: NUMBER OF ATOMS\n");
|
||||||
fprintf(fp,BIGINT_FORMAT "\n",ndump);
|
fprintf(fp,BIGINT_FORMAT "\n",ndump);
|
||||||
fprintf(fp,"ITEM: BOX BOUNDS xy xz yz\n");
|
fprintf(fp,"ITEM: BOX BOUNDS %s xy xz yz\n",boundstr);
|
||||||
fprintf(fp,"%g %g %g\n",boxxlo,boxxhi,boxxy);
|
fprintf(fp,"%g %g %g\n",boxxlo,boxxhi,boxxy);
|
||||||
fprintf(fp,"%g %g %g\n",boxylo,boxyhi,boxxz);
|
fprintf(fp,"%g %g %g\n",boxylo,boxyhi,boxxz);
|
||||||
fprintf(fp,"%g %g %g\n",boxzlo,boxzhi,boxyz);
|
fprintf(fp,"%g %g %g\n",boxzlo,boxzhi,boxyz);
|
||||||
|
|||||||
Reference in New Issue
Block a user