Loading...
Searching...
No Matches
zoneCPCStencil.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) 2020 DLR
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::zoneCPCStencil
28
29Description
30 computes a cell point cell stencil in a narrow band. resizes in case
31 of topological change
32
33 Original code supplied by Henning Scheufler, DLR (2019)
34
35SourceFiles
36 zoneCPCStencil.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef zoneCPCStencil_H
41#define zoneCPCStencil_H
42
43#include "zoneCellStencils.H"
44#include "boolList.H"
45#include "HashSet.H"
46#include "Map.H"
48#include "fvMesh.H"
49
50// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51
52namespace Foam
53{
55/*---------------------------------------------------------------------------*\
56 Class zoneCPCStencil Declaration
57\*---------------------------------------------------------------------------*/
58
59class zoneCPCStencil
60:
61 public MeshObject
62 <
63 fvMesh,
64 TopologicalMeshObject,
65 zoneCPCStencil
66 >,
67 public zoneCellStencils
68{
69 // Private Typedefs
70
71 typedef MeshObject
72 <
73 fvMesh,
75 zoneCPCStencil
76 > MeshObject_type;
77
78
79 // Private Data
80
81 labelList nonEmptyBoundaryPoints_;
82
83 //- is valid boundaryface ?
84 //- non valid face are on empty, wedge and processor patches
85 boolList isValidBFace_;
86
87 //- cell is already uptodate
88 boolList uptodate_;
89
90
91 // Private Member Functions
92
93 //- Sync boundary points
94 Map<bool> syncCoupledBoundaryPoints
95 (
96 const boolList& zone,
97 const labelList& boundaryPoints
98 ) const;
99
100 //- Calculates per point the neighbour data (= pointCells)
101 void calcPointBoundaryData
102 (
103 const boolList& zone,
104 const boolList& isValidBFace,
105 const labelList& boundaryPoints,
106 Map<labelList>& neiGlobal
107 ) const;
108
109 //- Calculate stencil
110 void calculateStencil
111 (
112 const boolList& zone,
113 labelListList& globalCellCells
114 );
115
116 //- No copy construct
117 zoneCPCStencil(const zoneCPCStencil&) = delete;
118
119 //- No copy assignment
120 void operator=(const zoneCPCStencil&) = delete;
121
122public:
123
124 //- Runtime information
125 TypeName("zoneCPCStencil");
126
127
128 // Constructors
129
130 //- Construct from all cells and boundary faces
131 explicit zoneCPCStencil(const fvMesh&);
132
133
134 // Selectors
135
136 static zoneCPCStencil& New(const fvMesh&);
137
138};
139
140
141// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142
143} // End namespace Foam
144
145// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146
147#endif
148
149// ************************************************************************* //
A HashTable to objects of type <T> with a label key.
Definition Map.H:54
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
static zoneCPCStencil & New(const fvMesh &)
TypeName("zoneCPCStencil")
Runtime information.
zoneCellStencils(const zoneCellStencils &)=delete
No copy construct.
Base class for mesh zones.
Definition zone.H:63
Namespace for OpenFOAM.
List< labelList > labelListList
List of labelList.
Definition labelList.H:38
List< label > labelList
A List of labels.
Definition List.H:62
List< bool > boolList
A List of bools.
Definition List.H:60
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68