fvMeshLduAddressing.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) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2021 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 Class
28  Foam::fvMeshLduAddressing
29 
30 Description
31  Foam::fvMeshLduAddressing
32 
33 SourceFiles
34  fvMeshLduAddressing.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef fvMeshLduAddressing_H
39 #define fvMeshLduAddressing_H
40 
41 #include "lduAddressing.H"
42 #include "fvMesh.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class fvMeshLduAddressing Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
55  public lduAddressing
56 {
57  // Private Data
58 
59  //- Lower as a subList of allOwner
60  const labelList::subList lowerAddr_;
61 
62  //- Upper as a reference to neighbour
63  const labelList& upperAddr_;
64 
65  //- Patch addressing as a list of sublists
66  const UPtrList<const labelUList> patchAddr_;
67 
68  //- Patch field evaluation schedule
69  const lduSchedule& patchSchedule_;
70 
71 
72  // Private Member Functions
73 
74  //- No copy construct
76 
77  //- No copy assignment
78  void operator=(const fvMeshLduAddressing&) = delete;
79 
80 
81 public:
82 
83  // Constructors
84 
85  //- Construct from components
86  explicit fvMeshLduAddressing(const fvMesh& mesh)
87  :
88  lduAddressing(mesh.nCells()),
89  lowerAddr_
90  (
91  labelList::subList
92  (
93  mesh.faceOwner(),
94  mesh.nInternalFaces()
95  )
96  ),
97  upperAddr_(mesh.faceNeighbour()),
98  patchAddr_(mesh.boundary().faceCells()),
99  patchSchedule_(mesh.globalData().patchSchedule())
100  {}
101 
102 
103  //- Destructor
104  ~fvMeshLduAddressing() = default;
105 
106 
107  // Member Functions
108 
109  //- Return lower addressing (i.e. lower label = upper triangle)
110  const labelUList& lowerAddr() const noexcept
111  {
112  return lowerAddr_;
113  }
114 
115  //- Return upper addressing (i.e. upper label)
116  const labelUList& upperAddr() const noexcept
117  {
118  return upperAddr_;
119  }
120 
121  //- Return patch addressing
122  const labelUList& patchAddr(const label patchi) const
123  {
124  return patchAddr_[patchi];
125  }
126 
127  //- Return patch field evaluation schedule
128  const lduSchedule& patchSchedule() const noexcept
129  {
130  return patchSchedule_;
131  }
132 };
133 
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 } // End namespace Foam
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 #endif
142 
143 // ************************************************************************* //
Foam::lduAddressing
The class contains the addressing required by the lduMatrix: upper, lower and losort.
Definition: lduAddressing.H:114
Foam::fvMeshLduAddressing::patchSchedule
const lduSchedule & patchSchedule() const noexcept
Return patch field evaluation schedule.
Definition: fvMeshLduAddressing.H:127
Foam::SubList
A List obtained as a section of another List.
Definition: SubList.H:54
Foam::fvMeshLduAddressing::~fvMeshLduAddressing
~fvMeshLduAddressing()=default
Destructor.
Foam::fvMeshLduAddressing
Foam::fvMeshLduAddressing.
Definition: fvMeshLduAddressing.H:52
Foam::fvMeshLduAddressing::lowerAddr
const labelUList & lowerAddr() const noexcept
Return lower addressing (i.e. lower label = upper triangle)
Definition: fvMeshLduAddressing.H:109
Foam::UPtrList
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Definition: UPtrList.H:62
lduAddressing.H
Foam::fvMeshLduAddressing::patchAddr
const labelUList & patchAddr(const label patchi) const
Return patch addressing.
Definition: fvMeshLduAddressing.H:121
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fvMeshLduAddressing::fvMeshLduAddressing
fvMeshLduAddressing(const fvMesh &mesh)
Construct from components.
Definition: fvMeshLduAddressing.H:85
Foam::List< label >
Foam::fvMeshLduAddressing::upperAddr
const labelUList & upperAddr() const noexcept
Return upper addressing (i.e. upper label)
Definition: fvMeshLduAddressing.H:115
Foam::UList< label >
Foam::faceCells
Smooth ATC in cells next to a set of patches supplied by type.
Definition: faceCells.H:56
boundary
faceListList boundary
Definition: createBlockMesh.H:4