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

timeVaryingUniformFixedValuePointPatchField.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 "timeVaryingUniformFixedValuePointPatchField.H"
00028 #include "Time.H"
00029 #include "IFstream.H"
00030 
00031 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00032 
00033 template<class Type>
00034 Foam::
00035 timeVaryingUniformFixedValuePointPatchField<Type>::
00036 timeVaryingUniformFixedValuePointPatchField
00037 (
00038     const pointPatch& p,
00039     const DimensionedField<Type, pointMesh>& iF
00040 )
00041 :
00042     fixedValuePointPatchField<Type>(p, iF)
00043 {}
00044 
00045 
00046 template<class Type>
00047 Foam::
00048 timeVaryingUniformFixedValuePointPatchField<Type>::
00049 timeVaryingUniformFixedValuePointPatchField
00050 (
00051     const timeVaryingUniformFixedValuePointPatchField<Type>& ptf,
00052     const pointPatch& p,
00053     const DimensionedField<Type, pointMesh>& iF,
00054     const pointPatchFieldMapper& mapper
00055 )
00056 :
00057     fixedValuePointPatchField<Type>(ptf, p, iF, mapper),
00058     timeSeries_(ptf.timeSeries_)
00059 {}
00060 
00061 
00062 template<class Type>
00063 Foam::
00064 timeVaryingUniformFixedValuePointPatchField<Type>::
00065 timeVaryingUniformFixedValuePointPatchField
00066 (
00067     const pointPatch& p,
00068     const DimensionedField<Type, pointMesh>& iF,
00069     const dictionary& dict
00070 )
00071 :
00072     fixedValuePointPatchField<Type>(p, iF),
00073     timeSeries_(dict)
00074 {
00075     updateCoeffs();
00076 }
00077 
00078 
00079 template<class Type>
00080 Foam::
00081 timeVaryingUniformFixedValuePointPatchField<Type>::
00082 timeVaryingUniformFixedValuePointPatchField
00083 (
00084     const timeVaryingUniformFixedValuePointPatchField<Type>& ptf
00085 )
00086 :
00087     fixedValuePointPatchField<Type>(ptf),
00088     timeSeries_(ptf.timeSeries_)
00089 {}
00090 
00091 
00092 template<class Type>
00093 Foam::
00094 timeVaryingUniformFixedValuePointPatchField<Type>::
00095 timeVaryingUniformFixedValuePointPatchField
00096 (
00097     const timeVaryingUniformFixedValuePointPatchField<Type>& ptf,
00098     const DimensionedField<Type, pointMesh>& iF
00099 )
00100 :
00101     fixedValuePointPatchField<Type>(ptf, iF),
00102     timeSeries_(ptf.timeSeries_)
00103 {}
00104 
00105 
00106 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00107 
00108 template<class Type>
00109 void Foam::timeVaryingUniformFixedValuePointPatchField<Type>::updateCoeffs()
00110 {
00111     if (this->updated())
00112     {
00113         return;
00114     }
00115 
00116     this->operator==(timeSeries_(this->db().time().timeOutputValue()));
00117     fixedValuePointPatchField<Type>::updateCoeffs();
00118 }
00119 
00120 
00121 template<class Type>
00122 void Foam::timeVaryingUniformFixedValuePointPatchField<Type>::write(Ostream& os) const
00123 {
00124     fixedValuePointPatchField<Type>::write(os);
00125     timeSeries_.write(os);
00126 }
00127 
00128 
00129 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd