OpenFOAM
v2512
The open source CFD toolbox
Loading...
Searching...
No Matches
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
-------------------------------------------------------------------------------
10
License
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
26
Class
27
Foam::regionSplit2D
28
29
Description
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
33
SourceFiles
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
"
44
#include "
indirectPrimitivePatch.H
"
45
#include "
globalIndex.H
"
46
47
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49
namespace
Foam
50
{
51
52
// Forward Declarations
53
class
faceZone
;
54
class
polyMesh
;
55
56
/*---------------------------------------------------------------------------*\
57
Class regionSplit2D Declaration
58
\*---------------------------------------------------------------------------*/
59
60
class
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
79
public
:
80
81
// Constructors
82
83
//- Construct from mesh and list of blocked faces
84
regionSplit2D
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
// ************************************************************************* //
DynamicList.H
boolList.H
Foam::faceZone
A subset of mesh faces organised as a primitive patch.
Definition
faceZone.H:63
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition
polyMesh.H:79
Foam::regionSplit2D::~regionSplit2D
~regionSplit2D()=default
Destructor.
Foam::regionSplit2D::nRegions
label nRegions() const noexcept
Return the global number of regions.
Definition
regionSplit2D.H:107
mesh
dynamicFvMesh & mesh
Definition
createDynamicFvMesh.H:6
globalIndex.H
indirectPrimitivePatch.H
labelList.H
Foam
Namespace for OpenFOAM.
Definition
atmBoundaryLayer.C:27
Foam::labelList
List< label > labelList
A List of labels.
Definition
List.H:62
Foam::indirectPrimitivePatch
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
A PrimitivePatch with an IndirectList for the faces, const reference for the point field.
Definition
indirectPrimitivePatch.H:51
Foam::boolList
List< bool > boolList
A List of bools.
Definition
List.H:60
Foam::noexcept
const direction noexcept
Definition
scalarImpl.H:265
src
meshTools
regionSplit2D
regionSplit2D.H
Generated by
1.16.1