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 -------------------------------------------------------------------------------
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::emptyFaPatch
28 
29 Description
30  A patch which will not exist in the faMesh. Typical example is a front and
31  back plane of a 2-D geometry
32 
33 Author
34  Zeljko Tukovic, FMENA
35  Hrvoje Jasak, Wikki Ltd.
36 
37 SourceFiles
38  emptyFaPatch.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef emptyFaPatch_H
43 #define emptyFaPatch_H
44 
45 #include "faPatch.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class emptyFaPatch Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class emptyFaPatch
57 :
58  public faPatch
59 {
60 
61 public:
62 
63  //- Runtime type information
64  TypeName("empty");
65 
66 
67  // Constructors
68 
69  //- Construct from components
71  (
72  const word& name,
73  const labelList& edgeLabels,
74  const label index,
75  const faBoundaryMesh& bm,
76  const label ngbPolyPatchIndex
77  )
78  :
79  faPatch(name, edgeLabels, index, bm, ngbPolyPatchIndex)
80  {}
81 
82  //- Construct from dictionary
84  (
85  const word& name,
86  const dictionary& dict,
87  const label index,
88  const faBoundaryMesh& bm
89  )
90  :
91  faPatch(name, dict, index, bm)
92  {}
93 
94  //- Construct and return a clone, resetting the edge list
95  // and boundary mesh
97  (
98  const faBoundaryMesh& bm,
99  const labelList& edgeLabels,
100  const label index,
101  const label ngbPolyPatchIndex
102  ) const
103  {
104  return autoPtr<faPatch>
105  (
106  new emptyFaPatch
107  (
108  name(),
109  edgeLabels,
110  index,
111  bm,
113  )
114  );
115  }
116 
117  // Member Functions
118 
119  virtual label size() const
120  {
121  return 0;
122  }
123 
124  //- Return face normals. Over-riding base class return to get zero size
125  //
126 // virtual const vectorField& edgeNormals() const;
127 
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
Foam::emptyFaPatch::emptyFaPatch
emptyFaPatch(const word &name, const labelList &edgeLabels, const label index, const faBoundaryMesh &bm, const label ngbPolyPatchIndex)
Construct from components.
Definition: emptyFaPatch.H:70
Foam::faPatch::ngbPolyPatchIndex
label ngbPolyPatchIndex() const
Return neighbour polyPatch index.
Definition: faPatch.C:120
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::emptyFaPatch::size
virtual label size() const
Patch size.
Definition: emptyFaPatch.H:118
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:55
Foam::faBoundaryMesh
Finite area boundary mesh.
Definition: faBoundaryMesh.H:66
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:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
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::List< label >::clone
autoPtr< List< label > > clone() const
Clone.
Definition: ListI.H:99
Foam::faPatch
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:68
Foam::patchIdentifier::name
const word & name() const
The patch name.
Definition: patchIdentifier.H:134
Foam::patchIdentifier::index
label index() const
The index of this patch in the boundaryMesh.
Definition: patchIdentifier.H:158