Set up trapping for floating point exceptions (signal FPE). More...
Classes | |
| class | ignore |
| Helper to locally ignore SIGFPE handling. More... | |
Public Member Functions | |
| sigFpe () | |
| Constructor calls set() to activate the FPE signal handler if it was was not previously activate and requested() returns true. More... | |
| ~sigFpe () | |
| Destructor calls unset() to deactivate the FPE signal handler as required. More... | |
Static Public Member Functions | |
| static bool | requested () |
| Check if SIGFPE signals handler is to be enabled. More... | |
| static bool | active () |
| True if SIGFPE handling is currently active. More... | |
| static bool | nanActive () |
| True if NaN memory initialisation is currently active. More... | |
| static void | set (bool verbose=false) |
| Activate SIGFPE signal handler when FOAM_SIGFPE is set. More... | |
| static void | unset (bool verbose=false) |
| Deactivate SIGFPE signal handler and NaN memory initialisation. More... | |
| static void | fillNan (UList< scalar > &list) |
| Fill data block with NaN values. More... | |
Set up trapping for floating point exceptions (signal FPE).
Defined by controlDict InfoSwitch entries:
trapFpe, this causes usage of uninitialized scalars to trigger an abort.trapFpe setNaN | sigFpe | ( | ) |
Constructor calls set() to activate the FPE signal handler if it was was not previously activate and requested() returns true.
| ~sigFpe | ( | ) |
Destructor calls unset() to deactivate the FPE signal handler as required.
Definition at line 146 of file sigFpe.C.
References sigFpe::unset().

|
static |
Check if SIGFPE signals handler is to be enabled.
This is controlled by the trapFpe entry or the FOAM_SIGFPE environment variable
Definition at line 170 of file sigFpe.C.
References isTrue().
Referenced by sigFpe::set().


|
inlinestatic |
|
inlinestatic |
|
static |
Activate SIGFPE signal handler when FOAM_SIGFPE is set.
Fill memory with NaN when FOAM_SETNAN is set
Definition at line 176 of file sigFpe.C.
References Foam::endl(), Foam::Info, isTrue(), sigFpe::requested(), and Foam::setHandler().
Referenced by argList::parse(), and sigFpe::ignore::restore().


|
static |
Deactivate SIGFPE signal handler and NaN memory initialisation.
Definition at line 234 of file sigFpe.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, Foam::Info, and Foam::resetHandler().
Referenced by sigFpe::ignore::ignore(), and sigFpe::~sigFpe().


|
static |
Fill data block with NaN values.
Definition at line 270 of file sigFpe.C.
Referenced by dynamicRefineFvMesh::mapFields().

Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.