1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 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 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
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
29 points connected by edges.
36 \*---------------------------------------------------------------------------*/
41 #include "pointField.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class edgeMesh Declaration
51 \*---------------------------------------------------------------------------*/
57 //- Vertices of the edges
60 //- The edges defining the boundary
63 //- From point to edges
64 mutable autoPtr<labelListList> pointEdgesPtr_;
66 // Private Member Functions
68 //- Calculate point-edge addressing (inverse of edges)
69 void calcPointEdges() const;
75 //- Construct from components
76 edgeMesh(const pointField&, const edgeList&);
78 //- Construct from file
79 edgeMesh(const fileName&);
81 //- Construct from Istream
85 edgeMesh(const edgeMesh&);
91 inline const pointField& points() const;
93 inline const edgeList& edges() const;
95 inline const labelListList& pointEdges() const;
97 //- Find connected regions. Set region number per edge.
98 // Returns number of regions.
99 label regions(labelList& edgeRegion) const;
101 //- Merge common points (points within mergeDist)
102 void mergePoints(const scalar mergeDist);
106 inline void operator=(const edgeMesh&);
110 friend Ostream& operator<<(Ostream&, const edgeMesh&);
111 friend Istream& operator>>(Istream&, edgeMesh&);
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 } // End namespace Foam
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 #include "edgeMeshI.H"
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 // ************************************************************************* //