ENH: Update FreeFOAM contributions to GPL v3
[freefoam.git] / src / OSspecific / OSspecific / sigFpe.H
blob0063f76e9bd86154effc780ae8f067ee53b9169b
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by
13     the Free Software Foundation, either version 3 of the License, or
14     (at your option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::sigFpe
27 Description
28     Set up trapping for floating point exceptions (signal FPE).
30     Controlled by two env vars:
31     @param FOAM_SIGFPE \n
32         exception trapping
33     @param FOAM_SETNAN \n
34         initialization of all malloced memory to NaN. If FOAM_SIGFPE
35         also set, this will cause usage of uninitialized scalars to trigger
36         an abort.
38 SourceFiles
39     sigFpe.C
41 \*---------------------------------------------------------------------------*/
43 #ifndef sigFpe_H
44 #define sigFpe_H
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 namespace Foam
51 /*---------------------------------------------------------------------------*\
52                            Class sigFpe Declaration
53 \*---------------------------------------------------------------------------*/
55 //- Forward declaration of the OS specific implementation
56 class sigFpeImpl;
58 class sigFpe
60     // Private data
62         //- The actual implementation (opaque pointer): PIMPL
63         sigFpeImpl* impl_;
65 public:
68     // Constructors
70         sigFpe();
73     // Destructor
75         ~sigFpe();
78     // Member functions
80         void set(const bool verbose);
84 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
86 } // End namespace Foam
88 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90 #endif
92 // ************************ vim: set sw=4 sts=4 et: ************************ //