OpenFOAM
v2312
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
46
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48
namespace
Foam
49
{
50
51
/*---------------------------------------------------------------------------*\
52
Class IOmapDistributePolyMesh Declaration
53
\*---------------------------------------------------------------------------*/
54
55
class
IOmapDistributePolyMesh
56
:
57
public
regIOobject
,
58
public
mapDistributePolyMesh
59
{
60
// Private Member Functions
61
62
//- Read if IOobject flags set. Return true if read.
63
bool
readContents();
64
65
public
:
66
67
//- Runtime type information
68
TypeName
(
"mapDistributePolyMesh"
);
69
70
71
// Constructors
72
73
//- Construct from IOobject
74
explicit
IOmapDistributePolyMesh
(
const
IOobject
&
io
);
75
76
//- Construct from IOobject, copying mapDistributePolyMesh contents
77
IOmapDistributePolyMesh
78
(
79
const
IOobject
&
io
,
80
const
mapDistributePolyMesh
& map
81
);
82
83
//- Construct from IOobject, moving mapDistributePolyMesh contents
84
IOmapDistributePolyMesh
85
(
86
const
IOobject
&
io
,
87
mapDistributePolyMesh
&& map
88
);
89
90
91
//- Destructor
92
virtual
~IOmapDistributePolyMesh
() =
default
;
93
94
95
// Member Functions
96
97
//- The readData method for regIOobject read operation
98
virtual
bool
readData
(
Istream
& is);
99
100
//- The writeData method for regIOobject write operation
101
virtual
bool
writeData
(
Ostream
&
os
)
const
;
102
};
103
104
105
/*---------------------------------------------------------------------------*\
106
Class IOmapDistributePolyMeshRef Declaration
107
\*---------------------------------------------------------------------------*/
108
109
//- A IOmapDistributePolyMesh wrapper for using referenced external data.
110
class
IOmapDistributePolyMeshRef
111
:
112
public
regIOobject
113
{
114
// Private Data
115
116
//- Reference to the external content
117
refPtr<mapDistributePolyMesh>
contentRef_;
118
119
public
:
120
121
//- Type is identical to IOmapDistributePolyMesh
122
virtual
const
word
&
type
()
const
123
{
124
return
IOmapDistributePolyMesh::typeName;
125
}
126
127
128
// Generated Methods
129
130
//- No default construct
131
IOmapDistributePolyMeshRef
() =
delete
;
132
133
//- No copy construct
134
IOmapDistributePolyMeshRef
(
const
IOmapDistributePolyMeshRef
&) =
delete
;
135
136
//- No copy assignment
137
void
operator=
(
const
IOmapDistributePolyMeshRef
&) =
delete
;
138
139
140
// Constructors
141
142
//- Construct from IOobject and const data reference
143
IOmapDistributePolyMeshRef
144
(
145
const
IOobject
&
io
,
146
const
mapDistributePolyMesh
& map
147
);
148
149
150
//- Destructor
151
virtual
~IOmapDistributePolyMeshRef
() =
default
;
152
153
154
// Member Functions
155
156
//- Allow cast to const content
157
// Fatal if content is not set
158
operator
const
mapDistributePolyMesh
&()
const
159
{
160
return
contentRef_.
cref
();
161
}
162
163
//- The readData method for regIOobject read operation
164
// Fatal if content is constant (or not set)
165
virtual
bool
readData
(
Istream
& is);
166
167
//- The writeData method for regIOobject write operation
168
// Fatal if content is not set
169
virtual
bool
writeData
(
Ostream
&
os
)
const
;
170
};
171
172
173
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174
175
}
// End namespace Foam
176
177
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178
179
#endif
180
181
// ************************************************************************* //
Foam::IOmapDistributePolyMesh::readData
virtual bool readData(Istream &is)
The readData method for regIOobject read operation.
Definition:
IOmapDistributePolyMesh.C:123
Foam::IOmapDistributePolyMeshRef::readData
virtual bool readData(Istream &is)
The readData method for regIOobject read operation.
Definition:
IOmapDistributePolyMesh.C:137
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition:
Istream.H:57
Foam::IOmapDistributePolyMeshRef::operator=
void operator=(const IOmapDistributePolyMeshRef &)=delete
No copy assignment.
mapDistributePolyMesh.H
Foam::mapDistributePolyMesh
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Definition:
mapDistributePolyMesh.H:65
Foam::refPtr::cref
const T & cref() const
Return const reference to the object or to the contents of a (non-null) managed pointer.
Definition:
refPtrI.H:216
Foam::IOmapDistributePolyMeshRef
A IOmapDistributePolyMesh wrapper for using referenced external data.
Definition:
IOmapDistributePolyMesh.H:123
Foam::IOmapDistributePolyMeshRef::IOmapDistributePolyMeshRef
IOmapDistributePolyMeshRef()=delete
No default construct.
Foam::refPtr
A class for managing references or pointers (no reference counting)
Definition:
HashPtrTable.H:49
Foam::IOmapDistributePolyMesh::~IOmapDistributePolyMesh
virtual ~IOmapDistributePolyMesh()=default
Destructor.
Foam::IOmapDistributePolyMeshRef::writeData
virtual bool writeData(Ostream &os) const
The writeData method for regIOobject write operation.
Definition:
IOmapDistributePolyMesh.C:144
Foam::word
A class for handling words, derived from Foam::string.
Definition:
word.H:63
Foam::IOmapDistributePolyMesh
IOmapDistributePolyMesh is derived from mapDistributePolyMesh and IOobject to give the mapDistributeP...
Definition:
IOmapDistributePolyMesh.H:50
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition:
Ostream.H:56
Foam::IOmapDistributePolyMeshRef::type
virtual const word & type() const
Type is identical to IOmapDistributePolyMesh.
Definition:
IOmapDistributePolyMesh.H:139
Foam::IOmapDistributePolyMeshRef::~IOmapDistributePolyMeshRef
virtual ~IOmapDistributePolyMeshRef()=default
Destructor.
os
OBJstream os(runTime.globalPath()/outputName)
Foam::IOmapDistributePolyMesh::TypeName
TypeName("mapDistributePolyMesh")
Runtime type information.
regIOobject.H
Foam::IOmapDistributePolyMesh::writeData
virtual bool writeData(Ostream &os) const
The writeData method for regIOobject write operation.
Definition:
IOmapDistributePolyMesh.C:130
Foam::regIOobject
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition:
regIOobject.H:66
io
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition:
IOobject.H:172
Foam::IOmapDistributePolyMesh::IOmapDistributePolyMesh
IOmapDistributePolyMesh(const IOobject &io)
Construct from IOobject.
Definition:
IOmapDistributePolyMesh.C:49
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:26
src
OpenFOAM
meshes
polyMesh
mapPolyMesh
mapDistribute
IOmapDistributePolyMesh.H
Generated by
1.8.14