1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
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 ~fvMeshLduAddressing()
114 //- Return lower addressing (i.e. lower label = upper triangle)
115 const unallocLabelList& lowerAddr() const
120 //- Return upper addressing (i.e. upper label)
121 const unallocLabelList& upperAddr() const
126 //- Return patch addressing
127 const unallocLabelList& patchAddr(const label i) const
129 return *patchAddr_[i];
132 // Return patch field evaluation schedule
133 const lduSchedule& patchSchedule() const
135 return patchSchedule_;
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 } // End namespace Foam
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 // ************************************************************************* //