1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 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::lduPrimitiveMesh
29 Simplest contrete lduMesh which stores the addressing needed bu lduMatrix.
31 \*---------------------------------------------------------------------------*/
33 #ifndef lduPrimitiveMesh_H
34 #define lduPrimitiveMesh_H
37 #include "labelList.H"
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 /*---------------------------------------------------------------------------*\
45 Class lduPrimitiveMesh Declaration
46 \*---------------------------------------------------------------------------*/
48 class lduPrimitiveMesh
61 //- Patch to internal addressing
62 labelListList patchAddr_;
64 //- List of pointers for each patch
65 // with only those pointing to interfaces being set
66 lduInterfacePtrsList interfaces_;
68 //- Patch field evaluation schedule.
69 // Note this does not need to be held as a copy because it is invariant
70 const lduSchedule& patchSchedule_;
73 // Private Member Functions
75 //- Disallow default bitwise copy construct
76 lduPrimitiveMesh(const lduPrimitiveMesh&);
78 //- Disallow default bitwise assignment
79 void operator=(const lduPrimitiveMesh&);
86 //- Construct from components as copies
90 const unallocLabelList& l,
91 const unallocLabelList& u,
92 const labelListList& pa,
93 lduInterfacePtrsList interfaces,
97 lduAddressing(nCells),
101 interfaces_(interfaces),
106 //- Construct from components and re-use storage as specified.
113 lduInterfacePtrsList interfaces,
114 const lduSchedule& ps,
118 lduAddressing(nCells),
119 lowerAddr_(l, reUse),
120 upperAddr_(u, reUse),
121 patchAddr_(pa, reUse),
122 interfaces_(interfaces, reUse),
129 virtual ~lduPrimitiveMesh()
137 //- Return ldu addressing
138 virtual const lduAddressing& lduAddr() const
143 //- Return a list of pointers for each patch
144 // with only those pointing to interfaces being set
145 virtual lduInterfacePtrsList interfaces() const
150 //- Return Lower addressing
151 virtual const unallocLabelList& lowerAddr() const
156 //- Return Upper addressing
157 virtual const unallocLabelList& upperAddr() const
162 //- Return patch addressing
163 virtual const unallocLabelList& patchAddr(const label i) const
165 return patchAddr_[i];
168 //- Return patch evaluation schedule
169 virtual const lduSchedule& patchSchedule() const
171 return patchSchedule_;
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 } // End namespace Foam
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 // ************************************************************************* //