mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add trapFpe and setNaN optimisationSwitch (issue #517)
- allows configuration without an environment variable. For compatibility still respect FOAM_SIGFPE and FOAM_SETNAN env-variables - The env-variables are now treated as true/false switch values. Previously there was just a check for env exists or not, but this can be fairly fragile for a user's environment.
This commit is contained in:
@ -59,6 +59,7 @@ Usage
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "sigFpe.H"
|
||||
#include "Time.H"
|
||||
#include "fvMesh.H"
|
||||
#include "fvMeshTools.H"
|
||||
@ -2277,7 +2278,7 @@ int main(int argc, char *argv[])
|
||||
bool newTimes = args.optionFound("newTimes");
|
||||
|
||||
|
||||
if (env("FOAM_SIGFPE"))
|
||||
if (Foam::sigFpe::requested())
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Detected floating point exception trapping (FOAM_SIGFPE)."
|
||||
@ -2287,7 +2288,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
|
||||
const HashSet<word> selectedFields(0);
|
||||
const HashSet<word> selectedLagrangianFields(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user