OpenFOAM: API Guide
v2112
The open source CFD toolbox
IOmapDistributePolyMesh.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 | www.openfoam.com
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
Copyright (C) 2015 OpenFOAM Foundation
9
Copyright (C) 2022 OpenCFD Ltd.
10
-------------------------------------------------------------------------------
11
License
12
This file is part of OpenFOAM.
13
14
OpenFOAM is free software: you can redistribute it and/or modify it
15
under the terms of the GNU General Public License as published by
16
the Free Software Foundation, either version 3 of the License, or
17
(at your option) any later version.
18
19
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22
for more details.
23
24
You should have received a copy of the GNU General Public License
25
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27
Class
28
Foam::IOmapDistributePolyMesh
29
30
Description
31
IOmapDistributePolyMesh is derived from mapDistributePolyMesh and
32
IOobject to give the mapDistributePolyMesh
33
automatic IO functionality via the objectRegistry.
34
35
SourceFiles
36
IOmapDistributePolyMesh.C
37
38
\*---------------------------------------------------------------------------*/
39
40
#ifndef Foam_IOmapDistributePolyMesh_H
41
#define Foam_IOmapDistributePolyMesh_H
42
43
#include "
mapDistributePolyMesh.H
"
44
#include "
regIOobject.H
"
45
#include "
refPtr.H
"
46
47
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49
namespace
Foam
50
{
51
52
/*---------------------------------------------------------------------------*\
53
Class IOmapDistributePolyMesh Declaration
54
\*---------------------------------------------------------------------------*/
55
56
class
IOmapDistributePolyMesh
57
:
58
public
regIOobject
,
59
public
mapDistributePolyMesh
60
{
61
// Private Member Functions
62
63
//- Read if IOobject flags set. Return true if read.
64
bool
readContents();
65
66
public
:
67
68
//- Runtime type information
69
TypeName
(
"mapDistributePolyMesh"
);
70
71
72
// Constructors
73
74
//- Construct from IOobject
75
explicit
IOmapDistributePolyMesh
(
const
IOobject
&
io
);
76
77
//- Construct from IOobject, copying mapDistributePolyMesh contents
78
IOmapDistributePolyMesh
79
(
80
const
IOobject
&
io
,
81
const
mapDistributePolyMesh
& map
82
);
83
84
//- Construct from IOobject, moving mapDistributePolyMesh contents
85
IOmapDistributePolyMesh
86
(
87
const
IOobject
&
io
,
88
mapDistributePolyMesh
&& map
89
);
90
91
92
//- Destructor
93
virtual
~IOmapDistributePolyMesh
() =
default
;
94
95
96
// Member Functions
97
98
//- The readData method for regIOobject read operation
99
virtual
bool
readData
(
Istream
& is);
100
101
//- The writeData method for regIOobject write operation
102
virtual
bool
writeData
(
Ostream
&
os
)
const
;
103
};
104
105
106
/*---------------------------------------------------------------------------*\
107
Class IOmapDistributePolyMeshRef Declaration
108
\*---------------------------------------------------------------------------*/
109
110
//- A IOmapDistributePolyMesh wrapper for using referenced external data.
111
class
IOmapDistributePolyMeshRef
112
:
113
public
regIOobject
114
{
115
// Private Data
116
117
//- Reference to the external content
118
refPtr<mapDistributePolyMesh>
contentRef_;
119
120
public
:
121
122
//- Type is identical to IOmapDistributePolyMesh
123
virtual
const
word
&
type
()
const
124
{
125
return
IOmapDistributePolyMesh::typeName
;
126
}
127
128
129
// Generated Methods
130
131
//- No default construct
132
IOmapDistributePolyMeshRef
() =
delete
;
133
134
//- No copy construct
135
IOmapDistributePolyMeshRef
(
const
IOmapDistributePolyMeshRef
&) =
delete
;
136
137
//- No copy assignment
138
void
operator=
(
const
IOmapDistributePolyMeshRef
&) =
delete
;
139
140
141
// Constructors
142
143
//- Construct from IOobject and const data reference
144
IOmapDistributePolyMeshRef
145
(
146
const
IOobject
&
io
,
147
const
mapDistributePolyMesh
& map
148
);
149
150
151
//- Destructor
152
virtual
~IOmapDistributePolyMeshRef
() =
default
;
153
154
155
// Member Functions
156
157
//- Allow cast to const content
158
// Fatal if content is not set
159
operator
const
mapDistributePolyMesh
&()
const
160
{
161
return
contentRef_.
cref
();
162
}
163
164
//- The readData method for regIOobject read operation
165
// Fatal if content is constant (or not set)
166
virtual
bool
readData
(
Istream
& is);
167
168
//- The writeData method for regIOobject write operation
169
// Fatal if content is not set
170
virtual
bool
writeData
(
Ostream
&
os
)
const
;
171
};
172
173
174
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175
176
}
// End namespace Foam
177
178
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179
180
#endif
181
182
// ************************************************************************* //
Foam::IOmapDistributePolyMeshRef
A IOmapDistributePolyMesh wrapper for using referenced external data.
Definition:
IOmapDistributePolyMesh.H:113
Foam::IOmapDistributePolyMeshRef::IOmapDistributePolyMeshRef
IOmapDistributePolyMeshRef()=delete
No default construct.
Foam::IOmapDistributePolyMeshRef::IOmapDistributePolyMeshRef
IOmapDistributePolyMeshRef(const IOmapDistributePolyMeshRef &)=delete
No copy construct.
Foam::IOmapDistributePolyMeshRef::writeData
virtual bool writeData(Ostream &os) const
The writeData method for regIOobject write operation.
Definition:
IOmapDistributePolyMesh.C:158
Foam::IOmapDistributePolyMeshRef::readData
virtual bool readData(Istream &is)
The readData method for regIOobject read operation.
Definition:
IOmapDistributePolyMesh.C:151
Foam::IOmapDistributePolyMeshRef::type
virtual const word & type() const
Type is identical to IOmapDistributePolyMesh.
Definition:
IOmapDistributePolyMesh.H:122
Foam::IOmapDistributePolyMeshRef::~IOmapDistributePolyMeshRef
virtual ~IOmapDistributePolyMeshRef()=default
Destructor.
Foam::IOmapDistributePolyMeshRef::operator=
void operator=(const IOmapDistributePolyMeshRef &)=delete
No copy assignment.
Foam::IOmapDistributePolyMesh
IOmapDistributePolyMesh is derived from mapDistributePolyMesh and IOobject to give the mapDistributeP...
Definition:
IOmapDistributePolyMesh.H:59
Foam::IOmapDistributePolyMesh::~IOmapDistributePolyMesh
virtual ~IOmapDistributePolyMesh()=default
Destructor.
Foam::IOmapDistributePolyMesh::TypeName
TypeName("mapDistributePolyMesh")
Runtime type information.
Foam::IOmapDistributePolyMesh::writeData
virtual bool writeData(Ostream &os) const
The writeData method for regIOobject write operation.
Definition:
IOmapDistributePolyMesh.C:144
Foam::IOmapDistributePolyMesh::readData
virtual bool readData(Istream &is)
The readData method for regIOobject read operation.
Definition:
IOmapDistributePolyMesh.C:137
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition:
IOobject.H:170
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition:
Istream.H:64
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition:
Ostream.H:62
Foam::mapDistributePolyMesh
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Definition:
mapDistributePolyMesh.H:67
Foam::refPtr
A class for managing references or pointers (no reference counting)
Definition:
refPtr.H:58
Foam::refPtr::cref
const T & cref() const
Definition:
refPtrI.H:189
Foam::regIOobject
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition:
regIOobject.H:76
Foam::word
A class for handling words, derived from Foam::string.
Definition:
word.H:68
os
OBJstream os(runTime.globalPath()/outputName)
io
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
mapDistributePolyMesh.H
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:34
refPtr.H
regIOobject.H
Foam::ensightPTraits::typeName
static const char *const typeName
The type name used in ensight case files.
Definition:
ensightPTraits.H:56
TypeName
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition:
typeInfo.H:73
src
OpenFOAM
meshes
polyMesh
mapPolyMesh
mapDistribute
IOmapDistributePolyMesh.H
Generated by
1.9.5
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.