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 #include "calculatedFvPatchField.H"
00027 #include <finiteVolume/fvPatchFieldMapper.H>
00028
00029
00030
00031 namespace Foam
00032 {
00033
00034 template<class Type>
00035 const word& fvPatchField<Type>::calculatedType()
00036 {
00037 return calculatedFvPatchField<Type>::typeName;
00038 }
00039
00040
00041
00042 template<class Type>
00043 calculatedFvPatchField<Type>::calculatedFvPatchField
00044 (
00045 const fvPatch& p,
00046 const DimensionedField<Type, volMesh>& iF
00047 )
00048 :
00049 fvPatchField<Type>(p, iF)
00050 {}
00051
00052
00053 template<class Type>
00054 calculatedFvPatchField<Type>::calculatedFvPatchField
00055 (
00056 const calculatedFvPatchField<Type>& ptf,
00057 const fvPatch& p,
00058 const DimensionedField<Type, volMesh>& iF,
00059 const fvPatchFieldMapper& mapper
00060 )
00061 :
00062 fvPatchField<Type>(ptf, p, iF, mapper)
00063 {}
00064
00065
00066 template<class Type>
00067 calculatedFvPatchField<Type>::calculatedFvPatchField
00068 (
00069 const fvPatch& p,
00070 const DimensionedField<Type, volMesh>& iF,
00071 const dictionary& dict,
00072 const bool valueRequired
00073 )
00074 :
00075 fvPatchField<Type>(p, iF, dict, valueRequired)
00076 {}
00077
00078
00079 template<class Type>
00080 calculatedFvPatchField<Type>::calculatedFvPatchField
00081 (
00082 const calculatedFvPatchField<Type>& ptf
00083 )
00084 :
00085 fvPatchField<Type>(ptf)
00086 {}
00087
00088
00089 template<class Type>
00090 calculatedFvPatchField<Type>::calculatedFvPatchField
00091 (
00092 const calculatedFvPatchField<Type>& ptf,
00093 const DimensionedField<Type, volMesh>& iF
00094 )
00095 :
00096 fvPatchField<Type>(ptf, iF)
00097 {}
00098
00099
00100 template<class Type>
00101 template<class Type2>
00102 tmp<fvPatchField<Type> > fvPatchField<Type>::NewCalculatedType
00103 (
00104 const fvPatchField<Type2>& pf
00105 )
00106 {
00107 typename patchConstructorTable::iterator patchTypeCstrIter =
00108 patchConstructorTablePtr_->find(pf.patch().type());
00109
00110 if (patchTypeCstrIter != patchConstructorTablePtr_->end())
00111 {
00112 return patchTypeCstrIter()
00113 (
00114 pf.patch(),
00115 DimensionedField<Type, volMesh>::null()
00116 );
00117 }
00118 else
00119 {
00120 return tmp<fvPatchField<Type> >
00121 (
00122 new calculatedFvPatchField<Type>
00123 (
00124 pf.patch(),
00125 DimensionedField<Type, volMesh>::null()
00126 )
00127 );
00128 }
00129 }
00130
00131
00132
00133
00134 template<class Type>
00135 tmp<Field<Type> > calculatedFvPatchField<Type>::valueInternalCoeffs
00136 (
00137 const tmp<scalarField>&
00138 ) const
00139 {
00140 FatalErrorIn
00141 (
00142 "calculatedFvPatchField<Type>::"
00143 "valueInternalCoeffs(const tmp<scalarField>&) const"
00144 ) << "\n "
00145 "valueInternalCoeffs cannot be called for a calculatedFvPatchField"
00146 << "\n on patch " << this->patch().name()
00147 << " of field " << this->dimensionedInternalField().name()
00148 << " in file " << this->dimensionedInternalField().objectPath()
00149 << "\n You are probably trying to solve for a field with a "
00150 "default boundary condition."
00151 << exit(FatalError);
00152
00153 return *this;
00154 }
00155
00156
00157 template<class Type>
00158 tmp<Field<Type> > calculatedFvPatchField<Type>::valueBoundaryCoeffs
00159 (
00160 const tmp<scalarField>&
00161 ) const
00162 {
00163 FatalErrorIn
00164 (
00165 "calculatedFvPatchField<Type>::"
00166 "valueBoundaryCoeffs(const tmp<scalarField>&) const"
00167 ) << "\n "
00168 "valueBoundaryCoeffs cannot be called for a calculatedFvPatchField"
00169 << "\n on patch " << this->patch().name()
00170 << " of field " << this->dimensionedInternalField().name()
00171 << " in file " << this->dimensionedInternalField().objectPath()
00172 << "\n You are probably trying to solve for a field with a "
00173 "default boundary condition."
00174 << exit(FatalError);
00175
00176 return *this;
00177 }
00178
00179 template<class Type>
00180 tmp<Field<Type> > calculatedFvPatchField<Type>::gradientInternalCoeffs() const
00181 {
00182 FatalErrorIn
00183 (
00184 "calculatedFvPatchField<Type>::"
00185 "gradientInternalCoeffs() const"
00186 ) << "\n "
00187 "gradientInternalCoeffs cannot be called for a "
00188 "calculatedFvPatchField"
00189 << "\n on patch " << this->patch().name()
00190 << " of field " << this->dimensionedInternalField().name()
00191 << " in file " << this->dimensionedInternalField().objectPath()
00192 << "\n You are probably trying to solve for a field with a "
00193 "default boundary condition."
00194 << exit(FatalError);
00195
00196 return *this;
00197 }
00198
00199 template<class Type>
00200 tmp<Field<Type> > calculatedFvPatchField<Type>::gradientBoundaryCoeffs() const
00201 {
00202 FatalErrorIn
00203 (
00204 "calculatedFvPatchField<Type>::"
00205 "gradientBoundaryCoeffs() const"
00206 ) << "\n "
00207 "gradientBoundaryCoeffs cannot be called for a "
00208 "calculatedFvPatchField"
00209 << "\n on patch " << this->patch().name()
00210 << " of field " << this->dimensionedInternalField().name()
00211 << " in file " << this->dimensionedInternalField().objectPath()
00212 << "\n You are probably trying to solve for a field with a "
00213 "default boundary condition."
00214 << exit(FatalError);
00215
00216 return *this;
00217 }
00218
00219
00220
00221 template<class Type>
00222 void calculatedFvPatchField<Type>::write(Ostream& os) const
00223 {
00224 fvPatchField<Type>::write(os);
00225 this->writeEntry("value", os);
00226 }
00227
00228
00229
00230
00231 }
00232
00233