mirror of https://github.com/lammps/lammps.git
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10628 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
1a6312c5d8
commit
5ad6f286a8
|
@ -2171,11 +2171,12 @@ void FixRigid::readfile(int which, double *vec, double **array, int *inbody)
|
|||
only proc 0 writes list of global bodies to file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void FixRigid::write_restart_file()
|
||||
void FixRigid::write_restart_file(char *file)
|
||||
{
|
||||
if (me) return;
|
||||
|
||||
const char *outfile = "tmp.restart.inertia";
|
||||
char outfile[128];
|
||||
sprintf(outfile,"%s.rigid",file);
|
||||
FILE *fp = fopen(outfile,"w");
|
||||
if (fp == NULL) {
|
||||
char str[128];
|
||||
|
@ -2184,7 +2185,7 @@ void FixRigid::write_restart_file()
|
|||
}
|
||||
|
||||
fprintf(fp,"fix rigid mass, COM, inertia tensor info for "
|
||||
"%d bodies on timestep " TAGINT_FORMAT "\n\n",
|
||||
"%d bodies on timestep " BIGINT_FORMAT "\n\n",
|
||||
nbody,update->ntimestep);
|
||||
fprintf(fp,"%d\n",nbody);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class FixRigid : public Fix {
|
|||
virtual void final_integrate();
|
||||
void initial_integrate_respa(int, int, int);
|
||||
void final_integrate_respa(int, int);
|
||||
void write_restart_file();
|
||||
void write_restart_file(char *);
|
||||
virtual double compute_scalar();
|
||||
virtual int modify_param(int, char **) {return 0;}
|
||||
|
||||
|
|
|
@ -2172,7 +2172,7 @@ void FixRigidSmall::readfile(int which, double **array, int *inbody)
|
|||
each proc contributes info for rigid bodies it owns
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void FixRigidSmall::write_restart_file()
|
||||
void FixRigidSmall::write_restart_file(char *file)
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
|
@ -2183,7 +2183,8 @@ void FixRigidSmall::write_restart_file()
|
|||
// proc 0 opens file and writes header
|
||||
|
||||
if (me == 0) {
|
||||
const char *outfile = "tmp.restart.inertia";
|
||||
char outfile[128];
|
||||
sprintf(outfile,"%s.rigid",file);
|
||||
fp = fopen(outfile,"w");
|
||||
if (fp == NULL) {
|
||||
char str[128];
|
||||
|
@ -2192,7 +2193,7 @@ void FixRigidSmall::write_restart_file()
|
|||
}
|
||||
|
||||
fprintf(fp,"fix rigid mass, COM, inertia tensor info for "
|
||||
"%d bodies on timestep " TAGINT_FORMAT "\n\n",
|
||||
"%d bodies on timestep " BIGINT_FORMAT "\n\n",
|
||||
nbody,update->ntimestep);
|
||||
fprintf(fp,"%d\n",nbody);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class FixRigidSmall : public Fix {
|
|||
virtual void final_integrate();
|
||||
void initial_integrate_respa(int, int, int);
|
||||
void final_integrate_respa(int, int);
|
||||
void write_restart_file();
|
||||
void write_restart_file(char *);
|
||||
|
||||
void grow_arrays(int);
|
||||
void copy_arrays(int, int, int);
|
||||
|
|
|
@ -109,7 +109,7 @@ class Fix : protected Pointers {
|
|||
virtual void end_of_step() {}
|
||||
virtual void post_run() {}
|
||||
virtual void write_restart(FILE *) {}
|
||||
virtual void write_restart_file() {}
|
||||
virtual void write_restart_file(char *) {}
|
||||
virtual void restart(char *) {}
|
||||
|
||||
virtual void grow_arrays(int) {}
|
||||
|
|
|
@ -298,7 +298,7 @@ void WriteRestart::write(char *file)
|
|||
|
||||
for (int ifix = 0; ifix < modify->nfix; ifix++)
|
||||
if (modify->fix[ifix]->restart_file)
|
||||
modify->fix[ifix]->write_restart_file();
|
||||
modify->fix[ifix]->write_restart_file(file);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue