Loading...
Searching...
No Matches
jumpCyclicAMIFvPatchField.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) 2012-2016 OpenFOAM Foundation
9 Copyright (C) 2019,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::jumpCyclicAMIFvPatchField
29
30Group
31 grpCoupledBoundaryConditions
32
33Description
34 This boundary condition provides a base class that enforces a cyclic
35 condition with a specified 'jump' (or offset) between a pair of boundaries,
36 whereby communication between the patches is performed using an arbitrary
37 mesh interface (AMI) interpolation.
38
39See also
40 Foam::cyclicAMIFvPatchField
41
42SourceFiles
43 jumpCyclicAMIFvPatchField.C
44
45\*---------------------------------------------------------------------------*/
46
47#ifndef jumpCyclicAMIFvPatchField_H
48#define jumpCyclicAMIFvPatchField_H
49
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54namespace Foam
55{
56
57/*---------------------------------------------------------------------------*\
58 Class jumpCyclicAMIFvPatchField Declaration
59\*---------------------------------------------------------------------------*/
60
61template<class Type>
63:
64 public cyclicAMIFvPatchField<Type>
65{
66
67public:
68
69 //- Runtime type information
70 TypeName("jumpCyclicAMI");
71
72
73 // Constructors
74
75 //- Construct from patch and internal field
77 (
78 const fvPatch&,
80 );
81
82 //- Construct from patch, internal field and dictionary
84 (
85 const fvPatch&,
87 const dictionary&
88 );
89
90 //- Construct by mapping given jumpCyclicAMIFvPatchField onto a
91 // new patch
93 (
95 const fvPatch&,
98 );
99
100 //- Construct as copy
102 (
104 );
105
106 //- Construct as copy setting internal field reference
108 (
111 );
112
113
114 // Member functions
115
116 // Access
117
118 //- Return the interface type
119 virtual const word& interfaceFieldType() const
120 {
122 }
123
124 //- Return the "jump" across the patch as a "half" field
125 virtual tmp<Field<Type>> jump() const = 0;
126
127
128 // Evaluation functions
130 //- Return neighbour coupled given internal cell data
131 virtual tmp<Field<Type>> patchNeighbourField() const;
132
133 //- Initialise the evaluation of the patch field
134 virtual void initEvaluate(const Pstream::commsTypes commsType);
135
136 //- Evaluate the patch field
137 virtual void evaluate(const Pstream::commsTypes commsType);
138
139 //- Initialise interface functionality
140 virtual void initInterfaceMatrixUpdate
141 (
142 solveScalarField& result,
143 const bool add,
144 const lduAddressing& lduAddr,
145 const label patchId,
146 const solveScalarField& psiInternal,
147 const scalarField& coeffs,
148 const direction cmpt,
149 const Pstream::commsTypes commsType
150 ) const;
151
152 //- Update result field based on interface functionality
153 virtual void updateInterfaceMatrix
154 (
155 solveScalarField& result,
156 const bool add,
157 const lduAddressing& lduAddr,
158 const label patchId,
159 const solveScalarField& psiInternal,
160 const scalarField& coeffs,
161 const direction cmpt,
162 const Pstream::commsTypes commsType
163 ) const;
164
165 //- Initialise interface functionality
167 (
168 Field<Type>& result,
169 const bool add,
170 const lduAddressing& lduAddr,
171 const label patchId,
172 const Field<Type>& psiInternal,
173 const scalarField& coeffs,
174 const Pstream::commsTypes commsType
175 ) const;
176
177 //- Update result field based on interface functionality
178 virtual void updateInterfaceMatrix
179 (
181 const bool add,
182 const lduAddressing& lduAddr,
183 const label patchId,
184 const Field<Type>&,
185 const scalarField&,
186 const Pstream::commsTypes commsType
187 ) const;
188};
189
190
191//- Update result field based on interface functionality
192template<>
194(
195 solveScalarField& result,
196 const bool add,
197 const lduAddressing& lduAddr,
198 const label patchId,
199 const solveScalarField& psiInternal,
200 const scalarField& coeffs,
201 const direction cmpt,
202 const Pstream::commsTypes commsType
203) const;
204
205
206// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207
208} // End namespace Foam
209
210// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211
212#ifdef NoRepository
214#endif
215
216// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
217
218#endif
219
220// ************************************************************************* //
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
cyclicAMIFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
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
virtual const word & interfaceFieldType() const
Return the interface type.
virtual void initInterfaceMatrixUpdate(solveScalarField &result, const bool add, const lduAddressing &lduAddr, const label patchId, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
Initialise interface functionality.
jumpCyclicAMIFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
virtual void updateInterfaceMatrix(solveScalarField &result, const bool add, const lduAddressing &lduAddr, const label patchId, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
Update result field based on interface functionality.
virtual void initEvaluate(const Pstream::commsTypes commsType)
Initialise the evaluation of the patch field.
virtual tmp< Field< Type > > jump() const =0
Return the "jump" across the patch as a "half" field.
TypeName("jumpCyclicAMI")
Runtime type information.
virtual void evaluate(const Pstream::commsTypes commsType)
Evaluate the patch field.
virtual tmp< Field< Type > > patchNeighbourField() const
Return neighbour coupled given internal cell data.
The class contains the addressing required by the lduMatrix: upper, lower and losort.
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
label patchId(-1)
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
void add(DimensionedField< scalar, GeoMesh > &result, const dimensioned< scalar > &dt1, const DimensionedField< scalar, GeoMesh > &f2)
Field< solveScalar > solveScalarField
uint8_t direction
Definition direction.H:49
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68