meshStructure.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 | Copyright (C) 2013-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::meshStructure
26 
27 Description
28  Detect extruded mesh structure given a set of patch faces.
29 
30 SourceFiles
31  meshStructure.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef meshStructure_H
36 #define meshStructure_H
37 
38 #include "labelList.H"
40 #include "className.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 // Forward declaration of classes
48 class polyMesh;
49 
50 
51 /*---------------------------------------------------------------------------*\
52  Class meshStructure Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class meshStructure
56 {
57  // Private data
58 
59  //- Cell to patch face
60  labelList cellToPatchFaceAddressing_;
61 
62  //- Cell to layer
63  labelList cellLayer_;
64 
65  //- Face to patch face
66  labelList faceToPatchFaceAddressing_;
67 
68  //- Face to patch edge
69  labelList faceToPatchEdgeAddressing_;
70 
71  //- Face to layer
72  labelList faceLayer_;
73 
74  //- Point to patch point
75  labelList pointToPatchPointAddressing_;
76 
77  //- Point to layer
78  labelList pointLayer_;
79 
80  //- Is mesh structured?
81  bool structured_;
82 
83 
84  // Private Member Functions
85 
86  //- Is cell structured
87  bool isStructuredCell
88  (
89  const polyMesh& mesh,
90  const label layerI,
91  const label celli
92  ) const;
93 
94  //- Calculate all maps.
95  void correct
96  (
97  const polyMesh& mesh,
98  const uindirectPrimitivePatch& pp
99  );
100 
101 
102 public:
103 
104  // Declare name of the class and its debug switch
105  ClassName("meshStructure");
106 
107  // Constructors
108 
109  //- Construct null
110  meshStructure(const polyMesh& mesh, const uindirectPrimitivePatch&);
111 
112 
113  // Member Functions
114 
115  //- Is mesh structured?
116  inline bool structured() const;
117 
118  //- Cell to patch face
119  inline const labelList& cellToPatchFaceAddressing() const;
120 
121  //- Cell to patch face
123 
124  //- Cell to layer
125  inline const labelList& cellLayer() const;
126 
127  //- Cell to layer
128  inline labelList& cellLayer();
129 
130  //- Face to patch face
131  inline const labelList& faceToPatchFaceAddressing() const;
132 
133  //- Face to patch face
135 
136  //- Face to patch edge
137  inline const labelList& faceToPatchEdgeAddressing() const;
138 
139  //- Face to patch edge
141 
142  //- Face to layer
143  inline const labelList& faceLayer() const;
144 
145  //- Face to layer
146  inline labelList& faceLayer();
147 
148  //- Point to patch point
149  inline const labelList& pointToPatchPointAddressing() const;
150 
151  //- Point to patch point
153 
154  //- Point to layer
155  inline const labelList& pointLayer() const;
156 
157  //- Point to layer
158  inline labelList& pointLayer();
159 
160 };
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 } // End namespace Foam
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #include "meshStructureI.H"
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 #endif
174 
175 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
meshStructure(const polyMesh &mesh, const uindirectPrimitivePatch &)
Construct null.
const labelList & cellLayer() const
Cell to layer.
ClassName("meshStructure")
A list of faces which address into the list of points.
const labelList & pointToPatchPointAddressing() const
Point to patch point.
const labelList & pointLayer() const
Point to layer.
dynamicFvMesh & mesh
const labelList & faceLayer() const
Face to layer.
bool structured() const
Is mesh structured?
const labelList & cellToPatchFaceAddressing() const
Cell to patch face.
Macro definitions for declaring ClassName(), NamespaceName(), etc.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Detect extruded mesh structure given a set of patch faces.
Definition: meshStructure.H:54
const labelList & faceToPatchEdgeAddressing() const
Face to patch edge.
const labelList & faceToPatchFaceAddressing() const
Face to patch face.
Namespace for OpenFOAM.