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::cellToFaceStencil
28 Base class for extended cell-to-face stencils (face values from
34 \*---------------------------------------------------------------------------*/
36 #ifndef cellToFaceStencil_H
37 #define cellToFaceStencil_H
39 #include "globalIndex.H"
42 #include "indirectPrimitivePatch.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 /*---------------------------------------------------------------------------*\
52 Class cellToFaceStencil Declaration
53 \*---------------------------------------------------------------------------*/
55 class cellToFaceStencil
61 const polyMesh& mesh_;
63 //- Global numbering for cells and boundary faces
64 const globalIndex globalNumbering_;
79 static void merge(const label, const labelList&, labelList&);
81 //- Valid boundary faces (not empty and not coupled)
82 void validBoundaryFaces(boolList& isValidBFace) const;
84 //- Return patch of all coupled faces.
85 autoPtr<indirectPrimitivePatch> allCoupledFacesPatch() const;
87 //- Combine operator for labelLists
91 void operator()( labelList& x, const labelList& y ) const;
94 //- Collect cell neighbours of faces in global numbering
99 const boolList& nonEmptyFace,
100 const labelList& faceLabels,
101 labelHashSet& globals
104 //- Collect cell neighbours of faces in global numbering
105 labelList calcFaceCells
107 const boolList& nonEmptyFace,
108 const labelList& faceLabels,
109 labelHashSet& globals
113 //- Collect cell neighbours into extended stencil
116 const labelListList& globalCellCells,
117 labelListList& faceStencil
125 //- Construct from mesh
126 explicit cellToFaceStencil(const polyMesh&);
131 const polyMesh& mesh() const
136 //- Global numbering for cells and boundary faces
137 const globalIndex& globalNumbering() const
139 return globalNumbering_;
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 } // End namespace Foam
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 // ************************************************************************* //