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
94  Field<Type> jump_;
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 and return a clone
137  virtual tmp<fvPatchField<Type>> clone() const
138  {
139  return tmp<fvPatchField<Type>>
140  (
142  );
143  }
144 
145  //- Construct as copy setting internal field reference
147  (
150  );
151 
152  //- Construct and return a clone setting internal field reference
154  (
156  ) const
157  {
158  return tmp<fvPatchField<Type>>
159  (
160  new fixedJumpAMIFvPatchField<Type>(*this, iF)
161  );
162  }
163 
164 
165  // Member functions
166 
167  // Access
168 
169  //- Return the "jump" across the patch
170  virtual tmp<Field<Type>> jump() const;
171 
172 
173  // Mapping functions
174 
175  //- Map (and resize as needed) from self given a mapping object
176  virtual void autoMap(const fvPatchFieldMapper&);
177 
178  //- Reverse map the given fvPatchField onto this fvPatchField
179  virtual void rmap(const fvPatchField<Type>&, const labelList&);
180 
181 
182  //- Write
183  virtual void write(Ostream&) const;
184 };
185 
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 } // End namespace Foam
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #ifdef NoRepository
194  #include "fixedJumpAMIFvPatchField.C"
195 #endif
196 
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 
199 #endif
200 
201 // ************************************************************************* //
Foam::fvPatchField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: volSurfaceMapping.H:50
Foam::fixedJumpAMIFvPatchField::TypeName
TypeName("fixedJumpAMI")
Runtime type information.
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::jumpCyclicAMIFvPatchField
This boundary condition provides a base class that enforces a cyclic condition with a specified 'jump...
Definition: jumpCyclicAMIFvPatchField.H:61
Foam::fixedJumpAMIFvPatchField::jump_
Field< Type > jump_
"jump" field
Definition: fixedJumpAMIFvPatchField.H:108
Foam::fixedJumpAMIFvPatchField::autoMap
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Definition: fixedJumpAMIFvPatchField.C:146
Foam::fixedJumpAMIFvPatchField
This boundary condition provides a jump condition, across non-conformal cyclic path-pairs,...
Definition: fixedJumpAMIFvPatchField.H:98
jumpCyclicAMIFvPatchField.H
Foam::fixedJumpAMIFvPatchField::clone
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
Definition: fixedJumpAMIFvPatchField.H:151
Foam::fixedJumpAMIFvPatchField::fixedJumpAMIFvPatchField
fixedJumpAMIFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Definition: fixedJumpAMIFvPatchField.C:34
Foam::Field
Generic templated field type.
Definition: Field.H:63
Foam::fixedJumpAMIFvPatchField::rmap
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Definition: fixedJumpAMIFvPatchField.C:157
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::fixedJumpAMIFvPatchField::jump
virtual tmp< Field< Type > > jump() const
Return the "jump" across the patch.
Definition: fixedJumpAMIFvPatchField.C:114
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::List< label >
Foam::fixedJumpAMIFvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: fixedJumpAMIFvPatchField.C:171
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
fixedJumpAMIFvPatchField.C
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54