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
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 #endif
143 
144 // ************************************************************************* //
const tensor & faceT() const
Return neighbour-cell transformation tensor.
Definition: wedgeFaPatch.H:133
const tensor & faceT() const
Return face transformation tensor.
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
const vector & axis() const
Return axis of the wedge.
Definition: wedgeFaPatch.H:109
virtual ~wedgeFaPatch()=default
Destructor.
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.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const vector & axis() const
Return axis of the wedge.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:72
label axisPoint() const
Return axis point label.
Definition: wedgeFaPatch.H:141
const vector & centreNormal() const
Return plane normal between the wedge boundaries.
const vector & centreNormal() const
Return plane normal between the wedge boundaries.
Definition: wedgeFaPatch.H:117
const tensor & edgeT() const
Return face transformation tensor.
Definition: wedgeFaPatch.H:125
wedgeFaPatch(const word &name, const dictionary &dict, const label index, const faBoundaryMesh &bm, const word &patchType)
Construct from dictionary.
Definition: wedgeFaPatch.C:72
Finite area boundary mesh.
label index() const noexcept
The index of this patch in the boundaryMesh.
Tensor of scalars, i.e. Tensor<scalar>.
const tensor & cellT() const
Return neighbour-cell transformation tensor.
Namespace for OpenFOAM.