|
|
|
volPointInterpolation.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-2007 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 volPointInterpolation 00027 00028 Description 00029 00030 SourceFiles 00031 volPointInterpolation.C 00032 volPointInterpolate.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef volPointInterpolation_H 00037 #define volPointInterpolation_H 00038 00039 #include "pointPatchInterpolation.H" 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 class fvMesh; 00047 class pointMesh; 00048 00049 /*---------------------------------------------------------------------------*\ 00050 Class volPointInterpolation Declaration 00051 \*---------------------------------------------------------------------------*/ 00052 00053 class volPointInterpolation 00054 { 00055 // Private data 00056 00057 //- Boundary interpolation engine. 00058 pointPatchInterpolation boundaryInterpolator_; 00059 00060 //- Interpolation scheme weighting factor array. 00061 scalarListList pointWeights_; 00062 00063 00064 // Private member functions 00065 00066 //- Construct point weighting factors 00067 void makeWeights(); 00068 00069 //- Disallow default bitwise copy construct 00070 volPointInterpolation(const volPointInterpolation&); 00071 00072 //- Disallow default bitwise assignment 00073 void operator=(const volPointInterpolation&); 00074 00075 00076 public: 00077 00078 // Declare name of the class and it's debug switch 00079 ClassName("volPointInterpolation"); 00080 00081 00082 // Constructors 00083 00084 //- Constructor given fvMesh and pointMesh. 00085 volPointInterpolation(const fvMesh&, const pointMesh&); 00086 00087 00088 // Destructor 00089 00090 ~volPointInterpolation(); 00091 00092 00093 // Member functions 00094 00095 // Access 00096 00097 const fvMesh& mesh() const 00098 { 00099 return boundaryInterpolator_.mesh(); 00100 } 00101 00102 const pointMesh& pMesh() const 00103 { 00104 return boundaryInterpolator_.pMesh(); 00105 } 00106 00107 00108 // Edit 00109 00110 //- Update mesh topology using the morph engine 00111 void updateMesh(); 00112 00113 //- Correct weighting factors for moving mesh. 00114 bool movePoints(); 00115 00116 00117 // Interpolation functions 00118 00119 //- Interpolate internal field from volField to pointField 00120 // using inverse distance weighting 00121 template<class Type> 00122 void interpolateInternalField 00123 ( 00124 const GeometricField<Type, fvPatchField, volMesh>&, 00125 GeometricField<Type, pointPatchField, pointMesh>& 00126 ) const; 00127 00128 //- Interpolate from volField to pointField 00129 // using inverse distance weighting 00130 template<class Type> 00131 void interpolate 00132 ( 00133 const GeometricField<Type, fvPatchField, volMesh>&, 00134 GeometricField<Type, pointPatchField, pointMesh>& 00135 ) const; 00136 00137 //- Interpolate volField using inverse distance weighting 00138 // returning pointField with the same patchField types 00139 template<class Type> 00140 tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate 00141 ( 00142 const GeometricField<Type, fvPatchField, volMesh>&, 00143 const wordList& patchFieldTypes 00144 ) const; 00145 00146 //- Interpolate tmp<volField> using inverse distance weighting 00147 // returning pointField with the same patchField types 00148 template<class Type> 00149 tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate 00150 ( 00151 const tmp<GeometricField<Type, fvPatchField, volMesh> >&, 00152 const wordList& patchFieldTypes 00153 ) const; 00154 00155 //- Interpolate volField using inverse distance weighting 00156 // returning pointField 00157 template<class Type> 00158 tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate 00159 ( 00160 const GeometricField<Type, fvPatchField, volMesh>& 00161 ) const; 00162 00163 //- Interpolate tmp<volField> using inverse distance weighting 00164 // returning pointField 00165 template<class Type> 00166 tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate 00167 ( 00168 const tmp<GeometricField<Type, fvPatchField, volMesh> >& 00169 ) const; 00170 }; 00171 00172 00173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00174 00175 } // End namespace Foam 00176 00177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00178 00179 #ifdef NoRepository 00180 # include "volPointInterpolate.C" 00181 #endif 00182 00183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00184 00185 #endif 00186 00187 // ************************************************************************* // |