better error checking if restart

This commit is contained in:
mattijs
2009-08-04 16:43:08 +01:00
parent 876135a83d
commit 0b16a73a5a

View File

@ -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
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~