ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / OpenFOAM / fields / Fields / scalarField / scalarField.H
blob8d39528b9fa87b7ad13d7173762b5f0f12bb1291
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
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 Typedef
25     Foam::scalarField
27 Description
28     Specialisation of Field\<T\> for scalar.
30 SourceFiles
31     scalarField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef scalarField_H
36 #define scalarField_H
38 #include "Field.H"
39 #include "scalar.H"
41 #define TEMPLATE
42 #include "FieldFunctionsM.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace Foam
49 typedef Field<scalar> scalarField;
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 template<>
54 tmp<scalarField> scalarField::component(const direction) const;
56 void component
58     scalarField& sf,
59     const UList<scalar>& f,
60     const direction
63 template<>
64 void scalarField::replace(const direction, const UList<scalar>& sf);
66 template<>
67 void scalarField::replace(const direction, const scalar& s);
70 void stabilise(scalarField& Res, const UList<scalar>& sf, const scalar s);
71 tmp<scalarField> stabilise(const UList<scalar>&, const scalar s);
72 tmp<scalarField> stabilise(const tmp<scalarField>&, const scalar s);
75 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77 BINARY_TYPE_OPERATOR(scalar, scalar, scalar, +, add)
78 BINARY_TYPE_OPERATOR(scalar, scalar, scalar, -, subtract)
80 BINARY_OPERATOR(scalar, scalar, scalar, *, multiply)
81 BINARY_OPERATOR(scalar, scalar, scalar, /, divide)
83 BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, divide)
85 BINARY_FUNCTION(scalar, scalar, scalar, pow)
86 BINARY_TYPE_FUNCTION(scalar, scalar, scalar, pow)
88 BINARY_FUNCTION(scalar, scalar, scalar, atan2)
89 BINARY_TYPE_FUNCTION(scalar, scalar, scalar, atan2)
92 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
94 UNARY_FUNCTION(scalar, scalar, pow3)
95 UNARY_FUNCTION(scalar, scalar, pow4)
96 UNARY_FUNCTION(scalar, scalar, pow5)
97 UNARY_FUNCTION(scalar, scalar, pow6)
98 UNARY_FUNCTION(scalar, scalar, pow025)
99 UNARY_FUNCTION(scalar, scalar, sqrt)
100 UNARY_FUNCTION(scalar, scalar, sign)
101 UNARY_FUNCTION(scalar, scalar, pos)
102 UNARY_FUNCTION(scalar, scalar, neg)
103 UNARY_FUNCTION(scalar, scalar, exp)
104 UNARY_FUNCTION(scalar, scalar, log)
105 UNARY_FUNCTION(scalar, scalar, log10)
106 UNARY_FUNCTION(scalar, scalar, sin)
107 UNARY_FUNCTION(scalar, scalar, cos)
108 UNARY_FUNCTION(scalar, scalar, tan)
109 UNARY_FUNCTION(scalar, scalar, asin)
110 UNARY_FUNCTION(scalar, scalar, acos)
111 UNARY_FUNCTION(scalar, scalar, atan)
112 UNARY_FUNCTION(scalar, scalar, sinh)
113 UNARY_FUNCTION(scalar, scalar, cosh)
114 UNARY_FUNCTION(scalar, scalar, tanh)
115 UNARY_FUNCTION(scalar, scalar, asinh)
116 UNARY_FUNCTION(scalar, scalar, acosh)
117 UNARY_FUNCTION(scalar, scalar, atanh)
118 UNARY_FUNCTION(scalar, scalar, erf)
119 UNARY_FUNCTION(scalar, scalar, erfc)
120 UNARY_FUNCTION(scalar, scalar, lgamma)
121 UNARY_FUNCTION(scalar, scalar, j0)
122 UNARY_FUNCTION(scalar, scalar, j1)
123 UNARY_FUNCTION(scalar, scalar, y0)
124 UNARY_FUNCTION(scalar, scalar, y1)
127 #define BesselFunc(func)                                            \
128 void func(scalarField& Res, const int n, const UList<scalar>& sf);  \
129 tmp<scalarField> func(const int n, const UList<scalar>&);           \
130 tmp<scalarField> func(const int n, const tmp<scalarField>&);
132 BesselFunc(jn)
133 BesselFunc(yn)
135 #undef BesselFunc
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 } // End namespace Foam
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 #include "undefFieldFunctionsM.H"
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 #endif
150 // ************************************************************************* //