1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
25 Foam::fixedJumpFvPatchField
28 Base class for "jump" of a field<type>
31 fixedJumpFvPatchField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef fixedJumpFvPatchField_H
36 #define fixedJumpFvPatchField_H
38 #include "jumpCyclicFvPatchField.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 /*---------------------------------------------------------------------------*\
46 Class fixedJumpFvPatchField Declaration
47 \*---------------------------------------------------------------------------*/
50 class fixedJumpFvPatchField
52 public jumpCyclicFvPatchField<Type>
68 //- Construct from patch and internal field
72 const DimensionedField<Type, volMesh>&
75 //- Construct from patch, internal field and dictionary
79 const DimensionedField<Type, volMesh>&,
83 //- Construct by mapping given fixedJumpFvPatchField onto a
87 const fixedJumpFvPatchField<Type>&,
89 const DimensionedField<Type, volMesh>&,
90 const fvPatchFieldMapper&
96 const fixedJumpFvPatchField<Type>&
99 //- Construct and return a clone
100 virtual tmp<fvPatchField<Type> > clone() const
102 return tmp<fvPatchField<Type> >
104 new fixedJumpFvPatchField<Type>(*this)
108 //- Construct as copy setting internal field reference
109 fixedJumpFvPatchField
111 const fixedJumpFvPatchField<Type>&,
112 const DimensionedField<Type, volMesh>&
115 //- Construct and return a clone setting internal field reference
116 virtual tmp<fvPatchField<Type> > clone
118 const DimensionedField<Type, volMesh>& iF
121 return tmp<fvPatchField<Type> >
123 new fixedJumpFvPatchField<Type>(*this, iF)
132 //- Return the "jump" across the patch.
133 virtual tmp<Field<Type> > jump() const
135 if (this->cyclicPatch().owner())
141 return refCast<const fixedJumpFvPatchField<Type> >
143 this->neighbourPatchField()
151 //- Map (and resize as needed) from self given a mapping object
154 const fvPatchFieldMapper&
157 //- Reverse map the given fvPatchField onto this fvPatchField
160 const fvPatchField<Type>&,
166 virtual void write(Ostream&) const;
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 } // End namespace Foam
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 # include "fixedJumpFvPatchField.C"
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 // ************************************************************************* //