1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 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
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 This class separates the mesh into distinct unconnected regions,
29 each of which is then given a label.
34 \*---------------------------------------------------------------------------*/
40 #include "demandDrivenData.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class regionSplit Declaration
49 \*---------------------------------------------------------------------------*/
58 const polyMesh& mesh_;
64 // Private Member Functions
66 //- Transfer faceRegion data from one face to the other (or vice versa)
67 void transferCoupledFaceRegion
70 const label otherFaceI,
72 labelList& faceRegion,
73 DynamicList<label>& newChangedFaces
76 //- Given a seed cell label, fill cellRegion/faceRegion with markValue
77 // for contiguous region around it
80 const List<labelPair>& explicitConnections,
81 labelList& cellRegion,
82 labelList& faceRegion,
83 const label seedCellID,
87 //- Calculate region split. Return number of regions.
90 const boolList& blockedFace,
91 const List<labelPair>& explicitConnections,
97 //- Runtime type information
98 ClassName("regionSplit");
102 //- Construct from mesh
103 regionSplit(const polyMesh&);
105 //- Construct from mesh and whether face is blocked
106 // NOTE: blockedFace has to be consistent across coupled faces!
107 regionSplit(const polyMesh&, const boolList& blockedFace);
109 //- Construct from mesh and whether face is blocked. Additional explicit
110 // connections between normal boundary faces.
111 // NOTE: blockedFace has to be consistent across coupled faces!
115 const boolList& blockedFace,
116 const List<labelPair>&
121 //- Return number of regions
122 label nRegions() const
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 } // End namespace Foam
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 // ************************************************************************* //