1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 #include "uniformFixedValueFvPatchField.H"
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
37 uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
40 const DimensionedField<Type, volMesh>& iF
43 fixedValueFvPatchField<Type>(p, iF),
44 uniformValue_(pTraits<Type>::zero)
49 uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
51 const uniformFixedValueFvPatchField<Type>& ptf,
53 const DimensionedField<Type, volMesh>& iF,
54 const fvPatchFieldMapper&
57 fixedValueFvPatchField<Type>(p, iF),
58 uniformValue_(ptf.uniformValue_)
60 fvPatchField<Type>::operator==(uniformValue_);
65 uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
68 const DimensionedField<Type, volMesh>& iF,
69 const dictionary& dict
72 fixedValueFvPatchField<Type>(p, iF),
73 uniformValue_(pTraits<Type>(dict.lookup("uniformValue")))
75 fvPatchField<Type>::operator==(uniformValue_);
80 uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
82 const uniformFixedValueFvPatchField<Type>& ptf
85 fixedValueFvPatchField<Type>(ptf),
86 uniformValue_(ptf.uniformValue_)
88 fvPatchField<Type>::operator==(uniformValue_);
93 uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
95 const uniformFixedValueFvPatchField<Type>& ptf,
96 const DimensionedField<Type, volMesh>& iF
99 fixedValueFvPatchField<Type>(ptf, iF),
100 uniformValue_(ptf.uniformValue_)
102 fvPatchField<Type>::operator==(uniformValue_);
106 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
109 void uniformFixedValueFvPatchField<Type>::autoMap
111 const fvPatchFieldMapper& m
114 this->setSize(m.size());
115 fvPatchField<Type>::operator==(uniformValue_);
120 void uniformFixedValueFvPatchField<Type>::write(Ostream& os) const
122 fvPatchField<Type>::write(os);
123 os.writeKeyword("uniformValue")
124 << uniformValue_ << token::END_STATEMENT << nl;
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 } // End namespace Foam
132 // ************************************************************************* //