OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

fvMeshMapper.H

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