timeVaryingUniformFixedValueFvPatchField.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "timeVaryingUniformFixedValueFvPatchField.H"
00028 #include "Time.H"
00029
00030
00031
00032 template<class Type>
00033 Foam::timeVaryingUniformFixedValueFvPatchField<Type>::
00034 timeVaryingUniformFixedValueFvPatchField
00035 (
00036 const fvPatch& p,
00037 const DimensionedField<Type, volMesh>& iF
00038 )
00039 :
00040 fixedValueFvPatchField<Type>(p, iF),
00041 timeSeries_()
00042 {}
00043
00044
00045 template<class Type>
00046 Foam::timeVaryingUniformFixedValueFvPatchField<Type>::
00047 timeVaryingUniformFixedValueFvPatchField
00048 (
00049 const fvPatch& p,
00050 const DimensionedField<Type, volMesh>& iF,
00051 const dictionary& dict
00052 )
00053 :
00054 fixedValueFvPatchField<Type>(p, iF),
00055 timeSeries_(dict)
00056 {
00057 if (dict.found("value"))
00058 {
00059 fvPatchField<Type>::operator==(Field<Type>("value", dict, p.size()));
00060 }
00061 else
00062 {
00063 updateCoeffs();
00064 }
00065 }
00066
00067
00068 template<class Type>
00069 Foam::timeVaryingUniformFixedValueFvPatchField<Type>::
00070 timeVaryingUniformFixedValueFvPatchField
00071 (
00072 const timeVaryingUniformFixedValueFvPatchField<Type>& ptf,
00073 const fvPatch& p,
00074 const DimensionedField<Type, volMesh>& iF,
00075 const fvPatchFieldMapper& mapper
00076 )
00077 :
00078 fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
00079 timeSeries_(ptf.timeSeries_)
00080 {}
00081
00082
00083 template<class Type>
00084 Foam::timeVaryingUniformFixedValueFvPatchField<Type>::
00085 timeVaryingUniformFixedValueFvPatchField
00086 (
00087 const timeVaryingUniformFixedValueFvPatchField<Type>& ptf
00088 )
00089 :
00090 fixedValueFvPatchField<Type>(ptf),
00091 timeSeries_(ptf.timeSeries_)
00092 {}
00093
00094
00095 template<class Type>
00096 Foam::timeVaryingUniformFixedValueFvPatchField<Type>::
00097 timeVaryingUniformFixedValueFvPatchField
00098 (
00099 const timeVaryingUniformFixedValueFvPatchField<Type>& ptf,
00100 const DimensionedField<Type, volMesh>& iF
00101 )
00102 :
00103 fixedValueFvPatchField<Type>(ptf, iF),
00104 timeSeries_(ptf.timeSeries_)
00105 {}
00106
00107
00108
00109
00110 template<class Type>
00111 void Foam::timeVaryingUniformFixedValueFvPatchField<Type>::updateCoeffs()
00112 {
00113 if (this->updated())
00114 {
00115 return;
00116 }
00117
00118 fvPatchField<Type>::operator==
00119 (
00120 timeSeries_(this->db().time().timeOutputValue())
00121 );
00122 fixedValueFvPatchField<Type>::updateCoeffs();
00123 }
00124
00125
00126 template<class Type>
00127 void Foam::timeVaryingUniformFixedValueFvPatchField<Type>::write
00128 (
00129 Ostream& os
00130 ) const
00131 {
00132 fvPatchField<Type>::write(os);
00133 timeSeries_.write(os);
00134 this->writeEntry("value", os);
00135 }
00136
00137
00138
Copyright © 2000-2009 OpenCFD Ltd