processorCyclicFvPatchField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::processorCyclicFvPatchField
28 
29 Group
30  grpCoupledBoundaryConditions
31 
32 Description
33  This boundary condition enables processor communication across cyclic
34  patches.
35 
36 Usage
37  Example of the boundary condition specification:
38  \verbatim
39  <patchName>
40  {
41  type processor;
42  }
43  \endverbatim
44 
45 See also
46  Foam::processorFvPatchField
47 
48 SourceFiles
49  processorCyclicFvPatchField.C
50  processorCyclicFvPatchFields.H
51  processorCyclicFvPatchFields.C
52  processorCyclicFvPatchFieldsFwd.H
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef Foam_processorCyclicFvPatchField_H
57 #define Foam_processorCyclicFvPatchField_H
58 
59 #include "processorCyclicFvPatch.H"
60 #include "processorFvPatchField.H"
61 
62 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 
64 namespace Foam
65 {
66 
67 /*---------------------------------------------------------------------------*\
68  Class processorCyclicFvPatchField Declaration
69 \*---------------------------------------------------------------------------*/
70 
71 template<class Type>
73 :
74  public processorFvPatchField<Type>
75 {
76  // Private Data
77 
78  //- Local reference cast into the processor patch
79  const processorCyclicFvPatch& procPatch_;
80 
81 public:
82 
83  //- Runtime type information
84  TypeName(processorCyclicFvPatch::typeName_());
85 
86 
87  // Constructors
88 
89  //- Construct from patch and internal field
91  (
92  const fvPatch&,
94  );
95 
96  //- Construct from patch and internal field and patch field
98  (
99  const fvPatch&,
101  const Field<Type>&
102  );
103 
104  //- Construct from patch, internal field and dictionary
106  (
107  const fvPatch&,
109  const dictionary&
110  );
111 
112  //- Construct by mapping given processorCyclicFvPatchField onto a
113  // new patch
115  (
117  const fvPatch&,
119  const fvPatchFieldMapper&
120  );
121 
122  //- Construct as copy
124 
125  //- Construct as copy setting internal field reference
127  (
130  );
131 
132  //- Return a clone
133  virtual tmp<fvPatchField<Type>> clone() const
134  {
135  return fvPatchField<Type>::Clone(*this);
136  }
137 
138  //- Clone with an internal field reference
140  (
142  ) const
143  {
144  return fvPatchField<Type>::Clone(*this, iF);
145  }
146 
148  //- Destructor
149  virtual ~processorCyclicFvPatchField() = default;
150 
151 
152  // Member Functions
153 
154  // Access
155 
156  //- Does the patch field perform the transformation
157  virtual bool doTransform() const
158  {
159  return (pTraits<Type>::rank && !procPatch_.parallel());
160  }
161 
162  //- Return face transformation tensor
163  virtual const tensorField& forwardT() const
164  {
165  return procPatch_.forwardT();
166  }
167 };
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace Foam
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 #ifdef NoRepository
178 #endif
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 #endif
183 
184 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
TypeName(processorCyclicFvPatch::typeName_())
Runtime type information.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
A traits class, which is primarily used for primitives and vector-space.
Definition: pTraits.H:61
virtual const tensorField & forwardT() const
Return face transformation tensor.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: fvPatchField.H:607
virtual bool parallel() const
Are the cyclic planes parallel.
Generic templated field type.
Definition: Field.H:63
virtual const tensorField & forwardT() const
Return face transformation tensor.
A FieldMapper for finite-volume patch fields.
virtual tmp< fvPatchField< Type > > clone() const
Return a clone.
virtual bool doTransform() const
Does the patch field perform the transformation.
virtual ~processorCyclicFvPatchField()=default
Destructor.
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...
This boundary condition enables processor communication across patches.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
processorCyclicFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Namespace for OpenFOAM.