Loading...
Searching...
No Matches
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-2024 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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 * * * * * * * * * * * * * //
32{
33 return boundary_;
34}
35
37inline Foam::label Foam::faMesh::nPoints() const noexcept
38{
39 return nPoints_;
40}
41
43inline Foam::label Foam::faMesh::nEdges() const noexcept
44{
45 return nEdges_;
46}
47
49inline Foam::label Foam::faMesh::nInternalEdges() const noexcept
50{
51 return nInternalEdges_;
52}
53
55inline Foam::label Foam::faMesh::nBoundaryEdges() const noexcept
56{
57 return (nEdges_ - nInternalEdges_);
58}
59
61inline Foam::label Foam::faMesh::nFaces() const noexcept
62{
63 return nFaces_;
64}
65
67inline const Foam::pointField& Foam::faMesh::points() const
68{
69 return patch().localPoints();
70}
71
74{
75 return edges_;
76}
77
80{
81 return edgeList::subList(edges_, nInternalEdges_);
82}
83
85inline const Foam::faceList& Foam::faMesh::faces() const
86{
87 return patch().localFaces();
88}
89
92{
93 return edgeOwner_;
94}
95
98{
99 return edgeNeighbour_;
100}
101
104{
105 return faceLabels_;
106}
107
108
110{
111 if (!patchPtr_)
113 initPatch();
114 }
115 return *patchPtr_;
116}
117
118
120{
121 if (!patchPtr_)
123 initPatch();
124 }
125 return *patchPtr_;
126}
127
129inline Foam::label Foam::faMesh::whichFace(const label meshFacei) const
130{
131 return faceLabels_.find(meshFacei);
132}
133
134
136{
137 if (!polyPatchFacesPtr_ || !polyPatchIdsPtr_)
139 calcWhichPatchFaces();
140 }
141 return *polyPatchIdsPtr_;
142}
143
144
146{
147 if (!polyPatchFacesPtr_ || !polyPatchIdsPtr_)
149 calcWhichPatchFaces();
150 }
151 return *polyPatchFacesPtr_;
152}
153
154
156{
157 return false;
158}
159
160
161inline const Foam::List<Foam::labelPair>&
163{
164 if (!bndConnectPtr_)
165 {
166 calcBoundaryConnections();
167 }
168 return *bndConnectPtr_;
169}
170
171
172// ************************************************************************* //
label find(const T &val, label pos=0, label len=-1) const
Find index of the first occurrence of the value.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
SubList< edge > subList
Definition List.H:129
Finite area boundary mesh, which is a faPatch list with registered IO, a reference to the associated ...
const List< labelPair > & whichPatchFaces() const
The polyPatch/local-face for each faceLabels().
Definition faMeshI.H:138
const labelList & edgeNeighbour() const noexcept
Edge neighbour addressing.
Definition faMeshI.H:90
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:148
const faBoundaryMesh & boundary() const noexcept
Return constant reference to boundary mesh.
Definition faMeshI.H:24
label nEdges() const noexcept
Number of local mesh edges.
Definition faMeshI.H:36
label nBoundaryEdges() const noexcept
Number of boundary edges (== nEdges - nInternalEdges).
Definition faMeshI.H:48
const faceList & faces() const
Return local faces.
Definition faMeshI.H:78
const edgeList::subList internalEdges() const
Sub-list of local internal edges.
Definition faMeshI.H:72
label whichFace(const label meshFacei) const
The area-face corresponding to the mesh-face, -1 if not found.
Definition faMeshI.H:122
const edgeList & edges() const noexcept
Return local edges with reordered boundary.
Definition faMeshI.H:66
const uindirectPrimitivePatch & patch() const
Return constant reference to primitive patch.
Definition faMeshI.H:102
label nInternalEdges() const noexcept
Number of internal faces.
Definition faMeshI.H:42
label nPoints() const noexcept
Number of local mesh points.
Definition faMeshI.H:30
label nFaces() const noexcept
Number of patch faces.
Definition faMeshI.H:54
const List< labelPair > & boundaryConnections() const
List of proc/face for the boundary edge neighbours using primitive patch edge numbering.
Definition faMeshI.H:155
const labelList & whichPolyPatches() const
The polyPatches related to the areaMesh, in sorted order.
Definition faMeshI.H:128
const pointField & points() const
Return local points.
Definition faMeshI.H:60
const labelList & faceLabels() const noexcept
Return the underlying polyMesh face labels.
Definition faMeshI.H:96
const labelList & edgeOwner() const noexcept
Edge owner addressing.
Definition faMeshI.H:84
List< edge > edgeList
List of edge.
Definition edgeList.H:32
List< label > labelList
A List of labels.
Definition List.H:62
List< face > faceList
List of faces.
Definition faceListFwd.H:41
const direction noexcept
Definition scalarImpl.H:265
PrimitivePatch< UIndirectList< face >, const pointField & > uindirectPrimitivePatch
A PrimitivePatch with UIndirectList for the faces, const reference for the point field.
vectorField pointField
pointField is a vectorField.