nonConformalCoupledPolyPatch.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) 2021-2022 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::nonConformalCoupledPolyPatch
26 
27 Description
28  Non-conformal coupled poly patch. As nonConformalPolyPatch, but this patch
29  is coupled to another non-conformal patch. Information about the
30  owner/neighbour relationship and transformation are made available by this
31  class. Also, this patch allows access to the error patch.
32 
33 See also
34  Foam::nonConformalPolyPatch
35  Foam::nonConformalErrorPolyPatch
36 
37 SourceFiles
38  nonConformalCoupledPolyPatch.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef nonConformalCoupledPolyPatch_H
43 #define nonConformalCoupledPolyPatch_H
44 
45 #include "cyclicPolyPatch.H"
46 #include "nonConformalPolyPatch.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 class nonConformalErrorPolyPatch;
54 
55 /*---------------------------------------------------------------------------*\
56  Class nonConformalCoupledPolyPatch Declaration
57 \*---------------------------------------------------------------------------*/
58 
60 :
62 {
63 private:
64 
65  // Private
66 
67  //- Reference to the coupled polyPatch
68  const coupledPolyPatch& patch_;
69 
70  //- Name of the error patch associated with this cyclic
71  mutable word errorPatchName_;
72 
73  //- Index of the error patch associated with this cyclic
74  mutable label errorPatchID_;
75 
76 
77 protected:
78 
79  // Protected Member Functions
80 
81  //- Reset the patch name
82  virtual void rename(const wordList& newNames);
83 
84  //- Reset the patch index
85  virtual void reorder(const labelUList& newToOldIndex);
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("nonConformalCoupled");
92 
93 
94  // Constructors
95 
96  //- Construct from a patch
98 
99  //- Construct from a patch and an original patch name
101  (
102  const polyPatch& patch,
103  const word& origPatchName
104  );
105 
106  //- Construct from a patch and a dictionary
108  (
109  const polyPatch& patch,
110  const dictionary& dict
111  );
112 
113  //- Construct from a patch and a non-conformal coupled patch
115  (
116  const polyPatch& patch,
117  const nonConformalCoupledPolyPatch& nccPatch
118  );
119 
120 
121  //- Destructor
123 
124 
125  // Member Functions
126 
127  //- Does this side own the patch?
128  bool owner() const;
129 
130  //- Does the coupled side own the patch?
131  bool neighbour() const;
132 
133  //- Return transformation between the coupled patches
134  const transformer& transform() const;
135 
136  //- Error patch name
137  const word& errorPatchName() const;
138 
139  //- Error patchID
140  label errorPatchID() const;
141 
142  //- Error patch
143  const nonConformalErrorPolyPatch& errorPatch() const;
144 
145  //- Write the polyPatch data as a dictionary
146  virtual void write(Ostream&) const;
147 };
148 
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 } // End namespace Foam
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 #endif
157 
158 // ************************************************************************* //
dictionary dict
Non-conformal coupled poly patch. As nonConformalPolyPatch, but this patch is coupled to another non-...
Vector-tensor class used to perform translations, rotations and scaling operations in 3D space...
Definition: transformer.H:83
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
TypeName("nonConformalCoupled")
Runtime type information.
const word & origPatchName() const
Original patch name.
const transformer & transform() const
Return transformation between the coupled patches.
virtual void rename(const wordList &newNames)
Reset the patch name.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
bool neighbour() const
Does the coupled side own the patch?
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
const nonConformalErrorPolyPatch & errorPatch() const
Error patch.
bool owner() const
Does this side own the patch?
A class for handling words, derived from string.
Definition: word.H:59
nonConformalCoupledPolyPatch(const polyPatch &patch)
Construct from a patch.
Non-conformal poly patch. This patch is a placeholder and must have no faces. This patch is linked to...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:60
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
Non-conformal error poly patch. As nonConformalPolyPatch. This patch is a non-coupled non-conformal p...
const word & errorPatchName() const
Error patch name.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
virtual void reorder(const labelUList &newToOldIndex)
Reset the patch index.
Namespace for OpenFOAM.