initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / finiteVolume / fields / fvPatchFields / derived / uniformFixedValue / uniformFixedValueFvPatchField.C
blob6234998695729faf56abcdf36b6520094b826731
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 namespace Foam
34 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
36 template<class Type>
37 uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
39     const fvPatch& p,
40     const DimensionedField<Type, volMesh>& iF
43     fixedValueFvPatchField<Type>(p, iF),
44     uniformValue_(pTraits<Type>::zero)
48 template<class Type>
49 uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
51     const uniformFixedValueFvPatchField<Type>& ptf,
52     const fvPatch& p,
53     const DimensionedField<Type, volMesh>& iF,
54     const fvPatchFieldMapper&
57     fixedValueFvPatchField<Type>(p, iF),
58     uniformValue_(ptf.uniformValue_)
60     fvPatchField<Type>::operator==(uniformValue_);
64 template<class Type>
65 uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
67     const fvPatch& p,
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_);
79 template<class Type>
80 uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
82     const uniformFixedValueFvPatchField<Type>& ptf
85     fixedValueFvPatchField<Type>(ptf),
86     uniformValue_(ptf.uniformValue_)
88     fvPatchField<Type>::operator==(uniformValue_);
92 template<class Type>
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  * * * * * * * * * * * * * //
108 template<class Type>
109 void uniformFixedValueFvPatchField<Type>::autoMap
111     const fvPatchFieldMapper& m
114     this->setSize(m.size());
115     fvPatchField<Type>::operator==(uniformValue_);
119 template<class Type>
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 // ************************************************************************* //