jumpCyclicFvPatchField.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) 2018-2019 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::jumpCyclicFvPatchField
29
30Group
31 grpCoupledBoundaryConditions
32
33Description
34 This boundary condition provides a base class for coupled-cyclic
35 conditions with a specified 'jump' (or offset) between the values
36
37See also
38 Foam::cyclicFvPatchField
39
40SourceFiles
41 jumpCyclicFvPatchField.C
42
43\*---------------------------------------------------------------------------*/
44
45#ifndef jumpCyclicFvPatchField_H
46#define jumpCyclicFvPatchField_H
47
48#include "cyclicFvPatchField.H"
49
50// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51
52namespace Foam
53{
54
55/*---------------------------------------------------------------------------*\
56 Class jumpCyclicFvPatchField Declaration
57\*---------------------------------------------------------------------------*/
58
59template<class Type>
61:
62 public cyclicFvPatchField<Type>
63{
64
65public:
66
67 //- Runtime type information
68 TypeName("jumpCyclic");
69
70
71 // Constructors
72
73 //- Construct from patch and internal field
75 (
76 const fvPatch&,
78 );
79
80 //- Construct from patch, internal field and dictionary
82 (
83 const fvPatch&,
85 const dictionary&,
86 const bool valueRequired = true
87 );
88
89 //- Construct by mapping given jumpCyclicFvPatchField onto a new patch
91 (
93 const fvPatch&,
96 );
97
98 //- Construct as copy
100 (
102 );
103
104 //- Construct as copy setting internal field reference
106 (
109 );
110
111
112 // Member functions
113
114 // Access
115
116 //- Return the interface type
117 virtual const word& interfaceFieldType() const
118 {
120 }
121
122 //- Return the "jump" across the patch as a "half" field
123 virtual tmp<Field<Type>> jump() const = 0;
124
125
126 // Evaluation functions
127
128 //- Return neighbour coupled given internal cell data
130
131 //- Update result field based on interface functionality
132 virtual void updateInterfaceMatrix
133 (
134 solveScalarField& result,
135 const bool add,
136 const lduAddressing& lduAddr,
137 const label patchId,
138 const solveScalarField& psiInternal,
139 const scalarField& coeffs,
140 const direction cmpt,
141 const Pstream::commsTypes commsType
142 ) const;
143
144 //- Update result field based on interface functionality
145 virtual void updateInterfaceMatrix
146 (
148 const bool add,
149 const lduAddressing& lduAddr,
150 const label patchId,
151 const Field<Type>&,
152 const scalarField&,
153 const Pstream::commsTypes commsType
154 ) const;
155};
156
157//- Update result field based on interface functionality
158template<>
160(
161 solveScalarField& result,
162 const bool add,
163 const lduAddressing& lduAddr,
164 const label patchId,
165 const solveScalarField& psiInternal,
166 const scalarField& coeffs,
167 const direction cmpt,
168 const Pstream::commsTypes commsType
169) const;
170
171
172template<>
174(
175 solveScalarField& result,
176 const bool add,
177 const lduAddressing& lduAddr,
178 const label patchId,
179 const solveScalarField& psiInternal,
180 const scalarField& coeffs,
181 const direction cmpt,
182 const Pstream::commsTypes commsType
183) const;
184
185
186// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187
188} // End namespace Foam
189
190// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191
192#ifdef NoRepository
193 #include "jumpCyclicFvPatchField.C"
194#endif
195
196// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197
198#endif
199
200// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
commsTypes
Types of communications.
Definition: UPstream.H:67
This boundary condition enforces a cyclic condition between a pair of boundaries.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
This boundary condition provides a base class for coupled-cyclic conditions with a specified 'jump' (...
virtual const word & interfaceFieldType() const
Return the interface type.
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 tmp< Field< Type > > jump() const =0
Return the "jump" across the patch as a "half" field.
tmp< Field< Type > > patchNeighbourField() const
Return neighbour coupled given internal cell data.
TypeName("jumpCyclic")
Runtime type information.
The class contains the addressing required by the lduMatrix: upper, lower and losort.
A class for managing temporary objects.
Definition: tmp.H:65
type
Volume classification types.
Definition: volumeType.H:66
A class for handling words, derived from Foam::string.
Definition: word.H:68
label patchId(-1)
Namespace for OpenFOAM.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
uint8_t direction
Definition: direction.H:56
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73