remove TAGINT_FORMAT from ntopo styles

This commit is contained in:
Axel Kohlmeyer
2020-06-05 08:45:18 -04:00
parent 0ee1393955
commit d874e8a2be
12 changed files with 119 additions and 187 deletions

View File

@ -23,6 +23,7 @@
#include "molecule.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"
using namespace LAMMPS_NS;
@ -76,16 +77,13 @@ void NTopoAngleTemplate::build()
atom3 = atom->map(angle_atom3[iatom][m]+tagprev);
if (atom1 == -1 || atom2 == -1 || atom3 == -1) {
nmissing++;
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Angle atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT
" missing on proc %d at step " BIGINT_FORMAT,
angle_atom1[iatom][m]+tagprev,angle_atom2[iatom][m]+tagprev,
angle_atom3[iatom][m]+tagprev,
me,update->ntimestep);
error->one(FLERR,str);
}
if (lostbond == Thermo::ERROR)
error->one(FLERR,fmt::format("Angle atoms {} {} {} missing on "
"proc {} at step {}",
angle_atom1[iatom][m]+tagprev,
angle_atom2[iatom][m]+tagprev,
angle_atom3[iatom][m]+tagprev,
me,update->ntimestep));
continue;
}
atom1 = domain->closest_image(i,atom1);
@ -110,10 +108,7 @@ void NTopoAngleTemplate::build()
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
if (all) {
char str[128];
sprintf(str,
"Angle atoms missing at step " BIGINT_FORMAT,update->ntimestep);
if (me == 0) error->warning(FLERR,str);
}
if (all && (me == 0))
error->warning(FLERR,fmt::format("Angle atoms missing at step {}",
update->ntimestep));
}