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