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

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