EHN: make signal verbosity an optional calling argument.

This commit is contained in:
Mark Olesen
2018-04-11 21:35:02 +02:00
parent 297570de53
commit 97dc9f4029
14 changed files with 154 additions and 173 deletions

View File

@ -145,9 +145,13 @@ bool Foam::functionObjects::runTimePostProcessing::write()
Info<< type() << " " << name() << " output:" << nl
<< " Constructing scene" << endl;
// Unset any floating point trapping (some low-level rendering functionality
// does not like it)
sigFpe::unset(false);
// Unset any floating point trapping
// (some low-level rendering functionality does not like it)
const bool oldFpe = sigFpe::active();
if (oldFpe)
{
sigFpe::unset();
}
// Initialise render window
auto renderWindow = vtkSmartPointer<vtkRenderWindow>::New();
@ -234,8 +238,11 @@ bool Foam::functionObjects::runTimePostProcessing::write()
surfaces_[i].clear();
}
// Reset any floating point trapping
sigFpe::set(false);
// Restore floating point trapping
if (oldFpe)
{
sigFpe::set();
}
return true;
}