1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
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
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/>.
25 Foam::scalarFieldField
28 Specialisation of FieldField\<T\> for scalar.
33 \*---------------------------------------------------------------------------*/
35 #ifndef scalarFieldField_H
36 #define scalarFieldField_H
38 #include "FieldField.H"
41 #define TEMPLATE template<template<class> class Field>
42 #include "FieldFieldFunctionsM.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 template<template<class> class Field>
54 FieldField<Field, scalar>& Res,
55 const FieldField<Field, scalar>& sf,
60 template<template<class> class Field>
61 tmp<FieldField<Field, scalar> > stabilise
63 const FieldField<Field, scalar>&,
68 template<template<class> class Field>
69 tmp<FieldField<Field, scalar> > stabilise
71 const tmp<FieldField<Field, scalar> >&,
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, pow025)
100 UNARY_FUNCTION(scalar, scalar, sqrt)
101 UNARY_FUNCTION(scalar, scalar, sign)
102 UNARY_FUNCTION(scalar, scalar, pos)
103 UNARY_FUNCTION(scalar, scalar, neg)
104 UNARY_FUNCTION(scalar, scalar, exp)
105 UNARY_FUNCTION(scalar, scalar, log)
106 UNARY_FUNCTION(scalar, scalar, log10)
107 UNARY_FUNCTION(scalar, scalar, sin)
108 UNARY_FUNCTION(scalar, scalar, cos)
109 UNARY_FUNCTION(scalar, scalar, tan)
110 UNARY_FUNCTION(scalar, scalar, asin)
111 UNARY_FUNCTION(scalar, scalar, acos)
112 UNARY_FUNCTION(scalar, scalar, atan)
113 UNARY_FUNCTION(scalar, scalar, sinh)
114 UNARY_FUNCTION(scalar, scalar, cosh)
115 UNARY_FUNCTION(scalar, scalar, tanh)
116 UNARY_FUNCTION(scalar, scalar, asinh)
117 UNARY_FUNCTION(scalar, scalar, acosh)
118 UNARY_FUNCTION(scalar, scalar, atanh)
119 UNARY_FUNCTION(scalar, scalar, erf)
120 UNARY_FUNCTION(scalar, scalar, erfc)
121 UNARY_FUNCTION(scalar, scalar, lgamma)
122 UNARY_FUNCTION(scalar, scalar, j0)
123 UNARY_FUNCTION(scalar, scalar, j1)
124 UNARY_FUNCTION(scalar, scalar, y0)
125 UNARY_FUNCTION(scalar, scalar, y1)
128 #define BesselFunc(func) \
131 FieldField<Field, scalar>& Res, \
133 const FieldField<Field, scalar>& sf \
135 tmp<scalarField> func(const int n, const FieldField<Field, scalar>&); \
136 tmp<scalarField> func(const int n, const tmp<FieldField<Field, scalar> >&);
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 } // End namespace Foam
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 #include "undefFieldFunctionsM.H"
153 # include "scalarFieldField.C"
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 // ************************************************************************* //