Skip to content
Snippets Groups Projects
Commit e08a1c19 authored by Tom Fischer's avatar Tom Fischer
Browse files

[PL/Output] Check correctness of RepeatsEachSteps pairs

parent e1aed97c
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,16 @@ struct OutputDataSpecification final ...@@ -56,6 +56,16 @@ struct OutputDataSpecification final
"Vector of fixed output time steps passed to the " "Vector of fixed output time steps passed to the "
"OutputDataSpecification constructor must be sorted"); "OutputDataSpecification constructor must be sorted");
} }
// check the repeats_each_steps pairs
for (auto const& pair : repeats_each_steps)
{
if (pair.each_steps == 0)
{
OGS_FATAL(
"Step in pair of <repeats><steps> is zero but has to be "
"greater than zero.");
}
}
if (repeats_each_steps.empty()) if (repeats_each_steps.empty())
{ {
repeats_each_steps.emplace_back(1, std::numeric_limits<int>::max()); repeats_each_steps.emplace_back(1, std::numeric_limits<int>::max());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment