1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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 Does modifications to boundary faces.
31 - move boundary points
32 - split boundary edges (multiple per edge if nessecary)
33 - face-centre decomposes boundary faces
34 - diagonal split of boundary faces
40 \*---------------------------------------------------------------------------*/
42 #ifndef boundaryCutter_H
43 #define boundaryCutter_H
46 #include "labelList.H"
49 #include "labelPair.H"
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 // Forward declaration of classes
62 /*---------------------------------------------------------------------------*\
63 Class boundaryCutter Declaration
64 \*---------------------------------------------------------------------------*/
71 const polyMesh& mesh_;
73 //- Per edge sorted (start to end) list of points added.
74 HashTable<labelList, edge, Hash<edge> > edgeAddedPoints_;
76 //- Per face the mid point added.
77 Map<label> faceAddedPoint_;
80 // Private Member Functions
82 //- Get patch and zone info for face
91 //- Add cuts of edges to face
92 face addEdgeCutsToFace(const label faceI, const Map<labelList>&) const;
94 //- Splits faces with multiple cut edges. Return true if anything split.
98 const Map<point>& pointToPos,
99 const Map<labelList>& edgeToAddedPoints,
100 polyTopoChange& meshMod
103 //- Add/modify faceI for new vertices.
109 bool& modifiedFace, // have we already 'used' faceI?
110 polyTopoChange& meshMod
114 //- Disallow default bitwise copy construct
115 boundaryCutter(const boundaryCutter&);
117 //- Disallow default bitwise assignment
118 void operator=(const boundaryCutter&);
122 //- Runtime type information
123 ClassName("boundaryCutter");
127 //- Construct from mesh
128 boundaryCutter(const polyMesh& mesh);
139 //- Do actual cutting with cut description. Inserts mesh changes
141 // pointToPos : new position for selected points
142 // edgeToCuts : per edge set of points that need to be introduced
143 // faceToSplit : per face the diagonal split
144 // faceToFeaturePoint : per face the feature point. Triangulation
145 // around this feature point.
148 const Map<point>& pointToPos,
149 const Map<List<point> >& edgeToCuts,
150 const Map<labelPair>& faceToSplit,
151 const Map<point>& faceToFeaturePoint,
152 polyTopoChange& meshMod
155 //- Force recalculation of locally stored data on topological change
156 void updateMesh(const mapPolyMesh&);
161 //- Per edge a sorted list (start to end) of added points.
162 const HashTable<labelList, edge, Hash<edge> >& edgeAddedPoints()
165 return edgeAddedPoints_;
168 //- Per face the mid point added.
169 const Map<label>& faceAddedPoint() const
171 return faceAddedPoint_;
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 } // End namespace Foam
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 // ************************************************************************* //