enable and apply clang-format

This commit is contained in:
Axel Kohlmeyer
2022-05-22 03:29:33 -04:00
parent b407b2f239
commit 9a973e67fa
23 changed files with 196 additions and 267 deletions

View File

@ -1,4 +1,3 @@
// clang-format off
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
@ -32,28 +31,26 @@ Minimize::Minimize(LAMMPS *lmp) : Command(lmp) {}
void Minimize::command(int narg, char **arg)
{
if (narg != 4) error->all(FLERR,"Illegal minimize command");
if (narg != 4) error->all(FLERR, "Illegal minimize command");
if (domain->box_exist == 0)
error->all(FLERR,"Minimize command before simulation box is defined");
error->all(FLERR, "Minimize command before simulation box is defined");
// ignore minimize command, if walltime limit was already reached
if (timer->is_timeout()) return;
update->etol = utils::numeric(FLERR,arg[0],false,lmp);
update->ftol = utils::numeric(FLERR,arg[1],false,lmp);
update->nsteps = utils::inumeric(FLERR,arg[2],false,lmp);
update->max_eval = utils::inumeric(FLERR,arg[3],false,lmp);
update->etol = utils::numeric(FLERR, arg[0], false, lmp);
update->ftol = utils::numeric(FLERR, arg[1], false, lmp);
update->nsteps = utils::inumeric(FLERR, arg[2], false, lmp);
update->max_eval = utils::inumeric(FLERR, arg[3], false, lmp);
if (update->etol < 0.0 || update->ftol < 0.0)
error->all(FLERR,"Illegal minimize command");
if (update->etol < 0.0 || update->ftol < 0.0) error->all(FLERR, "Illegal minimize command");
if (lmp->citeme) lmp->citeme->flush();
update->whichflag = 2;
update->beginstep = update->firststep = update->ntimestep;
update->endstep = update->laststep = update->firststep + update->nsteps;
if (update->laststep < 0)
error->all(FLERR,"Too many iterations");
if (update->laststep < 0) error->all(FLERR, "Too many iterations");
lmp->init();
timer->init_timeout();