![]() |
|
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 Class 00026 tetPolyPatchMapperCellDecomp 00027 00028 Description 00029 Mapping class for a tetPolyPatchFieldCellDecomp 00030 00031 SourceFiles 00032 tetPolyPatchMapperCellDecomp.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef tetPolyPatchMapperCellDecomp_H 00037 #define tetPolyPatchMapperCellDecomp_H 00038 00039 #include "TetPointPatchFieldMapper.H" 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 // Class forward declarations 00047 class tetPolyPatchCellDecomp; 00048 class mapPolyMesh; 00049 00050 /*---------------------------------------------------------------------------*\ 00051 Class tetPolyPatchMapperCellDecomp Declaration 00052 \*---------------------------------------------------------------------------*/ 00053 00054 class tetPolyPatchMapperCellDecomp 00055 : 00056 public TetPointPatchFieldMapper 00057 { 00058 // Private data 00059 00060 //- Reference to patch 00061 const tetPolyPatchCellDecomp& patch_; 00062 00063 //- Reference to mapPolyMesh 00064 const mapPolyMesh& mpm_; 00065 00066 00067 // Demand-driven private data 00068 00069 //- Is the mapping direct 00070 mutable bool* directPtr_; 00071 00072 //- Direct addressing (only one for of addressing is used) 00073 mutable labelList* directAddrPtr_; 00074 00075 00076 // Private Member Functions 00077 00078 //- Disallow default bitwise copy construct 00079 tetPolyPatchMapperCellDecomp 00080 ( 00081 const tetPolyPatchMapperCellDecomp& 00082 ); 00083 00084 //- Disallow default bitwise assignment 00085 void operator=(const tetPolyPatchMapperCellDecomp&); 00086 00087 00088 //- Calculate addressing for mapping with inserted cells 00089 void calcAddressing() const; 00090 00091 //- Clear out local storage 00092 void clearOut(); 00093 00094 00095 public: 00096 00097 // Static data members 00098 00099 // Constructors 00100 00101 //- Construct from mappers 00102 tetPolyPatchMapperCellDecomp 00103 ( 00104 const tetPolyPatchCellDecomp& patch, 00105 const mapPolyMesh& meshMap 00106 ); 00107 00108 00109 // Destructor 00110 00111 virtual ~tetPolyPatchMapperCellDecomp(); 00112 00113 00114 // Member Functions 00115 00116 //- Return size 00117 virtual label size() const; 00118 00119 //- Return size of field before mapping 00120 virtual label sizeBeforeMapping() const; 00121 00122 //- Is the mapping direct 00123 virtual bool direct() const 00124 { 00125 return true; 00126 } 00127 00128 //- Return direct addressing 00129 virtual const unallocLabelList& directAddressing() const; 00130 00131 }; 00132 00133 00134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00135 00136 } // End namespace Foam 00137 00138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00139 00140 #endif 00141 00142 // ************************************************************************* //