1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Double precision floating point scalar type.
34 \*---------------------------------------------------------------------------*/
36 #ifndef doubleScalar_H
37 #define doubleScalar_H
39 #include "doubleFloat.H"
40 #include "direction.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 typedef double doubleScalar;
52 // Largest and smallest scalar values allowed in certain parts of the code.
53 // (15 is the number of significant figures in an
54 // IEEE double precision number. See limits.h or float.h)
55 static const doubleScalar doubleScalarGREAT = 1.0e+15;
56 static const doubleScalar doubleScalarVGREAT = 1.0e+300;
57 static const doubleScalar doubleScalarROOTVGREAT = 1.0e+150;
58 static const doubleScalar doubleScalarSMALL = 1.0e-15;
59 static const doubleScalar doubleScalarVSMALL = 1.0e-300;
60 static const doubleScalar doubleScalarROOTVSMALL = 1.0e-150;
63 #define Scalar doubleScalar
64 #define ScalarVGREAT doubleScalarVGREAT
65 #define ScalarVSMALL doubleScalarVSMALL
66 #define readScalar readDoubleScalar
68 inline Scalar mag(const Scalar s)
73 #define transFunc(func) \
74 inline Scalar func(const Scalar s) \
81 inline Scalar hypot(const Scalar x, const Scalar y)
86 inline Scalar atan2(const Scalar y, const Scalar x)
91 inline Scalar jn(const int n, const Scalar s)
96 inline Scalar yn(const int n, const Scalar s)
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 } // End namespace Foam
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 // ************************************************************************* //