Loading...
Searching...
No Matches
cyclicACMIPointPatchField.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) 2013-2017 OpenFOAM Foundation
9 Copyright (C) 2020 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::cyclicACMIPointPatchField
29
30Description
31 Cyclic ACMI front and back plane patch field
32
33SourceFiles
34 cyclicACMIPointPatchField.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef Foam_cyclicACMIPointPatchField_H
39#define Foam_cyclicACMIPointPatchField_H
40
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50/*---------------------------------------------------------------------------*\
51 Class cyclicACMIPointPatchField Declaration
52\*---------------------------------------------------------------------------*/
53
54template<class Type>
56:
57 public coupledPointPatchField<Type>
58{
59 // Private Data
60
61 //- Local reference cast into the cyclicACMI patch
62 const cyclicACMIPointPatch& cyclicACMIPatch_;
63
64 //- Owner side patch interpolation pointer
66
67 //- Neighbour side patch interpolation pointer
69 nbrPpiPtr_;
70
71
72 // Private Member Functions
73
74 //- Owner side patch interpolation
76 {
77 if (!ppiPtr_)
78 {
79 ppiPtr_.reset
80 (
82 (
83 cyclicACMIPatch_.cyclicACMIPatch()
84 )
85 );
86 }
87
88 return *ppiPtr_;
89 }
90
91 //- Neighbour side patch interpolation
93 {
94 if (!nbrPpiPtr_)
95 {
96 nbrPpiPtr_.reset
97 (
99 (
100 cyclicACMIPatch_.cyclicACMIPatch().neighbPatch()
101 )
102 );
103 }
104
105 return *nbrPpiPtr_;
106 }
107
108
109public:
110
111 //- Runtime type information
112 TypeName(cyclicACMIPointPatch::typeName_());
113
114
115 // Constructors
116
117 //- Construct from patch and internal field
120 const pointPatch&,
122 );
123
124 //- Construct from patch, internal field and dictionary
126 (
127 const pointPatch&,
129 const dictionary&
130 );
131
132 //- Construct by mapping given patch field onto a new patch
134 (
136 const pointPatch&,
139 );
140
141 //- Construct as copy setting internal field reference
143 (
146 );
147
148 //- Return a clone
149 virtual autoPtr<pointPatchField<Type>> clone() const
150 {
151 return pointPatchField<Type>::Clone(*this);
152 }
153
154 //- Construct and return a clone setting internal field reference
156 (
158 ) const
159 {
160 return pointPatchField<Type>::Clone(*this, iF);
161 }
162
163
164 // Member functions
165
166 // Constraint handling
167
168 //- Return the constraint type this pointPatchField implements
169 virtual const word& constraintType() const
170 {
171 return cyclicACMIPointPatch::typeName;
172 }
173
175 // Cyclic AMI coupled interface functions
176
177 //- Does the patch field perform the transformation
178 virtual bool doTransform() const
179 {
180 return
181 (
183 && !cyclicACMIPatch_.parallel()
184 );
185 }
186
187 //- Return face transformation tensor
188 virtual const tensorField& forwardT() const
189 {
190 return cyclicACMIPatch_.forwardT();
191 }
192
193 //- Return neighbour-cell transformation tensor
194 virtual const tensorField& reverseT() const
195 {
196 return cyclicACMIPatch_.reverseT();
197 }
198
199
200 // Evaluation functions
202 //- Evaluate the patch field
203 virtual void evaluate
204 (
205 const Pstream::commsTypes commsType =
207 )
208 {}
209
210 //- Complete swap of patch point values and add to local values
211 virtual void swapAddSeparated
212 (
213 const Pstream::commsTypes commsType,
215 ) const;
216};
217
218
219// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
220
221} // End namespace Foam
222
223// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
224
225#ifdef NoRepository
227#endif
228
229// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
230
231#endif
233// ************************************************************************* //
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
Interpolation class within a primitive patch. Allows interpolation from points to faces and vice vers...
commsTypes
Communications types.
Definition UPstream.H:81
@ buffered
"buffered" : (MPI_Bsend, MPI_Recv)
Definition UPstream.H:82
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.
virtual bool doTransform() const
Does the patch field perform the transformation.
virtual void swapAddSeparated(const Pstream::commsTypes commsType, Field< Type > &) const
Complete swap of patch point values and add to local values.
cyclicACMIPointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
virtual const word & constraintType() const
Return the constraint type this pointPatchField implements.
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 autoPtr< pointPatchField< Type > > clone() const
Return a clone.
TypeName(cyclicACMIPointPatch::typeName_())
Runtime type information.
virtual const tensorField & forwardT() const
Return face transformation tensor.
Cyclic AMI point patch - place holder only.
const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
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
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
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