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);
681 <<
"cannot be called for a genericFvPatchField" 682 " (actual type " << actualTypeName() <<
")" 683 <<
"\n on patch " << this->patch().name()
684 <<
" of field " << this->internalField().name()
685 <<
" in file " << this->internalField().objectPath()
686 <<
"\n You are probably trying to solve for a field with a " 687 "generic boundary condition." 702 <<
"cannot be called for a genericFvPatchField" 703 " (actual type " << actualTypeName() <<
")" 704 <<
"\n on patch " << this->patch().name()
705 <<
" of field " << this->internalField().name()
706 <<
" in file " << this->internalField().objectPath()
707 <<
"\n You are probably trying to solve for a field with a " 708 "generic boundary condition." 720 <<
"cannot be called for a genericFvPatchField" 721 " (actual type " << actualTypeName() <<
")" 722 <<
"\n on patch " << this->patch().name()
723 <<
" of field " << this->internalField().name()
724 <<
" in file " << this->internalField().objectPath()
725 <<
"\n You are probably trying to solve for a field with a " 726 "generic boundary condition." 737 <<
"cannot be called for a genericFvPatchField" 738 " (actual type " << actualTypeName() <<
")" 739 <<
"\n on patch " << this->patch().name()
740 <<
" of field " << this->internalField().name()
741 <<
" in file " << this->internalField().objectPath()
742 <<
"\n You are probably trying to solve for a field with a " 743 "generic boundary condition." 757 if (iter().keyword() !=
"type" && iter().keyword() !=
"value")
762 && iter().stream().size()
763 && iter().stream()[0].isWord()
764 && iter().stream()[0].wordToken() ==
"nonuniform" 767 if (scalarFields_.found(iter().keyword()))
773 *scalarFields_.find(iter().keyword())()
776 else if (vectorFields_.found(iter().keyword()))
782 *vectorFields_.find(iter().keyword())()
785 else if (sphericalTensorFields_.found(iter().keyword()))
791 *sphericalTensorFields_.find(iter().keyword())()
794 else if (symmTensorFields_.found(iter().keyword()))
800 *symmTensorFields_.find(iter().keyword())()
803 else if (tensorFields_.found(iter().keyword()))
809 *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.
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.
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
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
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.