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 -------------------------------------------------------------------------------
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::zoneCPCStencil
28 
29 Description
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 
35 SourceFiles
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"
47 #include "indirectPrimitivePatch.H"
48 #include "fvMesh.H"
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 namespace Foam
53 {
54 
55 /*---------------------------------------------------------------------------*\
56  Class zoneCPCStencil Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class zoneCPCStencil
60 :
61  public MeshObject
62  <
63  fvMesh,
64  TopologicalMeshObject,
65  zoneCPCStencil
66  >,
67  public zoneCellStencils
68 {
69  // Private Data
70 
71  labelList nonEmptyBoundaryPoints_;
72 
73  //- is valid boundaryface ?
74  //- non valid face are on empty, wedge and processor patches
75  boolList isValidBFace_;
76 
77  //- cell is already uptodate
78  boolList uptodate_;
79 
80 
81  // Private Member Functions
82 
83  //- Sync boundary points
84  Map<bool> syncCoupledBoundaryPoints
85  (
86  const boolList& zone,
87  const labelList& boundaryPoints
88  ) const;
89 
90  //- Calculates per point the neighbour data (= pointCells)
91  void calcPointBoundaryData
92  (
93  const boolList& zone,
94  const boolList& isValidBFace,
95  const labelList& boundaryPoints,
96  Map<labelList>& neiGlobal
97  ) const;
98 
99  //- Calculate stencil
100  void calculateStencil
101  (
102  const boolList& zone,
103  labelListList& globalCellCells
104  );
105 
106  //- No copy construct
107  zoneCPCStencil(const zoneCPCStencil&) = delete;
108 
109  //- No copy assignment
110  void operator=(const zoneCPCStencil&) = delete;
111 
112 public:
113 
114  //- Runtime information
115  TypeName("zoneCPCStencil");
116 
117 
118  // Constructors
119 
120  //- Construct from all cells and boundary faces
121  explicit zoneCPCStencil(const fvMesh&);
122 
123  // Selectors
124 
125  static zoneCPCStencil& New(const fvMesh&);
126 
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************************************************************* //
boolList.H
Foam::zone
Base class for mesh zones.
Definition: zone.H:63
Foam::Map
A HashTable to objects of type <T> with a label key.
Definition: lumpedPointController.H:69
Map.H
zoneCellStencils.H
Foam::zoneCPCStencil::TypeName
TypeName("zoneCPCStencil")
Runtime information.
indirectPrimitivePatch.H
HashSet.H
zoneCellStencils
base class for cell stencil in a narrow band
Foam::zoneCPCStencil::New
static zoneCPCStencil & New(const fvMesh &)
Definition: zoneCPCStencil.C:135
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::List< label >
Foam::MeshObject
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
Definition: MeshObject.H:88
Foam::zoneCPCStencil
computes a cell point cell stencil in a narrow band. resizes in case of topological change
Definition: zoneCPCStencil.H:58