Skip to content
Snippets Groups Projects
Commit 0b16a73a authored by mattijs's avatar mattijs
Browse files

better error checking if restart

parent 876135a8
No related merge requests found
......@@ -350,6 +350,18 @@ void Foam::hexRef8::modFace
// Bit complex way to determine the unrefined edge length.
Foam::scalar Foam::hexRef8::getLevel0EdgeLength() const
{
if (cellLevel_.size() != mesh_.nCells())
{
FatalErrorIn
(
"hexRef8::getLevel0EdgeLength() const"
) << "Number of cells in mesh:" << mesh_.nCells()
<< " does not equal size of cellLevel:" << cellLevel_.size()
<< endl
<< "This might be because of a restart with inconsistent cellLevel."
<< abort(FatalError);
}
// Determine minimum edge length per refinement level
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment