OpenFOAM
v2406
The open source CFD toolbox
faBoundaryMeshEntries.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) 2022-2023 OpenCFD Ltd.
9
-------------------------------------------------------------------------------
10
License
11
This file is part of OpenFOAM.
12
13
OpenFOAM is free software: you can redistribute it and/or modify it
14
under the terms of the GNU General Public License as published by
15
the Free Software Foundation, either version 3 of the License, or
16
(at your option) any later version.
17
18
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21
for more details.
22
23
You should have received a copy of the GNU General Public License
24
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26
Class
27
Foam::faBoundaryMeshEntries
28
29
Description
30
Read and store dictionary entries for finite-area boundary patches.
31
The object is *never* registered to avoid registry name clashes with
32
faBoundaryMesh, which may either already have been registered, or
33
which should subsequently be registered.
34
35
SourceFiles
36
faBoundaryMeshEntries.C
37
38
\*---------------------------------------------------------------------------*/
39
40
#ifndef Foam_faBoundaryMeshEntries_H
41
#define Foam_faBoundaryMeshEntries_H
42
43
#include "
regIOobject.H
"
44
#include "
PtrList.H
"
45
#include "
entry.H
"
46
#include "
wordList.H
"
47
48
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50
namespace
Foam
51
{
52
53
/*---------------------------------------------------------------------------*\
54
Class faBoundaryMeshEntries Declaration
55
\*---------------------------------------------------------------------------*/
56
57
class
faBoundaryMeshEntries
58
:
59
public
PtrList
<entry>,
60
public
regIOobject
61
{
62
public
:
63
64
//- Runtime type information
65
TypeNameNoDebug
(
"faBoundaryMesh"
);
66
67
68
// Constructors
69
70
//- Read construct from IOobject. Never register!
71
explicit
faBoundaryMeshEntries
(
const
IOobject
&
io
);
72
73
74
// Factory Methods
75
76
//- Read and return contents. The IOobject is never registered
77
static
PtrList<entry>
readContents
(
const
IOobject
&
io
);
78
79
80
// Static Functions
81
82
//- Truncate entries at the first processor patch entry
83
static
void
removeProcPatches
(
PtrList<entry>
& entries);
84
85
//- Write list of entries
86
static
bool
writeEntries
(
Ostream
&
os
,
const
UPtrList<entry>
& entries);
87
88
//- Return a list of patch types, uses the "patch" entry
89
static
wordList
types
(
const
UPtrList<entry>
& entries);
90
91
92
// Member Functions
93
94
//- Truncate at the first processor patch entry
95
void
removeProcPatches
();
96
97
98
// Characteristics
99
100
//- Return a list of patch types, uses the "patch" entry
101
wordList
types
()
const
;
102
103
104
// Write
105
106
//- Write as a plain list of entries
107
void
writeEntry
(
Ostream
&
os
)
const
;
108
109
//- Write as a primitive entry with given name.
110
//- If the keyword is empty, revert to a plain list.
111
void
writeEntry
(
const
word
& keyword,
Ostream
&
os
)
const
;
112
113
//- The writeData member function required by regIOobject
114
virtual
bool
writeData
(
Ostream
&
os
)
const
;
115
116
//- Write using stream options, forces UNCOMPRESSED
117
virtual
bool
writeObject
118
(
119
IOstreamOption
streamOpt,
120
const
bool
writeOnProc =
true
121
)
const
;
122
};
123
124
125
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126
127
}
// End namespace Foam
128
129
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130
131
#endif
132
133
// ************************************************************************* //
Foam::faBoundaryMeshEntries::faBoundaryMeshEntries
faBoundaryMeshEntries(const IOobject &io)
Read construct from IOobject. Never register!
Definition:
faBoundaryMeshEntries.C:34
Foam::faBoundaryMeshEntries::writeEntries
static bool writeEntries(Ostream &os, const UPtrList< entry > &entries)
Write list of entries.
Definition:
faBoundaryMeshEntries.C:117
Foam::List< word >
Foam::faBoundaryMeshEntries::TypeNameNoDebug
TypeNameNoDebug("faBoundaryMesh")
Runtime type information.
Foam::IOstreamOption
A simple container for options an IOstream can normally have.
Definition:
IOstreamOption.H:59
entry.H
Foam::faBoundaryMeshEntries::writeEntry
void writeEntry(Ostream &os) const
Write as a plain list of entries.
Definition:
faBoundaryMeshEntries.C:171
Foam::word
A class for handling words, derived from Foam::string.
Definition:
word.H:63
Foam::faBoundaryMeshEntries::removeProcPatches
void removeProcPatches()
Truncate at the first processor patch entry.
Definition:
faBoundaryMeshEntries.C:159
Foam::UPtrList
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Definition:
HashTable.H:106
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition:
Ostream.H:56
os
OBJstream os(runTime.globalPath()/outputName)
Foam::faBoundaryMeshEntries::writeData
virtual bool writeData(Ostream &os) const
The writeData member function required by regIOobject.
Definition:
faBoundaryMeshEntries.C:197
Foam::faBoundaryMeshEntries
Read and store dictionary entries for finite-area boundary patches. The object is *never* registered ...
Definition:
faBoundaryMeshEntries.H:52
PtrList.H
regIOobject.H
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Definition:
List.H:55
Foam::faBoundaryMeshEntries::readContents
static PtrList< entry > readContents(const IOobject &io)
Read and return contents. The IOobject is never registered.
Definition:
faBoundaryMeshEntries.C:56
Foam::faBoundaryMeshEntries::types
wordList types() const
Return a list of patch types, uses the "patch" entry.
Definition:
faBoundaryMeshEntries.C:165
Foam::regIOobject
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition:
regIOobject.H:68
Foam::faBoundaryMeshEntries::writeObject
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc=true) const
Write using stream options, forces UNCOMPRESSED.
Definition:
faBoundaryMeshEntries.C:204
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:180
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:26
wordList.H
src
finiteArea
faMesh
faBoundaryMesh
faBoundaryMeshEntries.H
Generated by
1.8.14