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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::processorCyclicPointPatchField
28
29Description
30 Foam::processorCyclicPointPatchField
31
32SourceFiles
33 processorCyclicPointPatchField.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef processorCyclicPointPatchField_H
38#define processorCyclicPointPatchField_H
39
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48/*---------------------------------------------------------------------------*\
49 Class processorCyclicPointPatchField Declaration
50\*---------------------------------------------------------------------------*/
51
52template<class Type>
54:
55 public coupledPointPatchField<Type>
56{
57 // Private data
58
59 //- Local reference to processor patch
60 const processorCyclicPointPatch& procPatch_;
61
62 //- Receive buffer for non-blocking communication
63 mutable Field<Type> receiveBuf_;
64
65
66public:
67
68 //- Runtime type information
69 TypeName(processorCyclicPointPatch::typeName_());
70
71
72 // Constructors
73
74 //- Construct from patch and internal field
76 (
77 const pointPatch&,
79 );
80
81 //- Construct from patch, internal field and dictionary
83 (
84 const pointPatch&,
86 const dictionary&
87 );
88
89 //- Construct by mapping given patchField<Type> onto a new patch
91 (
93 const pointPatch&,
96 );
97
98 //- Construct and return a clone
100 {
102 (
104 (
105 *this
106 )
107 );
108 }
109
110 //- Construct as copy setting internal field reference
112 (
115 );
116
117 //- Construct and return a clone setting internal field reference
119 (
121 ) const
122 {
124 (
126 (
127 *this,
128 iF
129 )
130 );
131 }
132
133
134 //- Destructor
136
137
138 // Member functions
139
140 // Access
141
142 //- Return true if running parallel
143 virtual bool coupled() const
144 {
145 return Pstream::parRun();
146 }
147
148 //- Does the patch field perform the transformation
149 virtual bool doTransform() const
150 {
151 return
152 !(
154 || procPatch_.procPolyPatch().parallel()
155 );
156 }
157
158
159 // Evaluation functions
160
161 //- Evaluate the patch field
162 virtual void evaluate
163 (
164 const Pstream::commsTypes commsType =
166 )
167 {}
168
169 //- Initialise swap of non-collocated patch point values
170 virtual void initSwapAddSeparated
171 (
172 const Pstream::commsTypes commsType,
174 ) const;
175
176 //- Complete swap of patch point values and add to local values
177 virtual void swapAddSeparated
178 (
179 const Pstream::commsTypes commsType,
181 ) const;
182};
183
184
185// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186
187} // End namespace Foam
188
189// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190
191#ifdef NoRepository
193#endif
194
195// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196
197#endif
198
199// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type.
Definition: Field.H:82
commsTypes
Types of communications.
Definition: UPstream.H:67
static bool & parRun() noexcept
Test if this a parallel run.
Definition: UPstream.H:433
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A Coupled boundary condition for pointField.
virtual bool parallel() const
Are the cyclic planes parallel.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A traits class, which is primarily used for primitives.
Definition: pTraits.H:59
Foam::pointPatchFieldMapper.
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:64
Foam::processorCyclicPointPatchField.
virtual bool doTransform() const
Does the patch field perform the transformation.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field.
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 autoPtr< pointPatchField< Type > > clone(const DimensionedField< Type, pointMesh > &iF) const
Construct and return a clone setting internal field reference.
TypeName(processorCyclicPointPatch::typeName_())
Runtime type information.
virtual autoPtr< pointPatchField< Type > > clone() const
Construct and return a clone.
Processor patch boundary needs to be such that the ordering of points in the patch is the same on bot...
const processorPolyPatch & procPolyPatch() const
Return the underlying processorPolyPatch.
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73