initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / OpenFOAM / fields / Fields / scalarField / scalarField.H
bloba1d0865d205664100e4826ace2cbf57aab3792b3
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 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 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
19     for more details.
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
25 Typedef
26     Foam::scalarField
28 Description
29     Specialisation of Field\<T\> for scalar.
31 SourceFiles
32     scalarField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef scalarField_H
37 #define scalarField_H
39 #include "Field.H"
40 #include "scalar.H"
42 #define TEMPLATE
43 #include "FieldFunctionsM.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 namespace Foam
50 typedef Field<scalar> scalarField;
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 template<>
55 tmp<scalarField> scalarField::component(const direction) const;
57 void component
59     scalarField& sf,
60     const UList<scalar>& f,
61     const direction
64 template<>
65 void scalarField::replace(const direction, const UList<scalar>& sf);
67 template<>
68 void scalarField::replace(const direction, const scalar& s);
71 void stabilise(scalarField& Res, const UList<scalar>& sf, const scalar s);
72 tmp<scalarField> stabilise(const UList<scalar>&, const scalar s);
73 tmp<scalarField> stabilise(const tmp<scalarField>&, const scalar s);
76 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78 BINARY_TYPE_OPERATOR(scalar, scalar, scalar, +, add)
79 BINARY_TYPE_OPERATOR(scalar, scalar, scalar, -, subtract)
81 BINARY_OPERATOR(scalar, scalar, scalar, *, multiply)
82 BINARY_OPERATOR(scalar, scalar, scalar, /, divide)
84 BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, divide)
86 BINARY_FUNCTION(scalar, scalar, scalar, pow)
87 BINARY_TYPE_FUNCTION(scalar, scalar, scalar, pow)
89 BINARY_FUNCTION(scalar, scalar, scalar, atan2)
90 BINARY_TYPE_FUNCTION(scalar, scalar, scalar, atan2)
93 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
95 UNARY_FUNCTION(scalar, scalar, pow3)
96 UNARY_FUNCTION(scalar, scalar, pow4)
97 UNARY_FUNCTION(scalar, scalar, pow5)
98 UNARY_FUNCTION(scalar, scalar, pow6)
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 // ************************************************************************* //