Unverified Commit d874e8a2 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

remove TAGINT_FORMAT from ntopo styles

parent 0ee13939
Loading
Loading
Loading
Loading
+9 −15
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include "thermo.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"

using namespace LAMMPS_NS;

@@ -58,15 +59,11 @@ void NTopoAngleAll::build()
      atom3 = atom->map(angle_atom3[i][m]);
      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[i][m],angle_atom2[i][m],angle_atom3[i][m],
                  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[i][m],
                                       angle_atom2[i][m],angle_atom3[i][m],
                                       me,update->ntimestep));
        continue;
      }
      atom1 = domain->closest_image(i,atom1);
@@ -90,10 +87,7 @@ void NTopoAngleAll::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));
}
+9 −15
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include "thermo.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"

using namespace LAMMPS_NS;

@@ -59,15 +60,11 @@ void NTopoAnglePartial::build()
      atom3 = atom->map(angle_atom3[i][m]);
      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[i][m],angle_atom2[i][m],angle_atom3[i][m],
                  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[i][m],
                                       angle_atom2[i][m],angle_atom3[i][m],
                                       me,update->ntimestep));
        continue;
      }
      atom1 = domain->closest_image(i,atom1);
@@ -91,10 +88,7 @@ void NTopoAnglePartial::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));
}
+11 −16
Original line number Diff line number Diff line
@@ -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,
        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);
          error->one(FLERR,str);
        }
                                       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));
}
+8 −13
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include "thermo.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"

using namespace LAMMPS_NS;

@@ -55,13 +56,10 @@ void NTopoBondAll::build()
      atom1 = atom->map(bond_atom[i][m]);
      if (atom1 == -1) {
        nmissing++;
        if (lostbond == Thermo::ERROR) {
          char str[128];
          sprintf(str,"Bond atoms " TAGINT_FORMAT " " TAGINT_FORMAT
                  " missing on proc %d at step " BIGINT_FORMAT,
                  tag[i],bond_atom[i][m],me,update->ntimestep);
          error->one(FLERR,str);
        }
        if (lostbond == Thermo::ERROR)
          error->one(FLERR,fmt::format("Bond atoms {} {} missing on "
                                       "proc {} at step {}",tag[i],
                                       bond_atom[i][m],me,update->ntimestep));
        continue;
      }
      atom1 = domain->closest_image(i,atom1);
@@ -82,10 +80,7 @@ void NTopoBondAll::build()

  int all;
  MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
  if (all) {
    char str[128];
    sprintf(str,
            "Bond atoms missing at step " BIGINT_FORMAT,update->ntimestep);
    if (me == 0) error->warning(FLERR,str);
  }
  if (all && (me == 0))
    error->warning(FLERR,fmt::format("Bond atoms missing at step {}",
                                     update->ntimestep));
}
+8 −13
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include "thermo.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"

using namespace LAMMPS_NS;

@@ -56,13 +57,10 @@ void NTopoBondPartial::build()
      atom1 = atom->map(bond_atom[i][m]);
      if (atom1 == -1) {
        nmissing++;
        if (lostbond == Thermo::ERROR) {
          char str[128];
          sprintf(str,"Bond atoms " TAGINT_FORMAT " " TAGINT_FORMAT
                  " missing on proc %d at step " BIGINT_FORMAT,
                  tag[i],bond_atom[i][m],me,update->ntimestep);
          error->one(FLERR,str);
        }
        if (lostbond == Thermo::ERROR)
          error->one(FLERR,fmt::format("Bond atoms {} {} missing on "
                                       "proc {} at step {}",tag[i],
                                       bond_atom[i][m],me,update->ntimestep));
        continue;
      }
      atom1 = domain->closest_image(i,atom1);
@@ -83,10 +81,7 @@ void NTopoBondPartial::build()

  int all;
  MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
  if (all) {
    char str[128];
    sprintf(str,
            "Bond atoms missing at step " BIGINT_FORMAT,update->ntimestep);
    if (me == 0) error->warning(FLERR,str);
  }
  if (all && (me == 0))
    error->warning(FLERR,fmt::format("Bond atoms missing at step {}",
                                     update->ntimestep));
}
Loading