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

use {fmt}

parent 3cdf0e28
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include "memory.h"
#include "error.h"
#include "utils.h"
#include "fmt/format.h"

using namespace LAMMPS_NS;

@@ -82,13 +83,11 @@ void BondFENE::compute(int eflag, int vflag)
    // if r -> r0, then rlogarg < 0.0 which is an error
    // issue a warning and reset rlogarg = epsilon
    // if r > 2*r0 something serious is wrong, abort
    printf("r = %g  r0 = %g  rlogarg = %g\n",sqrt(rsq),sqrt(r0sq),rlogarg);

    if (rlogarg < 0.1) {
      char str[128];
      sprintf(str,"FENE bond too long: " BIGINT_FORMAT " "
              TAGINT_FORMAT " " TAGINT_FORMAT " %g",
              update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq));
      error->warning(FLERR,str,0);
      error->warning(FLERR,fmt::format("FENE bond too long: {} {} {} {}",
                     update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq)));
      if (rlogarg <= -3.0) error->one(FLERR,"Bad FENE bond");
      rlogarg = 0.1;
    }