format changes

This commit is contained in:
Axel Kohlmeyer
2021-09-17 22:49:57 -04:00
parent cd3efc3fa8
commit 385220fd4b
62 changed files with 322 additions and 386 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
@ -21,20 +20,20 @@ using namespace LAMMPS_NS;
/* -------------------------------------------------------------------- */
ImbalanceStore::ImbalanceStore(LAMMPS *lmp) : Imbalance(lmp), name(0) {}
ImbalanceStore::ImbalanceStore(LAMMPS *lmp) : Imbalance(lmp), name(nullptr) {}
/* -------------------------------------------------------------------- */
ImbalanceStore::~ImbalanceStore()
{
delete [] name;
delete[] name;
}
/* -------------------------------------------------------------------- */
int ImbalanceStore::options(int narg, char **arg)
{
if (narg < 1) error->all(FLERR,"Illegal balance weight command");
if (narg < 1) error->all(FLERR, "Illegal balance weight command");
name = utils::strdup(arg[0]);
return 1;
@ -44,13 +43,13 @@ int ImbalanceStore::options(int narg, char **arg)
void ImbalanceStore::compute(double *weight)
{
int flag,cols;
int index = atom->find_custom(name,flag,cols);
int flag, cols;
int index = atom->find_custom(name, flag, cols);
// property does not exist
if (index < 0 || flag != 1 || cols)
error->all(FLERR,"Balance weight store vector does not exist");
error->all(FLERR, "Balance weight store vector does not exist");
double *prop = atom->dvector[index];
const int nlocal = atom->nlocal;
@ -61,5 +60,5 @@ void ImbalanceStore::compute(double *weight)
std::string ImbalanceStore::info()
{
return fmt::format(" storing weight in atom property d_{}\n",name);
return fmt::format(" storing weight in atom property d_{}\n", name);
}