1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::fvMeshLduAddressing
28 Foam::fvMeshLduAddressing
33 \*---------------------------------------------------------------------------*/
35 #ifndef fvMeshLduAddressing_H
36 #define fvMeshLduAddressing_H
38 #include "lduAddressing.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class fvMeshLduAddressing Declaration
48 \*---------------------------------------------------------------------------*/
50 class fvMeshLduAddressing
56 //- Lower as a subList of allOwner
57 labelList::subList lowerAddr_;
59 //- Upper as a reference to neighbour
60 const labelList& upperAddr_;
62 //- Patch addressing as a list of sublists
63 List<const unallocLabelList*> patchAddr_;
65 //- Patch field evaluation schedule
66 const lduSchedule& patchSchedule_;
69 // Private Member Functions
71 //- Disallow default bitwise copy construct
72 fvMeshLduAddressing(const fvMeshLduAddressing&);
74 //- Disallow default bitwise assignment
75 void operator=(const fvMeshLduAddressing&);
82 //- Construct from components
83 fvMeshLduAddressing(const fvMesh& mesh)
85 lduAddressing(mesh.nCells()),
94 upperAddr_(mesh.faceNeighbour()),
95 patchAddr_(mesh.boundary().size()),
96 patchSchedule_(mesh.globalData().patchSchedule())
98 forAll (mesh.boundary(), patchI)
100 patchAddr_[patchI] = &mesh.boundary()[patchI].faceCells();
107 virtual ~fvMeshLduAddressing()
113 //- Return number of interfaces
114 virtual label nPatches() const
116 return patchAddr_.size();
119 //- Return lower addressing (i.e. lower label = upper triangle)
120 virtual const unallocLabelList& lowerAddr() const
125 //- Return upper addressing (i.e. upper label)
126 virtual const unallocLabelList& upperAddr() const
131 //- Return patch addressing
132 virtual const unallocLabelList& patchAddr(const label i) const
134 return *patchAddr_[i];
137 // Return patch field evaluation schedule
138 virtual const lduSchedule& patchSchedule() const
140 return patchSchedule_;
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 } // End namespace Foam
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 // ************************************************************************* //