OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

uniformFixedValuePointPatchField.C

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 \*---------------------------------------------------------------------------*/
00026 
00027 #include "uniformFixedValuePointPatchField.H"
00028 
00029 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00030 
00031 namespace Foam
00032 {
00033 
00034 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
00035 
00036 template<class Type>
00037 uniformFixedValuePointPatchField<Type>::
00038 uniformFixedValuePointPatchField
00039 (
00040     const pointPatch& p,
00041     const DimensionedField<Type, pointMesh>& iF
00042 )
00043 :
00044     fixedValuePointPatchField<Type>(p, iF),
00045     uniformValue_(pTraits<Type>::zero)
00046 {}
00047 
00048 
00049 template<class Type>
00050 uniformFixedValuePointPatchField<Type>::
00051 uniformFixedValuePointPatchField
00052 (
00053     const pointPatch& p,
00054     const DimensionedField<Type, pointMesh>& iF,
00055     const dictionary& dict
00056 )
00057 :
00058     fixedValuePointPatchField<Type>(p, iF, dict),
00059     uniformValue_(pTraits<Type>(dict.lookup("uniformValue")))
00060 {
00061     Field<Type>::operator=(uniformValue_);
00062 }
00063 
00064 
00065 template<class Type>
00066 uniformFixedValuePointPatchField<Type>::
00067 uniformFixedValuePointPatchField
00068 (
00069     const uniformFixedValuePointPatchField<Type>& ptf,
00070     const pointPatch& p,
00071     const DimensionedField<Type, pointMesh>& iF,
00072     const pointPatchFieldMapper& mapper
00073 )
00074 :
00075     fixedValuePointPatchField<Type>(ptf, p, iF, mapper),
00076     uniformValue_(ptf.uniformValue_)
00077 {}
00078 
00079 
00080 template<class Type>
00081 uniformFixedValuePointPatchField<Type>::
00082 uniformFixedValuePointPatchField
00083 (
00084     const uniformFixedValuePointPatchField<Type>& ptf
00085 )
00086 :
00087     fixedValuePointPatchField<Type>(ptf),
00088     uniformValue_(ptf.uniformValue_)
00089 {}
00090 
00091 
00092 template<class Type>
00093 uniformFixedValuePointPatchField<Type>::
00094 uniformFixedValuePointPatchField
00095 (
00096     const uniformFixedValuePointPatchField<Type>& ptf,
00097     const DimensionedField<Type, pointMesh>& iF
00098 )
00099 :
00100     fixedValuePointPatchField<Type>(ptf, iF),
00101     uniformValue_(ptf.uniformValue_)
00102 {}
00103 
00104 
00105 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00106 
00107 template<class Type>
00108 void uniformFixedValuePointPatchField<Type>::
00109 write(Ostream& os) const
00110 {
00111     pointPatchField<Type>::write(os);
00112     os.writeKeyword("uniformValue")
00113         << uniformValue_ << token::END_STATEMENT << nl;
00114 }
00115 
00116 
00117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00118 
00119 } // End namespace Foam
00120 
00121 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd