processorCyclicFvPatch.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-2026 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::processorCyclicFvPatch
26 
27 Description
28  Processor patch.
29 
30 SourceFiles
31  processorCyclicFvPatch.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef processorCyclicFvPatch_H
36 #define processorCyclicFvPatch_H
37 
39 #include "processorFvPatch.H"
40 #include "cyclicFvPatch.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class processorCyclicFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public processorFvPatch
54 {
55  // Private Data
56 
57  //- Reference to the corresponding processorCyclicPolyPatch
58  const processorCyclicPolyPatch& processorCyclicPoly_;
59 
60 
61 public:
62 
63  //- Runtime type information
64  TypeName(processorCyclicPolyPatch::typeName_());
65 
66 
67  // Constructors
68 
69  //- Construct from components
70  processorCyclicFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm)
71  :
72  processorFvPatch(patch, bm),
73  processorCyclicPoly_(refCast<const processorCyclicPolyPatch>(patch))
74  {}
75 
76 
77  // Member Functions
78 
79  //- Return message tag used for sending
80  virtual int tag() const
81  {
82  // Allocate from Pstream?
83  return processorCyclicPoly_.tag();
84  }
85 
86  //- Return the referring patch ID
87  label referPatchIndex() const
88  {
89  return processorCyclicPoly_.referPatchIndex();
90  }
91 
92  //- Return a reference to the referring patch
93  const cyclicFvPatch& referPatch() const
94  {
95  const fvPatch& fvp = this->boundaryMesh()[referPatchIndex()];
96  return refCast<const cyclicFvPatch>(fvp);
97  }
98 
99  //- Return transformation between the coupled patches
100  virtual const transformer& transform() const
101  {
102  return processorCyclicPoly_.transform();
103  }
104 };
105 
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 } // End namespace Foam
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 #endif
114 
115 // ************************************************************************* //
Cyclic-plane patch.
Definition: cyclicFvPatch.H:55
Foam::fvBoundaryMesh.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:58
const fvBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: fvPatch.H:180
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:71
TypeName(processorCyclicPolyPatch::typeName_())
Runtime type information.
label referPatchIndex() const
Return the referring patch ID.
processorCyclicFvPatch(const polyPatch &patch, const fvBoundaryMesh &bm)
Construct from components.
virtual const transformer & transform() const
Return transformation between the coupled patches.
const cyclicFvPatch & referPatch() const
Return a reference to the referring patch.
virtual int tag() const
Return message tag used for sending.
label referPatchIndex() const
Return the referring patchID.
virtual const transformer & transform() const
Return transformation between the coupled patches.
virtual int tag() const
Return message tag to use for communication.
Vector-tensor class used to perform translations, rotations and scaling operations in 3D space.
Definition: transformer.H:84
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
To & refCast(From &r)
Reference type cast template function.
Definition: typeInfo.H:141