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::lduPrimitiveMesh
28 Simplest contrete lduMesh which stores the addressing needed by lduMatrix.
30 \*---------------------------------------------------------------------------*/
32 #ifndef lduPrimitiveMesh_H
33 #define lduPrimitiveMesh_H
36 #include "labelList.H"
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 /*---------------------------------------------------------------------------*\
44 Class lduPrimitiveMesh Declaration
45 \*---------------------------------------------------------------------------*/
47 class lduPrimitiveMesh
60 //- Patch to internal addressing
61 labelListList patchAddr_;
63 //- List of pointers for each patch
64 // with only those pointing to interfaces being set
65 lduInterfacePtrsList interfaces_;
67 //- Patch field evaluation schedule.
68 // Note this does not need to be held as a copy because it is invariant
69 const lduSchedule& patchSchedule_;
72 // Private Member Functions
74 //- Disallow default bitwise copy construct
75 lduPrimitiveMesh(const lduPrimitiveMesh&);
77 //- Disallow default bitwise assignment
78 void operator=(const lduPrimitiveMesh&);
85 //- Construct from components as copies
91 const labelListList& pa,
92 lduInterfacePtrsList interfaces,
96 lduAddressing(nCells),
100 interfaces_(interfaces),
105 //- Construct from components and re-use storage as specified.
112 lduInterfacePtrsList interfaces,
113 const lduSchedule& ps,
117 lduAddressing(nCells),
118 lowerAddr_(l, reUse),
119 upperAddr_(u, reUse),
120 patchAddr_(pa, reUse),
121 interfaces_(interfaces, reUse),
127 virtual ~lduPrimitiveMesh()
135 //- Return ldu addressing
136 virtual const lduAddressing& lduAddr() const
141 //- Return a list of pointers for each patch
142 // with only those pointing to interfaces being set
143 virtual lduInterfacePtrsList interfaces() const
148 //- Return Lower addressing
149 virtual const labelUList& lowerAddr() const
154 //- Return Upper addressing
155 virtual const labelUList& upperAddr() const
160 //- Return patch addressing
161 virtual const labelUList& patchAddr(const label i) const
163 return patchAddr_[i];
166 //- Return patch evaluation schedule
167 virtual const lduSchedule& patchSchedule() const
169 return patchSchedule_;
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 } // End namespace Foam
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 // ************************************************************************* //