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()
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()
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" 86 if (iter().keyword() !=
"type" && iter().keyword() !=
"value")
91 && iter().stream().size()
102 && firstToken.
wordToken() ==
"nonuniform" 105 token fieldToken(is);
125 "genericFvPatchField<Type>::genericFvPatchField" 126 "(const fvPatch&, const Field<Type>&, " 127 "const dictionary&)",
129 ) <<
"\n token following 'nonuniform' " 131 <<
"\n on patch " << this->patch().name()
154 if (fPtr->
size() != this->size())
158 "genericFvPatchField<Type>::genericFvPatchField" 159 "(const fvPatch&, const Field<Type>&, " 160 "const dictionary&)",
162 ) <<
"\n size of field " << iter().keyword()
163 <<
" (" << fPtr->
size() <<
')' 164 <<
" is not the same size as the patch (" 165 << this->size() <<
')' 166 <<
"\n on patch " << this->patch().name()
174 scalarFields_.insert(iter().keyword(), fPtr);
191 if (fPtr->
size() != this->size())
195 "genericFvPatchField<Type>::genericFvPatchField" 196 "(const fvPatch&, const Field<Type>&, " 197 "const dictionary&)",
199 ) <<
"\n size of field " << iter().keyword()
200 <<
" (" << fPtr->
size() <<
')' 201 <<
" is not the same size as the patch (" 202 << this->size() <<
')' 203 <<
"\n on patch " << this->patch().name()
211 vectorFields_.insert(iter().keyword(), fPtr);
231 if (fPtr->
size() != this->size())
235 "genericFvPatchField<Type>::genericFvPatchField" 236 "(const fvPatch&, const Field<Type>&, " 237 "const dictionary&)",
239 ) <<
"\n size of field " << iter().keyword()
240 <<
" (" << fPtr->
size() <<
')' 241 <<
" is not the same size as the patch (" 242 << this->size() <<
')' 243 <<
"\n on patch " << this->patch().name()
251 sphericalTensorFields_.insert(iter().keyword(), fPtr);
271 if (fPtr->
size() != this->size())
275 "genericFvPatchField<Type>::genericFvPatchField" 276 "(const fvPatch&, const Field<Type>&, " 277 "const dictionary&)",
279 ) <<
"\n size of field " << iter().keyword()
280 <<
" (" << fPtr->
size() <<
')' 281 <<
" is not the same size as the patch (" 282 << this->size() <<
')' 283 <<
"\n on patch " << this->patch().name()
291 symmTensorFields_.insert(iter().keyword(), fPtr);
308 if (fPtr->
size() != this->size())
312 "genericFvPatchField<Type>::genericFvPatchField" 313 "(const fvPatch&, const Field<Type>&, " 314 "const dictionary&)",
316 ) <<
"\n size of field " << iter().keyword()
317 <<
" (" << fPtr->
size() <<
')' 318 <<
" is not the same size as the patch (" 319 << this->size() <<
')' 320 <<
"\n on patch " << this->patch().name()
328 tensorFields_.insert(iter().keyword(), fPtr);
334 "genericFvPatchField<Type>::genericFvPatchField" 335 "(const fvPatch&, const Field<Type>&, " 336 "const dictionary&)",
340 <<
"\n on patch " << this->patch().name()
354 token fieldToken(is);
375 if (l.
size() == vector::nComponents)
377 vector vs(l[0], l[1], l[2]);
385 else if (l.
size() == sphericalTensor::nComponents)
389 sphericalTensorFields_.insert
395 else if (l.
size() == symmTensor::nComponents)
397 symmTensor vs(l[0], l[1], l[2], l[3], l[4], l[5]);
399 symmTensorFields_.insert
405 else if (l.
size() == tensor::nComponents)
424 "genericFvPatchField<Type>::genericFvPatchField" 425 "(const fvPatch&, const Field<Type>&, " 426 "const dictionary&)",
428 ) <<
"\n unrecognised native type " << l
429 <<
"\n on patch " << this->patch().name()
454 actualTypeName_(ptf.actualTypeName_),
488 ptf.sphericalTensorFields_,
492 sphericalTensorFields_.insert
502 ptf.symmTensorFields_,
506 symmTensorFields_.insert
536 actualTypeName_(ptf.actualTypeName_),
538 scalarFields_(ptf.scalarFields_),
539 vectorFields_(ptf.vectorFields_),
540 sphericalTensorFields_(ptf.sphericalTensorFields_),
541 symmTensorFields_(ptf.symmTensorFields_),
542 tensorFields_(ptf.tensorFields_)
554 actualTypeName_(ptf.actualTypeName_),
556 scalarFields_(ptf.scalarFields_),
557 vectorFields_(ptf.vectorFields_),
558 sphericalTensorFields_(ptf.sphericalTensorFields_),
559 symmTensorFields_(ptf.symmTensorFields_),
560 tensorFields_(ptf.tensorFields_)
597 sphericalTensorFields_,
636 refCast<const genericFvPatchField<Type> >(ptf);
646 dptf.scalarFields_.find(iter.key());
648 if (dptfIter != dptf.scalarFields_.end())
650 iter()->rmap(*dptfIter(), addr);
662 dptf.vectorFields_.find(iter.key());
664 if (dptfIter != dptf.vectorFields_.end())
666 iter()->rmap(*dptfIter(), addr);
673 sphericalTensorFields_,
678 dptf.sphericalTensorFields_.find(iter.key());
680 if (dptfIter != dptf.sphericalTensorFields_.end())
682 iter()->rmap(*dptfIter(), addr);
694 dptf.symmTensorFields_.find(iter.key());
696 if (dptfIter != dptf.symmTensorFields_.end())
698 iter()->rmap(*dptfIter(), addr);
710 dptf.tensorFields_.find(iter.key());
712 if (dptfIter != dptf.tensorFields_.end())
714 iter()->rmap(*dptfIter(), addr);
729 "genericFvPatchField<Type>::" 730 "valueInternalCoeffs(const tmp<scalarField>&) const" 732 "valueInternalCoeffs cannot be called for a genericFvPatchField" 733 " (actual type " << actualTypeName_ <<
")" 734 <<
"\n on patch " << this->patch().name()
737 <<
"\n You are probably trying to solve for a field with a " 738 "generic boundary condition." 754 "genericFvPatchField<Type>::" 755 "valueBoundaryCoeffs(const tmp<scalarField>&) const" 757 "valueBoundaryCoeffs cannot be called for a genericFvPatchField" 758 " (actual type " << actualTypeName_ <<
")" 759 <<
"\n on patch " << this->patch().name()
762 <<
"\n You are probably trying to solve for a field with a " 763 "generic boundary condition." 776 "genericFvPatchField<Type>::" 777 "gradientInternalCoeffs() const" 779 "gradientInternalCoeffs cannot be called for a genericFvPatchField" 780 " (actual type " << actualTypeName_ <<
")" 781 <<
"\n on patch " << this->patch().name()
784 <<
"\n You are probably trying to solve for a field with a " 785 "generic boundary condition." 797 "genericFvPatchField<Type>::" 798 "gradientBoundaryCoeffs() const" 800 "gradientBoundaryCoeffs cannot be called for a genericFvPatchField" 801 " (actual type " << actualTypeName_ <<
")" 802 <<
"\n on patch " << this->patch().name()
805 <<
"\n You are probably trying to solve for a field with a " 806 "generic boundary condition." 816 os.
writeKeyword(
"type") << actualTypeName_ << token::END_STATEMENT <<
nl;
820 if (iter().keyword() !=
"type" && iter().keyword() !=
"value")
825 && iter().stream().size()
826 && iter().stream()[0].isWord()
827 && iter().stream()[0].wordToken() ==
"nonuniform" 830 if (scalarFields_.found(iter().keyword()))
832 scalarFields_.find(iter().keyword())()
833 ->writeEntry(iter().keyword(), os);
835 else if (vectorFields_.found(iter().keyword()))
837 vectorFields_.find(iter().keyword())()
838 ->writeEntry(iter().keyword(), os);
840 else if (sphericalTensorFields_.found(iter().keyword()))
842 sphericalTensorFields_.find(iter().keyword())()
843 ->writeEntry(iter().keyword(), os);
845 else if (symmTensorFields_.found(iter().keyword()))
847 symmTensorFields_.find(iter().keyword())()
848 ->writeEntry(iter().keyword(), os);
850 else if (tensorFields_.found(iter().keyword()))
852 tensorFields_.find(iter().keyword())()
853 ->writeEntry(iter().keyword(), os);
863 this->writeEntry(
"value", os);
This boundary condition is not designed to be evaluated; it is assmued that the value is assigned via...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
An STL-conforming const_iterator.
genericFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Templated 3D symmetric tensor derived from VectorSpace adding construction from 6 components...
Field< symmTensor > symmTensorField
Specialisation of Field<T> for symmTensor.
#define forAllIter(Container, container, iter)
void size(const label)
Override size to be inconsistent with allocated storage.
bool isPunctuation() const
errorManipArg< error, int > exit(error &err, const int errNo=1)
Foam::fvPatchFieldMapper.
Templated 3D SphericalTensor derived from VectorSpace adding construction from 1 component, element access using th ii() member function and the inner-product (dot-product) and outer-product operators.
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Return the matrix source coefficients corresponding to the.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const word & wordToken() const
const compound & compoundToken() const
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
void putBack(const token &)
Put back token.
volVectorField vectorField(fieldObject, mesh)
This boundary condition provides a generic version of the calculated condition, useful as a fallback ...
A templated class for holding compound tokens.
A token holds items read from Istream.
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
errorManip< error > abort(error &err)
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
rDeltaT dimensionedInternalField()
compound & transferCompoundToken(const Istream &is)
tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
To & dynamicCast(From &r)
Reference type cast template function,.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void write(Ostream &) const
Write.
volScalarField scalarField(fieldObject, mesh)
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.
A class for managing temporary objects.
Field< sphericalTensor > sphericalTensorField
Specialisation of Field<T> for sphericalTensor.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
A HashTable specialization for hashing pointers.