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 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::emptyFaPatch
29 
30 Description
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 
34 Author
35  Zeljko Tukovic, FMENA
36  Hrvoje Jasak, Wikki Ltd.
37 
38 SourceFiles
39  emptyFaPatch.C
40 
41 \*---------------------------------------------------------------------------*/
42 
43 #ifndef emptyFaPatch_H
44 #define emptyFaPatch_H
45 
46 #include "faPatch.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class emptyFaPatch Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 class emptyFaPatch
58 :
59  public faPatch
60 {
61 public:
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 ngbPolyPatchIndex = -1
76  );
77 
78  //- Construct from components
80  (
81  const word& name,
82  const labelList& edgeLabels,
83  const label index,
84  const faBoundaryMesh& bm,
85  const label ngbPolyPatchIndex
86  );
87 
88  //- Construct from dictionary
90  (
91  const word& name,
92  const dictionary& dict,
93  const label index,
94  const faBoundaryMesh& bm
95  )
96  :
97  faPatch(name, dict, index, bm)
98  {}
99 
100  //- Construct and return a clone, resetting the edge list
101  // and boundary mesh
103  (
104  const faBoundaryMesh& bm,
105  const labelList& edgeLabels,
106  const label index,
107  const label ngbPolyPatchIndex
108  ) const
109  {
110  return autoPtr<faPatch>
111  (
112  new emptyFaPatch
113  (
114  name(),
115  edgeLabels,
116  index,
117  bm,
119  )
120  );
121  }
122 
123 
124  // Member Functions
125 
126  virtual label size() const
127  {
128  return 0;
129  }
130 
131  //- Return face normals. Over-riding base class return to get zero size
132  //
133 // virtual const vectorField& edgeNormals() const;
134 };
135 
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 } // End namespace Foam
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #endif
144 
145 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::emptyFaPatch::size
virtual label size() const
Patch size is the number of edge labels.
Definition: emptyFaPatch.H:125
Foam::emptyFaPatch
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:56
Foam::faPatch::edgeLabels
const labelList & edgeLabels() const noexcept
Return the list of edges.
Definition: faPatch.H:225
Foam::emptyFaPatch::emptyFaPatch
emptyFaPatch(const word &name, const label index, const faBoundaryMesh &bm, const label ngbPolyPatchIndex=-1)
Minimal construct from components.
Definition: emptyFaPatch.C:48
Foam::faBoundaryMesh
Finite area boundary mesh.
Definition: faBoundaryMesh.H:65
Foam::emptyFaPatch::TypeName
TypeName("empty")
Runtime type information.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::patchIdentifier::index
label index() const noexcept
The index of this patch in the boundaryMesh.
Definition: patchIdentifier.H:147
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::List< label >
faPatch.H
Foam::patchIdentifier::name
const word & name() const noexcept
The patch name.
Definition: patchIdentifier.H:135
Foam::List::clone
autoPtr< List< T > > clone() const
Clone.
Definition: ListI.H:100
Foam::faPatch
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:69
Foam::faPatch::ngbPolyPatchIndex
label ngbPolyPatchIndex() const noexcept
The neighbour polyPatch index.
Definition: faPatch.H:246