final chunk of changes to apply utils::logical()

This commit is contained in:
Axel Kohlmeyer
2021-09-23 07:30:40 -04:00
parent 914f035475
commit f641b1c659
18 changed files with 76 additions and 112 deletions

View File

@ -266,12 +266,11 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) :
strcmp(arg[iarg],"-k") == 0) {
if (iarg+2 > narg)
error->universe_all(FLERR,"Invalid command-line argument");
if (strcmp(arg[iarg+1],"on") == 0) kokkosflag = 1;
else if (strcmp(arg[iarg+1],"off") == 0) kokkosflag = 0;
else if (strcmp(arg[iarg+1],"yes") == 0) kokkosflag = 1;
else if (strcmp(arg[iarg+1],"no") == 0) kokkosflag = 0;
else if (strcmp(arg[iarg+1],"true") == 0) kokkosflag = 1;
else if (strcmp(arg[iarg+1],"false") == 0) kokkosflag = 0;
const std::string kokkosarg = arg[iarg+1];
if ((kokkosarg == "on") || (kokkosarg == "yes") || (kokkosarg == "true"))
kokkosflag = 1;
else if ((kokkosarg == "off") || (kokkosarg == "no") || (kokkosarg == "false"))
kokkosflag = 0;
else error->universe_all(FLERR,"Invalid command-line argument");
iarg += 2;
// delimit any extra args for the Kokkos instantiation