Fixed URL for libccmio-2.6.1 (bug report #5 by Thomas Oliveira)
[foam-extend-3.2.git] / src / mesh / cfMesh / utilities / meshes / triSurf / triSurfFacets.H
blob8c323338ace7dec35e6c23468b40682f2f75b3c1
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | cfMesh: A library for mesh generation
4    \\    /   O peration     |
5     \\  /    A nd           | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6      \\/     M anipulation  | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
9     This file is part of cfMesh.
11     cfMesh 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 3 of the License, or (at your
14     option) any later version.
16     cfMesh 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 cfMesh.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     triSurfFacets
27 Description
28     Facets for the triangulated surface
30 SourceFiles
31     triSurfFacets.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef triSurfFacets_H
36 #define triSurfFacets_H
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 #include "triSurfAddressing.H"
41 #include "meshSubset.H"
42 #include "geometricSurfacePatchList.H"
43 #include "LongList.H"
44 #include "labelledTri.H"
45 #include "DynList.H"
46 #include "Map.H"
48 namespace Foam
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 class triSurfFacets
55 protected:
57     // Protected data
58         //- list of triangles
59         LongList<labelledTri> triangles_;
61         //- list of boundary patches and their properties
62         geometricSurfacePatchList patches_;
64         //- map of point subsets
65         Map<meshSubset> facetSubsets_;
67     // Disallow bitwise assignment
68         void operator=(const triSurfFacets&);
70         triSurfFacets(const triSurfFacets&);
72 public:
74     // Constructors
75         //- Null constructor
76         triSurfFacets();
78         //- Construct from components without the boundary
79         triSurfFacets(const LongList<labelledTri>& triangles);
81         //- Construct from components
82         triSurfFacets
83         (
84             const LongList<labelledTri>& triangles,
85             const geometricSurfacePatchList& patches
86         );
88     // Destructor
89         ~triSurfFacets();
91     // Member functions
92         //- return the number of triangles
93         inline label size() const;
95         //- access to facets
96         inline const LongList<labelledTri>& facets() const;
98         //- access to patches
99         inline const geometricSurfacePatchList& patches() const;
101         //- return list of patches in the boundary
102         wordList patchNames() const;
104         //- return a list of patch indices corresponding to the given
105         // name, expanding regular expressions
106         labelList findPatches(const word& patchName) const;
108         //- append a triangle to the end of the list
109         inline void appendTriangle(const labelledTri& tria);
111         //- point subsets
112         label addFacetSubset(const word&);
113         void removeFacetSubset(const label);
114         word facetSubsetName(const label) const;
115         label facetSubsetIndex(const word&) const;
116         inline void addFacetToSubset(const label, const label);
117         inline void removeFacetFromSubset(const label, const label);
118         inline void facetInSubsets(const label, DynList<label>&) const;
119         inline void facetSubsetIndices(DynList<label>&) const;
120         template<class ListType>
121         inline void facetsInSubset(const label, ListType&) const;
122         template<class ListType>
123         inline void updateFacetsSubsets(const ListType&);
125     // Operators
127         //- access to a triangle
128         inline const labelledTri& operator[](const label) const;
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 } // End namespace Foam
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 #include "triSurfFacetsI.H"
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 #endif
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //