Loading...
Searching...
No Matches
faMeshLduAddressing.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) 2019-2021 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
27Class
28 Foam::faMeshLduAddressing
29
30Description
31 lduAddressing wrapper for faMesh
32
33SourceFiles
34 faMeshLduAddressing.C
35
36Author
37 Zeljko Tukovic, FMENA
38 Hrvoje Jasak, Wikki Ltd.
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef faMeshLduAddressing_H
43#define faMeshLduAddressing_H
44
45#include "lduAddressing.H"
46#include "faMesh.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
53/*---------------------------------------------------------------------------*\
54 Class faMeshLduAddressing Declaration
55\*---------------------------------------------------------------------------*/
56
58:
59 public lduAddressing
60{
61 // Private Data
62
63 //- Lower as a subList of allOwner
64 const labelList::subList lowerAddr_;
65
66 //- Upper as a reference to neighbour
67 const labelList& upperAddr_;
68
69 //- Patch addressing as a list of sublists
70 const UPtrList<const labelUList> patchAddr_;
71
72 //- Patch field evaluation schedule
73 const lduSchedule& patchSchedule_;
74
75
76public:
77
78 // Generated Methods
79
80 //- No copy construct
82
83 //- No copy assignment
84 void operator=(const faMeshLduAddressing&) = delete;
85
87 // Constructors
88
89 //- Construct from components
91 :
92 lduAddressing(mesh.nFaces()),
93 lowerAddr_
94 (
95 labelList::subList
96 (
97 mesh.edgeOwner(),
98 mesh.nInternalEdges()
99 )
100 ),
101 upperAddr_(mesh.edgeNeighbour()),
102 patchAddr_(mesh.boundary().edgeFaces()),
103 patchSchedule_(mesh.globalData().patchSchedule())
104 {}
105
106
107 //- Destructor
108 virtual ~faMeshLduAddressing() = default;
109
110
111 // Member Functions
112
113 //- Return number of interfaces
114 virtual label nPatches() const noexcept
115 {
116 return patchAddr_.size();
117 }
118
119 //- Return lower addressing (i.e. lower label = upper triangle)
120 virtual const labelUList& lowerAddr() const noexcept
121 {
122 return lowerAddr_;
123 }
124
125 //- Return upper addressing (i.e. upper label)
126 virtual const labelUList& upperAddr() const noexcept
128 return upperAddr_;
129 }
130
131 //- Return patch addressing
132 virtual const labelUList& patchAddr(const label patchi) const
133 {
134 return patchAddr_[patchi];
136
137 //- Return patch field evaluation schedule
138 virtual const lduSchedule& patchSchedule() const noexcept
139 {
140 return patchSchedule_;
141 }
142};
144
145// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146
147} // End namespace Foam
148
149// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150
151#endif
152
153// ************************************************************************* //
SubList< label > subList
Definition List.H:129
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Definition UPtrList.H:101
label size() const noexcept
The number of entries in the list.
Definition UPtrListI.H:106
virtual const labelUList & patchAddr(const label patchi) const
Return patch addressing.
virtual const labelUList & lowerAddr() const noexcept
Return lower addressing (i.e. lower label = upper triangle).
virtual const lduSchedule & patchSchedule() const noexcept
Return patch field evaluation schedule.
faMeshLduAddressing(const faMeshLduAddressing &)=delete
No copy construct.
void operator=(const faMeshLduAddressing &)=delete
No copy assignment.
virtual label nPatches() const noexcept
Return number of interfaces.
faMeshLduAddressing(const faMesh &mesh)
Construct from components.
virtual ~faMeshLduAddressing()=default
Destructor.
virtual const labelUList & upperAddr() const noexcept
Return upper addressing (i.e. upper label).
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Definition faMesh.H:140
lduAddressing(const lduAddressing &)=delete
No copy construct.
faceListList boundary
dynamicFvMesh & mesh
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
List< lduScheduleEntry > lduSchedule
A List of lduSchedule entries.
Definition lduSchedule.H:46
const direction noexcept
Definition scalarImpl.H:265
UList< label > labelUList
A UList of labels.
Definition UList.H:75