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 | Copyright (C) 2012 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::fixedJumpAMIFvPatchField
26 
27 Group
28  grpCoupledBoundaryConditions
29 
30 Description
31  This boundary condition provides a jump condition, across non-conformal
32  cyclic path-pairs, employing an arbitraryMeshInterface (AMI).
33 
34  The jump is specified as a fixed value field, applied as an offset to the
35  'owner' patch.
36 
37  \heading Patch usage
38 
39  \table
40  Property | Description | Required | Default value
41  patchType | underlying patch type should be \c cyclic| yes |
42  jump | current jump value | yes |
43  \endtable
44 
45  Example of the boundary condition specification:
46  \verbatim
47  myPatch
48  {
49  type fixedJumpAMI;
50  patchType cyclic;
51  jump uniform 10;
52  }
53  \endverbatim
54 
55  The above example shows the use of a fixed jump of '10'.
56 
57 Note
58  The underlying \c patchType should be set to \c cyclicAMI
59 
60 SeeAlso
61  Foam::jumpCyclicAMIFvPatchField
62 
63 SourceFiles
64  fixedJumpAMIFvPatchField.C
65 
66 \*---------------------------------------------------------------------------*/
67 
68 #ifndef fixedJumpAMIFvPatchField_H
69 #define fixedJumpAMIFvPatchField_H
70 
72 
73 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
74 
75 namespace Foam
76 {
77 
78 /*---------------------------------------------------------------------------*\
79  Class fixedJumpAMIFvPatchField Declaration
80 \*---------------------------------------------------------------------------*/
81 
82 template<class Type>
83 class fixedJumpAMIFvPatchField
84 :
85  public jumpCyclicAMIFvPatchField<Type>
86 {
87 
88 protected:
89 
90  // Protected data
91 
92  //- "jump" field
93  Field<Type> jump_;
94 
95 
96 public:
97 
98  //- Runtime type information
99  TypeName("fixedJumpAMI");
100 
101 
102  // Constructors
103 
104  //- Construct from patch and internal field
106  (
107  const fvPatch&,
109  );
110 
111  //- Construct from patch, internal field and dictionary
113  (
114  const fvPatch&,
116  const dictionary&
117  );
118 
119  //- Construct by mapping given fixedJumpAMIFvPatchField onto a
120  // new patch
122  (
124  const fvPatch&,
126  const fvPatchFieldMapper&
127  );
128 
129  //- Construct as copy
131  (
133  );
134 
135  //- Construct and return a clone
136  virtual tmp<fvPatchField<Type> > clone() const
137  {
138  return tmp<fvPatchField<Type> >
139  (
141  );
142  }
143 
144  //- Construct as copy setting internal field reference
146  (
149  );
150 
151  //- Construct and return a clone setting internal field reference
152  virtual tmp<fvPatchField<Type> > clone
153  (
155  ) const
156  {
157  return tmp<fvPatchField<Type> >
158  (
159  new fixedJumpAMIFvPatchField<Type>(*this, iF)
160  );
161  }
162 
163 
164  // Member functions
165 
166  // Access
167 
168  //- Return the "jump" across the patch
169  virtual tmp<Field<Type> > jump() const;
170 
171 
172  // Mapping functions
173 
174  //- Map (and resize as needed) from self given a mapping object
175  virtual void autoMap(const fvPatchFieldMapper&);
176 
177  //- Reverse map the given fvPatchField onto this fvPatchField
178  virtual void rmap(const fvPatchField<Type>&, const labelList&);
179 
180 
181  //- Write
182  virtual void write(Ostream&) const;
183 };
184 
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 } // End namespace Foam
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 #ifdef NoRepository
193 # include "fixedJumpAMIFvPatchField.C"
194 #endif
195 
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 
198 #endif
199 
200 // ************************************************************************* //
Foam::fvPatchField< Type >
Foam::fixedJumpAMIFvPatchField::TypeName
TypeName("fixedJumpAMI")
Runtime type information.
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::jumpCyclicAMIFvPatchField
This boundary condition provides a base class that enforces a cyclic condition with a specified 'jump...
Definition: jumpCyclicAMIFvPatchField.H:58
Foam::fixedJumpAMIFvPatchField::jump_
Field< Type > jump_
"jump" field
Definition: fixedJumpAMIFvPatchField.H:107
Foam::fixedJumpAMIFvPatchField::autoMap
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Definition: fixedJumpAMIFvPatchField.C:144
Foam::fixedJumpAMIFvPatchField
This boundary condition provides a jump condition, across non-conformal cyclic path-pairs,...
Definition: fixedJumpAMIFvPatchField.H:97
jumpCyclicAMIFvPatchField.H
Foam::fixedJumpAMIFvPatchField::clone
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
Definition: fixedJumpAMIFvPatchField.H:150
Foam::fixedJumpAMIFvPatchField::fixedJumpAMIFvPatchField
fixedJumpAMIFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Definition: fixedJumpAMIFvPatchField.C:32
Foam::Field< Type >
Foam::fixedJumpAMIFvPatchField::rmap
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Definition: fixedJumpAMIFvPatchField.C:155
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::fixedJumpAMIFvPatchField::jump
virtual tmp< Field< Type > > jump() const
Return the "jump" across the patch.
Definition: fixedJumpAMIFvPatchField.C:112
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::fixedJumpAMIFvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: fixedJumpAMIFvPatchField.C:169
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
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:51