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/>.
24 \*---------------------------------------------------------------------------*/
26 #include "primitiveMesh.H"
27 #include "cellModeller.H"
28 #include "cellModel.H"
30 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
32 inline const Foam::Map<Foam::label>& Foam::cellMatcher::localPoint() const
38 inline const Foam::faceList& Foam::cellMatcher::localFaces() const
44 inline const Foam::labelList& Foam::cellMatcher::faceSize() const
50 inline const Foam::labelList& Foam::cellMatcher::pointMap() const
56 inline const Foam::labelList& Foam::cellMatcher::faceMap() const
62 inline const Foam::labelList& Foam::cellMatcher::edgeFaces() const
68 inline const Foam::labelListList& Foam::cellMatcher::pointFaceIndex() const
70 return pointFaceIndex_;
74 inline const Foam::labelList& Foam::cellMatcher::vertLabels() const
80 inline const Foam::labelList& Foam::cellMatcher::faceLabels() const
86 inline const Foam::cellModel& Foam::cellMatcher::model() const
88 if (cellModelPtr_ == NULL)
90 cellModelPtr_ = cellModeller::lookup(cellModelName_);
92 return *cellModelPtr_;
97 // Key into edgeFaces_. key and key+1 are the entries for edge going from
99 inline Foam::label Foam::cellMatcher::edgeKey
106 return 2*(v0*numVert + v1);
110 // Walk along face consistent with face orientation
111 inline Foam::label Foam::cellMatcher::nextVert
113 const label localVertI,
120 // face oriented acc. to righthand rule
121 return (localVertI + 1) % size;
125 // face oriented acc. to lefthand rule
126 return (size + localVertI - 1) % size;
131 // ************************************************************************* //