make error messages consistent and improve their grammar
This commit is contained in:
@ -299,7 +299,7 @@ int DumpVTK::count()
|
||||
if (ncompute) {
|
||||
for (i = 0; i < ncompute; i++) {
|
||||
if (!compute[i]->is_initialized())
|
||||
error->all(FLERR,"Dump compute ID {} cannot be invoked before initialized by a run",
|
||||
error->all(FLERR,"Dump compute ID {} cannot be invoked before initialization by a run",
|
||||
compute[i]->id);
|
||||
if (!(compute[i]->invoked_flag & Compute::INVOKED_PERATOM)) {
|
||||
compute[i]->compute_peratom();
|
||||
|
||||
@ -564,7 +564,7 @@ int DumpCustom::count()
|
||||
if (ncompute) {
|
||||
for (i = 0; i < ncompute; i++) {
|
||||
if (!compute[i]->is_initialized())
|
||||
error->all(FLERR,"Dump compute ID {} cannot be invoked before initialized by a run",
|
||||
error->all(FLERR,"Dump compute ID {} cannot be invoked before initialization by a run",
|
||||
compute[i]->id);
|
||||
if (!(compute[i]->invoked_flag & Compute::INVOKED_PERATOM)) {
|
||||
compute[i]->compute_peratom();
|
||||
|
||||
@ -529,7 +529,7 @@ int DumpGrid::count()
|
||||
if (ncompute) {
|
||||
for (i = 0; i < ncompute; i++) {
|
||||
if (!compute[i]->is_initialized())
|
||||
error->all(FLERR,"Dump compute ID {} cannot be invoked before initialized by a run",
|
||||
error->all(FLERR,"Dump compute ID {} cannot be invoked before initialization by a run",
|
||||
compute[i]->id);
|
||||
if (!(compute[i]->invoked_flag & Compute::INVOKED_PERGRID)) {
|
||||
compute[i]->compute_pergrid();
|
||||
|
||||
@ -669,7 +669,7 @@ void DumpImage::write()
|
||||
if (grid_compute) {
|
||||
if (!grid_compute->is_initialized())
|
||||
error->all(FLERR,"Grid compute ID {} used in dump image cannot be invoked "
|
||||
"before initialized by a run", grid_compute->id);
|
||||
"before initialization by a run", grid_compute->id);
|
||||
if (!(grid_compute->invoked_flag & Compute::INVOKED_PERGRID)) {
|
||||
grid_compute->compute_pergrid();
|
||||
grid_compute->invoked_flag |= Compute::INVOKED_PERGRID;
|
||||
|
||||
@ -330,7 +330,7 @@ int DumpLocal::count()
|
||||
if (ncompute) {
|
||||
for (i = 0; i < ncompute; i++) {
|
||||
if (!compute[i]->is_initialized())
|
||||
error->all(FLERR,"Dump compute ID {} cannot be invoked before initialized by a run",
|
||||
error->all(FLERR,"Dump compute ID {} cannot be invoked before initialization by a run",
|
||||
compute[i]->id);
|
||||
if (!(compute[i]->invoked_flag & Compute::INVOKED_LOCAL)) {
|
||||
compute[i]->compute_local();
|
||||
|
||||
@ -1135,7 +1135,7 @@ void Thermo::check_temp(const std::string &keyword)
|
||||
error->all(FLERR, "Thermo keyword {} in variable requires thermo to use/init temperature",
|
||||
keyword);
|
||||
if (!temperature->is_initialized())
|
||||
error->all(FLERR,"Thermo keyword {} cannot be invoked before initialized by run",keyword);
|
||||
error->all(FLERR,"Thermo keyword {} cannot be invoked before initialization by a run",keyword);
|
||||
if (!(temperature->invoked_flag & Compute::INVOKED_SCALAR)) {
|
||||
temperature->compute_scalar();
|
||||
temperature->invoked_flag |= Compute::INVOKED_SCALAR;
|
||||
@ -1154,7 +1154,7 @@ void Thermo::check_pe(const std::string &keyword)
|
||||
error->all(FLERR, "Thermo keyword {} in variable requires thermo to use/init potential energy",
|
||||
keyword);
|
||||
if (!pe->is_initialized())
|
||||
error->all(FLERR,"Thermo keyword {} cannot be invoked before initialized by run",keyword);
|
||||
error->all(FLERR,"Thermo keyword {} cannot be invoked before initialization by a run",keyword);
|
||||
if (!(pe->invoked_flag & Compute::INVOKED_SCALAR)) {
|
||||
pe->compute_scalar();
|
||||
pe->invoked_flag |= Compute::INVOKED_SCALAR;
|
||||
@ -1170,7 +1170,7 @@ void Thermo::check_press_scalar(const std::string &keyword)
|
||||
if (!pressure)
|
||||
error->all(FLERR, "Thermo keyword {} in variable requires thermo to use/init press", keyword);
|
||||
if (!pressure->is_initialized())
|
||||
error->all(FLERR,"Thermo keyword {} cannot be invoked before initialized by run",keyword);
|
||||
error->all(FLERR,"Thermo keyword {} cannot be invoked before initialization by a run",keyword);
|
||||
if (!(pressure->invoked_flag & Compute::INVOKED_SCALAR)) {
|
||||
pressure->compute_scalar();
|
||||
pressure->invoked_flag |= Compute::INVOKED_SCALAR;
|
||||
@ -1186,7 +1186,7 @@ void Thermo::check_press_vector(const std::string &keyword)
|
||||
if (!pressure)
|
||||
error->all(FLERR, "Thermo keyword {} in variable requires thermo to use/init press", keyword);
|
||||
if (!pressure->is_initialized())
|
||||
error->all(FLERR,"Thermo keyword {} cannot be invoked before initialized by run",keyword);
|
||||
error->all(FLERR,"Thermo keyword {} cannot be invoked before initialization by a run",keyword);
|
||||
if (!(pressure->invoked_flag & Compute::INVOKED_VECTOR)) {
|
||||
pressure->compute_vector();
|
||||
pressure->invoked_flag |= Compute::INVOKED_VECTOR;
|
||||
|
||||
@ -1506,7 +1506,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar)
|
||||
if (nbracket == 0 && compute->scalar_flag && lowercase) {
|
||||
|
||||
if (!compute->is_initialized())
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before initialized by run",ivar);
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before "
|
||||
"initialization by a run",ivar);
|
||||
if (!(compute->invoked_flag & Compute::INVOKED_SCALAR)) {
|
||||
compute->compute_scalar();
|
||||
compute->invoked_flag |= Compute::INVOKED_SCALAR;
|
||||
@ -1528,7 +1529,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar)
|
||||
compute->size_vector_variable == 0)
|
||||
print_var_error(FLERR,"Variable formula compute vector is accessed out-of-range",ivar,0);
|
||||
if (!compute->is_initialized())
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before initialized by run",ivar);
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before "
|
||||
"initialization by a run",ivar);
|
||||
if (!(compute->invoked_flag & Compute::INVOKED_VECTOR)) {
|
||||
compute->compute_vector();
|
||||
compute->invoked_flag |= Compute::INVOKED_VECTOR;
|
||||
@ -1554,7 +1556,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar)
|
||||
if (index2 > compute->size_array_cols)
|
||||
print_var_error(FLERR,"Variable formula compute array is accessed out-of-range",ivar,0);
|
||||
if (!compute->is_initialized())
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before initialized by run",ivar);
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before "
|
||||
"initialization by a run",ivar);
|
||||
if (!(compute->invoked_flag & Compute::INVOKED_ARRAY)) {
|
||||
compute->compute_array();
|
||||
compute->invoked_flag |= Compute::INVOKED_ARRAY;
|
||||
@ -1581,7 +1584,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar)
|
||||
if (compute->size_vector == 0)
|
||||
print_var_error(FLERR,"Variable formula compute vector is zero length",ivar);
|
||||
if (!compute->is_initialized())
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before initialized by run",ivar);
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before "
|
||||
"initialization by a run",ivar);
|
||||
if (!(compute->invoked_flag & Compute::INVOKED_VECTOR)) {
|
||||
compute->compute_vector();
|
||||
compute->invoked_flag |= Compute::INVOKED_VECTOR;
|
||||
@ -1605,7 +1609,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar)
|
||||
if (compute->size_array_rows == 0)
|
||||
print_var_error(FLERR,"Variable formula compute array is zero length",ivar);
|
||||
if (!compute->is_initialized())
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before initialized by run",ivar);
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before "
|
||||
"initialization by a run",ivar);
|
||||
if (!(compute->invoked_flag & Compute::INVOKED_ARRAY)) {
|
||||
compute->compute_array();
|
||||
compute->invoked_flag |= Compute::INVOKED_ARRAY;
|
||||
@ -1624,7 +1629,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar)
|
||||
compute->size_peratom_cols == 0) {
|
||||
|
||||
if (!compute->is_initialized())
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before initialized by run",ivar);
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before "
|
||||
"initialization by a run",ivar);
|
||||
if (!(compute->invoked_flag & Compute::INVOKED_PERATOM)) {
|
||||
compute->compute_peratom();
|
||||
compute->invoked_flag |= Compute::INVOKED_PERATOM;
|
||||
@ -1641,7 +1647,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar)
|
||||
if (index2 > compute->size_peratom_cols)
|
||||
print_var_error(FLERR,"Variable formula compute array is accessed out-of-range",ivar,0);
|
||||
if (!compute->is_initialized())
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before initialized by run",ivar);
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before "
|
||||
"initialization by a run",ivar);
|
||||
if (!(compute->invoked_flag & Compute::INVOKED_PERATOM)) {
|
||||
compute->compute_peratom();
|
||||
compute->invoked_flag |= Compute::INVOKED_PERATOM;
|
||||
@ -1664,7 +1671,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar)
|
||||
if (treetype == VECTOR)
|
||||
print_var_error(FLERR,"Per-atom compute in vector-style variable formula",ivar);
|
||||
if (!compute->is_initialized())
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before initialized by run",ivar);
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before "
|
||||
"initialization by a run",ivar);
|
||||
if (!(compute->invoked_flag & Compute::INVOKED_PERATOM)) {
|
||||
compute->compute_peratom();
|
||||
compute->invoked_flag |= Compute::INVOKED_PERATOM;
|
||||
@ -1688,7 +1696,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar)
|
||||
if (index1 > compute->size_peratom_cols)
|
||||
print_var_error(FLERR,"Variable formula compute array is accessed out-of-range",ivar,0);
|
||||
if (!compute->is_initialized())
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before initialized by run",ivar);
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before "
|
||||
"initialization by a run",ivar);
|
||||
if (!(compute->invoked_flag & Compute::INVOKED_PERATOM)) {
|
||||
compute->compute_peratom();
|
||||
compute->invoked_flag |= Compute::INVOKED_PERATOM;
|
||||
@ -4164,7 +4173,8 @@ int Variable::special_function(char *word, char *contents, Tree **tree, Tree **t
|
||||
}
|
||||
if (index == 0 && compute->vector_flag) {
|
||||
if (!compute->is_initialized())
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before initialized by run",ivar);
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before "
|
||||
"initialization by a run",ivar);
|
||||
if (!(compute->invoked_flag & Compute::INVOKED_VECTOR)) {
|
||||
compute->compute_vector();
|
||||
compute->invoked_flag |= Compute::INVOKED_VECTOR;
|
||||
@ -4175,7 +4185,8 @@ int Variable::special_function(char *word, char *contents, Tree **tree, Tree **t
|
||||
if (index > compute->size_array_cols)
|
||||
print_var_error(FLERR,"Variable formula compute array is accessed out-of-range",ivar,0);
|
||||
if (!compute->is_initialized())
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before initialized by run",ivar);
|
||||
print_var_error(FLERR,"Variable formula compute cannot be invoked before "
|
||||
"initialization by a run",ivar);
|
||||
if (!(compute->invoked_flag & Compute::INVOKED_ARRAY)) {
|
||||
compute->compute_array();
|
||||
compute->invoked_flag |= Compute::INVOKED_ARRAY;
|
||||
|
||||
Reference in New Issue
Block a user