git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5520 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
#include "string.h"
|
||||
#include "stdio.h"
|
||||
#include "fix_shake.h"
|
||||
#include "lmptype.h"
|
||||
#include "atom.h"
|
||||
#include "atom_vec.h"
|
||||
#include "update.h"
|
||||
@ -390,7 +391,7 @@ void FixShake::setup(int vflag)
|
||||
|
||||
// setup SHAKE output
|
||||
|
||||
int ntimestep = update->ntimestep;
|
||||
bigint ntimestep = update->ntimestep;
|
||||
next_output = ntimestep + output_every;
|
||||
if (output_every == 0) next_output = update->laststep + 1;
|
||||
if (output_every && ntimestep % output_every != 0)
|
||||
@ -453,8 +454,10 @@ void FixShake::pre_neighbor()
|
||||
atom1 = atom->map(shake_atom[i][0]);
|
||||
atom2 = atom->map(shake_atom[i][1]);
|
||||
if (atom1 == -1 || atom2 == -1) {
|
||||
char str[128];
|
||||
sprintf(str,"Shake atoms %d %d missing on proc %d at step %d",
|
||||
char str[128],fstr[64];
|
||||
sprintf(fstr,"Shake atoms %%d %%d missing on proc %%d at step %s",
|
||||
BIGINT_FORMAT);
|
||||
sprintf(str,fstr,
|
||||
shake_atom[i][0],shake_atom[i][1],me,update->ntimestep);
|
||||
error->one(str);
|
||||
}
|
||||
@ -464,8 +467,10 @@ void FixShake::pre_neighbor()
|
||||
atom2 = atom->map(shake_atom[i][1]);
|
||||
atom3 = atom->map(shake_atom[i][2]);
|
||||
if (atom1 == -1 || atom2 == -1 || atom3 == -1) {
|
||||
char str[128];
|
||||
sprintf(str,"Shake atoms %d %d %d missing on proc %d at step %d",
|
||||
char str[128],fstr[64];
|
||||
sprintf(fstr,"Shake atoms %%d %%d %%d missing on proc %%d at step %s",
|
||||
BIGINT_FORMAT);
|
||||
sprintf(str,fstr,
|
||||
shake_atom[i][0],shake_atom[i][1],shake_atom[i][2],
|
||||
me,update->ntimestep);
|
||||
error->one(str);
|
||||
@ -477,8 +482,11 @@ void FixShake::pre_neighbor()
|
||||
atom3 = atom->map(shake_atom[i][2]);
|
||||
atom4 = atom->map(shake_atom[i][3]);
|
||||
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
|
||||
char str[128];
|
||||
sprintf(str,"Shake atoms %d %d %d %d missing on proc %d at step %d",
|
||||
char str[128],fstr[64];
|
||||
sprintf(fstr,
|
||||
"Shake atoms %%d %%d %%d %%d missing on proc %%d at step %s",
|
||||
BIGINT_FORMAT);
|
||||
sprintf(str,fstr,
|
||||
shake_atom[i][0],shake_atom[i][1],
|
||||
shake_atom[i][2],shake_atom[i][3],
|
||||
me,update->ntimestep);
|
||||
@ -2139,9 +2147,10 @@ void FixShake::stats()
|
||||
// print stats only for non-zero counts
|
||||
|
||||
if (me == 0) {
|
||||
char fstr[64];
|
||||
sprintf(fstr,"SHAKE stats (type/ave/delta) on step %s\n",BIGINT_FORMAT);
|
||||
if (screen) {
|
||||
fprintf(screen,"SHAKE stats (type/ave/delta) on step %d\n",
|
||||
update->ntimestep);
|
||||
fprintf(screen,fstr,update->ntimestep);
|
||||
for (i = 1; i < nb; i++)
|
||||
if (b_count_all[i])
|
||||
fprintf(screen," %d %g %g\n",i,
|
||||
@ -2152,8 +2161,7 @@ void FixShake::stats()
|
||||
a_ave_all[i]/a_count_all[i],a_max_all[i]-a_min_all[i]);
|
||||
}
|
||||
if (logfile) {
|
||||
fprintf(logfile,"SHAKE stats (type/ave/delta) on step %d\n",
|
||||
update->ntimestep);
|
||||
fprintf(logfile,fstr,update->ntimestep);
|
||||
for (i = 0; i < nb; i++)
|
||||
if (b_count_all[i])
|
||||
fprintf(logfile," %d %g %g\n",i,
|
||||
|
||||
Reference in New Issue
Block a user