OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

pointMesh.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-2007 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     pointMesh
00027 
00028 Description
00029     Mesh representing a set of points created from polyMesh.
00030 
00031 \*---------------------------------------------------------------------------*/
00032 
00033 #ifndef pointMesh_H
00034 #define pointMesh_H
00035 
00036 #include "GeoMesh.H"
00037 #include "polyMesh.H"
00038 #include "pointBoundaryMesh.H"
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 /*---------------------------------------------------------------------------*\
00046                            Class pointMesh Declaration
00047 \*---------------------------------------------------------------------------*/
00048 
00049 class pointMesh
00050 :
00051     public GeoMesh<polyMesh>
00052 {
00053     // Permanent data
00054 
00055         //- Boundary mesh
00056         pointBoundaryMesh boundary_;
00057 
00058 
00059     // Private Member Functions
00060 
00061         //- Disallow default bitwise copy construct
00062         pointMesh(const pointMesh&);
00063 
00064         //- Disallow default bitwise assignment
00065         void operator=(const pointMesh&);
00066 
00067 
00068 public:
00069 
00070     typedef pointMesh Mesh;
00071     typedef pointBoundaryMesh BoundaryMesh;
00072 
00073 
00074     // Constructors
00075 
00076         //- Construct from polyMesh
00077         explicit pointMesh
00078         (
00079             const polyMesh& pMesh,
00080             bool alwaysConstructGlobalPatch = false
00081         );
00082 
00083 
00084     // Member Functions
00085 
00086         //- Return number of points
00087         label size() const
00088         {
00089             return size(*this);
00090         }
00091 
00092         //- Return number of points
00093         static label size(const Mesh& mesh)
00094         {
00095             return mesh.mesh_.nPoints();
00096         }
00097 
00098         //- Return reference to boundary mesh
00099         const pointBoundaryMesh& boundary() const
00100         {
00101             return boundary_;
00102         }
00103 
00104         //- Return parallel info
00105         const globalMeshData& globalData() const
00106         {
00107             return mesh_.globalData();
00108         }
00109 
00110 
00111     // Member Operators
00112 
00113         bool operator!=(const pointMesh& pm) const
00114         {
00115             return &pm != this;
00116         }
00117 
00118         bool operator==(const pointMesh& pm) const
00119         {
00120             return &pm == this;
00121         }
00122 };
00123 
00124 
00125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00126 
00127 } // End namespace Foam
00128 
00129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00130 
00131 #endif
00132 
00133 // ************************************************************************* //
Copyright © 2000-2007 OpenCFD Ltd