more optimizations and extend to other dump styles

This commit is contained in:
Steve Plimpton
2021-12-21 10:57:42 -07:00
parent 4d31e300c6
commit ded48cc031
11 changed files with 106 additions and 61 deletions

View File

@ -131,7 +131,11 @@ void DumpXYZ::write_header(bigint n)
{
if (me == 0) {
fprintf(fp,BIGINT_FORMAT "\n",n);
fprintf(fp,"Atoms. Timestep: " BIGINT_FORMAT "\n",update->ntimestep);
if (time_flag)
fprintf(fp,"Atoms. Timestep: " BIGINT_FORMAT " Time: %f\n",
update->ntimestep, update->atime);
else
fprintf(fp,"Atoms. Timestep: " BIGINT_FORMAT "\n",update->ntimestep);
}
}
@ -159,7 +163,6 @@ void DumpXYZ::pack(tagint *ids)
}
}
/* ----------------------------------------------------------------------
convert mybuf of doubles to one big formatted string in sbuf
return -1 if strlen exceeds an int, since used as arg in MPI calls in Dump