faMeshI.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) 2016-2017 Wikki Ltd
9  Copyright (C) 2021-2022 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
30 
31 inline const Foam::polyMesh& Foam::faMesh::mesh() const
32 {
33  return
35 }
36 
37 
39 {
40  return boundary_;
41 }
42 
43 
44 inline Foam::label Foam::faMesh::nPoints() const noexcept
45 {
46  return nPoints_;
47 }
48 
49 
50 inline Foam::label Foam::faMesh::nEdges() const noexcept
51 {
52  return nEdges_;
53 }
54 
55 
56 inline Foam::label Foam::faMesh::nInternalEdges() const noexcept
57 {
58  return nInternalEdges_;
59 }
60 
61 
62 inline Foam::label Foam::faMesh::nBoundaryEdges() const noexcept
63 {
64  return (nEdges_ - nInternalEdges_);
65 }
66 
67 
68 inline Foam::label Foam::faMesh::nFaces() const noexcept
69 {
70  return nFaces_;
71 }
72 
73 
74 inline const Foam::pointField& Foam::faMesh::points() const
75 {
76  return patch().localPoints();
77 }
78 
79 
80 inline const Foam::edgeList& Foam::faMesh::edges() const noexcept
81 {
82  return edges_;
83 }
84 
85 
87 {
88  return edgeList::subList(edges_, nInternalEdges_);
89 }
90 
91 
92 inline const Foam::faceList& Foam::faMesh::faces() const
93 {
94  return patch().localFaces();
95 }
96 
97 
99 {
100  return edgeOwner_;
101 }
102 
105 {
106  return edgeNeighbour_;
107 }
108 
111 {
112  return faceLabels_;
113 }
114 
115 
117 {
118  if (!patchPtr_)
119  {
120  initPatch();
121  }
122  return *patchPtr_;
123 }
124 
125 
127 {
128  if (!patchPtr_)
129  {
130  initPatch();
131  }
132  return *patchPtr_;
133 }
134 
136 inline Foam::label Foam::faMesh::whichFace(const label meshFacei) const
137 {
138  return faceLabels_.find(meshFacei);
139 }
140 
141 
143 {
144  if (!polyPatchFacesPtr_ || !polyPatchIdsPtr_)
145  {
146  calcWhichPatchFaces();
147  }
148  return *polyPatchIdsPtr_;
149 }
150 
151 
153 {
154  if (!polyPatchFacesPtr_ || !polyPatchIdsPtr_)
155  {
156  calcWhichPatchFaces();
157  }
158  return *polyPatchFacesPtr_;
159 }
160 
161 
163 {
164  return false;
165 }
166 
167 
168 inline const Foam::List<Foam::labelPair>&
170 {
171  if (!bndConnectPtr_)
172  {
173  calcBoundaryConnections();
174  }
175  return *bndConnectPtr_;
176 }
177 
178 
179 // ************************************************************************* //
const edgeList::subList internalEdges() const
Sub-list of local internal edges.
Definition: faMeshI.H:79
label whichFace(const label meshFacei) const
The area-face corresponding to the mesh-face, -1 if not found.
Definition: faMeshI.H:129
const labelList & whichPolyPatches() const
The polyPatches related to the areaMesh, in sorted order.
Definition: faMeshI.H:135
SubList< edge > subList
Declare type of subList.
Definition: List.H:144
const List< labelPair > & boundaryConnections() const
List of proc/face for the boundary edge neighbours using primitive patch edge numbering.
Definition: faMeshI.H:162
label nFaces() const noexcept
Number of patch faces.
Definition: faMeshI.H:61
label nPoints() const noexcept
Number of local mesh points.
Definition: faMeshI.H:37
const uindirectPrimitivePatch & patch() const
Return constant reference to primitive patch.
Definition: faMeshI.H:109
const faceList & faces() const
Return local faces.
Definition: faMeshI.H:85
A list of faces which address into the list of points.
A List obtained as a section of another List.
Definition: SubList.H:50
const labelList & faceLabels() const noexcept
Return the underlying polyMesh face labels.
Definition: faMeshI.H:103
const Mesh & mesh() const noexcept
Reference to the mesh.
Definition: MeshObject.H:157
bool hasInternalEdgeLabels() const noexcept
True if the internalEdges use an ordering that does not correspond 1-to-1 with the patch internalEdge...
Definition: faMeshI.H:155
const pointField & points() const
Return local points.
Definition: faMeshI.H:67
const direction noexcept
Definition: Scalar.H:258
const edgeList & edges() const noexcept
Return local edges with reordered boundary.
Definition: faMeshI.H:73
const polyMesh & mesh() const
Return access to polyMesh.
Definition: faMeshI.H:24
const faBoundaryMesh & boundary() const noexcept
Return constant reference to boundary mesh.
Definition: faMeshI.H:31
label nEdges() const noexcept
Number of local mesh edges.
Definition: faMeshI.H:43
label nInternalEdges() const noexcept
Number of internal faces.
Definition: faMeshI.H:49
const labelList & edgeNeighbour() const noexcept
Edge neighbour addressing.
Definition: faMeshI.H:97
const std::string patch
OpenFOAM patch number as a std::string.
Finite area boundary mesh.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
const List< labelPair > & whichPatchFaces() const
The polyPatch/local-face for each faceLabels()
Definition: faMeshI.H:145
label nBoundaryEdges() const noexcept
Number of boundary edges (== nEdges - nInternalEdges)
Definition: faMeshI.H:55
const labelList & edgeOwner() const noexcept
Edge owner addressing.
Definition: faMeshI.H:91