initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / OpenFOAM / meshes / GeoMesh / GeoMesh.H
blob847844e21b5375d4e19b664e114f1a6f9bfc728c
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::GeoMesh
28 Description
29     Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
31 \*---------------------------------------------------------------------------*/
33 #ifndef GeoMesh_H
34 #define GeoMesh_H
36 #include "objectRegistry.H"
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 namespace Foam
43 /*---------------------------------------------------------------------------*\
44                            Class GeoMesh Declaration
45 \*---------------------------------------------------------------------------*/
47 template<class MESH>
48 class GeoMesh
51 protected:
53     // Protected data
55         //- Reference to Mesh
56         const MESH& mesh_;
59 public:
61     // Public typedefs
63         typedef MESH Mesh;
64         typedef typename MESH::BoundaryMesh BoundaryMesh;
67     // Constructors
69         //- Construct from MESH
70         explicit GeoMesh(const MESH& mesh)
71         :
72             mesh_(mesh)
73         {}
76     // Member Functions
78         //- Return the object registry
79         const objectRegistry& thisDb() const
80         {
81             return mesh_;
82         }
85     // Member Operators
87         //- Return reference to polyMesh
88         const MESH& operator()() const
89         {
90             return mesh_;
91         }
95 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97 } // End namespace Foam
99 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 #endif
103 // ************************************************************************* //