OpenFOAM logo
Open Source CFD Toolkit

GeometricFieldFunctions.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2005 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Description
00026     Generic field type.
00027 
00028 \*---------------------------------------------------------------------------*/
00029 
00030 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00031 
00032 namespace Foam
00033 {
00034 
00035 // * * * * * * * * * * * * * * * Global functions  * * * * * * * * * * * * * //
00036 
00037 template<class Type, template<class> class PatchField, class GeoMesh>
00038 void component
00039 (
00040     GeometricField
00041     <
00042         typename GeometricField<Type, PatchField, GeoMesh>::cmptType,
00043         PatchField,
00044         GeoMesh
00045     >& gcf,
00046     const GeometricField<Type, PatchField, GeoMesh>& gf,
00047     const direction d
00048 );
00049 
00050 template<class Type, template<class> class PatchField, class GeoMesh>
00051 void T
00052 (
00053      GeometricField<Type, PatchField, GeoMesh>& gf,
00054      const GeometricField<Type, PatchField, GeoMesh>& gf1
00055 );
00056 
00057 template<class Type, template<class> class PatchField, class GeoMesh, int r>
00058 void pow
00059 (
00060     GeometricField<typename powProduct<Type, r>::type, PatchField, GeoMesh>& gf,
00061     const GeometricField<Type, PatchField, GeoMesh>& gf1
00062 );
00063 
00064 template<class Type, template<class> class PatchField, class GeoMesh, int r>
00065 tmp<GeometricField<typename powProduct<Type, r>::type, PatchField, GeoMesh> >
00066 pow
00067 (
00068     const GeometricField<Type, PatchField, GeoMesh>& gf,
00069     typename powProduct<Type, r>::type
00070 );
00071 
00072 template<class Type, template<class> class PatchField, class GeoMesh, int r>
00073 tmp<GeometricField<typename powProduct<Type, r>::type, PatchField, GeoMesh> >
00074 pow
00075 (
00076     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf,
00077     typename powProduct<Type, r>::type
00078 );
00079 
00080 template<class Type, template<class> class PatchField, class GeoMesh>
00081 void sqr
00082 (
00083     GeometricField
00084     <typename outerProduct<Type, Type>::type, PatchField, GeoMesh>& gf,
00085     const GeometricField<Type, PatchField, GeoMesh>& gf1
00086 );
00087 
00088 template<class Type, template<class> class PatchField, class GeoMesh>
00089 tmp
00090 <
00091     GeometricField
00092     <
00093         typename outerProduct<Type, Type>::type,
00094         PatchField,
00095         GeoMesh
00096     >
00097 >
00098 sqr(const GeometricField<Type, PatchField, GeoMesh>& gf);
00099 
00100 template<class Type, template<class> class PatchField, class GeoMesh>
00101 tmp
00102 <
00103     GeometricField
00104     <
00105         typename outerProduct<Type, Type>::type,
00106         PatchField,
00107         GeoMesh
00108     >
00109 >
00110 sqr(const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf);
00111 
00112 template<class Type, template<class> class PatchField, class GeoMesh>
00113 void magSqr
00114 (
00115     GeometricField<scalar, PatchField, GeoMesh>& gsf,
00116     const GeometricField<Type, PatchField, GeoMesh>& gf
00117 );
00118 
00119 template<class Type, template<class> class PatchField, class GeoMesh>
00120 tmp<GeometricField<scalar, PatchField, GeoMesh> > magSqr
00121 (
00122     const GeometricField<Type, PatchField, GeoMesh>& gf
00123 );
00124 
00125 template<class Type, template<class> class PatchField, class GeoMesh>
00126 tmp<GeometricField<scalar, PatchField, GeoMesh> > magSqr
00127 (
00128     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf
00129 );
00130 
00131 template<class Type, template<class> class PatchField, class GeoMesh>
00132 void mag
00133 (
00134     GeometricField<scalar, PatchField, GeoMesh>& gsf,
00135     const GeometricField<Type, PatchField, GeoMesh>& gf
00136 );
00137 
00138 template<class Type, template<class> class PatchField, class GeoMesh>
00139 tmp<GeometricField<scalar, PatchField, GeoMesh> > mag
00140 (
00141     const GeometricField<Type, PatchField, GeoMesh>& gf
00142 );
00143 
00144 template<class Type, template<class> class PatchField, class GeoMesh>
00145 tmp<GeometricField<scalar, PatchField, GeoMesh> > mag
00146 (
00147     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf
00148 );
00149 
00150 template<class Type, template<class> class PatchField, class GeoMesh>
00151 void cmptAv
00152 (
00153     GeometricField
00154     <
00155         typename GeometricField<Type, PatchField, GeoMesh>::cmptType,
00156         PatchField,
00157         GeoMesh
00158     >& gcf,
00159     const GeometricField<Type, PatchField, GeoMesh>& gf
00160 );
00161 
00162 template<class Type, template<class> class PatchField, class GeoMesh>
00163 tmp
00164 <
00165     GeometricField
00166     <
00167         typename GeometricField<Type, PatchField, GeoMesh>::cmptType,
00168         PatchField,
00169         GeoMesh
00170     >
00171 >
00172 cmptAv(const GeometricField<Type, PatchField, GeoMesh>& gf);
00173 
00174 template<class Type, template<class> class PatchField, class GeoMesh>
00175 tmp
00176 <
00177     GeometricField
00178     <
00179         typename GeometricField<Type, PatchField, GeoMesh>::cmptType,
00180         PatchField,
00181         GeoMesh
00182     >
00183 >
00184 cmptAv(const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf);
00185 
00186 #define BINARY_FUNCTION(func)                                                 \
00187                                                                               \
00188 template<class Type, template<class> class PatchField, class GeoMesh>         \
00189 void func                                                                     \
00190 (                                                                             \
00191     GeometricField<Type, PatchField, GeoMesh>& gf,                            \
00192     const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
00193     const GeometricField<Type, PatchField, GeoMesh>& gf2                      \
00194 );                                                                            \
00195                                                                               \
00196 template<class Type, template<class> class PatchField, class GeoMesh>         \
00197 tmp<GeometricField<Type, PatchField, GeoMesh> > func                          \
00198 (                                                                             \
00199     const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
00200     const GeometricField<Type, PatchField, GeoMesh>& gf2                      \
00201 );                                                                            \
00202                                                                               \
00203 template<class Type, template<class> class PatchField, class GeoMesh>         \
00204 tmp<GeometricField<Type, PatchField, GeoMesh> > func                          \
00205 (                                                                             \
00206     const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
00207     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf2               \
00208 );                                                                            \
00209                                                                               \
00210 template<class Type, template<class> class PatchField, class GeoMesh>         \
00211 tmp<GeometricField<Type, PatchField, GeoMesh> > func                          \
00212 (                                                                             \
00213     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1,              \
00214     const GeometricField<Type, PatchField, GeoMesh>& gf2                      \
00215 );                                                                            \
00216                                                                               \
00217 template<class Type, template<class> class PatchField, class GeoMesh>         \
00218 tmp<GeometricField<Type, PatchField, GeoMesh> > func                          \
00219 (                                                                             \
00220     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1,              \
00221     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf2               \
00222 );                                                                            \
00223                                                                               \
00224 template<class Type, template<class> class PatchField, class GeoMesh>         \
00225 void func                                                                     \
00226 (                                                                             \
00227     GeometricField<Type, PatchField, GeoMesh>& gf,                            \
00228     const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
00229     const dimensioned<Type>& dt                                               \
00230 );                                                                            \
00231                                                                               \
00232 template<class Type, template<class> class PatchField, class GeoMesh>         \
00233 tmp<GeometricField<Type, PatchField, GeoMesh> > func                          \
00234 (                                                                             \
00235     const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
00236     const dimensioned<Type>& dt                                               \
00237 );                                                                            \
00238                                                                               \
00239 template<class Type, template<class> class PatchField, class GeoMesh>         \
00240 tmp<GeometricField<Type, PatchField, GeoMesh> > func                          \
00241 (                                                                             \
00242     const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
00243     const Type& t                                                             \
00244 );                                                                            \
00245                                                                               \
00246 template<class Type, template<class> class PatchField, class GeoMesh>         \
00247 tmp<GeometricField<Type, PatchField, GeoMesh> > func                          \
00248 (                                                                             \
00249     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1,              \
00250     const dimensioned<Type>& dt                                               \
00251 );                                                                            \
00252                                                                               \
00253 template<class Type, template<class> class PatchField, class GeoMesh>         \
00254 tmp<GeometricField<Type, PatchField, GeoMesh> > func                          \
00255 (                                                                             \
00256     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1,              \
00257     const Type& t                                                             \
00258 );
00259 
00260 BINARY_FUNCTION(max)
00261 BINARY_FUNCTION(min)
00262 BINARY_FUNCTION(scale)
00263 
00264 #undef BINARY_FUNCTION
00265 
00266 
00267 #define UNARY_FUNCTION_WITH_BOUNDARY(returnType, func, gFunc)                 \
00268                                                                               \
00269 template<class Type, template<class> class PatchField, class GeoMesh>         \
00270 dimensioned<returnType> func                                                  \
00271 (                                                                             \
00272     const GeometricField<Type, PatchField, GeoMesh>& gf                       \
00273 );                                                                            \
00274                                                                               \
00275 template<class Type, template<class> class PatchField, class GeoMesh>         \
00276 dimensioned<returnType> func                                                  \
00277 (                                                                             \
00278     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1               \
00279 );
00280 
00281 UNARY_FUNCTION_WITH_BOUNDARY(Type, max, gMax)
00282 UNARY_FUNCTION_WITH_BOUNDARY(Type, min, gMin)
00283 
00284 #undef UNARY_FUNCTION_WITH_BOUNDARY
00285 
00286 
00287 #define UNARY_FUNCTION(returnType, func, gFunc)                               \
00288                                                                               \
00289 template<class Type, template<class> class PatchField, class GeoMesh>         \
00290 dimensioned<returnType> func                                                  \
00291 (                                                                             \
00292     const GeometricField<Type, PatchField, GeoMesh>& gf                       \
00293 );                                                                            \
00294                                                                               \
00295 template<class Type, template<class> class PatchField, class GeoMesh>         \
00296 dimensioned<returnType> func                                                  \
00297 (                                                                             \
00298     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1               \
00299 );
00300 
00301 UNARY_FUNCTION(Type, sum, gSum)
00302 UNARY_FUNCTION(scalar, sumMag, gSumMag)
00303 UNARY_FUNCTION(Type, average, gAverage)
00304 
00305 #undef UNARY_FUNCTION
00306 
00307 
00308 // * * * * * * * * * * * * * * * Global operators  * * * * * * * * * * * * * //
00309 
00310 #define UNARY_OPERATOR(op, opFunc)                                            \
00311                                                                               \
00312 template<class Type, template<class> class PatchField, class GeoMesh>         \
00313 void opFunc                                                                   \
00314 (                                                                             \
00315     GeometricField<Type, PatchField, GeoMesh>& gf,                            \
00316     const GeometricField<Type, PatchField, GeoMesh>& gf1                      \
00317 );                                                                            \
00318                                                                               \
00319 template<class Type, template<class> class PatchField, class GeoMesh>         \
00320 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00321 (                                                                             \
00322     const GeometricField<Type, PatchField, GeoMesh>& gf1                      \
00323 );                                                                            \
00324                                                                               \
00325 template<class Type, template<class> class PatchField, class GeoMesh>         \
00326 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00327 (                                                                             \
00328     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1               \
00329 );
00330 
00331 UNARY_OPERATOR(-, negate)
00332 
00333 #undef UNARY_OPERATOR
00334 
00335 
00336 #define BINARY_OPERATOR_FF(Type1, Type2, op, opFunc)                          \
00337                                                                               \
00338 template<class Type, template<class> class PatchField, class GeoMesh>         \
00339 void opFunc                                                                   \
00340 (                                                                             \
00341     GeometricField<Type, PatchField, GeoMesh>& gf,                            \
00342     const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
00343     const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
00344 );                                                                            \
00345                                                                               \
00346 template<class Type, template<class> class PatchField, class GeoMesh>         \
00347 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00348 (                                                                             \
00349     const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
00350     const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
00351 );
00352 
00353 #define BINARY_OPERATOR_FTR(Type1, Type2, op, opFunc)                         \
00354 template<class Type, template<class> class PatchField, class GeoMesh>         \
00355 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00356 (                                                                             \
00357     const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
00358     const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
00359 );
00360 
00361 #define BINARY_OPERATOR_FT(Type1, Type2, op, opFunc)                          \
00362 template<class Type, template<class> class PatchField, class GeoMesh>         \
00363 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00364 (                                                                             \
00365     const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
00366     const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
00367 );
00368 
00369 #define BINARY_OPERATOR_TRF(Type1, Type2, op, opFunc)                         \
00370 template<class Type, template<class> class PatchField, class GeoMesh>         \
00371 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00372 (                                                                             \
00373     const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
00374     const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
00375 );
00376 
00377 #define BINARY_OPERATOR_TF(Type1, Type2, op, opFunc)                          \
00378 template<class Type, template<class> class PatchField, class GeoMesh>         \
00379 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00380 (                                                                             \
00381     const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
00382     const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
00383 );
00384 
00385 #define BINARY_OPERATOR_TRT(Type1, Type2, op, opFunc)                         \
00386 template<class Type, template<class> class PatchField, class GeoMesh>         \
00387 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00388 (                                                                             \
00389     const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
00390     const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
00391 );
00392 
00393 #define BINARY_OPERATOR_TTR(Type1, Type2, op, opFunc)                         \
00394 template<class Type, template<class> class PatchField, class GeoMesh>         \
00395 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00396 (                                                                             \
00397     const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
00398     const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
00399 );
00400 
00401 #define BINARY_OPERATOR_R(Type1, Type2, op, opFunc)                           \
00402     BINARY_OPERATOR_FF(Type1, Type2, op, opFunc)                              \
00403     BINARY_OPERATOR_FTR(Type1, Type2, op, opFunc)                             \
00404     BINARY_OPERATOR_TRF(Type1, Type2, op, opFunc)                             \
00405     BINARY_OPERATOR_TRT(Type1, Type2, op, opFunc)
00406 
00407 BINARY_OPERATOR_R(Type, Type, +, add)
00408 BINARY_OPERATOR_R(Type, Type, -, subtract)
00409 
00410 #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
00411 BINARY_OPERATOR_FF(scalar, Type, *, multiply)
00412 BINARY_OPERATOR_FTR(scalar, Type, *, multiply)
00413 BINARY_OPERATOR_TF(scalar, Type, *, multiply)
00414 BINARY_OPERATOR_TTR(scalar, Type, *, multiply)
00415 #endif
00416 
00417 BINARY_OPERATOR_FF(Type, scalar, /, divide)
00418 BINARY_OPERATOR_FT(Type, scalar, /, divide)
00419 BINARY_OPERATOR_TRF(Type, scalar, /, divide)
00420 BINARY_OPERATOR_TRT(Type, scalar, /, divide)
00421 
00422 #undef BINARY_OPERATOR_R
00423 #undef BINARY_OPERATOR_FF
00424 #undef BINARY_OPERATOR_FTR
00425 #undef BINARY_OPERATOR_TF
00426 #undef BINARY_OPERATOR_TTR
00427 #undef BINARY_OPERATOR_FT
00428 #undef BINARY_OPERATOR_TRF
00429 #undef BINARY_OPERATOR_TRT
00430 
00431 
00432 #define BINARY_TYPE_OPERATOR_TF(TYPE, op, opFunc)                             \
00433                                                                               \
00434 template<class Type, template<class> class PatchField, class GeoMesh>         \
00435 void opFunc                                                                   \
00436 (                                                                             \
00437     GeometricField<Type, PatchField, GeoMesh>& gf,                            \
00438     const dimensioned<TYPE>& dt,                                              \
00439     const GeometricField<Type, PatchField, GeoMesh>& gf1                      \
00440 );                                                                            \
00441                                                                               \
00442 template<class Type, template<class> class PatchField, class GeoMesh>         \
00443 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00444 (                                                                             \
00445     const dimensioned<TYPE>& dt,                                              \
00446     const GeometricField<Type, PatchField, GeoMesh>& gf1                      \
00447 );                                                                            \
00448                                                                               \
00449 template<class Type, template<class> class PatchField, class GeoMesh>         \
00450 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00451 (                                                                             \
00452     const TYPE& t,                                                            \
00453     const GeometricField<Type, PatchField, GeoMesh>& gf1                      \
00454 );                                                                            \
00455                                                                               \
00456 template<class Type, template<class> class PatchField, class GeoMesh>         \
00457 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00458 (                                                                             \
00459     const dimensioned<TYPE>& dt,                                              \
00460     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1               \
00461 );                                                                            \
00462                                                                               \
00463 template<class Type, template<class> class PatchField, class GeoMesh>         \
00464 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00465 (                                                                             \
00466     const TYPE& t,                                                            \
00467     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1               \
00468 );
00469 
00470 
00471 #define BINARY_TYPE_OPERATOR_FT(TYPE, op, opFunc)                             \
00472                                                                               \
00473 template<class Type, template<class> class PatchField, class GeoMesh>         \
00474 void opFunc                                                                   \
00475 (                                                                             \
00476     GeometricField<Type, PatchField, GeoMesh>& gf,                            \
00477     const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
00478     const dimensioned<TYPE>& dt                                               \
00479 );                                                                            \
00480                                                                               \
00481 template<class Type, template<class> class PatchField, class GeoMesh>         \
00482 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00483 (                                                                             \
00484     const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
00485     const dimensioned<TYPE>& dt                                               \
00486 );                                                                            \
00487                                                                               \
00488 template<class Type, template<class> class PatchField, class GeoMesh>         \
00489 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00490 (                                                                             \
00491     const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
00492     const TYPE& t                                                             \
00493 );                                                                            \
00494                                                                               \
00495 template<class Type, template<class> class PatchField, class GeoMesh>         \
00496 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00497 (                                                                             \
00498     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1,              \
00499     const dimensioned<TYPE>& dt                                               \
00500 );                                                                            \
00501                                                                               \
00502 template<class Type, template<class> class PatchField, class GeoMesh>         \
00503 tmp<GeometricField<Type, PatchField, GeoMesh> > operator op                   \
00504 (                                                                             \
00505     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1,              \
00506     const TYPE& t                                                             \
00507 );
00508 
00509 #define BINARY_TYPE_OPERATOR(TYPE, op, opFunc)                                \
00510     BINARY_TYPE_OPERATOR_TF(TYPE, op, opFunc)                                 \
00511     BINARY_TYPE_OPERATOR_FT(TYPE, op, opFunc)
00512 
00513 BINARY_TYPE_OPERATOR(Type, +, add)
00514 BINARY_TYPE_OPERATOR(Type, -, subtract)
00515 
00516 BINARY_TYPE_OPERATOR(scalar, *, multiply)
00517 BINARY_TYPE_OPERATOR_FT(scalar, /, divide)
00518 
00519 #undef BINARY_TYPE_OPERATOR
00520 #undef BINARY_TYPE_OPERATOR_TF
00521 #undef BINARY_TYPE_OPERATOR_FT
00522 
00523 
00524 #define PRODUCT_OPERATOR(product, op, opFunc)                                 \
00525                                                                               \
00526 template                                                                      \
00527 <class Type1, class Type2, template<class> class PatchField, class GeoMesh>   \
00528 void opFunc                                                                   \
00529 (                                                                             \
00530     GeometricField                                                            \
00531     <typename product<Type1, Type2>::type, PatchField, GeoMesh>& gf,          \
00532     const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
00533     const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
00534 );                                                                            \
00535                                                                               \
00536 template                                                                      \
00537 <class Type1, class Type2, template<class> class PatchField, class GeoMesh>   \
00538 tmp                                                                           \
00539 <                                                                             \
00540     GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh> \
00541 >                                                                             \
00542 operator op                                                                   \
00543 (                                                                             \
00544     const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
00545     const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
00546 );                                                                            \
00547                                                                               \
00548 template                                                                      \
00549 <class Type1, class Type2, template<class> class PatchField, class GeoMesh>   \
00550 tmp                                                                           \
00551 <                                                                             \
00552     GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh> \
00553 >                                                                             \
00554 operator op                                                                   \
00555 (                                                                             \
00556     const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
00557     const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
00558 );                                                                            \
00559                                                                               \
00560 template                                                                      \
00561 <class Type1, class Type2, template<class> class PatchField, class GeoMesh>   \
00562 tmp                                                                           \
00563 <                                                                             \
00564     GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh> \
00565 >                                                                             \
00566 operator op                                                                   \
00567 (                                                                             \
00568     const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
00569     const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
00570 );                                                                            \
00571                                                                               \
00572 template                                                                      \
00573 <class Type1, class Type2, template<class> class PatchField, class GeoMesh>   \
00574 tmp                                                                           \
00575 <                                                                             \
00576     GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh> \
00577 >                                                                             \
00578 operator op                                                                   \
00579 (                                                                             \
00580     const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
00581     const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
00582 );                                                                            \
00583                                                                               \
00584 template                                                                      \
00585 <class Form, class Type, template<class> class PatchField, class GeoMesh>     \
00586 void opFunc                                                                   \
00587 (                                                                             \
00588     GeometricField                                                            \
00589     <typename product<Type, Form>::type, PatchField, GeoMesh>& gf,            \
00590     const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
00591     const dimensioned<Form>& dvs                                              \
00592 );                                                                            \
00593                                                                               \
00594 template                                                                      \
00595 <class Form, class Type, template<class> class PatchField, class GeoMesh>     \
00596 tmp<GeometricField<typename product<Type, Form>::type, PatchField, GeoMesh> > \
00597 operator op                                                                   \
00598 (                                                                             \
00599     const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
00600     const dimensioned<Form>& dvs                                              \
00601 );                                                                            \
00602                                                                               \
00603 template                                                                      \
00604 <                                                                             \
00605     class Form,                                                               \
00606     class Cmpt,                                                               \
00607     int nCmpt,                                                                \
00608     class Type, template<class> class PatchField,                             \
00609     class GeoMesh                                                             \
00610 >                                                                             \
00611 tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
00612 operator op                                                                   \
00613 (                                                                             \
00614     const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
00615     const VectorSpace<Form,Cmpt,nCmpt>& vs                                    \
00616 );                                                                            \
00617                                                                               \
00618 template                                                                      \
00619 <class Form, class Type, template<class> class PatchField, class GeoMesh>     \
00620 tmp<GeometricField<typename product<Type, Form>::type, PatchField, GeoMesh> > \
00621 operator op                                                                   \
00622 (                                                                             \
00623     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1,              \
00624     const dimensioned<Form>& dvs                                              \
00625 );                                                                            \
00626                                                                               \
00627 template                                                                      \
00628 <                                                                             \
00629     class Form,                                                               \
00630     class Cmpt,                                                               \
00631     int nCmpt,                                                                \
00632     class Type, template<class> class PatchField,                             \
00633     class GeoMesh                                                             \
00634 >                                                                             \
00635 tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
00636 operator op                                                                   \
00637 (                                                                             \
00638     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1,              \
00639     const VectorSpace<Form,Cmpt,nCmpt>& vs                                    \
00640 );                                                                            \
00641                                                                               \
00642 template                                                                      \
00643 <class Form, class Type, template<class> class PatchField, class GeoMesh>     \
00644 void opFunc                                                                   \
00645 (                                                                             \
00646     GeometricField                                                            \
00647     <typename product<Form, Type>::type, PatchField, GeoMesh>& gf,            \
00648     const dimensioned<Form>& dvs,                                             \
00649     const GeometricField<Type, PatchField, GeoMesh>& gf1                      \
00650 );                                                                            \
00651                                                                               \
00652 template                                                                      \
00653 <class Form, class Type, template<class> class PatchField, class GeoMesh>     \
00654 tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
00655 operator op                                                                   \
00656 (                                                                             \
00657     const dimensioned<Form>& dvs,                                             \
00658     const GeometricField<Type, PatchField, GeoMesh>& gf1                      \
00659 );                                                                            \
00660                                                                               \
00661 template                                                                      \
00662 <                                                                             \
00663     class Form,                                                               \
00664     class Cmpt,                                                               \
00665     int nCmpt,                                                                \
00666     class Type, template<class> class PatchField,                             \
00667     class GeoMesh                                                             \
00668 >                                                                             \
00669 tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
00670 operator op                                                                   \
00671 (                                                                             \
00672     const VectorSpace<Form,Cmpt,nCmpt>& vs,                                   \
00673     const GeometricField<Type, PatchField, GeoMesh>& gf1                      \
00674 );                                                                            \
00675                                                                               \
00676 template                                                                      \
00677 <class Form, class Type, template<class> class PatchField, class GeoMesh>     \
00678 tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
00679 operator op                                                                   \
00680 (                                                                             \
00681     const dimensioned<Form>& dvs,                                             \
00682     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1               \
00683 );                                                                            \
00684                                                                               \
00685 template                                                                      \
00686 <                                                                             \
00687     class Form,                                                               \
00688     class Cmpt,                                                               \
00689     int nCmpt,                                                                \
00690     class Type, template<class> class PatchField,                             \
00691     class GeoMesh                                                             \
00692 >                                                                             \
00693 tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
00694 operator op                                                                   \
00695 (                                                                             \
00696     const VectorSpace<Form,Cmpt,nCmpt>& vs,                                   \
00697     const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1               \
00698 );
00699 
00700 PRODUCT_OPERATOR(outerProduct, *, outer)
00701 PRODUCT_OPERATOR(crossProduct, ^, cross)
00702 PRODUCT_OPERATOR(innerProduct, &, dot)
00703 PRODUCT_OPERATOR(scalarProduct, &&, dotdot)
00704 
00705 #undef PRODUCT_OPERATOR
00706 
00707 
00708 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00709 
00710 } // End namespace Foam
00711 
00712 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
For further information go to www.openfoam.org