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 Does modifications to boundary faces.
32 - move boundary points
33 - split boundary edges (multiple per edge if nessecary)
34 - face-centre decomposes boundary faces
35 - diagonal split of boundary faces
41 \*---------------------------------------------------------------------------*/
43 #ifndef boundaryCutter_H
44 #define boundaryCutter_H
46 #include <OpenFOAM/Map.H>
47 #include <OpenFOAM/labelList.H>
48 #include <OpenFOAM/edge.H>
49 #include <OpenFOAM/typeInfo.H>
50 #include <OpenFOAM/labelPair.H>
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 // Forward declaration of classes
63 /*---------------------------------------------------------------------------*\
64 Class boundaryCutter Declaration
65 \*---------------------------------------------------------------------------*/
72 const polyMesh& mesh_;
74 //- Per edge sorted (start to end) list of points added.
75 HashTable<labelList, edge, Hash<edge> > edgeAddedPoints_;
77 //- Per face the mid point added.
78 Map<label> faceAddedPoint_;
81 // Private Member Functions
83 //- Get patch and zone info for face
92 //- Add cuts of edges to face
93 face addEdgeCutsToFace(const label faceI, const Map<labelList>&) const;
95 //- Splits faces with multiple cut edges. Return true if anything split.
99 const Map<point>& pointToPos,
100 const Map<labelList>& edgeToAddedPoints,
101 polyTopoChange& meshMod
104 //- Add/modify faceI for new vertices.
110 bool& modifiedFace, // have we already 'used' faceI?
111 polyTopoChange& meshMod
115 //- Disallow default bitwise copy construct
116 boundaryCutter(const boundaryCutter&);
118 //- Disallow default bitwise assignment
119 void operator=(const boundaryCutter&);
123 //- Runtime type information
124 ClassName("boundaryCutter");
128 //- Construct from mesh
129 boundaryCutter(const polyMesh& mesh);
141 //- Do actual cutting with cut description. Inserts mesh changes
143 // pointToPos : new position for selected points
144 // edgeToCuts : per edge set of points that need to be introduced
145 // faceToSplit : per face the diagonal split
146 // faceToFeaturePoint : per face the feature point. Triangulation
147 // around this feature point.
150 const Map<point>& pointToPos,
151 const Map<List<point> >& edgeToCuts,
152 const Map<labelPair>& faceToSplit,
153 const Map<point>& faceToFeaturePoint,
154 polyTopoChange& meshMod
157 //- Force recalculation of locally stored data on topological change
158 void updateMesh(const mapPolyMesh&);
163 //- Per edge a sorted list (start to end) of added points.
164 const HashTable<labelList, edge, Hash<edge> >& edgeAddedPoints()
167 return edgeAddedPoints_;
170 //- Per face the mid point added.
171 const Map<label>& faceAddedPoint() const
173 return faceAddedPoint_;
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 } // End namespace Foam
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 // ************************ vim: set sw=4 sts=4 et: ************************ //