mappedExtrudedPatchBase.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::mappedExtrudedPatchBase
26 
27 Description
28  Engine which provides mapping between two patches
29  and which offsets the geometry to account for the extrusion thickness
30 
31 SourceFiles
32  mappedExtrudedPatchBase.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef mappedExtrudedPatchBase_H
37 #define mappedExtrudedPatchBase_H
38 
39 #include "mappedPatchBase.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class mappedExtrudedPatchBase Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
52  public mappedPatchBase
53 {
54  // Private Member Data
55 
56  //- Is this the in the extruded region?
57  mutable bool isExtrudedRegion_;
58 
59  //- The face areas on the bottom patch
60  mutable autoPtr<vectorField> bottomFaceAreasPtr_;
61 
62  //- The face centres on the bottom patch
63  mutable autoPtr<pointField> bottomFaceCentresPtr_;
64 
65  //- The local points on the bottom patch
66  mutable autoPtr<pointField> bottomLocalPointsPtr_;
67 
68 
69 protected:
70 
71  // Protected Member Functions
72 
73  //- Get the face-areas for the patch
74  virtual tmp<vectorField> patchFaceAreas() const;
75 
76  //- Get the face-centres for the patch
77  virtual tmp<pointField> patchFaceCentres() const;
78 
79  //- Get the local points for the patch
80  virtual tmp<pointField> patchLocalPoints() const;
81 
82 
83 public:
84 
85  //- Runtime type information
86  TypeName("mappedExtrudedPatchBase");
87 
88 
89  // Constructors
90 
91  //- Construct from patch
93 
94  //- Construct from components
96  (
97  const polyPatch& pp,
98  const word& nbrRegionName,
99  const word& nbrPatchName,
100  const bool isExtrudedRegion,
102  );
103 
104  //- Construct from dictionary
106  (
107  const polyPatch& pp,
108  const dictionary& dict,
109  const bool defaultTransformIsNone
110  );
111 
112  //- Construct as copy, resetting the boundary mesh
114  (
115  const polyPatch&,
117  );
118 
119 
120  //- Destructor
121  virtual ~mappedExtrudedPatchBase();
122 
123 
124  // Member Functions
125 
126  // Edit
127 
128  //- Clear out data on mesh change
129  virtual void clearOut();
130 
131 
132  // I/O
133 
134  //- Write the polyPatch data as a dictionary
135  virtual void write(Ostream&) const;
136 };
137 
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 } // End namespace Foam
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #endif
146 
147 // ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Cyclic plane transformation.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Engine which provides mapping between two patches and which offsets the geometry to account for the e...
mappedExtrudedPatchBase(const polyPatch &)
Construct from patch.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
virtual tmp< vectorField > patchFaceAreas() const
Get the face-areas for the patch.
virtual tmp< pointField > patchLocalPoints() const
Get the local points for the patch.
TypeName("mappedExtrudedPatchBase")
Runtime type information.
virtual ~mappedExtrudedPatchBase()
Destructor.
virtual tmp< pointField > patchFaceCentres() const
Get the face-centres for the patch.
virtual void clearOut()
Clear out data on mesh change.
const transformer & transform() const
The transformation between the patches.
const word & nbrPatchName() const
Name of the patch to map from.
const word & nbrRegionName() const
Name of the region to map from.
Engine and base class for poly patches which provides interpolative mapping between two globally conf...
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:70
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
dictionary dict