Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
OpenFOAM
meshes
meshShapes
cellMatcher
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 | Copyright (C) 1991-2010 OpenCFD Ltd.
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
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.
15
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
19
for more details.
20
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/>.
23
24
\*---------------------------------------------------------------------------*/
25
26
#include <
OpenFOAM/primitiveMesh.H
>
27
#include <
OpenFOAM/cellModeller.H
>
28
#include <
OpenFOAM/cellModel.H
>
29
30
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
31
32
inline
const
Foam::Map<Foam::label>
&
Foam::cellMatcher::localPoint
()
const
33
{
34
return
localPoint_
;
35
}
36
37
38
inline
const
Foam::faceList
&
Foam::cellMatcher::localFaces
()
const
39
{
40
return
localFaces_;
41
}
42
43
44
inline
const
Foam::labelList
&
Foam::cellMatcher::faceSize
()
const
45
{
46
return
faceSize_;
47
}
48
49
50
inline
const
Foam::labelList
&
Foam::cellMatcher::pointMap
()
const
51
{
52
return
pointMap_;
53
}
54
55
56
inline
const
Foam::labelList
&
Foam::cellMatcher::faceMap
()
const
57
{
58
return
faceMap_;
59
}
60
61
62
inline
const
Foam::labelList
&
Foam::cellMatcher::edgeFaces
()
const
63
{
64
return
edgeFaces_;
65
}
66
67
68
inline
const
Foam::labelListList
&
Foam::cellMatcher::pointFaceIndex
()
const
69
{
70
return
pointFaceIndex_;
71
}
72
73
74
inline
const
Foam::labelList
&
Foam::cellMatcher::vertLabels
()
const
75
{
76
return
vertLabels_;
77
}
78
79
80
inline
const
Foam::labelList
&
Foam::cellMatcher::faceLabels
()
const
81
{
82
return
faceLabels_;
83
}
84
85
86
inline
const
Foam::cellModel
&
Foam::cellMatcher::model
()
const
87
{
88
if
(cellModelPtr_ == NULL)
89
{
90
cellModelPtr_ =
cellModeller::lookup
(cellModelName_);
91
}
92
return
*cellModelPtr_;
93
}
94
95
96
97
// Key into edgeFaces_. key and key+1 are the entries for edge going from
98
// v0 to v1
99
inline
Foam::label
Foam::cellMatcher::edgeKey
100
(
101
const
label numVert,
102
const
label v0,
103
const
label
v1
104
)
105
{
106
return
2*(v0*numVert +
v1
);
107
}
108
109
110
// Walk along face consistent with face orientation
111
inline
Foam::label
Foam::cellMatcher::nextVert
112
(
113
const
label localVertI,
114
const
label size,
115
const
bool
rightHand
116
)
117
{
118
if
(rightHand)
119
{
120
// face oriented acc. to righthand rule
121
return
(localVertI + 1) % size;
122
}
123
else
124
{
125
// face oriented acc. to lefthand rule
126
return
(size + localVertI - 1) % size;
127
}
128
}
129
130
131
// ************************ vim: set sw=4 sts=4 et: ************************ //