1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | cfMesh: A library for mesh generation
5 \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6 \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
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
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/>.
28 Facets for the triangulated surface
33 \*---------------------------------------------------------------------------*/
35 #ifndef triSurfFacets_H
36 #define triSurfFacets_H
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 #include "triSurfAddressing.H"
41 #include "meshSubset.H"
42 #include "geometricSurfacePatchList.H"
44 #include "labelledTri.H"
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
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&);
78 //- Construct from components without the boundary
79 triSurfFacets(const LongList<labelledTri>& triangles);
81 //- Construct from components
84 const LongList<labelledTri>& triangles,
85 const geometricSurfacePatchList& patches
92 //- return the number of triangles
93 inline label size() const;
96 inline const LongList<labelledTri>& facets() const;
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);
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&);
127 //- access to a triangle
128 inline const labelledTri& operator[](const label) const;
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 } // End namespace Foam
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 #include "triSurfFacetsI.H"
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //