![]() |
|
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 tetPointMapperFaceDecomp 00027 00028 Description 00029 Point mapper for the face tetFem decomposition 00030 00031 SourceFiles 00032 tetPointMapperFaceDecomp.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef tetPointMapperFaceDecomp_H 00037 #define tetPointMapperFaceDecomp_H 00038 00039 #include "morphFieldMapper.H" 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 // Class forward declarations 00047 class tetPolyMeshFaceDecomp; 00048 class mapPolyMesh; 00049 class pointMapper; 00050 class faceMapper; 00051 class cellMapper; 00052 00053 /*---------------------------------------------------------------------------*\ 00054 Class tetPointMapperFaceDecomp Declaration 00055 \*---------------------------------------------------------------------------*/ 00056 00057 class tetPointMapperFaceDecomp 00058 : 00059 public morphFieldMapper 00060 { 00061 // Private data 00062 00063 //- Reference to mesh 00064 const tetPolyMeshFaceDecomp& mesh_; 00065 00066 //- Reference to mapPolyMesh 00067 const mapPolyMesh& mpm_; 00068 00069 //- Reference to point mapper 00070 const pointMapper& pointMap_; 00071 00072 //- Reference to face mapper 00073 const faceMapper& faceMap_; 00074 00075 //- Reference to face mapper 00076 const cellMapper& cellMap_; 00077 00078 00079 //- Size of target object 00080 const label size_; 00081 00082 00083 // Demand-driven private data 00084 00085 //- Is the mapping direct 00086 mutable bool* directPtr_; 00087 00088 //- Direct addressing (only one for of addressing is used) 00089 mutable labelList* directAddrPtr_; 00090 00091 //- Interpolated addressing (only one for of addressing is used) 00092 mutable labelListList* interpolationAddrPtr_; 00093 00094 //- Interpolation weights 00095 mutable scalarListList* weightsPtr_; 00096 00097 //- Are there any inserted (unmapped) objects 00098 mutable bool* insertedObjectsPtr_; 00099 00100 //- Inserted faces 00101 mutable labelList* insertedObjectLabelsPtr_; 00102 00103 00104 00105 // Private Member Functions 00106 00107 //- Disallow default bitwise copy construct 00108 tetPointMapperFaceDecomp(const tetPointMapperFaceDecomp&); 00109 00110 //- Disallow default bitwise assignment 00111 void operator=(const tetPointMapperFaceDecomp&); 00112 00113 00114 //- Calculate addressing 00115 void calcAddressing() const; 00116 00117 //- Clear out local storage 00118 void clearOut(); 00119 00120 00121 public: 00122 00123 // Constructors 00124 00125 //- Construct from components 00126 tetPointMapperFaceDecomp 00127 ( 00128 const tetPolyMeshFaceDecomp& mesh, 00129 const mapPolyMesh& meshMap, 00130 const pointMapper& pMapper, 00131 const faceMapper& fMapper, 00132 const cellMapper& cMapper 00133 ); 00134 00135 00136 // Destructor 00137 00138 virtual ~tetPointMapperFaceDecomp(); 00139 00140 00141 // Member Functions 00142 00143 //- Return size 00144 virtual label size() const; 00145 00146 //- Return size of field before mapping 00147 virtual label sizeBeforeMapping() const; 00148 00149 //- Is the mapping direct 00150 virtual bool direct() const; 00151 00152 //- Return direct addressing 00153 virtual const unallocLabelList& directAddressing() const; 00154 00155 //- Return interpolated addressing 00156 virtual const labelListList& addressing() const; 00157 00158 //- Return interpolaion weights 00159 virtual const scalarListList& weights() const; 00160 00161 //- Are there any inserted faces 00162 bool insertedObjects() const; 00163 00164 //- Return list of inserted faces 00165 const labelList& insertedObjectLabels() const; 00166 }; 00167 00168 00169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00170 00171 } // End namespace Foam 00172 00173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00174 00175 #endif 00176 00177 // ************************************************************************* //