1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::fvMeshLduAddressing
29 Foam::fvMeshLduAddressing
34 \*---------------------------------------------------------------------------*/
36 #ifndef fvMeshLduAddressing_H
37 #define fvMeshLduAddressing_H
39 #include "lduAddressing.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class fvMeshLduAddressing Declaration
49 \*---------------------------------------------------------------------------*/
51 class fvMeshLduAddressing
57 //- Lower as a subList of allOwner
58 labelList::subList lowerAddr_;
60 //- Upper as a reference to neighbour
61 const labelList& upperAddr_;
63 //- Patch addressing as a list of sublists
64 List<const unallocLabelList*> patchAddr_;
66 //- Patch field evaluation schedule
67 const lduSchedule& patchSchedule_;
70 // Private Member Functions
72 //- Disallow default bitwise copy construct
73 fvMeshLduAddressing(const fvMeshLduAddressing&);
75 //- Disallow default bitwise assignment
76 void operator=(const fvMeshLduAddressing&);
83 //- Construct from components
84 fvMeshLduAddressing(const fvMesh& mesh)
86 lduAddressing(mesh.nCells()),
95 upperAddr_(mesh.faceNeighbour()),
96 patchAddr_(mesh.boundary().size()),
97 patchSchedule_(mesh.globalData().patchSchedule())
99 forAll (mesh.boundary(), patchI)
101 patchAddr_[patchI] = &mesh.boundary()[patchI].faceCells();
108 virtual ~fvMeshLduAddressing()
114 //- Return number of interfaces
115 virtual label nPatches() const
117 return patchAddr_.size();
120 //- Return lower addressing (i.e. lower label = upper triangle)
121 virtual const unallocLabelList& lowerAddr() const
126 //- Return upper addressing (i.e. upper label)
127 virtual const unallocLabelList& upperAddr() const
132 //- Return patch addressing
133 virtual const unallocLabelList& patchAddr(const label i) const
135 return *patchAddr_[i];
138 // Return patch field evaluation schedule
139 virtual const lduSchedule& patchSchedule() const
141 return patchSchedule_;
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 } // End namespace Foam
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 // ************************************************************************* //