FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 \*---------------------------------------------------------------------------*/
00025 
00026 #include "timeVaryingUniformFixedValuePointPatchField.H"
00027 #include <OpenFOAM/Time.H>
00028 #include <OpenFOAM/IFstream.H>
00029 
00030 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00031 
00032 template<class Type>
00033 Foam::
00034 timeVaryingUniformFixedValuePointPatchField<Type>::
00035 timeVaryingUniformFixedValuePointPatchField
00036 (
00037     const pointPatch& p,
00038     const DimensionedField<Type, pointMesh>& iF
00039 )
00040 :
00041     fixedValuePointPatchField<Type>(p, iF)
00042 {}
00043 
00044 
00045 template<class Type>
00046 Foam::
00047 timeVaryingUniformFixedValuePointPatchField<Type>::
00048 timeVaryingUniformFixedValuePointPatchField
00049 (
00050     const timeVaryingUniformFixedValuePointPatchField<Type>& ptf,
00051     const pointPatch& p,
00052     const DimensionedField<Type, pointMesh>& iF,
00053     const pointPatchFieldMapper& mapper
00054 )
00055 :
00056     fixedValuePointPatchField<Type>(ptf, p, iF, mapper),
00057     timeSeries_(ptf.timeSeries_)
00058 {}
00059 
00060 
00061 template<class Type>
00062 Foam::
00063 timeVaryingUniformFixedValuePointPatchField<Type>::
00064 timeVaryingUniformFixedValuePointPatchField
00065 (
00066     const pointPatch& p,
00067     const DimensionedField<Type, pointMesh>& iF,
00068     const dictionary& dict
00069 )
00070 :
00071     fixedValuePointPatchField<Type>(p, iF),
00072     timeSeries_(dict)
00073 {
00074     updateCoeffs();
00075 }
00076 
00077 
00078 template<class Type>
00079 Foam::
00080 timeVaryingUniformFixedValuePointPatchField<Type>::
00081 timeVaryingUniformFixedValuePointPatchField
00082 (
00083     const timeVaryingUniformFixedValuePointPatchField<Type>& ptf
00084 )
00085 :
00086     fixedValuePointPatchField<Type>(ptf),
00087     timeSeries_(ptf.timeSeries_)
00088 {}
00089 
00090 
00091 template<class Type>
00092 Foam::
00093 timeVaryingUniformFixedValuePointPatchField<Type>::
00094 timeVaryingUniformFixedValuePointPatchField
00095 (
00096     const timeVaryingUniformFixedValuePointPatchField<Type>& ptf,
00097     const DimensionedField<Type, pointMesh>& iF
00098 )
00099 :
00100     fixedValuePointPatchField<Type>(ptf, iF),
00101     timeSeries_(ptf.timeSeries_)
00102 {}
00103 
00104 
00105 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00106 
00107 template<class Type>
00108 void Foam::timeVaryingUniformFixedValuePointPatchField<Type>::updateCoeffs()
00109 {
00110     if (this->updated())
00111     {
00112         return;
00113     }
00114 
00115     this->operator==(timeSeries_(this->db().time().timeOutputValue()));
00116     fixedValuePointPatchField<Type>::updateCoeffs();
00117 }
00118 
00119 
00120 template<class Type>
00121 void Foam::timeVaryingUniformFixedValuePointPatchField<Type>::write(Ostream& os) const
00122 {
00123     fixedValuePointPatchField<Type>::write(os);
00124     timeSeries_.write(os);
00125 }
00126 
00127 
00128 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines