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-2015 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  \heading Patch usage
35 
36  Example of the boundary condition specification:
37  \verbatim
38  myPatch
39  {
40  type processor;
41  }
42  \endverbatim
43 
44 SeeAlso
45  Foam::processorFvPatchField
46 
47 SourceFiles
48  processorCyclicFvPatchField.C
49  processorCyclicFvPatchFields.H
50  processorCyclicFvPatchFields.C
51  processorCyclicFvPatchFieldsFwd.H
52 
53 \*---------------------------------------------------------------------------*/
54 
55 #ifndef processorCyclicFvPatchField_H
56 #define processorCyclicFvPatchField_H
57 
58 #include "processorCyclicFvPatch.H"
59 #include "processorFvPatchField.H"
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 namespace Foam
64 {
65 
66 /*---------------------------------------------------------------------------*\
67  Class processorCyclicFvPatchField Declaration
68 \*---------------------------------------------------------------------------*/
69 
70 template<class Type>
72 :
73  public processorFvPatchField<Type>
74 {
75  // Private data
76 
77  //- Local reference cast into the processor patch
79 
80 public:
81 
82  //- Runtime type information
83  TypeName(processorCyclicFvPatch::typeName_());
84 
85 
86  // Constructors
87 
88  //- Construct from patch and internal field
90  (
91  const fvPatch&,
93  );
94 
95  //- Construct from patch and internal field and patch field
97  (
98  const fvPatch&,
100  const Field<Type>&
101  );
102 
103  //- Construct from patch, internal field and dictionary
105  (
106  const fvPatch&,
108  const dictionary&
109  );
110 
111  //- Construct by mapping given processorCyclicFvPatchField onto a
112  // new patch
114  (
116  const fvPatch&,
118  const fvPatchFieldMapper&
119  );
120 
121  //- Construct as copy
123 
124  //- Construct and return a clone
125  virtual tmp<fvPatchField<Type> > clone() const
126  {
127  return tmp<fvPatchField<Type> >
128  (
130  );
131  }
132 
133  //- Construct as copy setting internal field reference
135  (
138  );
139 
140  //- Construct and return a clone setting internal field reference
142  (
144  ) const
145  {
146  return tmp<fvPatchField<Type> >
147  (
148  new processorCyclicFvPatchField<Type>(*this, iF)
149  );
150  }
151 
152 
153  //- Destructor
155 
156 
157  // Member functions
158 
159  // Access
160 
161  //- Does the patch field perform the transfromation
162  virtual bool doTransform() const
163  {
164  return !(procPatch_.parallel() || pTraits<Type>::rank == 0);
165  }
166 
167  //- Return face transformation tensor
168  virtual const tensorField& forwardT() const
169  {
170  return procPatch_.forwardT();
171  }
172 };
173 
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 } // End namespace Foam
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 #ifdef NoRepository
183 #endif
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #endif
188 
189 // ************************************************************************* //
processorFvPatchField.H
Foam::processorFvPatchField
This boundary condition enables processor communication across patches.
Definition: processorFvPatchField.H:64
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::processorCyclicFvPatchField::clone
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
Definition: processorCyclicFvPatchField.H:124
Foam::processorCyclicFvPatchField::doTransform
virtual bool doTransform() const
Does the patch field perform the transfromation.
Definition: processorCyclicFvPatchField.H:161
Foam::processorCyclicFvPatch::parallel
virtual bool parallel() const
Are the cyclic planes parallel.
Definition: processorCyclicFvPatch.H:88
Foam::processorCyclicFvPatchField
This boundary condition enables processor communication across cyclic patches.
Definition: processorCyclicFvPatchField.H:70
processorCyclicFvPatchField.C
Foam::Field< Type >
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::processorCyclicFvPatch::forwardT
virtual const tensorField & forwardT() const
Return face transformation tensor.
Definition: processorCyclicFvPatch.H:94
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::processorCyclicFvPatchField::procPatch_
const processorCyclicFvPatch & procPatch_
Local reference cast into the processor patch.
Definition: processorCyclicFvPatchField.H:77
Foam::processorCyclicFvPatchField::forwardT
virtual const tensorField & forwardT() const
Return face transformation tensor.
Definition: processorCyclicFvPatchField.H:167
Foam::pTraits
Traits class for primitives.
Definition: pTraits.H:50
Foam::processorCyclicFvPatchField::processorCyclicFvPatchField
processorCyclicFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Definition: processorCyclicFvPatchField.C:35
processorCyclicFvPatch.H
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::processorCyclicFvPatchField::~processorCyclicFvPatchField
virtual ~processorCyclicFvPatchField()
Destructor.
Definition: processorCyclicFvPatchField.C:148
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51
Foam::processorCyclicFvPatch
Processor patch.
Definition: processorCyclicFvPatch.H:49
Foam::processorCyclicFvPatchField::TypeName
TypeName(processorCyclicFvPatch::typeName_())
Runtime type information.