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  //- Copy constructor
119 
120  //- Construct and return a clone
121  virtual tmp<fvPatchField<Type>> clone() const
122  {
123  return tmp<fvPatchField<Type>>
124  (
126  );
127  }
128 
129  //- Copy constructor setting internal field reference
131  (
134  );
135 
136  //- Construct and return a clone setting internal field reference
138  (
140  ) const
141  {
142  return tmp<fvPatchField<Type>>
143  (
144  new processorCyclicFvPatchField<Type>(*this, iF)
145  );
146  }
147 
148 
149  //- Destructor
151 
152 
153  // Member Functions
154 
155  // Access
156 
157  //- Return transformation between the coupled patches
158  virtual const transformer& transform() const
159  {
160  return procPatch_.transform();
161  }
162 
163  //- Return rank of component for transform
164  virtual int rank() const
165  {
166  return pTraits<Type>::rank;
167  }
168 };
169 
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 } // End namespace Foam
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 #ifdef NoRepository
179 #endif
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 #endif
184 
185 // ************************************************************************* //
Vector-tensor class used to perform translations and rotations 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:158
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:61
Traits class for primitives.
Definition: pTraits.H:50
Pre-declare SubField and related Field type.
Definition: Field.H:56
Foam::fvPatchFieldMapper.
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
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.
processorCyclicFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Namespace for OpenFOAM.