|
|
|
PrimitivePatchInterpolation.HGo 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-2009 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 Class 00026 Foam::PrimitivePatchInterpolation 00027 00028 Description 00029 Interpolation class within a primitive patch. Allows interpolation from 00030 points to faces and vice versa 00031 00032 SourceFiles 00033 PrimitivePatchInterpolation.C 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef PrimitivePatchInterpolation_H 00038 #define PrimitivePatchInterpolation_H 00039 00040 #include "scalarList.H" 00041 #include "Field.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 /*---------------------------------------------------------------------------*\ 00049 Class PrimitivePatchInterpolation Declaration 00050 \*---------------------------------------------------------------------------*/ 00051 00052 template<class Patch> 00053 class PrimitivePatchInterpolation 00054 { 00055 // Private data 00056 00057 //- Reference to patch 00058 const Patch& patch_; 00059 00060 00061 // Demand-driven data 00062 00063 //- Face-to-point weights 00064 mutable scalarListList* faceToPointWeightsPtr_; 00065 00066 //- Face-to-edge weights 00067 mutable scalarList* faceToEdgeWeightsPtr_; 00068 00069 00070 // Private Member Functions 00071 00072 //- Disallow default bitwise copy construct 00073 PrimitivePatchInterpolation(const PrimitivePatchInterpolation&); 00074 00075 //- Disallow default bitwise assignment 00076 void operator=(const PrimitivePatchInterpolation&); 00077 00078 00079 //- Face-to-point weights 00080 const scalarListList& faceToPointWeights() const; 00081 00082 //- Make face-to-point weights 00083 void makeFaceToPointWeights() const; 00084 00085 //- Face-to-edge weights 00086 const scalarList& faceToEdgeWeights() const; 00087 00088 //- Make face-to-edge weights 00089 void makeFaceToEdgeWeights() const; 00090 00091 //- Clear weights 00092 void clearWeights(); 00093 00094 00095 public: 00096 00097 // Constructors 00098 00099 //- Construct from PrimitivePatch 00100 PrimitivePatchInterpolation(const Patch& p); 00101 00102 00103 // Destructor 00104 00105 ~PrimitivePatchInterpolation(); 00106 00107 00108 // Member Functions 00109 00110 //- Interpolate from faces to points 00111 template<class Type> 00112 tmp<Field<Type> > faceToPointInterpolate 00113 ( 00114 const Field<Type>& ff 00115 ) const; 00116 00117 template<class Type> 00118 tmp<Field<Type> > faceToPointInterpolate 00119 ( 00120 const tmp<Field<Type> >& tff 00121 ) const; 00122 00123 //- Interpolate from points to faces 00124 template<class Type> 00125 tmp<Field<Type> > pointToFaceInterpolate 00126 ( 00127 const Field<Type>& pf 00128 ) const; 00129 00130 template<class Type> 00131 tmp<Field<Type> > pointToFaceInterpolate 00132 ( 00133 const tmp<Field<Type> >& tpf 00134 ) const; 00135 00136 //- Interpolate from faces to edges 00137 template<class Type> 00138 tmp<Field<Type> > faceToEdgeInterpolate 00139 ( 00140 const Field<Type>& ff 00141 ) const; 00142 00143 template<class Type> 00144 tmp<Field<Type> > faceToEdgeInterpolate 00145 ( 00146 const tmp<Field<Type> >& tff 00147 ) const; 00148 00149 //- Do what is neccessary if the mesh has moved 00150 bool movePoints(); 00151 }; 00152 00153 00154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00155 00156 } // End namespace Foam 00157 00158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00159 00160 #ifdef NoRepository 00161 # include "PrimitivePatchInterpolation.C" 00162 #endif 00163 00164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00165 00166 #endif 00167 00168 // ************************************************************************* // |