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-2024 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  //- Clear out data on mesh change
83  virtual void clearOut() const;
84 
85 
86 public:
87 
88  //- Runtime type information
89  TypeName("mappedExtrudedPatchBase");
90 
91 
92  // Constructors
93 
94  //- Construct from patch
96 
97  //- Construct from components
99  (
100  const polyPatch& pp,
101  const word& nbrRegionName,
102  const word& nbrPatchName,
103  const bool isExtrudedRegion,
105  );
106 
107  //- Construct from dictionary
109  (
110  const polyPatch& pp,
111  const dictionary& dict
112  );
113 
114  //- Construct as copy, resetting the boundary mesh
116  (
117  const polyPatch&,
119  );
120 
121 
122  //- Destructor
123  virtual ~mappedExtrudedPatchBase();
124 
125 
126  // Member Functions
127 
128  //- Write the polyPatch data as a dictionary
129  virtual void write(Ostream&) const;
130 };
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************************************************************* //
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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
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.
virtual void clearOut() const
Clear out data on mesh change.
TypeName("mappedExtrudedPatchBase")
Runtime type information.
virtual ~mappedExtrudedPatchBase()
Destructor.
virtual tmp< pointField > patchFaceCentres() const
Get the face-centres for the patch.
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