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/>.
32 \*---------------------------------------------------------------------------*/
34 #ifndef faMeshLduAddressing_H
35 #define faMeshLduAddressing_H
37 #include "lduAddressing.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 /*---------------------------------------------------------------------------*\
46 Class faMeshLduAddressing Declaration
47 \*---------------------------------------------------------------------------*/
49 class faMeshLduAddressing
55 //- Lower as a subList of allOwner
56 labelList::subList lowerAddr_;
58 //- Upper as a reference to neighbour
59 const labelList& upperAddr_;
61 //- Patch addressing as a list of sublists
62 List<const unallocLabelList*> patchAddr_;
64 //- Patch field evaluation schedule
65 const lduSchedule& patchSchedule_;
68 // Private Member Functions
70 //- Disallow default bitwise copy construct
71 faMeshLduAddressing(const faMeshLduAddressing&);
73 //- Disallow default bitwise assignment
74 void operator=(const faMeshLduAddressing&);
81 //- Construct from components
82 faMeshLduAddressing(const faMesh& mesh)
84 lduAddressing(mesh.nFaces()),
93 upperAddr_(mesh.edgeNeighbour()),
94 patchAddr_(mesh.boundary().size()),
95 patchSchedule_(mesh.globalData().patchSchedule())
97 forAll (mesh.boundary(), patchI)
99 patchAddr_[patchI] = &mesh.boundary()[patchI].edgeFaces();
105 virtual ~faMeshLduAddressing()
111 //- Return number of interfaces
112 virtual label nPatches() const
114 return patchAddr_.size();
117 //- Return lower addressing (i.e. lower label = upper triangle)
118 virtual const unallocLabelList& lowerAddr() const
123 //- Return upper addressing (i.e. upper label)
124 virtual const unallocLabelList& upperAddr() const
129 //- Return patch addressing
130 virtual const unallocLabelList& patchAddr(const label i) const
132 return *patchAddr_[i];
135 // Return patch field evaluation schedule
136 virtual const lduSchedule& patchSchedule() const
138 return patchSchedule_;
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 } // End namespace Foam
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 // ************************************************************************* //