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 processorCyclicFvPatchField_H
57 #define 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
159 
160  // Access
161 
162  //- Does the patch field perform the transformation
163  virtual bool doTransform() const
164  {
165  return !(procPatch_.parallel() || pTraits<Type>::rank == 0);
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 // ************************************************************************* //
processorFvPatchField.H
Foam::processorFvPatchField
This boundary condition enables processor communication across patches.
Definition: processorFvPatchField.H:66
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::processorCyclicFvPatchField::clone
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
Definition: processorCyclicFvPatchField.H:125
Foam::processorCyclicFvPatchField::doTransform
virtual bool doTransform() const
Does the patch field perform the transformation.
Definition: processorCyclicFvPatchField.H:162
Foam::processorCyclicFvPatch::parallel
virtual bool parallel() const
Are the cyclic planes parallel.
Definition: processorCyclicFvPatch.H:90
Foam::processorCyclicFvPatchField
This boundary condition enables processor communication across cyclic patches.
Definition: processorCyclicFvPatchField.H:71
processorCyclicFvPatchField.C
Foam::Field
Generic templated field type.
Definition: Field.H:63
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::processorCyclicFvPatch::forwardT
virtual const tensorField & forwardT() const
Return face transformation tensor.
Definition: processorCyclicFvPatch.H:96
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::processorCyclicFvPatchField::forwardT
virtual const tensorField & forwardT() const
Return face transformation tensor.
Definition: processorCyclicFvPatchField.H:168
Foam::pTraits
A traits class, which is primarily used for primitives.
Definition: pTraits.H:56
Foam::processorCyclicFvPatchField::processorCyclicFvPatchField
processorCyclicFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Definition: processorCyclicFvPatchField.C:36
processorCyclicFvPatch.H
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::processorCyclicFvPatchField::~processorCyclicFvPatchField
virtual ~processorCyclicFvPatchField()
Destructor.
Definition: processorCyclicFvPatchField.C:140
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54
Foam::processorCyclicFvPatch
Processor patch.
Definition: processorCyclicFvPatch.H:51
Foam::processorCyclicFvPatchField::TypeName
TypeName(processorCyclicFvPatch::typeName_())
Runtime type information.