Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / src / foam / fields / FieldFields / scalarFieldField / scalarFieldField.H
blob3282a3791886084f7b289941daa8242ea83659bc
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::scalarFieldField
27 Description
28     Specialisation of FieldField\<T\> for scalar.
30 SourceFiles
31     scalarFieldField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef scalarFieldField_H
36 #define scalarFieldField_H
38 #include "FieldField.H"
39 #include "scalar.H"
41 #define TEMPLATE template<template<class> class Field>
42 #include "FieldFieldFunctionsM.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace Foam
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 template<template<class> class Field>
52 void stabilise
54     FieldField<Field, scalar>& Res,
55     const FieldField<Field, scalar>& sf,
56     const scalar s
59 template<template<class> class Field>
60 tmp<FieldField<Field, scalar> > stabilise
62     const FieldField<Field, scalar>&,
63     const scalar s
66 template<template<class> class Field>
67 tmp<FieldField<Field, scalar> > stabilise
69     const tmp<FieldField<Field, scalar> >&,
70     const scalar s
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)                                                      \
126 void func                                                                     \
127 (                                                                             \
128     FieldField<Field, scalar>& Res,                                           \
129     const int n,                                                              \
130     const FieldField<Field, scalar>& sf                                       \
131 );                                                                            \
132 tmp<scalarField> func(const int n, const FieldField<Field, scalar>&);         \
133 tmp<scalarField> func(const int n, const tmp<FieldField<Field, scalar> >&);
135 BesselFunc(jn)
136 BesselFunc(yn)
138 #undef BesselFunc
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 } // End namespace Foam
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 #include "undefFieldFunctionsM.H"
149 #ifdef NoRepository
150 #   include "scalarFieldField.C"
151 #endif
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 #endif
157 // ************************************************************************* //