The open source CFD toolbox
boundaryPatch.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-2016 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
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
27Class
28 Foam::boundaryPatch
29
30Description
31 Like polyPatch but without reference to mesh.
32 Used in boundaryMesh to hold data on patches.
33 The patchIdentifier::index is set, but not used.
34
35SourceFiles
36 boundaryPatch.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef Foam_boundaryPatch_H
41#define Foam_boundaryPatch_H
42
43#include "patchIdentifier.H"
44#include "autoPtr.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51/*---------------------------------------------------------------------------*\
52 Class boundaryPatch Declaration
53\*---------------------------------------------------------------------------*/
55class boundaryPatch
56:
57 public patchIdentifier
58{
59 // Private Data
60
61 label size_;
62
63 label start_;
64
65public:
66
67 // Generated Methods: copy construct, copy assignment
68
69
70 // Constructors
71
72 //- Construct from components
74 (
75 const word& name,
76 const label index,
77 const label size,
78 const label start,
80 );
81
82 //- Construct from dictionary
84 (
85 const word& name,
86 const dictionary& dict,
87 const label index
88 );
89
90 //- Copy construct, resetting the index
91 boundaryPatch(const boundaryPatch& p, const label index);
92
93
94 //- Clone
96 {
97 return autoPtr<boundaryPatch>::New(*this);
98 }
99
100
101 // Member Functions
103 label size() const
104 {
105 return size_;
106 }
108 label& size()
109 {
110 return size_;
111 }
113 label start() const
114 {
115 return start_;
116 }
118 label& start()
119 {
120 return start_;
121 }
122
123
124 //- Write dictionary entries (without surrounding braces)
125 virtual void write(Ostream& os) const;
126};
127
128
129// Global Operators
130
131//- Write boundaryPatch as dictionary entries (without surrounding braces)
132Ostream& operator<<(Ostream&, const boundaryPatch& p);
133
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137} // End namespace Foam
138
139// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141#endif
142
143// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Definition: Time.C:717
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Like polyPatch but without reference to mesh. Used in boundaryMesh to hold data on patches....
Definition: boundaryPatch.H:57
label start() const
label size() const
autoPtr< boundaryPatch > clone() const
Clone.
Definition: boundaryPatch.H:94
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Identifies a patch by name and index, with optional physical type and group information.
const word & physicalType() const noexcept
The (optional) physical type of the patch.
label index() const noexcept
The index of this patch in the boundaryMesh.
const word & name() const noexcept
The patch name.
A class for handling words, derived from Foam::string.
Definition: word.H:68
volScalarField & p
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
runTime write()
dictionary dict