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 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 wedgeFaPatch_H
43 #define 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  //- Finde 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  );
88 
89 
90  //- Destructor
91  virtual ~wedgeFaPatch() = default;
92 
93 
94  // Member functions
95 
96  // Access
97 
98  //- Return axis of the wedge
99  const vector& axis() const
100  {
101  return wedgePolyPatchPtr_->axis();
102  }
103 
104  //- Return plane normal between the wedge boundaries
105  const vector& centreNormal() const
106  {
107  return wedgePolyPatchPtr_->centreNormal();
108  }
109 
110  //- Return face transformation tensor
111  const tensor& edgeT() const
112  {
113  return wedgePolyPatchPtr_->faceT();
114  }
115 
116  //- Return neighbour-cell transformation tensor
117  const tensor& faceT() const
118  {
119  return wedgePolyPatchPtr_->cellT();
120  }
121 
122  //- Return axis point label
123  label axisPoint() const
124  {
125  if (axisPoint_ == -1 && !axisPointChecked_)
126  {
127  findAxisPoint();
128  }
129 
130  return axisPoint_;
131  }
132 };
133 
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 } // End namespace Foam
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 #endif
142 
143 // ************************************************************************* //
Foam::Tensor
A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace.
Definition: complexI.H:268
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:63
Foam::wedgePolyPatch
Wedge front and back plane patch.
Definition: wedgePolyPatch.H:46
wedgePolyPatch.H
Foam::wedgePolyPatch::cellT
const tensor & cellT() const
Definition: wedgePolyPatch.H:206
Foam::wedgeFaPatch
Wedge front and back plane patch.
Definition: wedgeFaPatch.H:52
Foam::wedgeFaPatch::edgeT
const tensor & edgeT() const
Definition: wedgeFaPatch.H:106
Foam::wedgePolyPatch::axis
const vector & axis() const
Definition: wedgePolyPatch.H:176
Foam::faBoundaryMesh
Finite area boundary mesh.
Definition: faBoundaryMesh.H:61
Foam::wedgeFaPatch::centreNormal
const vector & centreNormal() const
Definition: wedgeFaPatch.H:100
Foam::wedgeFaPatch::faceT
const tensor & faceT() const
Definition: wedgeFaPatch.H:112
Foam::wedgeFaPatch::TypeName
TypeName("wedge")
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:119
Foam
Definition: atmBoundaryLayer.C:26
Foam::patchIdentifier::index
label index() const noexcept
Definition: patchIdentifier.H:143
Foam::wedgePolyPatch::faceT
const tensor & faceT() const
Definition: wedgePolyPatch.H:200
Foam::wedgeFaPatch::axisPoint
label axisPoint() const
Definition: wedgeFaPatch.H:118
Foam::wedgeFaPatch::axis
const vector & axis() const
Definition: wedgeFaPatch.H:94
Foam::wedgeFaPatch::~wedgeFaPatch
virtual ~wedgeFaPatch()=default
Foam::Vector< scalar >
Foam::wedgeFaPatch::wedgeFaPatch
wedgeFaPatch(const word &name, const dictionary &dict, const label index, const faBoundaryMesh &bm)
Definition: wedgeFaPatch.C:72
faPatch.H
Foam::patchIdentifier::name
const word & name() const noexcept
Definition: patchIdentifier.H:131
Foam::faPatch
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:65
Foam::wedgePolyPatch::centreNormal
const vector & centreNormal() const
Definition: wedgePolyPatch.H:182