00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef GeometricScalarField_H
00037 #define GeometricScalarField_H
00038
00039 #include "GeometricField.H"
00040 #include "DimensionedScalarField.H"
00041
00042 #define TEMPLATE template<template<class> class PatchField, class GeoMesh>
00043 #include "GeometricFieldFunctionsM.H"
00044
00045
00046
00047 namespace Foam
00048 {
00049
00050
00051
00052 template<template<class> class PatchField, class GeoMesh>
00053 void stabilise
00054 (
00055 GeometricField<scalar, PatchField, GeoMesh>&,
00056 const GeometricField<scalar, PatchField, GeoMesh>&,
00057 const dimensioned<scalar>&
00058 );
00059
00060 template<template<class> class PatchField, class GeoMesh>
00061 tmp<GeometricField<scalar, PatchField, GeoMesh> > stabilise
00062 (
00063 const GeometricField<scalar, PatchField, GeoMesh>&,
00064 const dimensioned<scalar>&
00065 );
00066
00067 template<template<class> class PatchField, class GeoMesh>
00068 tmp<GeometricField<scalar, PatchField, GeoMesh> > stabilise
00069 (
00070 const tmp<GeometricField<scalar, PatchField, GeoMesh> >&,
00071 const dimensioned<scalar>&
00072 );
00073
00074
00075
00076
00077 BINARY_TYPE_OPERATOR(scalar, scalar, scalar, +, '+', add)
00078 BINARY_TYPE_OPERATOR(scalar, scalar, scalar, -, '-', subtract)
00079
00080 BINARY_OPERATOR(scalar, scalar, scalar, *, '*', multiply)
00081 BINARY_OPERATOR(scalar, scalar, scalar, /, '|', divide)
00082
00083 BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, '|', divide)
00084
00085 BINARY_FUNCTION(scalar, scalar, scalar, pow)
00086 BINARY_TYPE_FUNCTION(scalar, scalar, scalar, pow)
00087
00088
00089
00090
00091 UNARY_FUNCTION(scalar, scalar, pow3, pow3)
00092 UNARY_FUNCTION(scalar, scalar, pow4, pow4)
00093 UNARY_FUNCTION(scalar, scalar, pow5, pow5)
00094 UNARY_FUNCTION(scalar, scalar, pow6, pow6)
00095 UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
00096 UNARY_FUNCTION(scalar, scalar, sign, sign)
00097 UNARY_FUNCTION(scalar, scalar, pos, pos)
00098 UNARY_FUNCTION(scalar, scalar, neg, neg)
00099
00100 UNARY_FUNCTION(scalar, scalar, exp, trans)
00101 UNARY_FUNCTION(scalar, scalar, log, trans)
00102 UNARY_FUNCTION(scalar, scalar, log10, trans)
00103 UNARY_FUNCTION(scalar, scalar, sin, trans)
00104 UNARY_FUNCTION(scalar, scalar, cos, trans)
00105 UNARY_FUNCTION(scalar, scalar, tan, trans)
00106 UNARY_FUNCTION(scalar, scalar, asin, trans)
00107 UNARY_FUNCTION(scalar, scalar, acos, trans)
00108 UNARY_FUNCTION(scalar, scalar, atan, trans)
00109 UNARY_FUNCTION(scalar, scalar, sinh, trans)
00110 UNARY_FUNCTION(scalar, scalar, cosh, trans)
00111 UNARY_FUNCTION(scalar, scalar, tanh, trans)
00112 UNARY_FUNCTION(scalar, scalar, asinh, trans)
00113 UNARY_FUNCTION(scalar, scalar, acosh, trans)
00114 UNARY_FUNCTION(scalar, scalar, atanh, trans)
00115 UNARY_FUNCTION(scalar, scalar, erf, trans)
00116 UNARY_FUNCTION(scalar, scalar, erfc, trans)
00117 UNARY_FUNCTION(scalar, scalar, lgamma, trans)
00118 UNARY_FUNCTION(scalar, scalar, j0, trans)
00119 UNARY_FUNCTION(scalar, scalar, j1, trans)
00120 UNARY_FUNCTION(scalar, scalar, y0, trans)
00121 UNARY_FUNCTION(scalar, scalar, y1, trans)
00122
00123
00124
00125
00126 #define BesselFunc(func) \
00127 \
00128 template<template<class> class PatchField, class GeoMesh> \
00129 void func \
00130 ( \
00131 GeometricField<scalar, PatchField, GeoMesh>& Res, \
00132 const int n, \
00133 const GeometricField<scalar, PatchField, GeoMesh>& sf \
00134 ); \
00135 \
00136 template<template<class> class PatchField, class GeoMesh> \
00137 tmp<GeometricField<scalar, PatchField, GeoMesh> > func \
00138 ( \
00139 const int n, \
00140 const GeometricField<scalar, PatchField, GeoMesh>& \
00141 ); \
00142 \
00143 template<template<class> class PatchField, class GeoMesh> \
00144 tmp<GeometricField<scalar, PatchField, GeoMesh> > func \
00145 ( \
00146 const int n, \
00147 const tmp<GeometricField<scalar, PatchField, GeoMesh> >& \
00148 );
00149
00150 BesselFunc(jn)
00151 BesselFunc(yn)
00152
00153 #undef BesselFunc
00154
00155
00156
00157
00158 }
00159
00160
00161
00162 #include "undefFieldFunctionsM.H"
00163
00164 #ifdef NoRepository
00165 # include "GeometricScalarField.C"
00166 #endif
00167
00168
00169
00170 #endif
00171
00172