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
pointMesh
pointPatches
facePointPatch
facePointPatch.C
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 "
facePointPatch.H
"
27
#include <
OpenFOAM/pointBoundaryMesh.H
>
28
#include <
OpenFOAM/pointMesh.H
>
29
#include <
OpenFOAM/demandDrivenData.H
>
30
#include <
OpenFOAM/boolList.H
>
31
#include <
OpenFOAM/addToRunTimeSelectionTable.H
>
32
33
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34
35
namespace
Foam
36
{
37
38
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
39
40
defineTypeNameAndDebug
(facePointPatch, 0);
41
defineRunTimeSelectionTable
(facePointPatch, polyPatch);
42
43
addToRunTimeSelectionTable
44
(
45
facePointPatch,
46
facePointPatch,
47
polyPatch
48
);
49
50
51
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
52
53
void
facePointPatch::initGeometry
()
54
{
55
meshPoints_
.
setSize
(0);
56
localPoints_
.
setSize
(0);
57
pointNormals_
.
setSize
(0);
58
}
59
60
61
void
facePointPatch::calcGeometry
()
62
{}
63
64
65
void
facePointPatch::initMovePoints
(
const
pointField
&)
66
{}
67
68
69
void
facePointPatch::movePoints
(
const
pointField
&)
70
{}
71
72
73
void
facePointPatch::initUpdateMesh
()
74
{
75
facePointPatch::initGeometry
();
76
}
77
78
79
void
facePointPatch::updateMesh
()
80
{}
81
82
83
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
84
85
facePointPatch::facePointPatch
86
(
87
const
polyPatch
&
p
,
88
const
pointBoundaryMesh
& bm
89
)
90
:
91
pointPatch
(bm),
92
polyPatch_(p)
93
{}
94
95
96
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
97
98
const
labelList
&
facePointPatch::meshPoints
()
const
99
{
100
if
(
meshPoints_
.
size
())
101
{
102
return
meshPoints_
;
103
}
104
else
105
{
106
return
polyPatch_
.
meshPoints
();
107
}
108
}
109
110
111
const
pointField
&
facePointPatch::localPoints
()
const
112
{
113
if
(
meshPoints_
.
size
())
114
{
115
if
(
localPoints_
.
size
() !=
meshPoints_
.
size
())
116
{
117
const
labelList
& meshPts =
meshPoints
();
118
119
localPoints_
.
setSize
(meshPts.
size
());
120
const
pointField
&
points
=
polyPatch_
.
points
();
121
122
forAll
(meshPts, pointi)
123
{
124
localPoints_
[pointi] = points[meshPts[pointi]];
125
}
126
}
127
128
return
localPoints_
;
129
}
130
else
131
{
132
return
polyPatch_
.
localPoints
();
133
}
134
}
135
136
137
const
vectorField
&
facePointPatch::pointNormals
()
const
138
{
139
if
(
pointNormals_
.
size
())
140
{
141
return
pointNormals_
;
142
}
143
else
144
{
145
return
polyPatch_
.
pointNormals
();
146
}
147
}
148
149
150
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151
152
}
// End namespace Foam
153
154
// ************************ vim: set sw=4 sts=4 et: ************************ //