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 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::fvMeshLduAddressing
28 
29 Description
30  Foam::fvMeshLduAddressing
31 
32 SourceFiles
33  fvMeshLduAddressing.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef fvMeshLduAddressing_H
38 #define fvMeshLduAddressing_H
39 
40 #include "lduAddressing.H"
41 #include "fvMesh.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class fvMeshLduAddressing Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
54  public lduAddressing
55 {
56  // Private data
57 
58  //- Lower as a subList of allOwner
59  labelList::subList lowerAddr_;
60 
61  //- Upper as a reference to neighbour
62  const labelList& upperAddr_;
63 
64  //- Patch addressing as a list of sublists
65  List<const labelUList*> patchAddr_;
66 
67  //- Patch field evaluation schedule
68  const lduSchedule& patchSchedule_;
69 
70 
71  // Private Member Functions
72 
73  //- No copy construct
75 
76  //- No copy assignment
77  void operator=(const fvMeshLduAddressing&) = delete;
78 
79 
80 public:
81 
82  // Constructors
83 
84  //- Construct from components
86  :
87  lduAddressing(mesh.nCells()),
88  lowerAddr_
89  (
90  labelList::subList
91  (
92  mesh.faceOwner(),
93  mesh.nInternalFaces()
94  )
95  ),
96  upperAddr_(mesh.faceNeighbour()),
97  patchAddr_(mesh.boundary().size()),
98  patchSchedule_(mesh.globalData().patchSchedule())
99  {
100  forAll(mesh.boundary(), patchi)
101  {
102  patchAddr_[patchi] = &mesh.boundary()[patchi].faceCells();
103  }
104  }
105 
106 
107  //- Destructor
109  {}
110 
111 
112  // Member Functions
113 
114  //- Return lower addressing (i.e. lower label = upper triangle)
115  const labelUList& lowerAddr() const
116  {
117  return lowerAddr_;
118  }
119 
120  //- Return upper addressing (i.e. upper label)
121  const labelUList& upperAddr() const
122  {
123  return upperAddr_;
124  }
125 
126  //- Return patch addressing
127  const labelUList& patchAddr(const label i) const
128  {
129  return *patchAddr_[i];
130  }
131 
132  // Return patch field evaluation schedule
133  const lduSchedule& patchSchedule() const
134  {
135  return patchSchedule_;
136  }
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
Foam::lduAddressing
The class contains the addressing required by the lduMatrix: upper, lower and losort.
Definition: lduAddressing.H:114
Foam::fvMeshLduAddressing::patchAddr
const labelUList & patchAddr(const label i) const
Return patch addressing.
Definition: fvMeshLduAddressing.H:126
Foam::fvMeshLduAddressing::patchSchedule
const lduSchedule & patchSchedule() const
Definition: fvMeshLduAddressing.H:132
Foam::SubList
A List obtained as a section of another List.
Definition: SubList.H:53
Foam::fvMeshLduAddressing::upperAddr
const labelUList & upperAddr() const
Return upper addressing (i.e. upper label)
Definition: fvMeshLduAddressing.H:120
Foam::fvMeshLduAddressing::lowerAddr
const labelUList & lowerAddr() const
Return lower addressing (i.e. lower label = upper triangle)
Definition: fvMeshLduAddressing.H:114
Foam::lduAddressing::size
label size() const
Return number of equations.
Definition: lduAddressing.H:171
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:296
Foam::fvMeshLduAddressing
Foam::fvMeshLduAddressing.
Definition: fvMeshLduAddressing.H:51
lduAddressing.H
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:83
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fvMeshLduAddressing::fvMeshLduAddressing
fvMeshLduAddressing(const fvMesh &mesh)
Construct from components.
Definition: fvMeshLduAddressing.H:84
Foam::fvMeshLduAddressing::~fvMeshLduAddressing
~fvMeshLduAddressing()
Destructor.
Definition: fvMeshLduAddressing.H:107
Foam::List< label >
Foam::UList< label >
boundary
faceListList boundary
Definition: createBlockMesh.H:4