fixedJumpAMIFvPatchField.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 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::fixedJumpAMIFvPatchField
28 
29 Group
30  grpCoupledBoundaryConditions
31 
32 Description
33  This boundary condition provides a jump condition, across non-conformal
34  cyclic path-pairs, employing an arbitraryMeshInterface (AMI).
35 
36  The jump is specified as a fixed value field, applied as an offset to the
37  'owner' patch.
38 
39 Usage
40  \table
41  Property | Description | Required | Default value
42  patchType | underlying patch type should be \c cyclic| yes |
43  jump | current jump value | yes |
44  \endtable
45 
46  Example of the boundary condition specification:
47  \verbatim
48  <patchName>
49  {
50  type fixedJumpAMI;
51  patchType cyclic;
52  jump uniform 10;
53  }
54  \endverbatim
55 
56  The above example shows the use of a fixed jump of '10'.
57 
58 Note
59  The underlying \c patchType should be set to \c cyclicAMI
60 
61 See also
62  Foam::jumpCyclicAMIFvPatchField
63 
64 SourceFiles
65  fixedJumpAMIFvPatchField.C
66 
67 \*---------------------------------------------------------------------------*/
68 
69 #ifndef fixedJumpAMIFvPatchField_H
70 #define fixedJumpAMIFvPatchField_H
71 
73 
74 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
75 
76 namespace Foam
77 {
78 
79 /*---------------------------------------------------------------------------*\
80  Class fixedJumpAMIFvPatchField Declaration
81 \*---------------------------------------------------------------------------*/
82 
83 template<class Type>
84 class fixedJumpAMIFvPatchField
85 :
86  public jumpCyclicAMIFvPatchField<Type>
87 {
88 
89 protected:
90 
91  // Protected data
92 
93  //- "jump" field
95 
96 
97 public:
98 
99  //- Runtime type information
100  TypeName("fixedJumpAMI");
101 
102 
103  // Constructors
104 
105  //- Construct from patch and internal field
107  (
108  const fvPatch&,
110  );
111 
112  //- Construct from patch, internal field and dictionary
114  (
115  const fvPatch&,
117  const dictionary&
118  );
119 
120  //- Construct by mapping given fixedJumpAMIFvPatchField onto a
121  // new patch
123  (
125  const fvPatch&,
127  const fvPatchFieldMapper&
128  );
129 
130  //- Construct as copy
132  (
134  );
135 
136  //- Construct as copy setting internal field reference
138  (
141  );
142 
143  //- Return a clone
144  virtual tmp<fvPatchField<Type>> clone() const
145  {
146  return fvPatchField<Type>::Clone(*this);
147  }
148 
149  //- Clone with an internal field reference
151  (
153  ) const
154  {
155  return fvPatchField<Type>::Clone(*this, iF);
156  }
157 
158 
159  // Member functions
160 
161  // Access
162 
163  //- Return the "jump" across the patch
164  virtual tmp<Field<Type>> jump() const;
165 
166 
167  // Mapping functions
168 
169  //- Map (and resize as needed) from self given a mapping object
170  virtual void autoMap(const fvPatchFieldMapper&);
172  //- Reverse map the given fvPatchField onto this fvPatchField
173  virtual void rmap(const fvPatchField<Type>&, const labelList&);
174 
175 
176  //- Write
177  virtual void write(Ostream&) const;
178 };
179 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 } // End namespace Foam
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #ifdef NoRepository
188  #include "fixedJumpAMIFvPatchField.C"
189 #endif
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #endif
194 
195 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: fvPatchField.H:597
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Generic templated field type.
Definition: Field.H:62
A FieldMapper for finite-volume patch fields.
TypeName("fixedJumpAMI")
Runtime type information.
virtual tmp< fvPatchField< Type > > clone() const
Return a clone.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
This boundary condition provides a jump condition, across non-conformal cyclic path-pairs, employing an arbitraryMeshInterface (AMI).
virtual tmp< Field< Type > > jump() const
Return the "jump" across the patch.
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: HashPtrTable.H:50
fixedJumpAMIFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
virtual void write(Ostream &) const
Write.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Namespace for OpenFOAM.