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/>.
28 Customized lduAddressing for subMeshes
32 University of Massachusetts Amherst
35 \*---------------------------------------------------------------------------*/
37 #ifndef subMeshLduAddressing_H
38 #define subMeshLduAddressing_H
40 #include "lduAddressing.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class subMeshLduAddressing Declaration
50 \*---------------------------------------------------------------------------*/
52 class subMeshLduAddressing
58 //- Lower as a subList of allOwner
59 labelList::subList lowerAddr_;
61 //- Upper as a reference to neighbour
62 const labelList& upperAddr_;
67 // Private Member Functions
69 //- Disallow default bitwise copy construct
70 subMeshLduAddressing(const subMeshLduAddressing&);
72 //- Disallow default bitwise assignment
73 void operator=(const subMeshLduAddressing&);
79 //- Construct from components
80 subMeshLduAddressing(const fvMesh& mesh)
82 lduAddressing(mesh.nCells()),
91 upperAddr_(mesh.faceNeighbour()),
92 nPatches_(mesh.boundary().size())
97 virtual ~subMeshLduAddressing()
102 //- Return number of interfaces
103 virtual label nPatches() const
108 //- Return lower addressing (i.e. lower label = upper triangle)
109 virtual const unallocLabelList& lowerAddr() const
114 //- Return upper addressing (i.e. upper label)
115 virtual const unallocLabelList& upperAddr() const
120 //- Return patch addressing
121 virtual const unallocLabelList& patchAddr(const label i) const
125 "void subMeshLduAddressing::patchAddr(const label i)"
127 << " Illegal request. "
128 << abort(FatalError);
130 return unallocLabelList::null();
133 // Return patch field evaluation schedule
134 virtual const lduSchedule& patchSchedule() const
138 "void subMeshLduAddressing::patchSchedule()"
140 << " Illegal request. "
141 << abort(FatalError);
143 return lduSchedule::null();
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 } // End namespace Foam
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 // ************************************************************************* //