61 setAverage_(ptf.setAverage_),
62 average_(ptf.average_)
64 if (!isA<directMappedPatchBase>(this->patch().patch()))
68 "directMappedFixedValueFvPatchField<Type>::"
69 "directMappedFixedValueFvPatchField\n"
71 " const directMappedFixedValueFvPatchField<Type>&,\n"
73 " const Field<Type>&,\n"
74 " const fvPatchFieldMapper&\n"
76 ) <<
"\n patch type '" << p.type()
77 <<
"' not type '" << directMappedPatchBase::typeName <<
"'"
78 <<
"\n for patch " << p.
name()
79 <<
" of field " << this->dimensionedInternalField().name()
80 <<
" in file " << this->dimensionedInternalField().objectPath()
98 if (!isA<directMappedPatchBase>(this->patch().patch()))
102 "directMappedFixedValueFvPatchField<Type>::"
103 "directMappedFixedValueFvPatchField\n"
105 " const fvPatch& p,\n"
106 " const DimensionedField<Type, volMesh>& iF,\n"
107 " const dictionary& dict\n"
109 ) <<
"\n patch type '" << p.type()
110 <<
"' not type '" << directMappedPatchBase::typeName <<
"'"
111 <<
"\n for patch " << p.
name()
112 <<
" of field " << this->dimensionedInternalField().name()
113 <<
" in file " << this->dimensionedInternalField().objectPath()
133 setAverage_(ptf.setAverage_),
134 average_(ptf.average_)
146 setAverage_(ptf.setAverage_),
147 average_(ptf.average_)
174 const word& fldName = this->dimensionedInternalField().name();
185 newValues = this->internalField();
198 distMap.constructSize(),
200 distMap.constructMap(),
216 "void directMappedFixedValueFvPatchField<Type>::"
218 )<<
"Unable to find sample patch " << mpp.
samplePatch()
220 <<
" for patch " << this->patch().name() <<
nl
224 const fieldType& nbrField = nbrMesh.
lookupObject<fieldType>
228 newValues = nbrField.boundaryField()[nbrPatchID];
233 distMap.constructSize(),
235 distMap.constructMap(),
245 const fieldType& nbrField = nbrMesh.
lookupObject<fieldType>
249 forAll(nbrField.boundaryField(), patchI)
252 nbrField.boundaryField()[patchI];
257 allValues[faceStart++] = pf[faceI];
265 distMap.constructSize(),
267 distMap.constructMap(),
279 "directMappedFixedValueFvPatchField<Type>::updateCoeffs()"
280 )<<
"Unknown sampling mode: " << mpp.
mode()
288 gSum(this->patch().magSf()*newValues)
289 /
gSum(this->patch().magSf());
291 if (
mag(averagePsi)/
mag(average_) > 0.5)
293 newValues *=
mag(average_)/
mag(averagePsi);
297 newValues += (average_ - averagePsi);
305 Info<<
"directMapped on field:" << fldName
306 <<
" patch:" << this->patch().name()
308 <<
" min:" <<
gMin(*
this)
309 <<
" max:" <<
gMax(*
this)
323 this->writeEntry(
"value", os);