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
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef timeVaryingMappedFixedValueFvPatchField_H
00036 #define timeVaryingMappedFixedValueFvPatchField_H
00037
00038 #include "fixedValueFvPatchFields.H"
00039 #include "coordinateSystem.H"
00040 #include "FixedList.H"
00041
00042
00043
00044 namespace Foam
00045 {
00046
00047
00048
00049
00050
00051 template<class Type>
00052 class timeVaryingMappedFixedValueFvPatchField
00053 :
00054 public fixedValueFvPatchField<Type>
00055 {
00056
00057
00058
00059 bool setAverage_;
00060
00061
00062 autoPtr<coordinateSystem> referenceCS_;
00063
00064
00065
00066 List<FixedList<label, 3> > nearestVertex_;
00067
00068
00069
00070 List<FixedList<scalar, 3> > nearestVertexWeight_;
00071
00072
00073 word fieldName_;
00074
00075
00076 instantList sampleTimes_;
00077
00078
00079 label startSampleTime_;
00080
00081
00082 Field<Type> startSampledValues_;
00083
00084
00085 Type startAverage_;
00086
00087
00088 label endSampleTime_;
00089
00090
00091 Field<Type> endSampledValues_;
00092
00093
00094 Type endAverage_;
00095
00096
00097
00098
00099
00100 static wordList timeNames(const instantList&);
00101
00102
00103 void findTime
00104 (
00105 const fileName& instance,
00106 const fileName& local,
00107 const scalar timeVal,
00108 label& lo,
00109 label& hi
00110 ) const;
00111
00112
00113
00114 void readSamplePoints();
00115
00116
00117 void checkTable();
00118
00119
00120 tmp<Field<Type> > interpolate(const Field<Type>&) const;
00121
00122
00123 public:
00124
00125
00126 TypeName("timeVaryingMappedFixedValue");
00127
00128
00129
00130
00131
00132 timeVaryingMappedFixedValueFvPatchField
00133 (
00134 const fvPatch&,
00135 const DimensionedField<Type, volMesh>&
00136 );
00137
00138
00139 timeVaryingMappedFixedValueFvPatchField
00140 (
00141 const fvPatch&,
00142 const DimensionedField<Type, volMesh>&,
00143 const dictionary&
00144 );
00145
00146
00147
00148 timeVaryingMappedFixedValueFvPatchField
00149 (
00150 const timeVaryingMappedFixedValueFvPatchField<Type>&,
00151 const fvPatch&,
00152 const DimensionedField<Type, volMesh>&,
00153 const fvPatchFieldMapper&
00154 );
00155
00156
00157 timeVaryingMappedFixedValueFvPatchField
00158 (
00159 const timeVaryingMappedFixedValueFvPatchField<Type>&
00160 );
00161
00162
00163 virtual tmp<fvPatchField<Type> > clone() const
00164 {
00165 return tmp<fvPatchField<Type> >
00166 (
00167 new timeVaryingMappedFixedValueFvPatchField<Type>(*this)
00168 );
00169 }
00170
00171
00172 timeVaryingMappedFixedValueFvPatchField
00173 (
00174 const timeVaryingMappedFixedValueFvPatchField<Type>&,
00175 const DimensionedField<Type, volMesh>&
00176 );
00177
00178
00179 virtual tmp<fvPatchField<Type> > clone
00180 (
00181 const DimensionedField<Type, volMesh>& iF
00182 ) const
00183 {
00184 return tmp<fvPatchField<Type> >
00185 (
00186 new timeVaryingMappedFixedValueFvPatchField<Type>(*this, iF)
00187 );
00188 }
00189
00190
00191
00192
00193
00194
00195
00196 const coordinateSystem& referenceCS() const
00197 {
00198 return referenceCS_;
00199 }
00200
00201
00202
00203
00204
00205 virtual void updateCoeffs();
00206
00207
00208
00209 virtual void write(Ostream&) const;
00210 };
00211
00212
00213
00214
00215 }
00216
00217
00218
00219 #ifdef NoRepository
00220 # include "timeVaryingMappedFixedValueFvPatchField.C"
00221 #endif
00222
00223
00224
00225 #endif
00226
00227
Copyright © 2000-2007 OpenCFD Ltd