|
|
|
extendedCentredCellToFaceStencil.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::extendedCentredCellToFaceStencil 00027 00028 Description 00029 00030 SourceFiles 00031 extendedCentredCellToFaceStencil.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef extendedCentredCellToFaceStencil_H 00036 #define extendedCentredCellToFaceStencil_H 00037 00038 #include "extendedCellToFaceStencil.H" 00039 00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00041 00042 namespace Foam 00043 { 00044 00045 class cellToFaceStencil; 00046 00047 /*---------------------------------------------------------------------------*\ 00048 Class extendedCentredCellToFaceStencil Declaration 00049 \*---------------------------------------------------------------------------*/ 00050 00051 class extendedCentredCellToFaceStencil 00052 : 00053 public extendedCellToFaceStencil 00054 { 00055 // Private data 00056 00057 //- Swap map for getting neigbouring data 00058 autoPtr<mapDistribute> mapPtr_; 00059 00060 //- Per face the stencil. 00061 labelListList stencil_; 00062 00063 00064 // Private Member Functions 00065 00066 //- Disallow default bitwise copy construct 00067 extendedCentredCellToFaceStencil 00068 ( 00069 const extendedCentredCellToFaceStencil& 00070 ); 00071 00072 //- Disallow default bitwise assignment 00073 void operator=(const extendedCentredCellToFaceStencil&); 00074 00075 00076 public: 00077 00078 // Constructors 00079 00080 //- Construct from uncompacted face stencil 00081 explicit extendedCentredCellToFaceStencil(const cellToFaceStencil&); 00082 00083 00084 // Member Functions 00085 00086 //- Return reference to the parallel distribution map 00087 const mapDistribute& map() const 00088 { 00089 return mapPtr_(); 00090 } 00091 00092 //- Return reference to the stencil 00093 const labelListList& stencil() const 00094 { 00095 return stencil_; 00096 } 00097 00098 //- After removing elements from the stencil adapt the schedule (map). 00099 void compact(); 00100 00101 //- Use map to get the data into stencil order 00102 template<class T> 00103 void collectData 00104 ( 00105 const GeometricField<T, fvPatchField, volMesh>& fld, 00106 List<List<T> >& stencilFld 00107 ) const 00108 { 00109 extendedCellToFaceStencil::collectData 00110 ( 00111 map(), 00112 stencil(), 00113 fld, 00114 stencilFld 00115 ); 00116 } 00117 00118 //- Sum vol field contributions to create face values 00119 template<class Type> 00120 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > weightedSum 00121 ( 00122 const GeometricField<Type, fvPatchField, volMesh>& fld, 00123 const List<List<scalar> >& stencilWeights 00124 ) const 00125 { 00126 return extendedCellToFaceStencil::weightedSum 00127 ( 00128 map(), 00129 stencil(), 00130 fld, 00131 stencilWeights 00132 ); 00133 } 00134 00135 }; 00136 00137 00138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00139 00140 } // End namespace Foam 00141 00142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00143 00144 #endif 00145 00146 // ************************************************************************* // |