Skip to content

Commit

Permalink
Add more information to restart error message which can be hit by users
Browse files Browse the repository at this point in the history
with a wrong setup refs idaholab#29673
  • Loading branch information
GiudGiud authored and Vasileios Kyriakopoulos committed Jan 17, 2025
1 parent 5826457 commit 0c1e0e6
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions framework/src/restart/RestartableEquationSystems.C
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,20 @@ RestartableEquationSystems::load(std::istream & stream)
std::vector<dof_id_type> from_ordered_objects_ids;
dataLoad(stream, from_ordered_objects_ids, nullptr);
if (_loaded_ordered_objects.size() != from_ordered_objects_ids.size())
mooseError("RestartableEquationSystems::load(): Previously stored elements/nodes do not "
"match the current element/nodes");
mooseError("RestartableEquationSystems::load(): Number of previously stored elements/nodes (",
_loaded_ordered_objects.size(),
") does not "
"match the current number of elements/nodes (",
from_ordered_objects_ids.size(),
")");
for (const auto i : index_range(_loaded_ordered_objects))
if (_loaded_ordered_objects[i]->id() != from_ordered_objects_ids[i])
mooseError("RestartableEquationSystems::load(): Previously stored elements/nodes do not "
"match the current element/nodes");
mooseError("RestartableEquationSystems::load(): Id of previously stored element/node (",
_loaded_ordered_objects[i]->id(),
") does not "
"match the current element/node id (",
from_ordered_objects_ids[i],
")");
}

_loaded_stream_data_begin = static_cast<std::size_t>(stream.tellg());
Expand Down

0 comments on commit 0c1e0e6

Please sign in to comment.