nonConformalMappedPatchBase.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) 2011-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::nonConformalMappedPatchBase
26 
27 Description
28  Base class for poly patches which provides non-conformal mapping between
29  two potentially non-globally conforming poly patches
30 
31 SourceFiles
32  nonConformalMappedPatchBase.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef nonConformalMappedPatchBase_H
37 #define nonConformalMappedPatchBase_H
38 
39 #include "nonConformalPolyPatch.H"
40 #include "mappedPatchBaseBase.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class nonConformalMappedPatchBase Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
54  public mappedPatchBaseBase
55 {
56 protected:
57 
58  // Protected data
59 
60  //- Non-conformal patch to map to
62 
63  //- Does this side own the patch?
64  const bool owner_;
65 
66  //- Is the intersection engine up to date? Zero if out of date. One if
67  // out of date (or potentially not out of date) because of motion. Two
68  // if up to date.
70 
71  //- Patch-to-patch intersection engine
73 
74 
75  // Protected Member Functions
76 
77  //- Constructor helper for owner
78  bool calcOwner() const;
79 
80  //- Neighbour patch
81  inline const nonConformalMappedPatchBase& nbrMappedPatch() const;
82 
83 
84 public:
85 
86  //- Runtime type information
87  TypeName("nonConformalMappedPatchBase");
88 
89 
90  // Constructors
91 
92  //- Construct from non-conformal patch
94 
95  //- Construct from components
97  (
98  const nonConformalPolyPatch& ncPp,
99  const word& nbrRegionName,
100  const word& nbrPatchName,
101  const cyclicTransform& transform,
102  const bool owner
103  );
104 
105  //- Construct from dictionary
107  (
108  const nonConformalPolyPatch& ncPp,
109  const dictionary& dict,
110  const transformType tt
111  );
112 
113  //- Construct as copy, resetting patch
115  (
116  const nonConformalPolyPatch& ncPp,
118  );
119 
120 
121  //- Destructor
123 
124 
125  // Member Functions
126 
127  //- Does this side own the patch?
128  bool owner() const;
129 
130  //- Access the intersection engine
132 
133  //- Clear out data on mesh change
134  void clearOut(const bool move);
135 
136  //- Write as a dictionary
137  virtual void write(Ostream&) const;
138 };
139 
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 } // End namespace Foam
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 #endif
152 
153 // ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
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
Base class for engines and poly patches which provide mapping between two poly patches.
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.
transformType
The type of the transformation permitted/required by this patch.
Base class for poly patches which provides non-conformal mapping between two potentially non-globally...
patchToPatches::intersection intersection_
Patch-to-patch intersection engine.
bool owner() const
Does this side own the patch?
virtual void write(Ostream &) const
Write as a dictionary.
const nonConformalPolyPatch & patch_
Non-conformal patch to map to.
void clearOut(const bool move)
Clear out data on mesh change.
nonConformalMappedPatchBase(const nonConformalPolyPatch &ncPp)
Construct from non-conformal patch.
const patchToPatches::intersection & intersection() const
Access the intersection engine.
TypeName("nonConformalMappedPatchBase")
Runtime type information.
const bool owner_
Does this side own the patch?
bool calcOwner() const
Constructor helper for owner.
label intersectionIsValid_
Is the intersection engine up to date? Zero if out of date. One if.
const nonConformalMappedPatchBase & nbrMappedPatch() const
Neighbour patch.
Non-conformal poly patch. This patch is a placeholder and must have no faces. This patch is linked to...
Class to generate patchToPatch coupling geometry. A full geometric intersection is done between a fac...
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
dictionary dict