emptyFaPatch.C
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) 2022 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 \*---------------------------------------------------------------------------*/
28 
29 #include "emptyFaPatch.H"
31 
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36 
37 // Patch name
38 defineTypeNameAndDebug(emptyFaPatch, 0);
39 
40 // Add the patch constructor functions to the hash tables
41 addToRunTimeSelectionTable(faPatch, emptyFaPatch, dictionary);
42 
43 } // End namespace Foam
44 
45 
46 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
47 
49 (
50  const word& name,
51  const label index,
52  const faBoundaryMesh& bm,
53  const label nbrPolyPatchi,
54  const word& patchType
55 )
56 :
57  emptyFaPatch(name, labelList(), index, bm, nbrPolyPatchi, patchType)
58 {}
59 
60 
62 (
63  const word& name,
64  const labelUList& edgeLabels,
65  const label index,
66  const faBoundaryMesh& bm,
67  const label nbrPolyPatchi,
68  const word& patchType
69 )
70 :
71  faPatch(name, edgeLabels, index, bm, nbrPolyPatchi, patchType)
72 {}
73 
74 
76 (
77  const word& name,
78  const dictionary& dict,
79  const label index,
80  const faBoundaryMesh& bm,
81  const word& patchType
82 )
83 :
84  faPatch(name, dict, index, bm, patchType)
85 {}
86 
87 
89 (
90  const emptyFaPatch& p,
91  const faBoundaryMesh& bm
92 )
93 :
94  faPatch(p, bm)
95 {}
96 
97 
99 (
100  const emptyFaPatch& p,
101  const faBoundaryMesh& bm,
102  const label index,
103  const labelUList& edgeLabels,
104  const label nbrPolyPatchi
105 )
106 :
107  faPatch(p, bm, index, edgeLabels, nbrPolyPatchi)
108 {}
109 
110 
111 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
112 
113 // Over-riding the face normals return from the underlying patch
114 // This is the only piece of info used out of the underlying primitivePatch
115 // I choose to store it there because it is used in primitive patch operations
116 // and it should not be duplicated as before. However, to ensure everything
117 // in the empty patch is sized to zero, we shall here return a reference to
118 // a zero-sized field (it does not matter what the field is
119 //
120 // const vectorField& emptyFaPatch::edgeNormals() const
121 // {
122 // return faceAreas();
123 // }
124 
125 
126 // ************************************************************************* //
dictionary dict
emptyFaPatch(const word &name, const label index, const faBoundaryMesh &bm, const label nbrPolyPatchi=-1, const word &patchType=typeName)
Minimal construct from components.
Definition: emptyFaPatch.C:42
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
Macros for easy insertion into run-time selection tables.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition: exprTraits.C:127
A class for handling words, derived from Foam::string.
Definition: word.H:63
defineTypeNameAndDebug(combustionModel, 0)
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:72
Finite area boundary mesh.
volScalarField & p
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:52
Namespace for OpenFOAM.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)