FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

GeometricFieldFunctionsM.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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 \*---------------------------------------------------------------------------*/
00025 
00026 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00027 
00028 #define UNARY_FUNCTION(ReturnType, Type1, Func, Dfunc)                        \
00029                                                                               \
00030 TEMPLATE                                                                      \
00031 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
00032 (                                                                             \
00033     const GeometricField<Type1, PatchField, GeoMesh>& df                      \
00034 );                                                                            \
00035                                                                               \
00036 TEMPLATE                                                                      \
00037 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
00038 (                                                                             \
00039     const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1              \
00040 );
00041 
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 #define UNARY_OPERATOR(ReturnType, Type1, Op, opFunc, Dfunc)                  \
00046                                                                               \
00047 TEMPLATE                                                                      \
00048 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
00049 (                                                                             \
00050     const GeometricField<Type1, PatchField, GeoMesh>& df1                     \
00051 );                                                                            \
00052                                                                               \
00053 TEMPLATE                                                                      \
00054 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
00055 (                                                                             \
00056     const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1              \
00057 );
00058 
00059 
00060 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00061 
00062 #define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                       \
00063                                                                               \
00064 TEMPLATE                                                                      \
00065 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
00066 (                                                                             \
00067     const GeometricField<Type1, PatchField, GeoMesh>& df1,                    \
00068     const GeometricField<Type2, PatchField, GeoMesh>& df2                     \
00069 );                                                                            \
00070                                                                               \
00071 TEMPLATE                                                                      \
00072 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
00073 (                                                                             \
00074     const GeometricField<Type1, PatchField, GeoMesh>& df1,                    \
00075     const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2              \
00076 );                                                                            \
00077                                                                               \
00078 TEMPLATE                                                                      \
00079 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
00080 (                                                                             \
00081     const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,             \
00082     const GeometricField<Type2, PatchField, GeoMesh>& df2                     \
00083 );                                                                            \
00084                                                                               \
00085 TEMPLATE                                                                      \
00086 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
00087 (                                                                             \
00088     const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,             \
00089     const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2              \
00090 );
00091 
00092 
00093 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00094 
00095 #define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)               \
00096                                                                               \
00097 TEMPLATE                                                                      \
00098 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
00099 (                                                                             \
00100     const dimensioned<Type1>& dt1,                                            \
00101     const GeometricField<Type2, PatchField, GeoMesh>& df2                     \
00102 );                                                                            \
00103                                                                               \
00104 TEMPLATE                                                                      \
00105 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
00106 (                                                                             \
00107     const Type1& t1,                                                          \
00108     const GeometricField<Type2, PatchField, GeoMesh>& df2                     \
00109 );                                                                            \
00110                                                                               \
00111 TEMPLATE                                                                      \
00112 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
00113 (                                                                             \
00114     const dimensioned<Type1>& dt1,                                            \
00115     const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2              \
00116 );                                                                            \
00117                                                                               \
00118 TEMPLATE                                                                      \
00119 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
00120 (                                                                             \
00121     const Type1& t1,                                                          \
00122     const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2              \
00123 );
00124 
00125 
00126 #define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)               \
00127                                                                               \
00128 TEMPLATE                                                                      \
00129 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
00130 (                                                                             \
00131     const GeometricField<Type1, PatchField, GeoMesh>& df1,                    \
00132     const dimensioned<Type2>& dt2                                             \
00133 );                                                                            \
00134                                                                               \
00135 TEMPLATE                                                                      \
00136 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
00137 (                                                                             \
00138     const GeometricField<Type1, PatchField, GeoMesh>& df1,                    \
00139     const Type2& t2                                                           \
00140 );                                                                            \
00141                                                                               \
00142 TEMPLATE                                                                      \
00143 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
00144 (                                                                             \
00145     const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,             \
00146     const dimensioned<Type2>& dt2                                             \
00147 );                                                                            \
00148                                                                               \
00149 TEMPLATE                                                                      \
00150 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
00151 (                                                                             \
00152     const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf2,             \
00153     const Type2& t2                                                           \
00154 );
00155 
00156 
00157 #define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                  \
00158     BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                   \
00159     BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)
00160 
00161 
00162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00163 
00164 #define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)         \
00165                                                                               \
00166 TEMPLATE                                                                      \
00167 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
00168 (                                                                             \
00169     const GeometricField<Type1, PatchField, GeoMesh>& df1,                    \
00170     const GeometricField<Type2, PatchField, GeoMesh>& df2                     \
00171 );                                                                            \
00172                                                                               \
00173 TEMPLATE                                                                      \
00174 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
00175 (                                                                             \
00176     const GeometricField<Type1, PatchField, GeoMesh>& df1,                    \
00177     const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2              \
00178 );                                                                            \
00179                                                                               \
00180 TEMPLATE                                                                      \
00181 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
00182 (                                                                             \
00183     const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,             \
00184     const GeometricField<Type2, PatchField, GeoMesh>& df2                     \
00185 );                                                                            \
00186                                                                               \
00187 TEMPLATE                                                                      \
00188 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
00189 (                                                                             \
00190     const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,             \
00191     const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2              \
00192 );
00193 
00194 
00195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00196 
00197 #define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc) \
00198                                                                               \
00199 TEMPLATE                                                                      \
00200 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
00201 (                                                                             \
00202     const dimensioned<Type1>& dt1,                                            \
00203     const GeometricField<Type2, PatchField, GeoMesh>& df2                     \
00204 );                                                                            \
00205                                                                               \
00206 TEMPLATE                                                                      \
00207 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
00208 (                                                                             \
00209     const Type1& t1,                                                          \
00210     const GeometricField<Type2, PatchField, GeoMesh>& df2                     \
00211 );                                                                            \
00212                                                                               \
00213 TEMPLATE                                                                      \
00214 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
00215 (                                                                             \
00216     const dimensioned<Type1>& dt1,                                            \
00217     const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2              \
00218 );                                                                            \
00219                                                                               \
00220 TEMPLATE                                                                      \
00221 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
00222 (                                                                             \
00223     const Type1& t1,                                                          \
00224     const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2              \
00225 );
00226 
00227 
00228 #define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc) \
00229                                                                               \
00230 TEMPLATE                                                                      \
00231 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
00232 (                                                                             \
00233     const GeometricField<Type1, PatchField, GeoMesh>& df1,                    \
00234     const dimensioned<Type2>& dt2                                             \
00235 );                                                                            \
00236                                                                               \
00237 TEMPLATE                                                                      \
00238 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
00239 (                                                                             \
00240     const GeometricField<Type1, PatchField, GeoMesh>& df1,                    \
00241     const Type2& t2                                                           \
00242 );                                                                            \
00243                                                                               \
00244 TEMPLATE                                                                      \
00245 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
00246 (                                                                             \
00247     const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,             \
00248     const dimensioned<Type2>& dt2                                             \
00249 );                                                                            \
00250                                                                               \
00251 TEMPLATE                                                                      \
00252 tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
00253 (                                                                             \
00254     const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,             \
00255     const Type2& t2                                                           \
00256 );
00257 
00258 
00259 #define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)    \
00260     BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)     \
00261     BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc)
00262 
00263 
00264 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines