1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. 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 labelUList*> 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();
106 ~fvMeshLduAddressing()
112 //- Return lower addressing (i.e. lower label = upper triangle)
113 const labelUList& lowerAddr() const
118 //- Return upper addressing (i.e. upper label)
119 const labelUList& upperAddr() const
124 //- Return patch addressing
125 const labelUList& patchAddr(const label i) const
127 return *patchAddr_[i];
130 // Return patch field evaluation schedule
131 const lduSchedule& patchSchedule() const
133 return patchSchedule_;
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 } // End namespace Foam
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 // ************************************************************************* //