regionSplit2D.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2015-2020 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::regionSplit2D
28
29Description
30 Splits a patch into regions based on a mask field. Result is a globally
31 consistent label list of region index per patch face.
32
33SourceFiles
34 regionSplit2D.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef regionSplit2D_H
39#define regionSplit2D_H
40
41#include "DynamicList.H"
42#include "boolList.H"
43#include "labelList.H"
45#include "globalIndex.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52// Forward Declarations
53class faceZone;
54class polyMesh;
55
56/*---------------------------------------------------------------------------*\
57 Class regionSplit2D Declaration
58\*---------------------------------------------------------------------------*/
60class regionSplit2D
61:
62 public labelList
63{
64 // Private Data
65
66 //- Number of regions
67 label nRegions_;
68
69
70 // Private Member Functions
71
72 //- No copy construct
73 regionSplit2D(const regionSplit2D&) = delete;
74
75 //- No copy assignment
76 void operator=(const regionSplit2D&) = delete;
77
78
79public:
80
81 // Constructors
82
83 //- Construct from mesh and list of blocked faces
85 (
86 const polyMesh& mesh,
87 const indirectPrimitivePatch& patch,
88 const boolList& blockedFaces,
89 const label offset = 0
90 );
91
92
93 //- Destructor
94 ~regionSplit2D() = default;
95
96
97 // Member Functions
98
99 //- Return the global number of regions
100 label nRegions() const noexcept
101 {
102 return nRegions_;
103 }
104};
105
106
107// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108
109} // End namespace Foam
110
111// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112
113#endif
114
115// ************************************************************************* //
A list of faces which address into the list of points.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
Splits a patch into regions based on a mask field. Result is a globally consistent label list of regi...
Definition: regionSplit2D.H:62
~regionSplit2D()=default
Destructor.
label nRegions() const noexcept
Return the global number of regions.
Definition: regionSplit2D.H:99
dynamicFvMesh & mesh
Namespace for OpenFOAM.
const direction noexcept
Definition: Scalar.H:223