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-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::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  const processorCyclicPolyPatch& procPolyPatch_;
58 
59 public:
60 
61  //- Runtime type information
62  TypeName(processorCyclicPolyPatch::typeName_());
63 
64 
65  // Constructors
66 
67  //- Construct from components
69  :
70  processorFvPatch(patch, bm),
71  procPolyPatch_(refCast<const processorCyclicPolyPatch>(patch))
72  {}
73 
74 
75  // Member Functions
76 
77  //- Return message tag used for sending
78  virtual int tag() const
79  {
80  // Allocate from Pstream?
81  return procPolyPatch_.tag();
82  }
83 
84  //- Return the referring patch ID
85  label referPatchID() const
86  {
87  return procPolyPatch_.referPatchID();
88  }
89 
90  //- Return a reference to the referring patch
91  const cyclicFvPatch& referPatch() const
92  {
93  const fvPatch& fvp = this->boundaryMesh()[referPatchID()];
94  return refCast<const cyclicFvPatch>(fvp);
95  }
96 
97  //- Return transformation between the coupled patches
98  virtual const transformer& transform() const
99  {
100  return procPolyPatch_.transform();
101  }
102 };
103 
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 } // End namespace Foam
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 #endif
112 
113 // ************************************************************************* //
const fvBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: fvPatch.H:181
label referPatchID() const
Return the referring patchID.
Vector-tensor class used to perform translations, rotations and scaling operations in 3D space...
Definition: transformer.H:83
const cyclicFvPatch & referPatch() const
Return a reference to the referring patch.
To & refCast(From &r)
Reference type cast template function.
Definition: typeInfo.H:106
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:63
processorCyclicFvPatch(const polyPatch &patch, const fvBoundaryMesh &bm)
Construct from components.
const polyPatch & patch() const
Return the polyPatch.
Definition: fvPatch.H:139
Processor patch.
Cyclic-plane patch.
Definition: cyclicFvPatch.H:51
virtual int tag() const
Return message tag used for sending.
Foam::fvBoundaryMesh.
TypeName(processorCyclicPolyPatch::typeName_())
Runtime type information.
virtual const transformer & transform() const
Return transformation between the coupled patches.
virtual const transformer & transform() const
Return transformation between the coupled patches.
virtual int tag() const
Return message tag to use for communication.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
label referPatchID() const
Return the referring patch ID.
Namespace for OpenFOAM.