Loading...
Searching...
No Matches
processorCyclicPointPatchField.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-2017 OpenFOAM Foundation
9 Copyright (C) 2023 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::processorCyclicPointPatchField
29
30Description
31 Foam::processorCyclicPointPatchField
32
33SourceFiles
34 processorCyclicPointPatchField.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef Foam_processorCyclicPointPatchField_H
39#define Foam_processorCyclicPointPatchField_H
40
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49/*---------------------------------------------------------------------------*\
50 Class processorCyclicPointPatchField Declaration
51\*---------------------------------------------------------------------------*/
52
53template<class Type>
55:
56 public coupledPointPatchField<Type>
57{
58 // Private Data
59
60 //- Local reference to processor patch
61 const processorCyclicPointPatch& procPatch_;
62
63 //- Send buffer for non-blocking communication
64 mutable Field<Type> sendBuf_;
65
66 //- Receive buffer for non-blocking communication
67 mutable Field<Type> recvBuf_;
68
69
70public:
71
72 //- Runtime type information
73 TypeName(processorCyclicPointPatch::typeName_());
74
75
76 // Constructors
77
78 //- Construct from patch and internal field
80 (
81 const pointPatch&,
83 );
84
85 //- Construct from patch, internal field and dictionary
87 (
88 const pointPatch&,
90 const dictionary&
91 );
92
93 //- Construct by mapping given patch field onto a new patch
95 (
97 const pointPatch&,
100 );
101
102 //- Construct as copy setting internal field reference
104 (
107 );
108
109 //- Return a clone
110 virtual autoPtr<pointPatchField<Type>> clone() const
111 {
112 return pointPatchField<Type>::Clone(*this);
113 }
114
115 //- Construct and return a clone setting internal field reference
117 (
119 ) const
120 {
121 return pointPatchField<Type>::Clone(*this, iF);
122 }
124
125 //- Destructor
126 virtual ~processorCyclicPointPatchField() = default;
127
128
129 // Member functions
130
131 // Access
132
133 //- Return true if running parallel
134 virtual bool coupled() const
135 {
136 return UPstream::parRun();
137 }
138
139 //- Does the patch field perform the transformation
140 virtual bool doTransform() const
141 {
142 return
145 && !procPatch_.procPolyPatch().parallel()
146 );
147 }
148
149
150 // Evaluation functions
151
152 //- Evaluate the patch field
153 virtual void evaluate
154 (
155 const Pstream::commsTypes commsType =
157 )
158 {}
159
160 //- Initialise swap of non-collocated patch point values
162 (
163 const Pstream::commsTypes commsType,
165 ) const;
166
167 //- Complete swap of patch point values and add to local values
168 virtual void swapAddSeparated
169 (
170 const Pstream::commsTypes commsType,
172 ) const;
173};
174
175
176// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177
178} // End namespace Foam
179
180// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181
182#ifdef NoRepository
184#endif
185
186// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187
188#endif
189
190// ************************************************************************* //
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
commsTypes
Communications types.
Definition UPstream.H:81
@ buffered
"buffered" : (MPI_Bsend, MPI_Recv)
Definition UPstream.H:82
static bool & parRun() noexcept
Test if this a parallel run.
Definition UPstream.H:1681
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
coupledPointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
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
Foam::pointPatchFieldMapper.
static autoPtr< pointPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Basic pointPatch represents a set of points from the mesh.
Definition pointPatch.H:67
processorCyclicPointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
virtual bool doTransform() const
Does the patch field perform the transformation.
virtual bool coupled() const
Return true if running parallel.
virtual void swapAddSeparated(const Pstream::commsTypes commsType, Field< Type > &) const
Complete swap of patch point values and add to local values.
virtual void initSwapAddSeparated(const Pstream::commsTypes commsType, Field< Type > &) const
Initialise swap of non-collocated patch point values.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field.
virtual autoPtr< pointPatchField< Type > > clone(const DimensionedField< Type, pointMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual ~processorCyclicPointPatchField()=default
Destructor.
TypeName(processorCyclicPointPatch::typeName_())
Runtime type information.
virtual autoPtr< pointPatchField< Type > > clone() const
Return a clone.
Processor patch boundary needs to be such that the ordering of points in the patch is the same on bot...
Namespace for OpenFOAM.
constexpr bool is_rotational_vectorspace_v
The is_rotational_vectorspace value of Type.
Definition pTraits.H:251
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68