Let me please clarify my last concerns in this regard:
The operations
GridTools::find_active_cell_around_point and
feValues.reinit
are executed at quadrature point level and performance
is really important in our application.
The reason why I wanted to use an
try/catch block is to surrogate the use of an if-statement.
Consider these two variants:
Variant 1:
disable_abort_on_exception();
try
{
feValues.reinit(cell,...);
}
catch(dealii::Exception Base exception & )
{
Assert(checkSecondRunTimeCondition, ...)
// do something
}
Variant 2:
if(cell->state()==-1)
{
Assert(checkSecondRunTimeCondition, ...)
// do something
}
else
{
feValues.reinit(cell,...);
}
As you can see, there are two conditions I have to check at every quadrature point.
Clearly, Variant 2 implements an if-requests and is probably not the way to go.
1. So with regard to performance, would you prefer Variant 1
(as the try/catch introduces less overhead compared to the if-statement)?
2. If so, is the call of "disable_abort_on_exception()" good
coding practice or would you refrain from doing so?
In the main function of our program, we have a try/catch with
catch(dealii::ExceptionBase exception &).
Given that, in my opinion
"disable_abort_on_exception()"
should cause any undue behavior.
Best,
Simon