Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / src / foam / fields / DimensionedFields / DimensionedScalarField / DimensionedScalarField.H
blobb273373a5e47eee82defc5eaa2a956a36e1018b7
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 InClass
25     Foam::DimensionedScalarField
27 Description
28     Scalar specific part of the implementation of DimensionedField.
30 SourceFiles
31     DimensionedScalarField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef DimensionedScalarField_H
36 #define DimensionedScalarField_H
38 #include "DimensionedField.H"
39 #include "scalar.H"
41 #define TEMPLATE template<class GeoMesh>
42 #include "DimensionedFieldFunctionsM.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace Foam
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 template<class GeoMesh>
52 tmp<DimensionedField<scalar, GeoMesh> > stabilise
54     const DimensionedField<scalar, GeoMesh>&,
55     const dimensioned<scalar>&
58 template<class GeoMesh>
59 tmp<DimensionedField<scalar, GeoMesh> > stabilise
61     const tmp<DimensionedField<scalar, GeoMesh> >&,
62     const dimensioned<scalar>&
66 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68 BINARY_TYPE_OPERATOR(scalar, scalar, scalar, +, '+', add)
69 BINARY_TYPE_OPERATOR(scalar, scalar, scalar, -, '-', subtract)
71 BINARY_OPERATOR(scalar, scalar, scalar, *, '*', multiply)
72 BINARY_OPERATOR(scalar, scalar, scalar, /, '|', divide)
74 BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, '|', divide)
76 BINARY_FUNCTION(scalar, scalar, scalar, pow)
77 BINARY_TYPE_FUNCTION(scalar, scalar, scalar, pow)
80 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 UNARY_FUNCTION(scalar, scalar, pow3, pow3)
83 UNARY_FUNCTION(scalar, scalar, pow4, pow4)
84 UNARY_FUNCTION(scalar, scalar, pow5, pow5)
85 UNARY_FUNCTION(scalar, scalar, pow6, pow6)
86 UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
87 UNARY_FUNCTION(scalar, scalar, sign, sign)
88 UNARY_FUNCTION(scalar, scalar, pos, pos)
89 UNARY_FUNCTION(scalar, scalar, neg, neg)
91 UNARY_FUNCTION(scalar, scalar, exp, trans)
92 UNARY_FUNCTION(scalar, scalar, log, trans)
93 UNARY_FUNCTION(scalar, scalar, log10, trans)
94 UNARY_FUNCTION(scalar, scalar, sin, trans)
95 UNARY_FUNCTION(scalar, scalar, cos, trans)
96 UNARY_FUNCTION(scalar, scalar, tan, trans)
97 UNARY_FUNCTION(scalar, scalar, asin, trans)
98 UNARY_FUNCTION(scalar, scalar, acos, trans)
99 UNARY_FUNCTION(scalar, scalar, atan, trans)
100 UNARY_FUNCTION(scalar, scalar, sinh, trans)
101 UNARY_FUNCTION(scalar, scalar, cosh, trans)
102 UNARY_FUNCTION(scalar, scalar, tanh, trans)
103 UNARY_FUNCTION(scalar, scalar, asinh, trans)
104 UNARY_FUNCTION(scalar, scalar, acosh, trans)
105 UNARY_FUNCTION(scalar, scalar, atanh, trans)
106 UNARY_FUNCTION(scalar, scalar, erf, trans)
107 UNARY_FUNCTION(scalar, scalar, erfc, trans)
108 UNARY_FUNCTION(scalar, scalar, lgamma, trans)
109 UNARY_FUNCTION(scalar, scalar, j0, trans)
110 UNARY_FUNCTION(scalar, scalar, j1, trans)
111 UNARY_FUNCTION(scalar, scalar, y0, trans)
112 UNARY_FUNCTION(scalar, scalar, y1, trans)
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 #define BesselFunc(func)                                                       \
118                                                                                \
119 template<class GeoMesh>                                                        \
120 tmp<DimensionedField<scalar, GeoMesh> > func                                   \
121 (                                                                              \
122     const int n,                                                               \
123     const DimensionedField<scalar, GeoMesh>&                                   \
124 );                                                                             \
125                                                                                \
126 template<class GeoMesh>                                                        \
127 tmp<DimensionedField<scalar, GeoMesh> > func                                   \
128 (                                                                              \
129     const int n,                                                               \
130     const tmp<DimensionedField<scalar, GeoMesh> >&                             \
133 BesselFunc(jn)
134 BesselFunc(yn)
136 #undef BesselFunc
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 } // End namespace Foam
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 #include "undefFieldFunctionsM.H"
147 #ifdef NoRepository
148 #   include "DimensionedScalarField.C"
149 #endif
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 #endif
155 // ************************************************************************* //