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 and return a clone
126  virtual tmp<fvPatchField<Type>> clone() const
127  {
128  return tmp<fvPatchField<Type>>
129  (
131  );
132  }
133 
134  //- Construct as copy setting internal field reference
136  (
139  );
140 
141  //- Construct and return a clone setting internal field reference
143  (
145  ) const
146  {
147  return tmp<fvPatchField<Type>>
148  (
149  new processorCyclicFvPatchField<Type>(*this, iF)
150  );
151  }
152 
153 
154  //- Destructor
156 
157 
158  // Member functions
160  // Access
161 
162  //- Does the patch field perform the transformation
163  virtual bool doTransform() const
164  {
165  return (pTraits<Type>::rank && !procPatch_.parallel());
166  }
167 
168  //- Return face transformation tensor
169  virtual const tensorField& forwardT() const
170  {
171  return procPatch_.forwardT();
172  }
173 };
174 
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 } // End namespace Foam
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 #ifdef NoRepository
184 #endif
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 #endif
189 
190 // ************************************************************************* //
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:75
virtual const tensorField & forwardT() const
Return face transformation tensor.
virtual bool parallel() const
Are the cyclic planes parallel.
Generic templated field type.
Definition: Field.H:62
virtual const tensorField & forwardT() const
Return face transformation tensor.
A FieldMapper for finite-volume patch fields.
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
virtual bool doTransform() const
Does the patch field perform the transformation.
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...
Definition: areaFieldsFwd.H:42
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.