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
meshTools
directMapped
directMappedPolyPatch
directMappedPolyPatch.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
Class
25
Foam::directMappedPolyPatch
26
27
Description
28
Determines a mapping between patch face centres and mesh cell or face
29
centres and processors they're on.
30
31
Note
32
Storage is not optimal. It stores all face centres and cells on all
33
processors to keep the addressing calculation simple.
34
35
SourceFiles
36
directMappedPolyPatch.C
37
38
\*---------------------------------------------------------------------------*/
39
40
#ifndef directMappedPolyPatch_H
41
#define directMappedPolyPatch_H
42
43
#include <
OpenFOAM/polyPatch.H
>
44
#include "
directMappedPatchBase.H
"
45
46
47
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49
namespace
Foam
50
{
51
52
class
polyMesh;
53
54
/*---------------------------------------------------------------------------*\
55
Class directMappedPolyPatch Declaration
56
\*---------------------------------------------------------------------------*/
57
58
class
directMappedPolyPatch
59
:
60
public
polyPatch
,
61
public
directMappedPatchBase
62
{
63
64
protected
:
65
66
//- Initialise the calculation of the patch geometry
67
virtual
void
initGeometry
();
68
69
//- Calculate the patch geometry
70
virtual
void
calcGeometry
();
71
72
//- Initialise the patches for moving points
73
virtual
void
initMovePoints
(
const
pointField
&);
74
75
//- Correct patches after moving points
76
virtual
void
movePoints
(
const
pointField
&);
77
78
//- Initialise the update of the patch topology
79
virtual
void
initUpdateMesh
();
80
81
//- Update of the patch topology
82
virtual
void
updateMesh
();
83
84
85
public
:
86
87
//- Runtime type information
88
TypeName
(
"directMappedPatch"
);
89
90
91
// Constructors
92
93
//- Construct from components
94
directMappedPolyPatch
95
(
96
const
word
&
name
,
97
const
label size,
98
const
label
start
,
99
const
label
index
,
100
const
polyBoundaryMesh
& bm
101
);
102
103
//- Construct from components
104
directMappedPolyPatch
105
(
106
const
word
& name,
107
const
label size,
108
const
label start,
109
const
label index,
110
const
word
&
sampleRegion
,
111
const
directMappedPatchBase::sampleMode
mode
,
112
const
word
&
samplePatch
,
113
const
vectorField
& offset,
114
const
polyBoundaryMesh
& bm
115
);
116
117
//- Construct from components. Uniform offset.
118
directMappedPolyPatch
119
(
120
const
word
& name,
121
const
label size,
122
const
label start,
123
const
label index,
124
const
word
& sampleRegion,
125
const
directMappedPatchBase::sampleMode
mode,
126
const
word
& samplePatch,
127
const
vector
& offset,
128
const
polyBoundaryMesh
& bm
129
);
130
131
//- Construct from dictionary
132
directMappedPolyPatch
133
(
134
const
word
& name,
135
const
dictionary
& dict,
136
const
label index,
137
const
polyBoundaryMesh
& bm
138
);
139
140
//- Construct as copy, resetting the boundary mesh
141
directMappedPolyPatch
142
(
143
const
directMappedPolyPatch
&,
144
const
polyBoundaryMesh
&
145
);
146
147
//- Construct given the original patch and resetting the
148
// face list and boundary mesh information
149
directMappedPolyPatch
150
(
151
const
directMappedPolyPatch
& pp,
152
const
polyBoundaryMesh
& bm,
153
const
label index,
154
const
label newSize,
155
const
label newStart
156
);
157
158
//- Construct and return a clone, resetting the boundary mesh
159
virtual
autoPtr<polyPatch>
clone
(
const
polyBoundaryMesh
& bm)
const
160
{
161
return
autoPtr<polyPatch>
(
new
directMappedPolyPatch
(*
this
, bm));
162
}
163
164
//- Construct and return a clone, resetting the face list
165
// and boundary mesh
166
virtual
autoPtr<polyPatch>
clone
167
(
168
const
polyBoundaryMesh
& bm,
169
const
label index,
170
const
label newSize,
171
const
label newStart
172
)
const
173
{
174
return
autoPtr<polyPatch>
175
(
176
new
directMappedPolyPatch
(*
this
, bm, index, newSize, newStart)
177
);
178
}
179
180
181
//- Destructor
182
virtual
~directMappedPolyPatch
();
183
184
185
// Member functions
186
187
//- Write the polyPatch data as a dictionary
188
virtual
void
write
(
Ostream
&)
const
;
189
};
190
191
192
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193
194
}
// End namespace Foam
195
196
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197
198
#endif
199
200
// ************************ vim: set sw=4 sts=4 et: ************************ //