apply utils::logical() to more commands
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user