processorCyclicFvsPatchField.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::processorCyclicFvsPatchField
28 
29 Description
30  This boundary condition enables processor communication across cyclic
31  patches.
32 
33  The "value" entry is MUST_READ.
34 
35 SourceFiles
36  processorCyclicFvsPatchField.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef Foam_processorCyclicFvsPatchField_H
41 #define Foam_processorCyclicFvsPatchField_H
42 
43 #include "coupledFvsPatchField.H"
44 #include "processorCyclicFvPatch.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class processorCyclicFvsPatch Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 template<class Type>
57 :
58  public coupledFvsPatchField<Type>
59 {
60  // Private Data
61 
62  //- Local reference cast into the processor patch
63  const processorCyclicFvPatch& procPatch_;
64 
65 
66 public:
67 
68  //- Runtime type information
69  TypeName(processorCyclicFvPatch::typeName_());
70 
71 
72  // Constructors
73 
74  //- Construct from patch and internal field
76  (
77  const fvPatch&,
79  );
80 
81  //- Construct from patch and internal field and patch field
83  (
84  const fvPatch&,
86  const Field<Type>&
87  );
88 
89  //- Construct from patch, internal field and dictionary.
90  //- The "value" entry is MUST_READ.
92  (
93  const fvPatch&,
95  const dictionary&
96  );
97 
98  //- Construct by mapping given patch field onto a new patch
100  (
102  const fvPatch&,
104  const fvPatchFieldMapper&
105  );
106 
107  //- Construct as copy
109 
110  //- Construct as copy setting internal field reference
112  (
115  );
116 
117  //- Return clone
118  virtual tmp<fvsPatchField<Type>> clone() const
119  {
120  return fvsPatchField<Type>::Clone(*this);
121  }
122 
123  //- Clone with an internal field reference
125  (
127  ) const
128  {
129  return fvsPatchField<Type>::Clone(*this, iF);
130  }
132 
133  //- Destructor
134  virtual ~processorCyclicFvsPatchField() = default;
135 
136 
137  // Member Functions
138 
139  //- True if running parallel
140  virtual bool coupled() const
141  {
142  return UPstream::parRun();
143  }
144 };
145 
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 } // End namespace Foam
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 #ifdef NoRepository
155 #endif
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 #endif
160 
161 // ************************************************************************* //
This boundary condition enables processor communication across cyclic patches.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
static tmp< fvsPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
static bool & parRun() noexcept
Test if this a parallel run.
Definition: UPstream.H:1061
virtual bool coupled() const
True if running parallel.
processorCyclicFvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Construct from patch and internal field.
Generic templated field type.
Definition: Field.H:62
A FieldMapper for finite-volume patch fields.
virtual tmp< fvsPatchField< Type > > clone() const
Return clone.
Abstract base class for coupled patches.
virtual ~processorCyclicFvsPatchField()=default
Destructor.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: HashPtrTable.H:50
TypeName(processorCyclicFvPatch::typeName_())
Runtime type information.
Namespace for OpenFOAM.