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

@ -13,13 +13,15 @@
------------------------------------------------------------------------- */
#include "dump_atom.h"
#include <cstring>
#include "domain.h"
#include "atom.h"
#include "memory.h"
#include "domain.h"
#include "error.h"
#include "memory.h"
#include "update.h"
#include <cstring>
using namespace LAMMPS_NS;
#define ONELINE 256
@ -114,15 +116,11 @@ int DumpAtom::modify_param(int narg, char **arg)
{
if (strcmp(arg[0],"scale") == 0) {
if (narg < 2) error->all(FLERR,"Illegal dump_modify command");
if (strcmp(arg[1],"yes") == 0) scale_flag = 1;
else if (strcmp(arg[1],"no") == 0) scale_flag = 0;
else error->all(FLERR,"Illegal dump_modify command");
scale_flag = utils::logical(FLERR,arg[1],false,lmp);
return 2;
} else if (strcmp(arg[0],"image") == 0) {
if (narg < 2) error->all(FLERR,"Illegal dump_modify command");
if (strcmp(arg[1],"yes") == 0) image_flag = 1;
else if (strcmp(arg[1],"no") == 0) image_flag = 0;
else error->all(FLERR,"Illegal dump_modify command");
image_flag = utils::logical(FLERR,arg[1],false,lmp);
return 2;
}
return 0;