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 | Copyright (C) 2011-2016 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 Group
28  grpCoupledBoundaryConditions
29 
30 Description
31  This boundary condition provides a base class for coupled-cyclic
32  conditions with a specified 'jump' (or offset) between the values
33 
34 See also
35  Foam::cyclicFvPatchField
36 
37 SourceFiles
38  jumpCyclicFvPatchField.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef jumpCyclicFvPatchField_H
43 #define jumpCyclicFvPatchField_H
44 
45 #include "cyclicFvPatchField.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class jumpCyclicFvPatchField Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class Type>
58 :
59  public cyclicFvPatchField<Type>
60 {
61 
62 public:
63 
64  //- Runtime type information
65  TypeName("jumpCyclic");
66 
67 
68  // Constructors
69 
70  //- Construct from patch and internal field
72  (
73  const fvPatch&,
75  );
76 
77  //- Construct from patch, internal field and dictionary
79  (
80  const fvPatch&,
82  const dictionary&
83  );
84 
85  //- Construct by mapping given jumpCyclicFvPatchField onto a new patch
87  (
89  const fvPatch&,
91  const fvPatchFieldMapper&
92  );
93 
94  //- Construct as copy
96  (
98  );
99 
100  //- Construct as copy setting internal field reference
102  (
105  );
106 
107 
108  // Member functions
109 
110  // Access
111 
112  //- Return the interface type
113  virtual const word& interfaceFieldType() const
114  {
116  }
117 
118  //- Return the "jump" across the patch as a "half" field
119  virtual tmp<Field<Type>> jump() const = 0;
120 
121 
122  // Evaluation functions
123 
124  //- Return neighbour coupled given internal cell data
126 
127  //- Update result field based on interface functionality
128  virtual void updateInterfaceMatrix
129  (
130  scalarField& result,
131  const scalarField& psiInternal,
132  const scalarField& coeffs,
133  const direction cmpt,
134  const Pstream::commsTypes commsType
135  ) const;
136 
137  //- Update result field based on interface functionality
138  virtual void updateInterfaceMatrix
139  (
140  Field<Type>&,
141  const Field<Type>&,
142  const scalarField&,
143  const Pstream::commsTypes commsType
144  ) const;
145 };
146 
147 //- Update result field based on interface functionality
148 template<>
150 (
151  scalarField& result,
152  const scalarField& psiInternal,
153  const scalarField& coeffs,
154  const direction cmpt,
155  const Pstream::commsTypes commsType
156 ) const;
157 
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #ifdef NoRepository
166  #include "jumpCyclicFvPatchField.C"
167 #endif
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
type
Types of root.
Definition: Roots.H:52
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
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.
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.