apply utils::logical() to more commands

This commit is contained in:
Axel Kohlmeyer
2021-09-20 22:44:42 -04:00
parent 6adac6b637
commit 41a3eccd1c
39 changed files with 210 additions and 410 deletions

View File

@ -17,19 +17,21 @@
------------------------------------------------------------------------- */
#include "compute_centro_atom.h"
#include <cstring>
#include "atom.h"
#include "update.h"
#include "modify.h"
#include "neighbor.h"
#include "neigh_list.h"
#include "neigh_request.h"
#include "force.h"
#include "pair.h"
#include "comm.h"
#include "error.h"
#include "force.h"
#include "math_extra.h"
#include "memory.h"
#include "error.h"
#include "modify.h"
#include "neigh_list.h"
#include "neigh_request.h"
#include "neighbor.h"
#include "pair.h"
#include "update.h"
#include <cstring>
using namespace LAMMPS_NS;
@ -55,11 +57,8 @@ ComputeCentroAtom::ComputeCentroAtom(LAMMPS *lmp, int narg, char **arg) :
int iarg = 4;
while (iarg < narg) {
if (strcmp(arg[iarg],"axes") == 0) {
if (iarg+2 > narg)
error->all(FLERR,"Illegal compute centro/atom command3");
if (strcmp(arg[iarg+1],"yes") == 0) axes_flag = 1;
else if (strcmp(arg[iarg+1],"no") == 0) axes_flag = 0;
else error->all(FLERR,"Illegal compute centro/atom command2");
if (iarg+2 > narg) error->all(FLERR,"Illegal compute centro/atom command3");
axes_flag = utils::logical(FLERR,arg[iarg+1],false,lmp);
iarg += 2;
} else error->all(FLERR,"Illegal compute centro/atom command1");
}