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

input checking

parent da89474c
No related merge requests found
......@@ -170,7 +170,20 @@ Foam::searchableBox::searchableBox
:
searchableSurface(io),
treeBoundBox(bb)
{}
{
if (!contains(midpoint()))
{
FatalErrorIn
(
"Foam::searchableBox::searchableBox\n"
"(\n"
" const IOobject& io,\n"
" const treeBoundBox& bb\n"
")\n"
) << "Illegal bounding box specification : "
<< static_cast<const treeBoundBox>(*this) << exit(FatalError);
}
}
Foam::searchableBox::searchableBox
......@@ -181,7 +194,20 @@ Foam::searchableBox::searchableBox
:
searchableSurface(io),
treeBoundBox(dict.lookup("min"), dict.lookup("max"))
{}
{
if (!contains(midpoint()))
{
FatalErrorIn
(
"Foam::searchableBox::searchableBox\n"
"(\n"
" const IOobject& io,\n"
" const treeBoundBox& bb\n"
")\n"
) << "Illegal bounding box specification : "
<< static_cast<const treeBoundBox>(*this) << exit(FatalError);
}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
......
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