improve error messages
This commit is contained in:
@ -29,10 +29,11 @@ using namespace LAMMPS_NS;
|
||||
ComputeHeatFluxTally::ComputeHeatFluxTally(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR, "Illegal compute heat/flux/tally command");
|
||||
if (narg < 4) utils::missing_cmd_args(FLERR, "compute heat/flux/tally", error);
|
||||
|
||||
igroup2 = group->find(arg[3]);
|
||||
if (igroup2 == -1) error->all(FLERR, "Could not find compute heat/flux/tally second group ID");
|
||||
if (igroup2 == -1)
|
||||
error->all(FLERR, "Could not find compute heat/flux/tally second group ID {}", arg[3]);
|
||||
groupbit2 = group->bitmask[igroup2];
|
||||
|
||||
vector_flag = 1;
|
||||
|
||||
@ -29,11 +29,11 @@ using namespace LAMMPS_NS;
|
||||
ComputeHeatFluxVirialTally::ComputeHeatFluxVirialTally(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR, "Illegal compute heat/flux/virial/tally command");
|
||||
if (narg < 4) utils::missing_cmd_args(FLERR, "compute heat/flux/virial/tally", error);
|
||||
|
||||
igroup2 = group->find(arg[3]);
|
||||
if (igroup2 == -1)
|
||||
error->all(FLERR, "Could not find compute heat/flux/virial/tally second group ID");
|
||||
error->all(FLERR, "Could not find compute heat/flux/virial/tally second group ID {}", arg[3]);
|
||||
groupbit2 = group->bitmask[igroup2];
|
||||
|
||||
scalar_flag = 1;
|
||||
|
||||
@ -27,10 +27,11 @@ using namespace LAMMPS_NS;
|
||||
|
||||
ComputePEMolTally::ComputePEMolTally(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR, "Illegal compute pe/mol/tally command");
|
||||
if (narg < 4) utils::missing_cmd_args(FLERR, "compute pe/mol/tally", error);
|
||||
|
||||
igroup2 = group->find(arg[3]);
|
||||
if (igroup2 == -1) error->all(FLERR, "Could not find compute pe/mol/tally second group ID");
|
||||
if (igroup2 == -1)
|
||||
error->all(FLERR, "Could not find compute pe/mol/tally second group ID {}", arg[3]);
|
||||
groupbit2 = group->bitmask[igroup2];
|
||||
|
||||
vector_flag = 1;
|
||||
|
||||
@ -28,10 +28,10 @@ using namespace LAMMPS_NS;
|
||||
|
||||
ComputePETally::ComputePETally(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR, "Illegal compute pe/tally command");
|
||||
if (narg < 4) utils::missing_cmd_args(FLERR, "compute pe/tally", error);
|
||||
|
||||
igroup2 = group->find(arg[3]);
|
||||
if (igroup2 == -1) error->all(FLERR, "Could not find compute pe/tally second group ID");
|
||||
if (igroup2 == -1) error->all(FLERR, "Could not find compute pe/tally second group ID {}", arg[3]);
|
||||
groupbit2 = group->bitmask[igroup2];
|
||||
|
||||
scalar_flag = 1;
|
||||
|
||||
@ -29,10 +29,11 @@ using namespace LAMMPS_NS;
|
||||
|
||||
ComputeStressTally::ComputeStressTally(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR, "Illegal compute stress/tally command");
|
||||
if (narg < 4) utils::missing_cmd_args(FLERR, "compute stress/tally", error);
|
||||
|
||||
igroup2 = group->find(arg[3]);
|
||||
if (igroup2 == -1) error->all(FLERR, "Could not find compute stress/tally second group ID");
|
||||
if (igroup2 == -1)
|
||||
error->all(FLERR, "Could not find compute stress/tally second group ID {}", arg[3]);
|
||||
groupbit2 = group->bitmask[igroup2];
|
||||
|
||||
scalar_flag = 1;
|
||||
|
||||
Reference in New Issue
Block a user