Loading...
Searching...
No Matches
processorFvsPatchField.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 Copyright (C) 2024 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::processorFvsPatchField
29
30Description
31 This boundary condition enables processor communication across patches.
32
33 The "value" entry is MUST_READ.
34
35 Example of the boundary condition specification:
36 \verbatim
37 <patchName>
38 {
39 type processor;
40 value uniform (0 0 0); // Mandatory
41 }
42 \endverbatim
43
44SourceFiles
45 processorFvsPatchField.C
46
47\*---------------------------------------------------------------------------*/
48
49#ifndef Foam_processorFvsPatchField_H
50#define Foam_processorFvsPatchField_H
51
53#include "processorFvPatch.H"
54
55// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56
57namespace Foam
58{
59
60/*---------------------------------------------------------------------------*\
61 Class processorFvsPatch Declaration
62\*---------------------------------------------------------------------------*/
63
64template<class Type>
66:
67 public coupledFvsPatchField<Type>
68{
69 // Private Data
70
71 //- Local reference cast into the processor patch
72 const processorFvPatch& procPatch_;
73
74
75public:
76
77 //- Runtime type information
78 TypeName(processorFvPatch::typeName_());
79
80
81 // Constructors
82
83 //- Construct from patch and internal field
85 (
86 const fvPatch&,
88 );
89
90 //- Construct from patch and internal field and patch field
92 (
93 const fvPatch&,
95 const Field<Type>&
96 );
97
98 //- Construct from patch, internal field and dictionary.
99 //- The "value" entry is MUST_READ.
101 (
102 const fvPatch&,
104 const dictionary&
105 );
106
107 //- Construct by mapping given processorFvsPatchField onto a new patch
109 (
111 const fvPatch&,
113 const fvPatchFieldMapper&
114 );
115
116 //- Construct as copy
118
119 //- Construct as copy setting internal field reference
121 (
124 );
125
126 //- Return clone
127 virtual tmp<fvsPatchField<Type>> clone() const
128 {
129 return fvsPatchField<Type>::Clone(*this);
130 }
131
132 //- Clone with an internal field reference
134 (
136 ) const
137 {
138 return fvsPatchField<Type>::Clone(*this, iF);
139 }
141
142 //- Destructor
143 virtual ~processorFvsPatchField() = default;
144
145
146 // Member Functions
147
148 //- True if running parallel
149 virtual bool coupled() const
150 {
151 return UPstream::parRun();
152 }
153};
154
155
156// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157
158} // End namespace Foam
159
160// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161
162#ifdef NoRepository
163 #include "processorFvsPatchField.C"
164#endif
165
166// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167
168#endif
169
170// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Definition Field.H:172
static bool & parRun() noexcept
Test if this a parallel run.
Definition UPstream.H:1681
coupledFvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Construct from patch and internal field.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
static tmp< fvsPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
processorFvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Construct from patch and internal field.
virtual tmp< fvsPatchField< Type > > clone(const DimensionedField< Type, surfaceMesh > &iF) const
Clone with an internal field reference.
virtual bool coupled() const
True if running parallel.
virtual ~processorFvsPatchField()=default
Destructor.
TypeName(processorFvPatch::typeName_())
Runtime type information.
virtual tmp< fvsPatchField< Type > > clone() const
Return clone.
A class for managing temporary objects.
Definition tmp.H:75
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68