forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2645 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
3cfe126105
commit
3d70bec677
|
@ -46,10 +46,11 @@ FixPrint::FixPrint(LAMMPS *lmp, int narg, char **arg) :
|
|||
|
||||
int iarg = 5;
|
||||
while (iarg < narg) {
|
||||
if (strcmp(arg[iarg],"file") == 0) {
|
||||
if (strcmp(arg[iarg],"file") == 0 || strcmp(arg[iarg],"append") == 0) {
|
||||
if (iarg+2 > narg) error->all("Illegal fix print command");
|
||||
if (me == 0) {
|
||||
fp = fopen(arg[iarg+1],"w");
|
||||
if (strcmp(arg[iarg],"file") == 0) fp = fopen(arg[iarg+1],"w");
|
||||
else fp = fopen(arg[iarg+1],"a");
|
||||
if (fp == NULL) {
|
||||
char str[128];
|
||||
sprintf(str,"Cannot open fix print file %s",arg[iarg+1]);
|
||||
|
|
Loading…
Reference in New Issue