emptyFaPatch.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) 2016-2017 Wikki Ltd
9 Copyright (C) 2021-2022 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::emptyFaPatch
29
30Description
31 A patch which will not exist in the faMesh. Typical example is a front and
32 back plane of a 2-D geometry
33
34Author
35 Zeljko Tukovic, FMENA
36 Hrvoje Jasak, Wikki Ltd.
37
38SourceFiles
39 emptyFaPatch.C
40
41\*---------------------------------------------------------------------------*/
42
43#ifndef Foam_emptyFaPatch_H
44#define Foam_emptyFaPatch_H
45
46#include "faPatch.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52
53/*---------------------------------------------------------------------------*\
54 Class emptyFaPatch Declaration
55\*---------------------------------------------------------------------------*/
57class emptyFaPatch
58:
59 public faPatch
60{
61public:
62
63 //- Runtime type information
64 TypeName("empty");
65
66
67 // Constructors
68
69 //- Minimal construct from components
71 (
72 const word& name,
73 const label index,
74 const faBoundaryMesh& bm,
75 const label nbrPolyPatchi = -1,
76 const word& patchType = typeName
77 );
78
79 //- Construct from components
81 (
82 const word& name,
84 const label index,
85 const faBoundaryMesh& bm,
86 const label nbrPolyPatchi = -1,
87 const word& patchType = typeName
88 );
89
90 //- Construct from dictionary
92 (
93 const word& name,
94 const dictionary& dict,
95 const label index,
96 const faBoundaryMesh& bm,
97 const word& patchType
98 );
99
100 //- Copy construct, resetting the boundary mesh
101 emptyFaPatch(const emptyFaPatch& p, const faBoundaryMesh& bm);
102
103 //- Copy construct, resetting boundary mesh and addressing
105 (
106 const emptyFaPatch& p,
107 const faBoundaryMesh& bm,
108 const label index,
109 const labelUList& edgeLabels,
110 const label nbrPolyPatchi = -1
111 );
112
113
114 //- Construct and return a clone, resetting the boundary mesh
115 virtual autoPtr<faPatch> clone(const faBoundaryMesh& bm) const
116 {
117 return autoPtr<faPatch>(new emptyFaPatch(*this, bm));
118 }
119
120 //- Construct and return a clone, resetting the edge list
121 // and boundary mesh
122 virtual autoPtr<faPatch> clone
123 (
124 const faBoundaryMesh& bm,
125 const labelUList& edgeLabels,
126 const label index,
127 const label nbrPolyPatchi = -1
128 ) const
129 {
130 return autoPtr<faPatch>
131 (
132 new emptyFaPatch(*this, bm, index, edgeLabels, nbrPolyPatchi)
133 );
134 }
135
136
137 // Member Functions
139 virtual label size() const
140 {
141 return 0;
142 }
143
144 //- Return face normals. Over-riding base class return to get zero size
145 //
146// virtual const vectorField& edgeNormals() const;
147};
148
149
150// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151
152} // End namespace Foam
153
154// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155
156#endif
157
158// ************************************************************************* //
autoPtr< List< label > > clone() const
Clone.
Definition: ListI.H:100
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A patch which will not exist in the faMesh. Typical example is a front and back plane of a 2-D geomet...
Definition: emptyFaPatch.H:59
virtual label size() const
Patch size is the number of edge labels.
Definition: emptyFaPatch.H:138
TypeName("empty")
Runtime type information.
virtual autoPtr< faPatch > clone(const faBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
Definition: emptyFaPatch.H:114
Finite area boundary mesh.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:78
const labelList & edgeLabels() const noexcept
Return the list of edges.
Definition: faPatch.H:275
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
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73