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 zoneCellStencils
62 {
63  // Private Data
64 
65  labelList nonEmptyBoundaryPoints_;
66 
67  //- is valid boundaryface ?
68  //- non valid face are on empty, wedge and processor patches
69  boolList isValidBFace_;
70 
71  //- cell is already uptodate
72  boolList uptodate_;
73 
74 
75  // Private Member Functions
76 
77  //- Sync boundary points
78  Map<bool> syncCoupledBoundaryPoints
79  (
80  const boolList& zone,
81  const labelList& boundaryPoints
82  ) const;
83 
84  //- Calculates per point the neighbour data (= pointCells)
85  void calcPointBoundaryData
86  (
87  const boolList& zone,
88  const boolList& isValidBFace,
89  const labelList& boundaryPoints,
90  Map<labelList>& neiGlobal
91  ) const;
92 
93  //- Calculate stencil
94  void calculateStencil
95  (
96  const boolList& zone,
97  labelListList& globalCellCells
98  );
99 
100 
101 public:
102 
103  //- Runtime information
104  TypeName("zoneCPCStencil");
105 
106 
107  // Constructors
108 
109  //- Construct from all cells and boundary faces
110  explicit zoneCPCStencil(const fvMesh&);
111 
112 
113  // Member Functions
114 
115  //- Calculates per cell the neighbour data
116  //- (= cell or boundary in global numbering).
117  //- First element is always cell itself!
118  virtual void updateMesh(const mapPolyMesh& mpm);
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
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
Foam::zoneCPCStencil::zoneCPCStencil
zoneCPCStencil(const fvMesh &)
Construct from all cells and boundary faces.
Definition: zoneCPCStencil.C:124
Map.H
zoneCellStencils.H
Foam::zoneCPCStencil::TypeName
TypeName("zoneCPCStencil")
Runtime information.
indirectPrimitivePatch.H
HashSet.H
Foam::zoneCellStencils
base class for cell stencil in a narrow band
Definition: zoneCellStencils.H:58
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:83
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::zoneCPCStencil::updateMesh
virtual void updateMesh(const mapPolyMesh &mpm)
Definition: zoneCPCStencil.C:227
Foam::List< label >
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:161
Foam::zoneCPCStencil
computes a cell point cell stencil in a narrow band. resizes in case of topological change
Definition: zoneCPCStencil.H:58