42 "genericFvPatchField<Type>::genericFvPatchField"
43 "(const fvPatch& p, const DimensionedField<Type, volMesh>& iF)"
44 ) <<
"Not Implemented\n "
45 <<
"Trying to construct an genericFvPatchField on patch "
46 << this->patch().name()
47 <<
" of field " << this->dimensionedInternalField().name()
61 actualTypeName_(dict.lookup(
"type")),
64 if (!dict.found(
"value"))
68 "genericFvPatchField<Type>::genericFvPatchField"
69 "(const fvPatch&, const Field<Type>&, const dictionary&)",
71 ) <<
"\n Cannot find 'value' entry"
72 <<
" on patch " << this->patch().name()
73 <<
" of field " << this->dimensionedInternalField().name()
74 <<
" in file " << this->dimensionedInternalField().objectPath()
76 <<
" which is required to set the"
77 " values of the generic patch field." <<
nl
78 <<
" (Actual type " << actualTypeName_ <<
")" <<
nl
79 <<
"\n Please add the 'value' entry to the write function "
80 "of the user-defined boundary-condition\n"
81 " or link the boundary-condition into libfoamUtil.so"
92 if (iter().keyword() !=
"type" && iter().keyword() !=
"value")
97 && iter().stream().size()
103 token firstToken(is);
108 && firstToken.
wordToken() ==
"nonuniform"
111 token fieldToken(is);
131 "genericFvPatchField<Type>::genericFvPatchField"
132 "(const fvPatch&, const Field<Type>&, "
133 "const dictionary&)",
135 ) <<
"\n token following 'nonuniform' "
137 <<
"\n on patch " << this->patch().name()
139 << this->dimensionedInternalField().name()
141 << this->dimensionedInternalField().objectPath()
160 if (fPtr->
size() != this->size())
164 "genericFvPatchField<Type>::genericFvPatchField"
165 "(const fvPatch&, const Field<Type>&, "
166 "const dictionary&)",
168 ) <<
"\n size of field " << iter().keyword()
169 <<
" (" << fPtr->
size() <<
')'
170 <<
" is not the same size as the patch ("
171 << this->size() <<
')'
172 <<
"\n on patch " << this->patch().name()
174 << this->dimensionedInternalField().name()
176 << this->dimensionedInternalField().objectPath()
180 scalarFields_.insert(iter().keyword(), fPtr);
197 if (fPtr->
size() != this->size())
201 "genericFvPatchField<Type>::genericFvPatchField"
202 "(const fvPatch&, const Field<Type>&, "
203 "const dictionary&)",
205 ) <<
"\n size of field " << iter().keyword()
206 <<
" (" << fPtr->
size() <<
')'
207 <<
" is not the same size as the patch ("
208 << this->size() <<
')'
209 <<
"\n on patch " << this->patch().name()
211 << this->dimensionedInternalField().name()
213 << this->dimensionedInternalField().objectPath()
217 vectorFields_.insert(iter().keyword(), fPtr);
237 if (fPtr->
size() != this->size())
241 "genericFvPatchField<Type>::genericFvPatchField"
242 "(const fvPatch&, const Field<Type>&, "
243 "const dictionary&)",
245 ) <<
"\n size of field " << iter().keyword()
246 <<
" (" << fPtr->
size() <<
')'
247 <<
" is not the same size as the patch ("
248 << this->size() <<
')'
249 <<
"\n on patch " << this->patch().name()
251 << this->dimensionedInternalField().name()
253 << this->dimensionedInternalField().objectPath()
257 sphericalTensorFields_.insert(iter().keyword(), fPtr);
277 if (fPtr->
size() != this->size())
281 "genericFvPatchField<Type>::genericFvPatchField"
282 "(const fvPatch&, const Field<Type>&, "
283 "const dictionary&)",
285 ) <<
"\n size of field " << iter().keyword()
286 <<
" (" << fPtr->
size() <<
')'
287 <<
" is not the same size as the patch ("
288 << this->size() <<
')'
289 <<
"\n on patch " << this->patch().name()
291 << this->dimensionedInternalField().name()
293 << this->dimensionedInternalField().objectPath()
297 symmTensorFields_.insert(iter().keyword(), fPtr);
314 if (fPtr->
size() != this->size())
318 "genericFvPatchField<Type>::genericFvPatchField"
319 "(const fvPatch&, const Field<Type>&, "
320 "const dictionary&)",
322 ) <<
"\n size of field " << iter().keyword()
323 <<
" (" << fPtr->
size() <<
')'
324 <<
" is not the same size as the patch ("
325 << this->size() <<
')'
326 <<
"\n on patch " << this->patch().name()
328 << this->dimensionedInternalField().name()
330 << this->dimensionedInternalField().objectPath()
334 tensorFields_.insert(iter().keyword(), fPtr);
340 "genericFvPatchField<Type>::genericFvPatchField"
341 "(const fvPatch&, const Field<Type>&, "
342 "const dictionary&)",
346 <<
"\n on patch " << this->patch().name()
348 << this->dimensionedInternalField().name()
350 << this->dimensionedInternalField().objectPath()
360 token fieldToken(is);
381 if (l.
size() == vector::nComponents)
383 vector vs(l[0], l[1], l[2]);
391 else if (l.
size() == sphericalTensor::nComponents)
395 sphericalTensorFields_.insert
401 else if (l.
size() == symmTensor::nComponents)
403 symmTensor vs(l[0], l[1], l[2], l[3], l[4], l[5]);
405 symmTensorFields_.insert
411 else if (l.
size() == tensor::nComponents)
430 "genericFvPatchField<Type>::genericFvPatchField"
431 "(const fvPatch&, const Field<Type>&, "
432 "const dictionary&)",
434 ) <<
"\n unrecognised native type " << l
435 <<
"\n on patch " << this->patch().name()
437 << this->dimensionedInternalField().name()
439 << this->dimensionedInternalField().objectPath()
460 actualTypeName_(ptf.actualTypeName_),
466 ptf.scalarFields_.
begin();
467 iter != ptf.scalarFields_.
end();
471 scalarFields_.insert(iter.key(),
new scalarField(*iter(), mapper));
477 ptf.vectorFields_.
begin();
478 iter != ptf.vectorFields_.
end();
482 vectorFields_.insert(iter.key(),
new vectorField(*iter(), mapper));
488 ptf.sphericalTensorFields_.
begin();
489 iter != ptf.sphericalTensorFields_.
end();
493 sphericalTensorFields_.insert
503 ptf.symmTensorFields_.
begin();
504 iter != ptf.symmTensorFields_.
end();
508 symmTensorFields_.insert
518 ptf.tensorFields_.
begin();
519 iter != ptf.tensorFields_.
end();
523 tensorFields_.insert(iter.key(),
new tensorField(*iter(), mapper));
535 actualTypeName_(ptf.actualTypeName_),
537 scalarFields_(ptf.scalarFields_),
538 vectorFields_(ptf.vectorFields_),
539 sphericalTensorFields_(ptf.sphericalTensorFields_),
540 symmTensorFields_(ptf.symmTensorFields_),
541 tensorFields_(ptf.tensorFields_)
553 actualTypeName_(ptf.actualTypeName_),
555 scalarFields_(ptf.scalarFields_),
556 vectorFields_(ptf.vectorFields_),
557 sphericalTensorFields_(ptf.sphericalTensorFields_),
558 symmTensorFields_(ptf.symmTensorFields_),
559 tensorFields_(ptf.tensorFields_)
576 iter != scalarFields_.end();
586 iter != vectorFields_.end();
596 sphericalTensorFields_.
begin();
597 iter != sphericalTensorFields_.end();
607 symmTensorFields_.
begin();
608 iter != symmTensorFields_.end();
618 iter != tensorFields_.end();
637 refCast<const genericFvPatchField<Type> >(ptf);
642 iter != scalarFields_.end();
647 dptf.scalarFields_.find(iter.key());
649 if (dptfIter != dptf.scalarFields_.end())
651 iter()->rmap(*dptfIter(), addr);
658 iter != vectorFields_.end();
663 dptf.vectorFields_.find(iter.key());
665 if (dptfIter != dptf.vectorFields_.end())
667 iter()->rmap(*dptfIter(), addr);
674 sphericalTensorFields_.
begin();
675 iter != sphericalTensorFields_.end();
680 dptf.sphericalTensorFields_.find(iter.key());
682 if (dptfIter != dptf.sphericalTensorFields_.end())
684 iter()->rmap(*dptfIter(), addr);
691 symmTensorFields_.
begin();
692 iter != symmTensorFields_.end();
697 dptf.symmTensorFields_.find(iter.key());
699 if (dptfIter != dptf.symmTensorFields_.end())
701 iter()->rmap(*dptfIter(), addr);
708 iter != tensorFields_.end();
713 dptf.tensorFields_.find(iter.key());
715 if (dptfIter != dptf.tensorFields_.end())
717 iter()->rmap(*dptfIter(), addr);
732 "genericFvPatchField<Type>::"
733 "valueInternalCoeffs(const tmp<scalarField>&) const"
735 "valueInternalCoeffs cannot be called for a genericFvPatchField"
736 " (actual type " << actualTypeName_ <<
")"
737 <<
"\n on patch " << this->patch().name()
738 <<
" of field " << this->dimensionedInternalField().name()
739 <<
" in file " << this->dimensionedInternalField().objectPath()
740 <<
"\n You are probably trying to solve for a field with a "
741 "generic boundary condition."
757 "genericFvPatchField<Type>::"
758 "valueBoundaryCoeffs(const tmp<scalarField>&) const"
760 "valueBoundaryCoeffs cannot be called for a genericFvPatchField"
761 " (actual type " << actualTypeName_ <<
")"
762 <<
"\n on patch " << this->patch().name()
763 <<
" of field " << this->dimensionedInternalField().name()
764 <<
" in file " << this->dimensionedInternalField().objectPath()
765 <<
"\n You are probably trying to solve for a field with a "
766 "generic boundary condition."
779 "genericFvPatchField<Type>::"
780 "gradientInternalCoeffs() const"
782 "gradientInternalCoeffs cannot be called for a genericFvPatchField"
783 " (actual type " << actualTypeName_ <<
")"
784 <<
"\n on patch " << this->patch().name()
785 <<
" of field " << this->dimensionedInternalField().name()
786 <<
" in file " << this->dimensionedInternalField().objectPath()
787 <<
"\n You are probably trying to solve for a field with a "
788 "generic boundary condition."
800 "genericFvPatchField<Type>::"
801 "gradientBoundaryCoeffs() const"
803 "gradientBoundaryCoeffs cannot be called for a genericFvPatchField"
804 " (actual type " << actualTypeName_ <<
")"
805 <<
"\n on patch " << this->patch().name()
806 <<
" of field " << this->dimensionedInternalField().name()
807 <<
" in file " << this->dimensionedInternalField().objectPath()
808 <<
"\n You are probably trying to solve for a field with a "
809 "generic boundary condition."
819 os.
writeKeyword(
"type") << actualTypeName_ << token::END_STATEMENT <<
nl;
828 if (iter().keyword() !=
"type" && iter().keyword() !=
"value")
833 && iter().stream().size()
834 && iter().stream()[0].isWord()
835 && iter().stream()[0].wordToken() ==
"nonuniform"
838 if (scalarFields_.found(iter().keyword()))
840 scalarFields_.find(iter().keyword())()
841 ->writeEntry(iter().keyword(), os);
843 else if (vectorFields_.found(iter().keyword()))
845 vectorFields_.find(iter().keyword())()
846 ->writeEntry(iter().keyword(), os);
848 else if (sphericalTensorFields_.found(iter().keyword()))
850 sphericalTensorFields_.find(iter().keyword())()
851 ->writeEntry(iter().keyword(), os);
853 else if (symmTensorFields_.found(iter().keyword()))
855 symmTensorFields_.find(iter().keyword())()
856 ->writeEntry(iter().keyword(), os);
858 else if (tensorFields_.found(iter().keyword()))
860 tensorFields_.find(iter().keyword())()
861 ->writeEntry(iter().keyword(), os);
871 this->writeEntry(
"value", os);