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?
67  mutable bool intersectionIsValid_;
68 
69  //- Patch-to-patch intersection engine
71 
72 
73  // Protected Member Functions
74 
75  //- Constructor helper for owner
76  bool calcOwner() const;
77 
78  //- Neighbour patch
79  inline const nonConformalMappedPatchBase& nbrMappedPatch() const;
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("nonConformalMappedPatchBase");
86 
87 
88  // Constructors
89 
90  //- Construct from non-conformal patch
92 
93  //- Construct from components
95  (
96  const nonConformalPolyPatch& ncPp,
97  const word& nbrRegionName,
98  const word& nbrPatchName,
100  );
101 
102  //- Construct from dictionary
104  (
105  const nonConformalPolyPatch& ncPp,
106  const dictionary& dict,
107  const bool defaultTransformIsNone
108  );
109 
110  //- Construct as copy, resetting patch
112  (
113  const nonConformalPolyPatch& ncPp,
115  );
116 
117 
118  //- Destructor
120 
121 
122  // Member Functions
123 
124  //- Does this side own the patch?
125  bool owner() const;
126 
127  //- Access the intersection engine
129 
130  //- Clear out data on mesh change
131  void clearOut();
132 
133  //- Write as a dictionary
134  virtual void write(Ostream&) const;
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace Foam
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #endif
149 
150 // ************************************************************************* //
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 keyword definitions, which are a keyword followed by any number of values (e....
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.
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.
bool intersectionIsValid_
Is the intersection engine up to date?
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.
void clearOut()
Clear out data on mesh change.
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.
dictionary dict