Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::faBoundaryMeshEntries
28
29Description
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
35SourceFiles
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
50namespace Foam
51{
53/*---------------------------------------------------------------------------*\
54 Class faBoundaryMeshEntries Declaration
55\*---------------------------------------------------------------------------*/
56
58:
59 public PtrList<entry>,
60 public regIOobject
61{
62public:
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
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// ************************************************************************* //
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition IOobject.H:191
A simple container for options an IOstream can normally have.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
constexpr PtrList() noexcept
Definition PtrListI.H:29
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Definition UPtrList.H:101
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc=true) const
Write using stream options, forces UNCOMPRESSED.
wordList types() const
Return a list of patch types, uses the "patch" entry.
virtual bool writeData(Ostream &os) const
The writeData member function required by regIOobject.
static PtrList< entry > readContents(const IOobject &io)
Read and return contents. The IOobject is never registered.
TypeNameNoDebug("faBoundaryMesh")
Runtime type information.
static bool writeEntries(Ostream &os, const UPtrList< entry > &entries)
Write list of entries.
faBoundaryMeshEntries(const IOobject &io)
Read construct from IOobject. Never register!
void writeEntry(Ostream &os) const
Write as a plain list of entries.
void removeProcPatches()
Truncate at the first processor patch entry.
regIOobject(const IOobject &io, const bool isTimeObject=false)
Construct from IOobject. The optional flag adds special handling if the object is the top-level regIO...
Definition regIOobject.C:43
A class for handling words, derived from Foam::string.
Definition word.H:66
OBJstream os(runTime.globalPath()/outputName)
const auto & io
Namespace for OpenFOAM.
List< word > wordList
List of word.
Definition fileName.H:60
#define TypeNameNoDebug(TypeNameString)
Declare a ClassNameNoDebug() with extra virtual type info.
Definition typeInfo.H:61