1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2008-2010 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
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::extendedCentredCellToFaceStencil
30 extendedCentredCellToFaceStencil.C
32 \*---------------------------------------------------------------------------*/
34 #ifndef extendedCentredCellToFaceStencil_H
35 #define extendedCentredCellToFaceStencil_H
37 #include "extendedCellToFaceStencil.H"
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 class cellToFaceStencil;
46 /*---------------------------------------------------------------------------*\
47 Class extendedCentredCellToFaceStencil Declaration
48 \*---------------------------------------------------------------------------*/
50 class extendedCentredCellToFaceStencil
52 public extendedCellToFaceStencil
56 //- Swap map for getting neigbouring data
57 autoPtr<mapDistribute> mapPtr_;
59 //- Per face the stencil.
60 labelListList stencil_;
63 // Private Member Functions
65 //- Disallow default bitwise copy construct
66 extendedCentredCellToFaceStencil
68 const extendedCentredCellToFaceStencil&
71 //- Disallow default bitwise assignment
72 void operator=(const extendedCentredCellToFaceStencil&);
79 //- Construct from uncompacted face stencil
80 explicit extendedCentredCellToFaceStencil(const cellToFaceStencil&);
85 //- Return reference to the parallel distribution map
86 const mapDistribute& map() const
91 //- Return reference to the stencil
92 const labelListList& stencil() const
97 //- After removing elements from the stencil adapt the schedule (map).
100 //- Use map to get the data into stencil order
104 const GeometricField<T, fvPatchField, volMesh>& fld,
105 List<List<T> >& stencilFld
108 extendedCellToFaceStencil::collectData
117 //- Sum vol field contributions to create face values
119 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > weightedSum
121 const GeometricField<Type, fvPatchField, volMesh>& fld,
122 const List<List<scalar> >& stencilWeights
125 return extendedCellToFaceStencil::weightedSum
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 } // End namespace Foam
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 // ************************************************************************* //