wedgeFaPatch.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) 2019-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::wedgeFaPatch
29
30Description
31 Wedge front and back plane patch.
32
33Author
34 Zeljko Tukovic, FMENA
35 Hrvoje Jasak, Wikki Ltd.
36
37SourceFiles
38 wedgeFaPatch.C
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef Foam_wedgeFaPatch_H
43#define Foam_wedgeFaPatch_H
44
45#include "faPatch.H"
46#include "wedgePolyPatch.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52
53/*---------------------------------------------------------------------------*\
54 Class wedgeFaPatch Declaration
55\*---------------------------------------------------------------------------*/
57class wedgeFaPatch
58:
59 public faPatch
60{
61 // Private Data
62
63 const wedgePolyPatch* wedgePolyPatchPtr_;
64
65 //- Axis point label
66 mutable label axisPoint_;
67
68 //- Is it axis point looked for?
69 mutable bool axisPointChecked_;
70
71 //- Find axis point
72 void findAxisPoint() const;
73
74
75public:
76
77 //- Runtime type information
78 TypeName("wedge");
79
80 //- Construct from dictionary
82 (
83 const word& name,
84 const dictionary& dict,
85 const label index,
86 const faBoundaryMesh& bm,
87 const word& patchType
88 );
89
90
91 //- Destructor
92 virtual ~wedgeFaPatch() = default;
93
94
95 // Member Functions
96
97 // Access
98
99 //- Return axis of the wedge
100 const vector& axis() const
101 {
102 return wedgePolyPatchPtr_->axis();
103 }
104
105 //- Return plane normal between the wedge boundaries
106 const vector& centreNormal() const
107 {
108 return wedgePolyPatchPtr_->centreNormal();
109 }
110
111 //- Return face transformation tensor
112 const tensor& edgeT() const
113 {
114 return wedgePolyPatchPtr_->faceT();
115 }
116
117 //- Return neighbour-cell transformation tensor
118 const tensor& faceT() const
119 {
120 return wedgePolyPatchPtr_->cellT();
121 }
122
123 //- Return axis point label
124 label axisPoint() const
125 {
126 if (axisPoint_ == -1 && !axisPointChecked_)
127 {
128 findAxisPoint();
129 }
130
131 return axisPoint_;
132 }
133};
134
135
136// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137
138} // End namespace Foam
139
140// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141
142#endif
143
144// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Finite area boundary mesh.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:78
label index() const noexcept
The index of this patch in the boundaryMesh.
const word & name() const noexcept
The patch name.
Wedge front and back plane patch.
Definition: wedgeFaPatch.H:59
const tensor & faceT() const
Return neighbour-cell transformation tensor.
Definition: wedgeFaPatch.H:117
const vector & axis() const
Return axis of the wedge.
Definition: wedgeFaPatch.H:99
label axisPoint() const
Return axis point label.
Definition: wedgeFaPatch.H:123
const tensor & edgeT() const
Return face transformation tensor.
Definition: wedgeFaPatch.H:111
const vector & centreNormal() const
Return plane normal between the wedge boundaries.
Definition: wedgeFaPatch.H:105
TypeName("wedge")
Runtime type information.
virtual ~wedgeFaPatch()=default
Destructor.
Wedge front and back plane patch.
const tensor & faceT() const
Return face transformation tensor.
const vector & axis() const
Return axis of the wedge.
const tensor & cellT() const
Return neighbour-cell transformation tensor.
const vector & centreNormal() const
Return plane normal between the wedge boundaries.
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73