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
pointMesh.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::pointMesh
26
27
Description
28
Mesh representing a set of points created from polyMesh.
29
30
\*---------------------------------------------------------------------------*/
31
32
#ifndef pointMesh_H
33
#define pointMesh_H
34
35
#include <
OpenFOAM/GeoMesh.H
>
36
#include <
OpenFOAM/MeshObject.H
>
37
#include <
OpenFOAM/polyMesh.H
>
38
#include <
OpenFOAM/pointBoundaryMesh.H
>
39
40
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41
42
namespace
Foam
43
{
44
45
/*---------------------------------------------------------------------------*\
46
Class pointMesh Declaration
47
\*---------------------------------------------------------------------------*/
48
49
class
pointMesh
50
:
51
public
MeshObject
<polyMesh, pointMesh>,
52
public
GeoMesh
<polyMesh>
53
{
54
// Permanent data
55
56
//- Boundary mesh
57
pointBoundaryMesh
boundary_;
58
59
60
// Private Member Functions
61
62
//- Map all fields
63
void
mapFields(
const
mapPolyMesh
&);
64
65
//- Disallow default bitwise copy construct
66
pointMesh
(
const
pointMesh
&);
67
68
//- Disallow default bitwise assignment
69
void
operator=(
const
pointMesh
&);
70
71
72
public
:
73
74
typedef
pointMesh
Mesh
;
75
typedef
pointBoundaryMesh
BoundaryMesh
;
76
77
78
// Constructors
79
80
//- Construct from polyMesh
81
explicit
pointMesh
82
(
83
const
polyMesh
& pMesh,
84
bool
alwaysConstructGlobalPatch =
false
85
);
86
87
88
// Member Functions
89
90
//- Return number of points
91
label
size
()
const
92
{
93
return
size
(*
this
);
94
}
95
96
//- Return number of points
97
static
label
size
(
const
Mesh
&
mesh
)
98
{
99
return
mesh.
GeoMesh
<
polyMesh
>
::mesh_
.
nPoints
();
100
}
101
102
//- Return reference to boundary mesh
103
const
pointBoundaryMesh
&
boundary
()
const
104
{
105
return
boundary_;
106
}
107
108
//- Return parallel info
109
const
globalMeshData
&
globalData
()
const
110
{
111
return
GeoMesh<polyMesh>::mesh_
.globalData();
112
}
113
114
//- Return database. For now is its polyMesh.
115
const
objectRegistry
&
thisDb
()
const
116
{
117
return
GeoMesh<polyMesh>::mesh_
.
thisDb
();
118
}
119
120
121
// Mesh motion
122
123
//- Move points, returns volumes swept by faces in motion
124
void
movePoints
(
const
pointField
&);
125
126
//- Update the mesh corresponding to given map
127
void
updateMesh
(
const
mapPolyMesh
& mpm);
128
129
130
// Member Operators
131
132
bool
operator!=
(
const
pointMesh
& pm)
const
133
{
134
return
&pm !=
this
;
135
}
136
137
bool
operator==
(
const
pointMesh
& pm)
const
138
{
139
return
&pm ==
this
;
140
}
141
};
142
143
144
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145
146
}
// End namespace Foam
147
148
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149
150
#endif
151
152
// ************************ vim: set sw=4 sts=4 et: ************************ //