Loading...
Searching...
No Matches
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{
53/*---------------------------------------------------------------------------*\
54 Class wedgeFaPatch Declaration
55\*---------------------------------------------------------------------------*/
56
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.
81 // Fatal if ngbPolyPatchIndex is not defined
82 // or does not correspond to a wedgePolyPatch
84 (
85 const word& name,
86 const dictionary& dict,
87 const label index,
88 const faBoundaryMesh& bm,
89 const word& patchType
90 );
91
92
93 //- Destructor
94 virtual ~wedgeFaPatch() = default;
95
96
97 // Member Functions
98
99 // Access
100
101 //- Return axis of the wedge
102 const vector& axis() const noexcept
103 {
104 return wedgePolyPatchPtr_->axis();
105 }
106
107 //- Return plane normal between the wedge boundaries
108 const vector& centreNormal() const noexcept
109 {
110 return wedgePolyPatchPtr_->centreNormal();
111 }
113 //- Return face transformation tensor
114 const tensor& edgeT() const noexcept
115 {
116 return wedgePolyPatchPtr_->faceT();
117 }
118
119 //- Return neighbour-cell transformation tensor
120 const tensor& faceT() const noexcept
121 {
122 return wedgePolyPatchPtr_->cellT();
123 }
124
125 //- Return axis point label
126 label axisPoint() const
127 {
128 if (axisPoint_ == -1 && !axisPointChecked_)
129 {
130 findAxisPoint();
131 }
132
133 return axisPoint_;
134 }
135};
137
138// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139
140} // End namespace Foam
141
142// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143
144#endif
145
146// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
friend class faBoundaryMesh
The faPatch geometry initialisation is called by faBoundaryMesh.
Definition faPatch.H:130
label index() const noexcept
The index of this patch in the boundaryMesh.
label axisPoint() const
Return axis point label.
wedgeFaPatch(const word &name, const dictionary &dict, const label index, const faBoundaryMesh &bm, const word &patchType)
Construct from dictionary.
const vector & axis() const noexcept
Return axis of the wedge.
const tensor & faceT() const noexcept
Return neighbour-cell transformation tensor.
const tensor & edgeT() const noexcept
Return face transformation tensor.
TypeName("wedge")
Runtime type information.
virtual ~wedgeFaPatch()=default
Destructor.
const vector & centreNormal() const noexcept
Return plane normal between the wedge boundaries.
Wedge front and back plane patch.
const vector & centreNormal() const noexcept
Return plane normal between the wedge boundaries.
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
Tensor< scalar > tensor
Definition symmTensor.H:57
const direction noexcept
Definition scalarImpl.H:265
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
Vector< scalar > vector
Definition vector.H:57
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68