initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / OpenFOAM / fields / FieldFields / scalarFieldField / scalarFieldField.H
blob45f1e86ea01e95a8f36496075a1d09b4595d9184
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 InClass
26     Foam::scalarFieldField
28 Description
29     Specialisation of FieldField\<T\> for scalar.
31 SourceFiles
32     scalarFieldField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef scalarFieldField_H
37 #define scalarFieldField_H
39 #include "FieldField.H"
40 #include "scalar.H"
42 #define TEMPLATE template<template<class> class Field>
43 #include "FieldFieldFunctionsM.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 namespace Foam
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 template<template<class> class Field>
53 void stabilise
55     FieldField<Field, scalar>& Res,
56     const FieldField<Field, scalar>& sf,
57     const scalar s
60 template<template<class> class Field>
61 tmp<FieldField<Field, scalar> > stabilise
63     const FieldField<Field, scalar>&,
64     const scalar s
67 template<template<class> class Field>
68 tmp<FieldField<Field, scalar> > stabilise
70     const tmp<FieldField<Field, scalar> >&,
71     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, sqrt)
99 UNARY_FUNCTION(scalar, scalar, sign)
100 UNARY_FUNCTION(scalar, scalar, pos)
101 UNARY_FUNCTION(scalar, scalar, neg)
102 UNARY_FUNCTION(scalar, scalar, exp)
103 UNARY_FUNCTION(scalar, scalar, log)
104 UNARY_FUNCTION(scalar, scalar, log10)
105 UNARY_FUNCTION(scalar, scalar, sin)
106 UNARY_FUNCTION(scalar, scalar, cos)
107 UNARY_FUNCTION(scalar, scalar, tan)
108 UNARY_FUNCTION(scalar, scalar, asin)
109 UNARY_FUNCTION(scalar, scalar, acos)
110 UNARY_FUNCTION(scalar, scalar, atan)
111 UNARY_FUNCTION(scalar, scalar, sinh)
112 UNARY_FUNCTION(scalar, scalar, cosh)
113 UNARY_FUNCTION(scalar, scalar, tanh)
114 UNARY_FUNCTION(scalar, scalar, asinh)
115 UNARY_FUNCTION(scalar, scalar, acosh)
116 UNARY_FUNCTION(scalar, scalar, atanh)
117 UNARY_FUNCTION(scalar, scalar, erf)
118 UNARY_FUNCTION(scalar, scalar, erfc)
119 UNARY_FUNCTION(scalar, scalar, lgamma)
120 UNARY_FUNCTION(scalar, scalar, j0)
121 UNARY_FUNCTION(scalar, scalar, j1)
122 UNARY_FUNCTION(scalar, scalar, y0)
123 UNARY_FUNCTION(scalar, scalar, y1)
126 #define BesselFunc(func)                                                      \
127 void func                                                                     \
128 (                                                                             \
129     FieldField<Field, scalar>& Res,                                           \
130     const int n,                                                              \
131     const FieldField<Field, scalar>& sf                                       \
132 );                                                                            \
133 tmp<scalarField> func(const int n, const FieldField<Field, scalar>&);         \
134 tmp<scalarField> func(const int n, const tmp<FieldField<Field, scalar> >&);
136 BesselFunc(jn)
137 BesselFunc(yn)
139 #undef BesselFunc
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 } // End namespace Foam
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 #include "undefFieldFunctionsM.H"
150 #ifdef NoRepository
151 #   include "scalarFieldField.C"
152 #endif
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 #endif
158 // ************************************************************************* //