41 <<
"Trying to construct an genericFvPatchField on patch " 42 << this->patch().name()
43 <<
" of field " << this->internalField().name()
60 if (!dict.
found(
"value"))
65 ) <<
"\n Cannot find 'value' entry" 66 <<
" on patch " << this->patch().name()
67 <<
" of field " << this->internalField().name()
68 <<
" in file " << this->internalField().objectPath()
70 <<
" which is required to set the" 71 " values of the generic patch field." <<
nl 72 <<
" (Actual type " << actualTypeName() <<
")" <<
nl 73 <<
"\n Please add the 'value' entry to the write function " 74 "of the user-defined boundary-condition\n" 80 if (iter().keyword() !=
"type" && iter().keyword() !=
"value")
85 && iter().stream().size()
120 ) <<
"\n token following 'nonuniform' " 122 <<
"\n on patch " << this->patch().name()
124 << this->internalField().name()
126 << this->internalField().objectPath()
145 if (fPtr->
size() != this->size())
150 ) <<
"\n size of field " << iter().keyword()
151 <<
" (" << fPtr->
size() <<
')' 152 <<
" is not the same size as the patch (" 153 << this->size() <<
')' 154 <<
"\n on patch " << this->patch().name()
156 << this->internalField().name()
158 << this->internalField().objectPath()
162 scalarFields_.insert(iter().keyword(), fPtr);
179 if (fPtr->
size() != this->size())
184 ) <<
"\n size of field " << iter().keyword()
185 <<
" (" << fPtr->
size() <<
')' 186 <<
" is not the same size as the patch (" 187 << this->size() <<
')' 188 <<
"\n on patch " << this->patch().name()
190 << this->internalField().name()
192 << this->internalField().objectPath()
196 vectorFields_.insert(iter().keyword(), fPtr);
216 if (fPtr->
size() != this->size())
221 ) <<
"\n size of field " << iter().keyword()
222 <<
" (" << fPtr->
size() <<
')' 223 <<
" is not the same size as the patch (" 224 << this->size() <<
')' 225 <<
"\n on patch " << this->patch().name()
227 << this->internalField().name()
229 << this->internalField().objectPath()
233 sphericalTensorFields_.insert(iter().keyword(), fPtr);
253 if (fPtr->
size() != this->size())
258 ) <<
"\n size of field " << iter().keyword()
259 <<
" (" << fPtr->
size() <<
')' 260 <<
" is not the same size as the patch (" 261 << this->size() <<
')' 262 <<
"\n on patch " << this->patch().name()
264 << this->internalField().name()
266 << this->internalField().objectPath()
270 symmTensorFields_.insert(iter().keyword(), fPtr);
287 if (fPtr->
size() != this->size())
292 ) <<
"\n size of field " << iter().keyword()
293 <<
" (" << fPtr->
size() <<
')' 294 <<
" is not the same size as the patch (" 295 << this->size() <<
')' 296 <<
"\n on patch " << this->patch().name()
298 << this->internalField().name()
300 << this->internalField().objectPath()
304 tensorFields_.insert(iter().keyword(), fPtr);
313 <<
"\n on patch " << this->patch().name()
315 << this->internalField().name()
317 << this->internalField().objectPath()
327 token fieldToken(is);
348 if (l.
size() == vector::nComponents)
350 vector vs(l[0], l[1], l[2]);
358 else if (l.
size() == sphericalTensor::nComponents)
362 sphericalTensorFields_.insert
368 else if (l.
size() == symmTensor::nComponents)
370 symmTensor vs(l[0], l[1], l[2], l[3], l[4], l[5]);
372 symmTensorFields_.insert
378 else if (l.
size() == tensor::nComponents)
398 ) <<
"\n unrecognised native type " << l
399 <<
"\n on patch " << this->patch().name()
401 << this->internalField().name()
403 << this->internalField().objectPath()
437 mapper(*iter()).ptr()
451 mapper(*iter()).ptr()
458 ptf.sphericalTensorFields_,
462 sphericalTensorFields_.insert
465 mapper(*iter()).ptr()
472 ptf.symmTensorFields_,
476 symmTensorFields_.insert
479 mapper(*iter()).ptr()
493 mapper(*iter()).ptr()
509 scalarFields_(ptf.scalarFields_),
510 vectorFields_(ptf.vectorFields_),
511 sphericalTensorFields_(ptf.sphericalTensorFields_),
512 symmTensorFields_(ptf.symmTensorFields_),
513 tensorFields_(ptf.tensorFields_)
550 sphericalTensorFields_,
589 refCast<const genericFvPatchField<Type>>(ptf);
599 dptf.scalarFields_.find(iter.key());
601 if (dptfIter != dptf.scalarFields_.end())
603 iter()->rmap(*dptfIter(), addr);
615 dptf.vectorFields_.find(iter.key());
617 if (dptfIter != dptf.vectorFields_.end())
619 iter()->rmap(*dptfIter(), addr);
626 sphericalTensorFields_,
631 dptf.sphericalTensorFields_.find(iter.key());
633 if (dptfIter != dptf.sphericalTensorFields_.end())
635 iter()->rmap(*dptfIter(), addr);
647 dptf.symmTensorFields_.find(iter.key());
649 if (dptfIter != dptf.symmTensorFields_.end())
651 iter()->rmap(*dptfIter(), addr);
663 dptf.tensorFields_.find(iter.key());
665 if (dptfIter != dptf.tensorFields_.end())
667 iter()->rmap(*dptfIter(), addr);
682 refCast<const genericFvPatchField<Type>>(ptf);
692 dptf.scalarFields_.find(iter.key());
694 if (dptfIter != dptf.scalarFields_.end())
696 iter()->reset(*dptfIter());
708 dptf.vectorFields_.find(iter.key());
710 if (dptfIter != dptf.vectorFields_.end())
712 iter()->reset(*dptfIter());
719 sphericalTensorFields_,
724 dptf.sphericalTensorFields_.find(iter.key());
726 if (dptfIter != dptf.sphericalTensorFields_.end())
728 iter()->reset(*dptfIter());
740 dptf.symmTensorFields_.find(iter.key());
742 if (dptfIter != dptf.symmTensorFields_.end())
744 iter()->reset(*dptfIter());
756 dptf.tensorFields_.find(iter.key());
758 if (dptfIter != dptf.tensorFields_.end())
760 iter()->reset(*dptfIter());
774 <<
"cannot be called for a genericFvPatchField" 775 " (actual type " << actualTypeName() <<
")" 776 <<
"\n on patch " << this->patch().name()
777 <<
" of field " << this->internalField().name()
778 <<
" in file " << this->internalField().objectPath()
779 <<
"\n You are probably trying to solve for a field with a " 780 "generic boundary condition." 795 <<
"cannot be called for a genericFvPatchField" 796 " (actual type " << actualTypeName() <<
")" 797 <<
"\n on patch " << this->patch().name()
798 <<
" of field " << this->internalField().name()
799 <<
" in file " << this->internalField().objectPath()
800 <<
"\n You are probably trying to solve for a field with a " 801 "generic boundary condition." 813 <<
"cannot be called for a genericFvPatchField" 814 " (actual type " << actualTypeName() <<
")" 815 <<
"\n on patch " << this->patch().name()
816 <<
" of field " << this->internalField().name()
817 <<
" in file " << this->internalField().objectPath()
818 <<
"\n You are probably trying to solve for a field with a " 819 "generic boundary condition." 830 <<
"cannot be called for a genericFvPatchField" 831 " (actual type " << actualTypeName() <<
")" 832 <<
"\n on patch " << this->patch().name()
833 <<
" of field " << this->internalField().name()
834 <<
" in file " << this->internalField().objectPath()
835 <<
"\n You are probably trying to solve for a field with a " 836 "generic boundary condition." 850 if (iter().keyword() !=
"type" && iter().keyword() !=
"value")
855 && iter().stream().size()
856 && iter().stream()[0].isWord()
857 && iter().stream()[0].wordToken() ==
"nonuniform" 860 if (scalarFields_.found(iter().keyword()))
866 *scalarFields_.find(iter().keyword())()
869 else if (vectorFields_.found(iter().keyword()))
875 *vectorFields_.find(iter().keyword())()
878 else if (sphericalTensorFields_.found(iter().keyword()))
884 *sphericalTensorFields_.find(iter().keyword())()
887 else if (symmTensorFields_.found(iter().keyword()))
893 *symmTensorFields_.find(iter().keyword())()
896 else if (tensorFields_.found(iter().keyword()))
902 *tensorFields_.find(iter().keyword())()
tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Field< sphericalTensor > sphericalTensorField
Specialisation of Field<T> for sphericalTensor.
compound & transferCompoundToken(const Istream &is)
Field< symmTensor > symmTensorField
Specialisation of Field<T> for symmTensor.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
To & dynamicCast(From &r)
Reference type cast template function,.
An STL-conforming const_iterator.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
This boundary condition provides a generic version of the calculated condition, useful as a fallback ...
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
const word & wordToken() const
void size(const label)
Override size to be inconsistent with allocated storage.
A token holds items read from Istream.
void putBack(const token &)
Put back token.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void write(Ostream &) const
Write.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
volVectorField vectorField(fieldObject, mesh)
A HashTable specialisation for hashing pointers.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
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.
A templated class for holding compound tokens.
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Return the matrix source coefficients corresponding to the.
virtual void reset(const fvPatchField< Type > &)
Reset the fvPatchField to the given fvPatchField.
Foam::fvPatchFieldMapper.
tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
genericFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
This boundary condition is not designed to be evaluated; it is assumed that the value is assigned via...
const compound & compoundToken() const
errorManip< error > abort(error &err)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
volScalarField scalarField(fieldObject, mesh)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the.
A class for managing temporary objects.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
bool isPunctuation() const
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.