00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2010 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 00013 the Free Software Foundation, either version 3 of the License, or 00014 (at your 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, see <http://www.gnu.org/licenses/>. 00023 00024 Class 00025 Foam::fvMeshMapper 00026 00027 Description 00028 Class holds all the necessary information for mapping fields associated 00029 with fvMesh. 00030 SourceFiles 00031 fvMeshMapper.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef fvMeshMapper_H 00036 #define fvMeshMapper_H 00037 00038 #include <OpenFOAM/faceMapper.H> 00039 #include <OpenFOAM/cellMapper.H> 00040 #include "fvSurfaceMapper.H" 00041 #include "fvBoundaryMeshMapper.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 // Forward declaration of classes 00049 class fvMesh; 00050 class mapPolyMesh; 00051 00052 /*---------------------------------------------------------------------------*\ 00053 Class fvMeshMapper Declaration 00054 \*---------------------------------------------------------------------------*/ 00055 00056 class fvMeshMapper 00057 { 00058 // Private data 00059 00060 //- Reference to mesh 00061 const fvMesh& mesh_; 00062 00063 //- Face mapper 00064 faceMapper faceMap_; 00065 00066 //- Cell mapper 00067 cellMapper cellMap_; 00068 00069 //- Surface mapper (needs to be shortened for internal faces only) 00070 fvSurfaceMapper surfaceMap_; 00071 00072 //- Boundary mapper 00073 fvBoundaryMeshMapper boundaryMap_; 00074 00075 00076 // Private Member Functions 00077 00078 //- Disallow default bitwise copy construct 00079 fvMeshMapper(const fvMeshMapper&); 00080 00081 //- Disallow default bitwise assignment 00082 void operator=(const fvMeshMapper&); 00083 00084 00085 public: 00086 00087 // Constructors 00088 00089 //- Construct from fvMesh 00090 fvMeshMapper(const fvMesh& mesh, const mapPolyMesh& mpm) 00091 : 00092 mesh_(mesh), 00093 faceMap_(mpm), 00094 cellMap_(mpm), 00095 surfaceMap_(mesh, faceMap_), 00096 boundaryMap_(mesh, faceMap_) 00097 {} 00098 00099 00100 // Member Functions 00101 00102 //- Return reference to mesh 00103 const fvMesh& mesh() const 00104 { 00105 return mesh_; 00106 } 00107 00108 //- Return reference to objectRegistry storing fields. Can be 00109 // removed once fields stored on pointMesh. 00110 const objectRegistry& thisDb() const 00111 { 00112 return mesh_; 00113 } 00114 00115 //- Return volume mapper 00116 const morphFieldMapper& volMap() const 00117 { 00118 return cellMap_; 00119 } 00120 00121 //- Return surface mapper 00122 const fvSurfaceMapper& surfaceMap() const 00123 { 00124 return surfaceMap_; 00125 } 00126 00127 //- Return boundary mapper 00128 const fvBoundaryMeshMapper& boundaryMap() const 00129 { 00130 return boundaryMap_; 00131 } 00132 }; 00133 00134 00135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00136 00137 } // End namespace Foam 00138 00139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00140 00141 #endif 00142 00143 // ************************ vim: set sw=4 sts=4 et: ************************ //