symmetryFaPatch.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::symmetryFaPatch
29 
30 Description
31  Symmetry-plane patch.
32 
33 Author
34  Zeljko Tukovic, FMENA
35  Hrvoje Jasak, Wikki Ltd.
36 
37 SourceFiles
38  symmetryFaPatch.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef Foam_symmetryFaPatch_H
43 #define Foam_symmetryFaPatch_H
44 
45 #include "faPatch.H"
46 #include "symmetryPolyPatch.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class symmetryFaPatch Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 class symmetryFaPatch
58 :
59  public faPatch
60 {
61 protected:
62 
63  // Protected Member Functions
64 
65  //- Make patch face non-orthogonality correction vectors
66  virtual void makeCorrVecs(vectorField&) const;
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName(symmetryPolyPatch::typeName_()); // ie, "symmetry"
73 
74 
75  // Constructors
76 
77  //- Construct from components
79  (
80  const word& name,
81  const labelUList& edgeLabels,
82  const label index,
83  const faBoundaryMesh& bm,
84  const label nbrPolyPatchi,
85  const word& patchType
86  );
87 
88  //- Construct from dictionary
90  (
91  const word& name,
92  const dictionary& dict,
93  const label index,
94  const faBoundaryMesh& bm,
95  const word& patchType
96  );
97 
98  //- Copy construct, resetting boundary mesh
100 
101  //- Copy construct, resetting boundary mesh and addressing
103  (
104  const symmetryFaPatch& p,
105  const faBoundaryMesh& bm,
106  const label index,
107  const labelUList& edgeLabels,
108  const label nbrPolyPatchi
109  );
110 
111 
112  //- Construct and return a clone, resetting the boundary mesh
113  virtual autoPtr<faPatch> clone(const faBoundaryMesh& bm) const
114  {
115  return autoPtr<faPatch>
116  (
117  new symmetryFaPatch(*this, bm)
118  );
119  }
120 
121  //- Construct and return a clone, resetting the edge list
122  //- and boundary mesh
123  virtual autoPtr<faPatch> clone
124  (
125  const faBoundaryMesh& bm,
126  const labelUList& edgeLabels,
127  const label index,
128  const label nbrPolyPatchi
129  ) const
130  {
131  return autoPtr<faPatch>
132  (
133  new symmetryFaPatch
134  (
135  *this,
136  bm,
137  index,
138  edgeLabels,
139  nbrPolyPatchi
140  )
141  );
142  }
143 };
144 
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 } // End namespace Foam
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #endif
153 
154 // ************************************************************************* //
dictionary dict
symmetryFaPatch(const word &name, const labelUList &edgeLabels, const label index, const faBoundaryMesh &bm, const label nbrPolyPatchi, const word &patchType)
Construct from components.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
TypeName(symmetryPolyPatch::typeName_())
Runtime type information.
const labelList & edgeLabels() const noexcept
Return the list of edges.
Definition: faPatch.H:335
virtual void makeCorrVecs(vectorField &) const
Make patch face non-orthogonality correction vectors.
A class for handling words, derived from Foam::string.
Definition: word.H:63
const word & name() const noexcept
The patch name.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:72
Finite area boundary mesh.
autoPtr< List< label > > clone() const
Clone.
Definition: ListI.H:121
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
label index() const noexcept
The index of this patch in the boundaryMesh.
volScalarField & p
Symmetry-plane patch.
Namespace for OpenFOAM.