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 | Copyright (C) 2011-2016 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 Group
28  grpCoupledBoundaryConditions
29 
30 Description
31  This boundary condition enables processor communication across cyclic
32  patches.
33 
34 Usage
35  Example of the boundary condition specification:
36  \verbatim
37  <patchName>
38  {
39  type processor;
40  }
41  \endverbatim
42 
43 See also
44  Foam::processorFvPatchField
45 
46 SourceFiles
47  processorCyclicFvPatchField.C
48  processorCyclicFvPatchFields.H
49  processorCyclicFvPatchFields.C
50  processorCyclicFvPatchFieldsFwd.H
51 
52 \*---------------------------------------------------------------------------*/
53 
54 #ifndef processorCyclicFvPatchField_H
55 #define processorCyclicFvPatchField_H
56 
57 #include "processorCyclicFvPatch.H"
58 #include "processorFvPatchField.H"
59 
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 
62 namespace Foam
63 {
64 
65 /*---------------------------------------------------------------------------*\
66  Class processorCyclicFvPatchField Declaration
67 \*---------------------------------------------------------------------------*/
68 
69 template<class Type>
71 :
72  public processorFvPatchField<Type>
73 {
74  // Private data
75 
76  //- Local reference cast into the processor patch
77  const processorCyclicFvPatch& procPatch_;
78 
79 public:
80 
81  //- Runtime type information
82  TypeName(processorCyclicFvPatch::typeName_());
83 
84 
85  // Constructors
86 
87  //- Construct from patch and internal field
89  (
90  const fvPatch&,
92  );
93 
94  //- Construct from patch and internal field and patch field
96  (
97  const fvPatch&,
99  const Field<Type>&
100  );
101 
102  //- Construct from patch, internal field and dictionary
104  (
105  const fvPatch&,
107  const dictionary&
108  );
109 
110  //- Construct by mapping given processorCyclicFvPatchField onto a
111  // new patch
113  (
115  const fvPatch&,
117  const fvPatchFieldMapper&
118  );
119 
120  //- Construct as copy
122 
123  //- Construct and return a clone
124  virtual tmp<fvPatchField<Type>> clone() const
125  {
126  return tmp<fvPatchField<Type>>
127  (
129  );
130  }
131 
132  //- Construct as copy setting internal field reference
134  (
137  );
138 
139  //- Construct and return a clone setting internal field reference
141  (
143  ) const
144  {
145  return tmp<fvPatchField<Type>>
146  (
147  new processorCyclicFvPatchField<Type>(*this, iF)
148  );
149  }
150 
151 
152  //- Destructor
154 
155 
156  // Member functions
157 
158  // Access
159 
160  //- Does the patch field perform the transfromation
161  virtual bool doTransform() const
162  {
163  return !(procPatch_.parallel() || pTraits<Type>::rank == 0);
164  }
165 
166  //- Return face transformation tensor
167  virtual const tensorField& forwardT() const
168  {
169  return procPatch_.forwardT();
170  }
171 };
172 
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 } // End namespace Foam
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #ifdef NoRepository
182 #endif
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 #endif
187 
188 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
TypeName(processorCyclicFvPatch::typeName_())
Runtime type information.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Traits class for primitives.
Definition: pTraits.H:50
virtual const tensorField & forwardT() const
Return face transformation tensor.
virtual bool parallel() const
Are the cyclic planes parallel.
Pre-declare SubField and related Field type.
Definition: Field.H:57
virtual const tensorField & forwardT() const
Return face transformation tensor.
Foam::fvPatchFieldMapper.
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
virtual bool doTransform() const
Does the patch field perform the transfromation.
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: PtrList.H:53
processorCyclicFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Namespace for OpenFOAM.