From 40ea03234f6d6aabcf5ddeb2ce384f5a5f573198 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Tue, 1 Sep 2020 12:57:47 -0400 Subject: [PATCH] Update force->inumeric to utils::inumeric --- src/COMPRESS/dump_atom_gz.cpp | 4 ++-- src/COMPRESS/dump_atom_zstd.cpp | 4 ++-- src/COMPRESS/dump_cfg_gz.cpp | 4 ++-- src/COMPRESS/dump_cfg_zstd.cpp | 4 ++-- src/COMPRESS/dump_custom_gz.cpp | 4 ++-- src/COMPRESS/dump_custom_zstd.cpp | 4 ++-- src/COMPRESS/dump_local_gz.cpp | 4 ++-- src/COMPRESS/dump_local_zstd.cpp | 4 ++-- src/COMPRESS/dump_xyz_gz.cpp | 4 ++-- src/COMPRESS/dump_xyz_zstd.cpp | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/COMPRESS/dump_atom_gz.cpp b/src/COMPRESS/dump_atom_gz.cpp index 38ec0fb59e..6c78ba7910 100644 --- a/src/COMPRESS/dump_atom_gz.cpp +++ b/src/COMPRESS/dump_atom_gz.cpp @@ -15,7 +15,7 @@ #include "domain.h" #include "error.h" #include "update.h" -#include "force.h" +#include "utils.h" #include #include "fmt/format.h" @@ -173,7 +173,7 @@ int DumpAtomGZ::modify_param(int narg, char **arg) if (narg < 2) error->all(FLERR,"Illegal dump_modify command"); int min_level = Z_DEFAULT_COMPRESSION; int max_level = Z_BEST_COMPRESSION; - compression_level = force->inumeric(FLERR,arg[1]); + compression_level = utils::inumeric(FLERR, arg[1], false, lmp); if (compression_level < min_level || compression_level > max_level) error->all(FLERR, fmt::format("Illegal dump_modify command: compression level must in the range of [{}, {}]", min_level, max_level)); return 2; diff --git a/src/COMPRESS/dump_atom_zstd.cpp b/src/COMPRESS/dump_atom_zstd.cpp index 9c0f428905..a8da9a1a2c 100644 --- a/src/COMPRESS/dump_atom_zstd.cpp +++ b/src/COMPRESS/dump_atom_zstd.cpp @@ -21,7 +21,7 @@ #include "domain.h" #include "error.h" #include "update.h" -#include "force.h" +#include "utils.h" #include #include "fmt/format.h" @@ -181,7 +181,7 @@ int DumpAtomZstd::modify_param(int narg, char **arg) return 2; } else if (strcmp(arg[0],"compression_level") == 0) { if (narg < 2) error->all(FLERR,"Illegal dump_modify command"); - int compression_level = force->inumeric(FLERR,arg[1]); + int compression_level = utils::inumeric(FLERR, arg[1], false, lmp); writer.setCompressionLevel(compression_level); return 2; } diff --git a/src/COMPRESS/dump_cfg_gz.cpp b/src/COMPRESS/dump_cfg_gz.cpp index 25f29eda2f..2d48e02f3c 100644 --- a/src/COMPRESS/dump_cfg_gz.cpp +++ b/src/COMPRESS/dump_cfg_gz.cpp @@ -16,7 +16,7 @@ #include "domain.h" #include "error.h" #include "update.h" -#include "force.h" +#include "utils.h" #include #include "fmt/format.h" @@ -181,7 +181,7 @@ int DumpCFGGZ::modify_param(int narg, char **arg) if (narg < 2) error->all(FLERR,"Illegal dump_modify command"); int min_level = Z_DEFAULT_COMPRESSION; int max_level = Z_BEST_COMPRESSION; - compression_level = force->inumeric(FLERR,arg[1]); + compression_level = utils::inumeric(FLERR, arg[1], false, lmp); if (compression_level < min_level || compression_level > max_level) error->all(FLERR, fmt::format("Illegal dump_modify command: compression level must in the range of [{}, {}]", min_level, max_level)); return 2; diff --git a/src/COMPRESS/dump_cfg_zstd.cpp b/src/COMPRESS/dump_cfg_zstd.cpp index 125c4f3406..0f74e2550b 100644 --- a/src/COMPRESS/dump_cfg_zstd.cpp +++ b/src/COMPRESS/dump_cfg_zstd.cpp @@ -21,7 +21,7 @@ #include "domain.h" #include "error.h" #include "update.h" -#include "force.h" +#include "utils.h" #include #include "fmt/format.h" @@ -183,7 +183,7 @@ int DumpCFGZstd::modify_param(int narg, char **arg) return 2; } else if (strcmp(arg[0],"compression_level") == 0) { if (narg < 2) error->all(FLERR,"Illegal dump_modify command"); - int compression_level = force->inumeric(FLERR,arg[1]); + int compression_level = utils::inumeric(FLERR, arg[1], false, lmp); writer.setCompressionLevel(compression_level); return 2; } diff --git a/src/COMPRESS/dump_custom_gz.cpp b/src/COMPRESS/dump_custom_gz.cpp index 6770e16bbc..35a2d25a2a 100644 --- a/src/COMPRESS/dump_custom_gz.cpp +++ b/src/COMPRESS/dump_custom_gz.cpp @@ -15,7 +15,7 @@ #include "domain.h" #include "error.h" #include "update.h" -#include "force.h" +#include "utils.h" #include #include "fmt/format.h" @@ -173,7 +173,7 @@ int DumpCustomGZ::modify_param(int narg, char **arg) if (narg < 2) error->all(FLERR,"Illegal dump_modify command"); int min_level = Z_DEFAULT_COMPRESSION; int max_level = Z_BEST_COMPRESSION; - compression_level = force->inumeric(FLERR,arg[1]); + compression_level = utils::inumeric(FLERR, arg[1], false, lmp); if (compression_level < min_level || compression_level > max_level) error->all(FLERR, fmt::format("Illegal dump_modify command: compression level must in the range of [{}, {}]", min_level, max_level)); return 2; diff --git a/src/COMPRESS/dump_custom_zstd.cpp b/src/COMPRESS/dump_custom_zstd.cpp index afb6d81435..395ba51fdc 100644 --- a/src/COMPRESS/dump_custom_zstd.cpp +++ b/src/COMPRESS/dump_custom_zstd.cpp @@ -21,7 +21,7 @@ #include "domain.h" #include "error.h" #include "update.h" -#include "force.h" +#include "utils.h" #include #include "fmt/format.h" @@ -181,7 +181,7 @@ int DumpCustomZstd::modify_param(int narg, char **arg) return 2; } else if (strcmp(arg[0],"compression_level") == 0) { if (narg < 2) error->all(FLERR,"Illegal dump_modify command"); - int compression_level = force->inumeric(FLERR,arg[1]); + int compression_level = utils::inumeric(FLERR, arg[1], false, lmp); writer.setCompressionLevel(compression_level); return 2; } diff --git a/src/COMPRESS/dump_local_gz.cpp b/src/COMPRESS/dump_local_gz.cpp index 0d1f666322..a346de3127 100644 --- a/src/COMPRESS/dump_local_gz.cpp +++ b/src/COMPRESS/dump_local_gz.cpp @@ -15,7 +15,7 @@ #include "domain.h" #include "error.h" #include "update.h" -#include "force.h" +#include "utils.h" #include #include "fmt/format.h" @@ -188,7 +188,7 @@ int DumpLocalGZ::modify_param(int narg, char **arg) if (narg < 2) error->all(FLERR,"Illegal dump_modify command"); int min_level = Z_DEFAULT_COMPRESSION; int max_level = Z_BEST_COMPRESSION; - compression_level = force->inumeric(FLERR,arg[1]); + compression_level = utils::inumeric(FLERR, arg[1], false, lmp); if (compression_level < min_level || compression_level > max_level) error->all(FLERR, fmt::format("Illegal dump_modify command: compression level must in the range of [{}, {}]", min_level, max_level)); return 2; diff --git a/src/COMPRESS/dump_local_zstd.cpp b/src/COMPRESS/dump_local_zstd.cpp index 3184dd06ad..3e658fd070 100644 --- a/src/COMPRESS/dump_local_zstd.cpp +++ b/src/COMPRESS/dump_local_zstd.cpp @@ -21,7 +21,7 @@ #include "domain.h" #include "error.h" #include "update.h" -#include "force.h" +#include "utils.h" #include #include "fmt/format.h" @@ -181,7 +181,7 @@ int DumpLocalZstd::modify_param(int narg, char **arg) return 2; } else if (strcmp(arg[0],"compression_level") == 0) { if (narg < 2) error->all(FLERR,"Illegal dump_modify command"); - int compression_level = force->inumeric(FLERR,arg[1]); + int compression_level = utils::inumeric(FLERR, arg[1], false, lmp); writer.setCompressionLevel(compression_level); return 2; } diff --git a/src/COMPRESS/dump_xyz_gz.cpp b/src/COMPRESS/dump_xyz_gz.cpp index d1f7b59dfe..79d2d20997 100644 --- a/src/COMPRESS/dump_xyz_gz.cpp +++ b/src/COMPRESS/dump_xyz_gz.cpp @@ -14,7 +14,7 @@ #include "dump_xyz_gz.h" #include "error.h" #include "update.h" -#include "force.h" +#include "utils.h" #include #include "fmt/format.h" @@ -152,7 +152,7 @@ int DumpXYZGZ::modify_param(int narg, char **arg) if (narg < 2) error->all(FLERR,"Illegal dump_modify command"); int min_level = Z_DEFAULT_COMPRESSION; int max_level = Z_BEST_COMPRESSION; - compression_level = force->inumeric(FLERR,arg[1]); + compression_level = utils::inumeric(FLERR, arg[1], false, lmp); if (compression_level < min_level || compression_level > max_level) error->all(FLERR, fmt::format("Illegal dump_modify command: compression level must in the range of [{}, {}]", min_level, max_level)); return 2; diff --git a/src/COMPRESS/dump_xyz_zstd.cpp b/src/COMPRESS/dump_xyz_zstd.cpp index 83cb90627b..066609eebb 100644 --- a/src/COMPRESS/dump_xyz_zstd.cpp +++ b/src/COMPRESS/dump_xyz_zstd.cpp @@ -20,7 +20,7 @@ #include "dump_xyz_zstd.h" #include "error.h" #include "update.h" -#include "force.h" +#include "utils.h" #include #include "fmt/format.h" @@ -156,7 +156,7 @@ int DumpXYZZstd::modify_param(int narg, char **arg) return 2; } else if (strcmp(arg[0],"compression_level") == 0) { if (narg < 2) error->all(FLERR,"Illegal dump_modify command"); - int compression_level = force->inumeric(FLERR,arg[1]); + int compression_level = utils::inumeric(FLERR, arg[1], false, lmp); writer.setCompressionLevel(compression_level); return 2; }