git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8226 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2012-06-06 22:47:51 +00:00
parent f46eb9dedb
commit ef9e700545
1408 changed files with 58053 additions and 57983 deletions

View File

@ -5,7 +5,7 @@
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
@ -131,7 +131,7 @@ void WriteRestart::write(char *file)
bigint nblocal = atom->nlocal;
MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world);
if (natoms != atom->natoms && output->thermo->lostflag == ERROR)
if (natoms != atom->natoms && output->thermo->lostflag == ERROR)
error->all(FLERR,"Atom count is inconsistent, cannot write restart file");
// check if filename contains "%"
@ -218,19 +218,19 @@ void WriteRestart::write(char *file)
if (triclinic) domain->x2lamda(x,x);
if (xperiodic) {
if (x[0] < lo[0]) x[0] += period[0];
if (x[0] >= hi[0]) x[0] -= period[0];
x[0] = MAX(x[0],lo[0]);
if (x[0] < lo[0]) x[0] += period[0];
if (x[0] >= hi[0]) x[0] -= period[0];
x[0] = MAX(x[0],lo[0]);
}
if (yperiodic) {
if (x[1] < lo[1]) x[1] += period[1];
if (x[1] >= hi[1]) x[1] -= period[1];
x[1] = MAX(x[1],lo[1]);
if (x[1] < lo[1]) x[1] += period[1];
if (x[1] >= hi[1]) x[1] -= period[1];
x[1] = MAX(x[1],lo[1]);
}
if (zperiodic) {
if (x[2] < lo[2]) x[2] += period[2];
if (x[2] >= hi[2]) x[2] -= period[2];
x[2] = MAX(x[2],lo[2]);
if (x[2] < lo[2]) x[2] += period[2];
if (x[2] >= hi[2]) x[2] -= period[2];
x[2] = MAX(x[2],lo[2]);
}
if (triclinic) domain->lamda2x(x,x);
@ -252,15 +252,15 @@ void WriteRestart::write(char *file)
if (me == 0) {
for (int iproc = 0; iproc < nprocs; iproc++) {
if (iproc) {
MPI_Irecv(buf,max_size,MPI_DOUBLE,iproc,0,world,&request);
MPI_Send(&tmp,0,MPI_INT,iproc,0,world);
MPI_Wait(&request,&status);
MPI_Get_count(&status,MPI_DOUBLE,&recv_size);
} else recv_size = send_size;
fwrite(&recv_size,sizeof(int),1,fp);
fwrite(buf,sizeof(double),recv_size,fp);
if (iproc) {
MPI_Irecv(buf,max_size,MPI_DOUBLE,iproc,0,world,&request);
MPI_Send(&tmp,0,MPI_INT,iproc,0,world);
MPI_Wait(&request,&status);
MPI_Get_count(&status,MPI_DOUBLE,&recv_size);
} else recv_size = send_size;
fwrite(&recv_size,sizeof(int),1,fp);
fwrite(buf,sizeof(double),recv_size,fp);
}
fclose(fp);
@ -288,12 +288,12 @@ void WriteRestart::write(char *file)
fwrite(buf,sizeof(double),send_size,fp);
fclose(fp);
}
memory->destroy(buf);
}
/* ----------------------------------------------------------------------
proc 0 writes out problem description
proc 0 writes out problem description
------------------------------------------------------------------------- */
void WriteRestart::header()
@ -452,7 +452,7 @@ void WriteRestart::force_fields()
}
/* ----------------------------------------------------------------------
write a flag and an int into restart file
write a flag and an int into restart file
------------------------------------------------------------------------- */
void WriteRestart::write_int(int flag, int value)
@ -462,7 +462,7 @@ void WriteRestart::write_int(int flag, int value)
}
/* ----------------------------------------------------------------------
write a flag and a double into restart file
write a flag and a double into restart file
------------------------------------------------------------------------- */
void WriteRestart::write_double(int flag, double value)
@ -472,7 +472,7 @@ void WriteRestart::write_double(int flag, double value)
}
/* ----------------------------------------------------------------------
write a flag and a char str into restart file
write a flag and a char str into restart file
------------------------------------------------------------------------- */
void WriteRestart::write_char(int flag, char *value)
@ -484,7 +484,7 @@ void WriteRestart::write_char(int flag, char *value)
}
/* ----------------------------------------------------------------------
write a flag and a bigint into restart file
write a flag and a bigint into restart file
------------------------------------------------------------------------- */
void WriteRestart::write_bigint(int flag, bigint value)