1 /*---------------------------------------------------------------------------*\
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 -------------------------------------------------------------------------------
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/>.
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,
59 template<template<class> class Field>
60 tmp<FieldField<Field, scalar> > stabilise
62 const FieldField<Field, scalar>&,
66 template<template<class> class Field>
67 tmp<FieldField<Field, scalar> > stabilise
69 const tmp<FieldField<Field, scalar> >&,
74 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76 BINARY_TYPE_OPERATOR(scalar, scalar, scalar, +, add)
77 BINARY_TYPE_OPERATOR(scalar, scalar, scalar, -, subtract)
79 BINARY_OPERATOR(scalar, scalar, scalar, *, multiply)
80 BINARY_OPERATOR(scalar, scalar, scalar, /, divide)
82 BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, divide)
84 BINARY_FUNCTION(scalar, scalar, scalar, pow)
85 BINARY_TYPE_FUNCTION(scalar, scalar, scalar, pow)
87 BINARY_FUNCTION(scalar, scalar, scalar, atan2)
88 BINARY_TYPE_FUNCTION(scalar, scalar, scalar, atan2)
91 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93 UNARY_FUNCTION(scalar, scalar, pow3)
94 UNARY_FUNCTION(scalar, scalar, pow4)
95 UNARY_FUNCTION(scalar, scalar, pow5)
96 UNARY_FUNCTION(scalar, scalar, pow6)
97 UNARY_FUNCTION(scalar, scalar, sqrt)
98 UNARY_FUNCTION(scalar, scalar, sign)
99 UNARY_FUNCTION(scalar, scalar, pos)
100 UNARY_FUNCTION(scalar, scalar, neg)
101 UNARY_FUNCTION(scalar, scalar, exp)
102 UNARY_FUNCTION(scalar, scalar, log)
103 UNARY_FUNCTION(scalar, scalar, log10)
104 UNARY_FUNCTION(scalar, scalar, sin)
105 UNARY_FUNCTION(scalar, scalar, cos)
106 UNARY_FUNCTION(scalar, scalar, tan)
107 UNARY_FUNCTION(scalar, scalar, asin)
108 UNARY_FUNCTION(scalar, scalar, acos)
109 UNARY_FUNCTION(scalar, scalar, atan)
110 UNARY_FUNCTION(scalar, scalar, sinh)
111 UNARY_FUNCTION(scalar, scalar, cosh)
112 UNARY_FUNCTION(scalar, scalar, tanh)
113 UNARY_FUNCTION(scalar, scalar, asinh)
114 UNARY_FUNCTION(scalar, scalar, acosh)
115 UNARY_FUNCTION(scalar, scalar, atanh)
116 UNARY_FUNCTION(scalar, scalar, erf)
117 UNARY_FUNCTION(scalar, scalar, erfc)
118 UNARY_FUNCTION(scalar, scalar, lgamma)
119 UNARY_FUNCTION(scalar, scalar, j0)
120 UNARY_FUNCTION(scalar, scalar, j1)
121 UNARY_FUNCTION(scalar, scalar, y0)
122 UNARY_FUNCTION(scalar, scalar, y1)
125 #define BesselFunc(func) \
128 FieldField<Field, scalar>& Res, \
130 const FieldField<Field, scalar>& sf \
132 tmp<scalarField> func(const int n, const FieldField<Field, scalar>&); \
133 tmp<scalarField> func(const int n, const tmp<FieldField<Field, scalar> >&);
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 } // End namespace Foam
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 #include "undefFieldFunctionsM.H"
150 # include "scalarFieldField.C"
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 // ************************************************************************* //