OpenFOAM logo
Open Source CFD Toolkit

TetPointPatchFieldFunctions.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 TetPointPatchField type.
00027 
00028 \*---------------------------------------------------------------------------*/
00029 
00030 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00031 
00032 namespace Foam
00033 {
00034 
00035 /* * * * * * * * * * * * * * * * Global functions  * * * * * * * * * * * * * */
00036 
00037 template<template<class> class PatchField, class PointPatch, class Type>
00038 inline void component
00039 (
00040     TetPointPatchField<PatchField, PointPatch, typename Field<Type>::cmptType>& sf,
00041     const TetPointPatchField<PatchField, PointPatch, Type>& f,
00042     const direction d
00043 ){}
00044 
00045 
00046 template<template<class> class PatchField, class PointPatch, class Type>
00047 inline void T
00048 (
00049     TetPointPatchField<PatchField, PointPatch, Type>& f1,
00050     const TetPointPatchField<PatchField, PointPatch, Type>& f2
00051 ){}
00052 
00053 
00054 template<template<class> class PatchField, class PointPatch, class Type, int r>
00055 inline void pow
00056 (
00057     Field<typename powProduct<Type, r>::type>& f,
00058     const TetPointPatchField<PatchField, PointPatch, Type>& vf
00059 ){}
00060 
00061 
00062 template<template<class> class PatchField, class PointPatch, class Type>
00063 inline void sqr
00064 (
00065     Field<typename outerProduct<Type, Type>::type>& f,
00066     const TetPointPatchField<PatchField, PointPatch, Type>& vf
00067 ){}
00068 
00069 
00070 template<template<class> class PatchField, class PointPatch, class Type>
00071 inline void magSqr
00072 (
00073     TetPointPatchField<PatchField, PointPatch, scalar>& sf,
00074     const TetPointPatchField<PatchField, PointPatch, Type>& f
00075 ){}
00076 
00077 
00078 template<template<class> class PatchField, class PointPatch, class Type>
00079 inline void mag
00080 (
00081     TetPointPatchField<PatchField, PointPatch, scalar>& sf,
00082     const TetPointPatchField<PatchField, PointPatch, Type>& f
00083 ){}
00084 
00085 
00086 template<template<class> class PatchField, class PointPatch, class Type>
00087 inline void cmptAv
00088 (
00089     TetPointPatchField<PatchField, PointPatch, typename Field<Type>::cmptType>& cf,
00090     const TetPointPatchField<PatchField, PointPatch, Type>& f
00091 ){}
00092 
00093 
00094 template<template<class> class PatchField, class PointPatch, class Type>
00095 inline void cmptMag
00096 (
00097     TetPointPatchField<PatchField, PointPatch, Type>& cf,
00098     const TetPointPatchField<PatchField, PointPatch, Type>& f
00099 ){}
00100 
00101 
00102 #define BINARY_FUNCTION(func)                                                 \
00103                                                                               \
00104 template<template<class> class PatchField, class PointPatch, class Type>      \
00105 inline void func                                                              \
00106 (                                                                             \
00107     TetPointPatchField<PatchField, PointPatch, Type>& f,                         \
00108     const TetPointPatchField<PatchField, PointPatch, Type>& f1,                  \
00109     const TetPointPatchField<PatchField, PointPatch, Type>& f2                   \
00110 ){}                                                                           \
00111                                                                               \
00112 template<template<class> class PatchField, class PointPatch, class Type>      \
00113 inline void func                                                              \
00114 (                                                                             \
00115     TetPointPatchField<PatchField, PointPatch, Type>& f,                         \
00116     const TetPointPatchField<PatchField, PointPatch, Type>& f1,                  \
00117     const Type& s                                                             \
00118 ){}
00119 
00120 BINARY_FUNCTION(max)
00121 BINARY_FUNCTION(min)
00122 BINARY_FUNCTION(scale)
00123 
00124 #undef BINARY_FUNCTION
00125 
00126 
00127 /* * * * * * * * * * * * * * * * Global operators  * * * * * * * * * * * * * */
00128 
00129 #define UNARY_OPERATOR(op, opFunc)                                            \
00130                                                                               \
00131 template<template<class> class PatchField, class PointPatch, class Type>      \
00132 inline void opFunc                                                            \
00133 (                                                                             \
00134     TetPointPatchField<PatchField, PointPatch, Type>& f,                         \
00135     const TetPointPatchField<PatchField, PointPatch, Type>& f1                   \
00136 ){}
00137 
00138 UNARY_OPERATOR(-, negate)
00139 
00140 #undef UNARY_OPERATOR
00141 
00142 
00143 #define BINARY_OPERATOR_FF(Type1, Type2, op, opFunc)                          \
00144                                                                               \
00145 template<template<class> class PatchField, class PointPatch, class Type>      \
00146 inline void opFunc                                                            \
00147 (                                                                             \
00148     TetPointPatchField<PatchField, PointPatch, Type>& f,                         \
00149     const TetPointPatchField<PatchField, PointPatch, Type1>& f1,                 \
00150     const TetPointPatchField<PatchField, PointPatch, Type2>& f2                  \
00151 ){}
00152 
00153 #define BINARY_OPERATOR_R(Type1, Type2, op, opFunc)                           \
00154     BINARY_OPERATOR_FF(Type1, Type2, op, opFunc)
00155 
00156 BINARY_OPERATOR_R(Type, Type, +, add)
00157 BINARY_OPERATOR_R(Type, Type, -, subtract)
00158 BINARY_OPERATOR_FF(scalar, Type, *, multiply)
00159 BINARY_OPERATOR_FF(Type, scalar, /, divide)
00160 
00161 #undef BINARY_OPERATOR_R
00162 #undef BINARY_OPERATOR_FF
00163 #undef BINARY_OPERATOR_FTR
00164 #undef BINARY_OPERATOR_TF
00165 #undef BINARY_OPERATOR_TTR
00166 #undef BINARY_OPERATOR_FT
00167 #undef BINARY_OPERATOR_TRF
00168 #undef BINARY_OPERATOR_TRT
00169 
00170 
00171 #define BINARY_TYPE_OPERATOR_TF(TYPE, op, opFunc)                             \
00172                                                                               \
00173 template<template<class> class PatchField, class PointPatch, class Type>      \
00174 inline void opFunc                                                            \
00175 (                                                                             \
00176     TetPointPatchField<PatchField, PointPatch, Type>& f,                         \
00177     const TYPE& s,                                                            \
00178     const TetPointPatchField<PatchField, PointPatch, Type>& f1                   \
00179 ){}
00180 
00181 
00182 #define BINARY_TYPE_OPERATOR_FT(TYPE, op, opFunc)                             \
00183                                                                               \
00184 template<template<class> class PatchField, class PointPatch, class Type>      \
00185 inline void opFunc                                                            \
00186 (                                                                             \
00187     TetPointPatchField<PatchField, PointPatch, Type>& f,                         \
00188     const TetPointPatchField<PatchField, PointPatch, Type>& f1,                  \
00189     const TYPE& s                                                             \
00190 ){}
00191 
00192 
00193 #define BINARY_TYPE_OPERATOR(TYPE, op, opFunc)                                \
00194     BINARY_TYPE_OPERATOR_TF(TYPE, op, opFunc)                                 \
00195     BINARY_TYPE_OPERATOR_FT(TYPE, op, opFunc)
00196 
00197 BINARY_TYPE_OPERATOR(Type, +, add)
00198 BINARY_TYPE_OPERATOR(Type, -, subtract)
00199 
00200 BINARY_TYPE_OPERATOR(scalar, *, multiply)
00201 BINARY_TYPE_OPERATOR_FT(scalar, /, divide)
00202 
00203 #undef BINARY_TYPE_OPERATOR
00204 #undef BINARY_TYPE_OPERATOR_TF
00205 #undef BINARY_TYPE_OPERATOR_FT
00206 
00207 
00208 #define PRODUCT_OPERATOR(product, op, opFunc)                                 \
00209                                                                               \
00210 template                                                                      \
00211 <                                                                             \
00212     template<class> class PatchField,                                         \
00213     class PointPatch,                                                         \
00214     class Type1,                                                              \
00215     class Type2                                                               \
00216 >                                                                             \
00217 inline void opFunc                                                            \
00218 (                                                                             \
00219     TetPointPatchField                                                           \
00220     <PatchField, PointPatch, typename product<Type1, Type2>::type>& f,        \
00221     const TetPointPatchField<PatchField, PointPatch, Type1>& f1,                 \
00222     const TetPointPatchField<PatchField, PointPatch, Type2>& f2                  \
00223 ){}                                                                           \
00224                                                                               \
00225 template                                                                      \
00226 <                                                                             \
00227     template<class> class PatchField,                                         \
00228     class PointPatch,                                                         \
00229     class Type,                                                               \
00230     class Form,                                                               \
00231     class Cmpt,                                                               \
00232     int nCmpt                                                                 \
00233 >                                                                             \
00234 inline void opFunc                                                            \
00235 (                                                                             \
00236     TetPointPatchField                                                           \
00237     <PatchField, PointPatch, typename product<Type, Form>::type>& f,          \
00238     const TetPointPatchField<PatchField, PointPatch, Type>& f1,                  \
00239     const VectorSpace<Form,Cmpt,nCmpt>& vs                                    \
00240 ){}                                                                           \
00241                                                                               \
00242 template                                                                      \
00243 <                                                                             \
00244     template<class> class PatchField,                                         \
00245     class PointPatch,                                                         \
00246     class Form,                                                               \
00247     class Cmpt,                                                               \
00248     int nCmpt,                                                                \
00249     class Type                                                                \
00250 >                                                                             \
00251 inline void opFunc                                                            \
00252 (                                                                             \
00253     TetPointPatchField                                                           \
00254     <PatchField, PointPatch, typename product<Form, Type>::type>& f,          \
00255     const VectorSpace<Form,Cmpt,nCmpt>& vs,                                   \
00256     const TetPointPatchField<PatchField, PointPatch, Type>& f1                   \
00257 ){}
00258 
00259 PRODUCT_OPERATOR(outerProduct, *, outer)
00260 PRODUCT_OPERATOR(crossProduct, ^, cross)
00261 PRODUCT_OPERATOR(innerProduct, &, dot)
00262 PRODUCT_OPERATOR(scalarProduct, &&, dotdot)
00263 
00264 #undef PRODUCT_OPERATOR
00265 
00266 
00267 template<template<class> class PatchField, class PointPatch>
00268 void hdual
00269 (
00270     TetPointPatchField<PatchField, PointPatch, vector>&,
00271     const TetPointPatchField<PatchField, PointPatch, tensor>&
00272 ){}
00273 
00274 template<template<class> class PatchField, class PointPatch>
00275 void hdual
00276 (
00277     TetPointPatchField<PatchField, PointPatch, tensor>&,
00278     const TetPointPatchField<PatchField, PointPatch, vector>&
00279 ){}
00280 
00281 template<template<class> class PatchField, class PointPatch>
00282 void diag
00283 (
00284     TetPointPatchField<PatchField, PointPatch, vector>&,
00285     const TetPointPatchField<PatchField, PointPatch, tensor>&
00286 ){}
00287 
00288 template<template<class> class PatchField, class PointPatch>
00289 void tr
00290 (
00291     TetPointPatchField<PatchField, PointPatch, scalar>&,
00292     const TetPointPatchField<PatchField, PointPatch, tensor>&
00293 ){}
00294 
00295 template<template<class> class PatchField, class PointPatch>
00296 void dev
00297 (
00298     TetPointPatchField<PatchField, PointPatch, tensor>&,
00299     const TetPointPatchField<PatchField, PointPatch, tensor>&
00300 ){}
00301 
00302 template<template<class> class PatchField, class PointPatch>
00303 void dev2
00304 (
00305     TetPointPatchField<PatchField, PointPatch, tensor>&,
00306     const TetPointPatchField<PatchField, PointPatch, tensor>&
00307 ){}
00308 
00309 template<template<class> class PatchField, class PointPatch>
00310 void det
00311 (
00312     TetPointPatchField<PatchField, PointPatch, scalar>&,
00313     const TetPointPatchField<PatchField, PointPatch, tensor>&
00314 ){}
00315 
00316 template<template<class> class PatchField, class PointPatch>
00317 void inv
00318 (
00319     TetPointPatchField<PatchField, PointPatch, tensor>&,
00320     const TetPointPatchField<PatchField, PointPatch, tensor>&
00321 ){}
00322 
00323 template<template<class> class PatchField, class PointPatch>
00324 void hinv
00325 (
00326     TetPointPatchField<PatchField, PointPatch, tensor>&,
00327     const TetPointPatchField<PatchField, PointPatch, tensor>&
00328 ){}
00329 
00330 template<template<class> class PatchField, class PointPatch>
00331 void symm
00332 (
00333     TetPointPatchField<PatchField, PointPatch, tensor>&,
00334     const TetPointPatchField<PatchField, PointPatch, tensor>&
00335 ){}
00336 
00337 template<template<class> class PatchField, class PointPatch>
00338 void skew
00339 (
00340     TetPointPatchField<PatchField, PointPatch, tensor>&,
00341     const TetPointPatchField<PatchField, PointPatch, tensor>&
00342 ){}
00343 
00344 template<template<class> class PatchField, class PointPatch>
00345 void eigenValues
00346 (
00347     TetPointPatchField<PatchField, PointPatch, vector>&,
00348     const TetPointPatchField<PatchField, PointPatch, tensor>&
00349 ){}
00350 
00351 template<template<class> class PatchField, class PointPatch>
00352 void eigenVectors
00353 (
00354     TetPointPatchField<PatchField, PointPatch, tensor>&,
00355     const TetPointPatchField<PatchField, PointPatch, tensor>&
00356 ){}
00357 
00358 
00359 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00360 
00361 } // End namespace Foam
00362 
00363 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
For further information go to www.openfoam.org