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 -------------------------------------------------------------------------------
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::wedgeFaPatch
29 
30 Description
31  Wedge front and back plane patch.
32 
33 Author
34  Zeljko Tukovic, FMENA
35  Hrvoje Jasak, Wikki Ltd.
36 
37 SourceFiles
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 
50 namespace Foam
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class wedgeFaPatch Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 class 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 
75 public:
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 // ************************************************************************* //
const tensor & cellT() const noexcept
Return neighbour-cell transformation tensor.
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:130
virtual ~wedgeFaPatch()=default
Destructor.
const tensor & faceT() const noexcept
Return neighbour-cell transformation tensor.
Definition: wedgeFaPatch.H:136
const vector & centreNormal() const noexcept
Return plane normal between the wedge boundaries.
Definition: wedgeFaPatch.H:120
const tensor & edgeT() const noexcept
Return face transformation tensor.
Definition: wedgeFaPatch.H:128
const vector & axis() const noexcept
Return axis of the wedge.
TypeName("wedge")
Runtime type information.
A class for handling words, derived from Foam::string.
Definition: word.H:63
Wedge front and back plane patch.
Wedge front and back plane patch.
Definition: wedgeFaPatch.H:52
const word & name() const noexcept
The patch name.
const direction noexcept
Definition: scalarImpl.H:265
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const tensor & faceT() const noexcept
Return face transformation tensor.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:73
label axisPoint() const
Return axis point label.
Definition: wedgeFaPatch.H:144
const vector & axis() const noexcept
Return axis of the wedge.
Definition: wedgeFaPatch.H:112
wedgeFaPatch(const word &name, const dictionary &dict, const label index, const faBoundaryMesh &bm, const word &patchType)
Construct from dictionary.
Definition: wedgeFaPatch.C:69
Finite area boundary mesh, which is a faPatch list with registered IO, a reference to the associated ...
label index() const noexcept
The index of this patch in the boundaryMesh.
Tensor of scalars, i.e. Tensor<scalar>.
Namespace for OpenFOAM.
const vector & centreNormal() const noexcept
Return plane normal between the wedge boundaries.