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
surfMesh
MeshedSurfaceAllocator
MeshedSurfaceIOAllocator.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::MeshedSurfaceIOAllocator
26
27
Description
28
A helper class for storing points, faces and zones with IO capabilities.
29
30
SourceFiles
31
MeshedSurfaceIOAllocator.C
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef MeshedSurfaceIOAllocator_H
36
#define MeshedSurfaceIOAllocator_H
37
38
#include <
OpenFOAM/pointIOField.H
>
39
#include <
OpenFOAM/faceIOList.H
>
40
#include <
surfMesh/surfZoneIOList.H
>
41
42
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44
namespace
Foam
45
{
46
47
/*---------------------------------------------------------------------------*\
48
Class MeshedSurfaceIOAllocator Declaration
49
\*---------------------------------------------------------------------------*/
50
51
//- A helper class for storing points, faces and zones
52
class
MeshedSurfaceIOAllocator
53
{
54
// Private data
55
56
//- Points
57
pointIOField
points_;
58
59
//- Faces
60
faceIOList
faces_;
61
62
//- Surface zones
63
surfZoneIOList
zones_;
64
65
66
// Private Member Functions
67
68
//- Disallow default bitwise copy construct
69
MeshedSurfaceIOAllocator
(
const
MeshedSurfaceIOAllocator
&);
70
71
//- Disallow default bitwise assignment
72
void
operator=(
const
MeshedSurfaceIOAllocator
&);
73
74
75
public
:
76
77
// Constructors
78
79
//- Read construct from IOobjects
80
MeshedSurfaceIOAllocator
81
(
82
const
IOobject
&
ioPoints
,
83
const
IOobject
& ioFaces,
84
const
IOobject
& ioZones
85
);
86
87
//- Construct from IOobjects, copying components
88
MeshedSurfaceIOAllocator
89
(
90
const
IOobject
& ioPoints,
91
const
pointField
&
points
,
92
const
IOobject
& ioFaces,
93
const
faceList
& faces,
94
const
IOobject
& ioZones,
95
const
surfZoneList
& zones
96
);
97
98
//- Construct from IOobjects, possibly transferring components
99
MeshedSurfaceIOAllocator
100
(
101
const
IOobject
& ioPoints,
102
const
Xfer< pointField >
& points,
103
const
IOobject
& ioFaces,
104
const
Xfer< faceList >
& faces,
105
const
IOobject
& ioZones,
106
const
Xfer< surfZoneList >
& zones
107
);
108
109
// Destructor
110
111
112
// Member Functions
113
114
// Access
115
116
//- Non-const access to the points
117
pointIOField
&
storedIOPoints
()
118
{
119
return
points_;
120
}
121
122
//- Non-const access to the faces
123
faceIOList
&
storedIOFaces
()
124
{
125
return
faces_;
126
}
127
128
//- Non-const access to the zones
129
surfZoneIOList
&
storedIOZones
()
130
{
131
return
zones_;
132
}
133
134
//- Const access to the points
135
const
pointIOField
&
storedIOPoints
()
const
136
{
137
return
points_;
138
}
139
140
//- Const access to the faces
141
const
faceIOList
&
storedIOFaces
()
const
142
{
143
return
faces_;
144
}
145
146
//- Const access to the zones
147
const
surfZoneIOList
&
storedIOZones
()
const
148
{
149
return
zones_;
150
}
151
152
153
// Storage management
154
155
//- Clear primitive data (points, faces and zones)
156
void
clear
();
157
158
//- Reset primitive data (points, faces and zones)
159
// Note, optimized to avoid overwriting data (with Xfer::null)
160
void
resetFaces
161
(
162
const
Xfer< faceList >
& faces,
163
const
Xfer< surfZoneList >
& zones
164
);
165
166
//- Reset primitive data (points, faces and zones)
167
// Note, optimized to avoid overwriting data (with Xfer::null)
168
void
reset
169
(
170
const
Xfer< pointField >
& points,
171
const
Xfer< faceList >
& faces,
172
const
Xfer< surfZoneList >
& zones
173
);
174
175
//- Reset primitive data (points, faces and zones)
176
// Note, optimized to avoid overwriting data (with Xfer::null)
177
void
reset
178
(
179
const
Xfer
<
List<point>
>& points,
180
const
Xfer< faceList >
& faces,
181
const
Xfer< surfZoneList >
& zones
182
);
183
};
184
185
186
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187
188
}
// End namespace Foam
189
190
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191
192
#endif
193
194
// ************************ vim: set sw=4 sts=4 et: ************************ //