processorCyclicFvPatchField.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-2020 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::processorCyclicFvPatchField
26 
27 Description
28  This boundary condition enables processor communication across cyclic
29  patches.
30 
31 Usage
32  Example of the boundary condition specification:
33  \verbatim
34  <patchName>
35  {
36  type processor;
37  }
38  \endverbatim
39 
40 See also
41  Foam::processorFvPatchField
42 
43 SourceFiles
44  processorCyclicFvPatchField.C
45  processorCyclicFvPatchFields.H
46  processorCyclicFvPatchFields.C
47  processorCyclicFvPatchFieldsFwd.H
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef processorCyclicFvPatchField_H
52 #define processorCyclicFvPatchField_H
53 
54 #include "processorCyclicFvPatch.H"
55 #include "processorFvPatchField.H"
56 
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 
59 namespace Foam
60 {
61 
62 /*---------------------------------------------------------------------------*\
63  Class processorCyclicFvPatchField Declaration
64 \*---------------------------------------------------------------------------*/
65 
66 template<class Type>
68 :
69  public processorFvPatchField<Type>
70 {
71  // Private Data
72 
73  //- Local reference cast into the processor patch
74  const processorCyclicFvPatch& procPatch_;
75 
76 public:
77 
78  //- Runtime type information
79  TypeName(processorCyclicFvPatch::typeName_());
80 
81 
82  // Constructors
83 
84  //- Construct from patch and internal field
86  (
87  const fvPatch&,
89  );
90 
91  //- Construct from patch and internal field and patch field
93  (
94  const fvPatch&,
96  const Field<Type>&
97  );
98 
99  //- Construct from patch, internal field and dictionary
101  (
102  const fvPatch&,
104  const dictionary&
105  );
106 
107  //- Construct by mapping given processorCyclicFvPatchField onto a
108  // new patch
110  (
112  const fvPatch&,
114  const fvPatchFieldMapper&
115  );
116 
117  //- Disallow copy without setting internal field reference
119  (
121  ) = delete;
122 
123  //- Copy constructor setting internal field reference
125  (
128  );
129 
130  //- Construct and return a clone setting internal field reference
132  (
134  ) const
135  {
136  return tmp<fvPatchField<Type>>
137  (
138  new processorCyclicFvPatchField<Type>(*this, iF)
139  );
140  }
141 
142 
143  //- Destructor
145 
146 
147  // Member Functions
148 
149  // Access
150 
151  //- Return transformation between the coupled patches
152  virtual const transformer& transform() const
153  {
154  return procPatch_.transform();
155  }
156 
157  //- Return rank of component for transform
158  virtual int rank() const
159  {
160  return pTraits<Type>::rank;
161  }
162 };
163 
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 } // End namespace Foam
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #ifdef NoRepository
173 #endif
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 #endif
178 
179 // ************************************************************************* //
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(processorCyclicFvPatch::typeName_())
Runtime type information.
virtual int rank() const
Return rank of component for transform.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:62
Traits class for primitives.
Definition: pTraits.H:50
Pre-declare SubField and related Field type.
Definition: Field.H:56
Foam::fvPatchFieldMapper.
This boundary condition enables processor communication across cyclic patches.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual const transformer & transform() const
Return transformation between the coupled patches.
This boundary condition enables processor communication across patches.
A class for managing temporary objects.
Definition: PtrList.H:53
virtual const transformer & transform() const
Return transformation between the coupled patches.
tmp< fvPatchField< Type > > clone() const
Disallow clone without setting internal field reference.
Definition: fvPatchField.H:199
processorCyclicFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Namespace for OpenFOAM.