1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
28 Mesh representing a set of points created from polyMesh.
30 \*---------------------------------------------------------------------------*/
36 #include "MeshObject.H"
38 #include "pointBoundaryMesh.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 /*---------------------------------------------------------------------------*\
46 Class pointMesh Declaration
47 \*---------------------------------------------------------------------------*/
51 public MeshObject<polyMesh, pointMesh>,
52 public GeoMesh<polyMesh>
57 pointBoundaryMesh boundary_;
60 // Private Member Functions
63 void mapFields(const mapPolyMesh&);
65 //- Disallow default bitwise copy construct
66 pointMesh(const pointMesh&);
68 //- Disallow default bitwise assignment
69 void operator=(const pointMesh&);
74 typedef pointMesh Mesh;
75 typedef pointBoundaryMesh BoundaryMesh;
80 //- Construct from polyMesh
81 explicit pointMesh(const polyMesh& pMesh);
86 //- Return number of points
92 //- Return number of points
93 static label size(const Mesh& mesh)
95 return mesh.GeoMesh<polyMesh>::mesh_.nPoints();
98 //- Return reference to boundary mesh
99 const pointBoundaryMesh& boundary() const
104 //- Return parallel info
105 const globalMeshData& globalData() const
107 return GeoMesh<polyMesh>::mesh_.globalData();
110 //- Return database. For now is its polyMesh.
111 const objectRegistry& thisDb() const
113 return GeoMesh<polyMesh>::mesh_.thisDb();
119 //- Move points, returns volumes swept by faces in motion
120 void movePoints(const pointField&);
122 //- Update the mesh corresponding to given map
123 void updateMesh(const mapPolyMesh& mpm);
128 bool operator!=(const pointMesh& pm) const
133 bool operator==(const pointMesh& pm) const
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 } // End namespace Foam
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 // ************************************************************************* //