OpenFOAM
v2406
The open source CFD toolbox
polyBoundaryMeshEntries.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) 2011-2015 OpenFOAM Foundation
9
Copyright (C) 2020-2023 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::polyBoundaryMeshEntries
29
30
Description
31
Read and store dictionary entries for boundary patches
32
The object is *never* registered to avoid registry name clashes with
33
polyBoundaryMesh, which may either already have been registered, or
34
which should subsequently be registered.
35
36
SourceFiles
37
polyBoundaryMeshEntries.C
38
39
\*---------------------------------------------------------------------------*/
40
41
#ifndef Foam_polyBoundaryMeshEntries_H
42
#define Foam_polyBoundaryMeshEntries_H
43
44
#include "
regIOobject.H
"
45
#include "
PtrList.H
"
46
#include "
entry.H
"
47
#include "
wordList.H
"
48
49
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51
namespace
Foam
52
{
53
54
/*---------------------------------------------------------------------------*\
55
Class polyBoundaryMeshEntries Declaration
56
\*---------------------------------------------------------------------------*/
57
58
class
polyBoundaryMeshEntries
59
:
60
public
PtrList
<entry>,
61
public
regIOobject
62
{
63
public
:
64
65
//- Runtime type information
66
TypeNameNoDebug
(
"polyBoundaryMesh"
);
67
68
69
// Constructors
70
71
//- Read construct from IOobject. Never register!
72
explicit
polyBoundaryMeshEntries
(
const
IOobject
&
io
);
73
74
75
// Factory Methods
76
77
//- Read and return contents. The IOobject is never registered
78
static
PtrList<entry>
readContents
(
const
IOobject
&
io
);
79
80
81
// Static Functions
82
83
//- Truncate entries at the first processor patch entry
84
static
void
removeProcPatches
(
PtrList<entry>
& entries);
85
86
//- Write list of entries
87
static
bool
writeEntries
(
Ostream
&
os
,
const
UPtrList<entry>
& entries);
88
89
//- Return a list of patch types, uses the "patch" entry
90
static
wordList
types
(
const
UPtrList<entry>
& entries);
91
92
//- Return a list of patch start face indices, uses "startFace" entry
93
static
labelList
patchStarts
(
const
UPtrList<entry>
& entries);
94
95
//- Return a list of patch sizes, uses "nFaces" entry
96
static
labelList
patchSizes
(
const
UPtrList<entry>
& entries);
97
98
99
// Member Functions
100
101
//- Truncate at the first processor patch entry
102
void
removeProcPatches
();
103
104
105
// Characteristics
106
107
//- Return a list of patch types, uses the "patch" entry
108
wordList
types
()
const
;
109
110
//- Return a list of patch start face indices, uses "startFace" entry
111
labelList
patchStarts
()
const
;
112
113
//- Return a list of patch sizes, uses "nFaces" entry
114
labelList
patchSizes
()
const
;
115
116
117
// Write
118
119
//- Write as a plain list of entries
120
void
writeEntry
(
Ostream
&
os
)
const
;
121
122
//- Write as a primitive entry with given name.
123
//- If the keyword is empty, revert to a plain list.
124
void
writeEntry
(
const
word
& keyword,
Ostream
&
os
)
const
;
125
126
//- The writeData member function required by regIOobject
127
virtual
bool
writeData
(
Ostream
&
os
)
const
;
128
129
//- Write using stream options, forces UNCOMPRESSED
130
virtual
bool
writeObject
131
(
132
IOstreamOption
streamOpt,
133
const
bool
writeOnProc =
true
134
)
const
;
135
};
136
137
138
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139
140
}
// End namespace Foam
141
142
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143
144
#endif
145
146
// ************************************************************************* //
Foam::polyBoundaryMeshEntries::polyBoundaryMeshEntries
polyBoundaryMeshEntries(const IOobject &io)
Read construct from IOobject. Never register!
Definition:
polyBoundaryMeshEntries.C:35
Foam::polyBoundaryMeshEntries::removeProcPatches
void removeProcPatches()
Truncate at the first processor patch entry.
Definition:
polyBoundaryMeshEntries.C:178
Foam::polyBoundaryMeshEntries::writeObject
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc=true) const
Write using stream options, forces UNCOMPRESSED.
Definition:
polyBoundaryMeshEntries.C:235
Foam::List< word >
Foam::IOstreamOption
A simple container for options an IOstream can normally have.
Definition:
IOstreamOption.H:59
Foam::polyBoundaryMeshEntries::types
wordList types() const
Return a list of patch types, uses the "patch" entry.
Definition:
polyBoundaryMeshEntries.C:184
entry.H
Foam::polyBoundaryMeshEntries::writeEntries
static bool writeEntries(Ostream &os, const UPtrList< entry > &entries)
Write list of entries.
Definition:
polyBoundaryMeshEntries.C:118
Foam::word
A class for handling words, derived from Foam::string.
Definition:
word.H:63
Foam::polyBoundaryMeshEntries::readContents
static PtrList< entry > readContents(const IOobject &io)
Read and return contents. The IOobject is never registered.
Definition:
polyBoundaryMeshEntries.C:57
Foam::UPtrList
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Definition:
HashTable.H:106
Foam::polyBoundaryMeshEntries::patchSizes
labelList patchSizes() const
Return a list of patch sizes, uses "nFaces" entry.
Definition:
polyBoundaryMeshEntries.C:196
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition:
Ostream.H:56
Foam::polyBoundaryMeshEntries::writeEntry
void writeEntry(Ostream &os) const
Write as a plain list of entries.
Definition:
polyBoundaryMeshEntries.C:202
os
OBJstream os(runTime.globalPath()/outputName)
PtrList.H
regIOobject.H
Foam::polyBoundaryMeshEntries::patchStarts
labelList patchStarts() const
Return a list of patch start face indices, uses "startFace" entry.
Definition:
polyBoundaryMeshEntries.C:190
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Definition:
List.H:55
Foam::regIOobject
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition:
regIOobject.H:68
Foam::polyBoundaryMeshEntries::writeData
virtual bool writeData(Ostream &os) const
The writeData member function required by regIOobject.
Definition:
polyBoundaryMeshEntries.C:228
Foam::polyBoundaryMeshEntries::TypeNameNoDebug
TypeNameNoDebug("polyBoundaryMesh")
Runtime type information.
io
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Foam::polyBoundaryMeshEntries
Read and store dictionary entries for boundary patches The object is *never* registered to avoid regi...
Definition:
polyBoundaryMeshEntries.H:53
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition:
IOobject.H:180
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:26
wordList.H
src
OpenFOAM
meshes
polyMesh
polyBoundaryMesh
polyBoundaryMeshEntries.H
Generated by
1.8.14