cellMatcherI.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26\*---------------------------------------------------------------------------*/
27
28// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
29
31{
32 return localPoint_;
33}
34
35
37{
38 return localFaces_;
39}
40
41
43{
44 return faceSize_;
45}
46
47
49{
50 return pointMap_;
51}
52
53
55{
56 return faceMap_;
57}
58
59
61{
62 return edgeFaces_;
63}
64
65
67{
68 return pointFaceIndex_;
69}
70
71
73{
74 return vertLabels_;
75}
76
77
79{
80 return faceLabels_;
81}
82
83
85{
86 if (cellModelPtr_ == nullptr)
87 {
88 cellModelPtr_ = cellModel::ptr(cellModelName_);
89 }
90 return *cellModelPtr_;
91}
92
93
94// Key into edgeFaces_. key and key+1 are the entries for edge going from
95// v0 to v1
97(
98 const label numVert,
99 const label v0,
100 const label v1
101)
102{
103 return 2*(v0*numVert + v1);
104}
105
106
107// Walk along face consistent with face orientation
109(
110 const label localVertI,
111 const label size,
112 const bool rightHand
113)
114{
115 if (rightHand)
116 {
117 // face oriented acc. to righthand rule
118 return (localVertI + 1) % size;
119 }
120 else
121 {
122 // face oriented acc. to lefthand rule
123 return (size + localVertI - 1) % size;
124 }
125}
126
127
128// ************************************************************************* //
A HashTable to objects of type <T> with a label key.
Definition: Map.H:60
const faceList & localFaces() const
Definition: cellMatcherI.H:36
const cellModel & model() const
Definition: cellMatcherI.H:84
const labelList & faceMap() const
Definition: cellMatcherI.H:54
const labelList & faceLabels() const
Definition: cellMatcherI.H:78
Map< label > localPoint_
Definition: cellMatcher.H:120
static label nextVert(const label, const label, const bool)
Step along face either in righthand or lefthand direction.
Definition: cellMatcherI.H:109
const Map< label > & localPoint() const
Definition: cellMatcherI.H:30
const labelList & pointMap() const
Definition: cellMatcherI.H:48
const labelList & vertLabels() const
Definition: cellMatcherI.H:72
const labelList & faceSize() const
Definition: cellMatcherI.H:42
static label edgeKey(const label numVert, const label v0, const label v1)
Given start and end of edge generate unique key.
Definition: cellMatcherI.H:97
const labelListList & pointFaceIndex() const
Definition: cellMatcherI.H:66
const labelList & edgeFaces() const
Definition: cellMatcherI.H:60
Maps a geometry to a set of cell primitives.
Definition: cellModel.H:73