All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
jumpCyclicFvPatchField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::jumpCyclicFvPatchField
26 
27 Description
28  This boundary condition provides a base class for coupled-cyclic
29  conditions with a specified 'jump' (or offset) between the values
30 
31 See also
32  Foam::cyclicFvPatchField
33 
34 SourceFiles
35  jumpCyclicFvPatchField.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef jumpCyclicFvPatchField_H
40 #define jumpCyclicFvPatchField_H
41 
42 #include "cyclicFvPatchField.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class jumpCyclicFvPatchField Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 template<class Type>
55 :
56  public cyclicFvPatchField<Type>
57 {
58 
59 public:
60 
61  //- Runtime type information
62  TypeName("jumpCyclic");
63 
64 
65  // Constructors
66 
67  //- Construct from patch and internal field
69  (
70  const fvPatch&,
72  );
73 
74  //- Construct from patch, internal field and dictionary
76  (
77  const fvPatch&,
79  const dictionary&
80  );
81 
82  //- Construct by mapping given jumpCyclicFvPatchField onto a new patch
84  (
86  const fvPatch&,
88  const fvPatchFieldMapper&
89  );
90 
91  //- Copy constructor
93  (
95  );
96 
97  //- Copy constructor setting internal field reference
99  (
102  );
103 
104 
105  // Member Functions
106 
107  // Access
108 
109  //- Return the interface type
110  virtual const word& interfaceFieldType() const
111  {
113  }
114 
115  //- Return the "jump" across the patch as a "half" field
116  virtual tmp<Field<Type>> jump() const = 0;
117 
118 
119  // Evaluation functions
120 
121  //- Return neighbour coupled given internal cell data
123 
124  //- Update result field based on interface functionality
125  virtual void updateInterfaceMatrix
126  (
127  scalarField& result,
128  const scalarField& psiInternal,
129  const scalarField& coeffs,
130  const direction cmpt,
131  const Pstream::commsTypes commsType
132  ) const;
133 
134  //- Update result field based on interface functionality
135  virtual void updateInterfaceMatrix
136  (
137  Field<Type>&,
138  const Field<Type>&,
139  const scalarField&,
140  const Pstream::commsTypes commsType
141  ) const;
142 };
143 
144 //- Update result field based on interface functionality
145 template<>
147 (
148  scalarField& result,
149  const scalarField& psiInternal,
150  const scalarField& coeffs,
151  const direction cmpt,
152  const Pstream::commsTypes commsType
153 ) const;
154 
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 } // End namespace Foam
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 #ifdef NoRepository
163  #include "jumpCyclicFvPatchField.C"
164 #endif
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 #endif
169 
170 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
commsTypes
Types of communications.
Definition: UPstream.H:64
virtual const word & interfaceFieldType() const
Return the interface type.
uint8_t direction
Definition: direction.H:45
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
jumpCyclicFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
A class for handling words, derived from string.
Definition: word.H:59
Foam::fvPatchFieldMapper.
This boundary condition provides a base class for coupled-cyclic conditions with a specified &#39;jump&#39; (...
virtual void updateInterfaceMatrix(scalarField &result, const scalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
Update result field based on interface functionality.
This boundary condition enforces a cyclic condition between a pair of boundaries. ...
TypeName("jumpCyclic")
Runtime type information.
virtual tmp< Field< Type > > jump() const =0
Return the "jump" across the patch as a "half" field.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: PtrList.H:53
tmp< Field< Type > > patchNeighbourField() const
Return neighbour coupled given internal cell data.
Namespace for OpenFOAM.