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 | Copyright (C) 2012-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::jumpCyclicAMIFvPatchField
26 
27 Group
28  grpCoupledBoundaryConditions
29 
30 Description
31  This boundary condition provides a base class that enforces a cyclic
32  condition with a specified 'jump' (or offset) between a pair of boundaries,
33  whereby communication between the patches is performed using an arbitrary
34  mesh interface (AMI) interpolation.
35 
36 See also
37  Foam::cyclicAMIFvPatchField
38 
39 SourceFiles
40  jumpCyclicAMIFvPatchField.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef jumpCyclicAMIFvPatchField_H
45 #define jumpCyclicAMIFvPatchField_H
46 
47 #include "cyclicAMIFvPatchField.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class jumpCyclicAMIFvPatchField Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 template<class Type>
60 :
61  public cyclicAMIFvPatchField<Type>
62 {
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("jumpCyclicAMI");
68 
69 
70  // Constructors
71 
72  //- Construct from patch and internal field
74  (
75  const fvPatch&,
77  );
78 
79  //- Construct from patch, internal field and dictionary
81  (
82  const fvPatch&,
84  const dictionary&
85  );
86 
87  //- Construct by mapping given jumpCyclicAMIFvPatchField onto a
88  // new patch
90  (
92  const fvPatch&,
94  const fvPatchFieldMapper&
95  );
96 
97  //- Construct as copy
99  (
101  );
102 
103  //- Construct as copy setting internal field reference
105  (
108  );
109 
110 
111  // Member functions
112 
113  // Access
114 
115  //- Return the interface type
116  virtual const word& interfaceFieldType() const
117  {
119  }
120 
121  //- Return the "jump" across the patch as a "half" field
122  virtual tmp<Field<Type>> jump() const = 0;
123 
124 
125  // Evaluation functions
126 
127  //- Return neighbour coupled given internal cell data
129 
130  //- Update result field based on interface functionality
131  virtual void updateInterfaceMatrix
132  (
133  scalarField& result,
134  const scalarField& psiInternal,
135  const scalarField& coeffs,
136  const direction cmpt,
137  const Pstream::commsTypes commsType
138  ) const;
139 
140  //- Update result field based on interface functionality
141  virtual void updateInterfaceMatrix
142  (
143  Field<Type>&,
144  const Field<Type>&,
145  const scalarField&,
146  const Pstream::commsTypes commsType
147  ) const;
148 };
149 
150 
151 //- Update result field based on interface functionality
152 template<>
154 (
155  scalarField& result,
156  const scalarField& psiInternal,
157  const scalarField& coeffs,
158  const direction cmpt,
159  const Pstream::commsTypes commsType
160 ) const;
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 } // End namespace Foam
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #ifdef NoRepository
170  #include "jumpCyclicAMIFvPatchField.C"
171 #endif
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 #endif
176 
177 // ************************************************************************* //
This boundary condition provides a base class that enforces a cyclic condition with a specified &#39;jump...
virtual const word & interfaceFieldType() const
Return the interface type.
uint8_t direction
Definition: direction.H:46
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 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.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
jumpCyclicAMIFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
TypeName("jumpCyclicAMI")
Runtime type information.
A class for handling words, derived from string.
Definition: word.H:59
Foam::fvPatchFieldMapper.
tmp< Field< Type > > patchNeighbourField() const
Return neighbour coupled given internal cell data.
virtual tmp< Field< Type > > jump() const =0
Return the "jump" across the patch as a "half" field.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:461
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:54
This boundary condition enforces a cyclic condition between a pair of boundaries, whereby communicati...
Namespace for OpenFOAM.