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()
508 scalarFields_(ptf.scalarFields_),
509 vectorFields_(ptf.vectorFields_),
510 sphericalTensorFields_(ptf.sphericalTensorFields_),
511 symmTensorFields_(ptf.symmTensorFields_),
512 tensorFields_(ptf.tensorFields_)
526 scalarFields_(ptf.scalarFields_),
527 vectorFields_(ptf.vectorFields_),
528 sphericalTensorFields_(ptf.sphericalTensorFields_),
529 symmTensorFields_(ptf.symmTensorFields_),
530 tensorFields_(ptf.tensorFields_)
567 sphericalTensorFields_,
606 refCast<const genericFvPatchField<Type>>(ptf);
616 dptf.scalarFields_.find(iter.key());
618 if (dptfIter != dptf.scalarFields_.end())
620 iter()->rmap(*dptfIter(), addr);
632 dptf.vectorFields_.find(iter.key());
634 if (dptfIter != dptf.vectorFields_.end())
636 iter()->rmap(*dptfIter(), addr);
643 sphericalTensorFields_,
648 dptf.sphericalTensorFields_.find(iter.key());
650 if (dptfIter != dptf.sphericalTensorFields_.end())
652 iter()->rmap(*dptfIter(), addr);
664 dptf.symmTensorFields_.find(iter.key());
666 if (dptfIter != dptf.symmTensorFields_.end())
668 iter()->rmap(*dptfIter(), addr);
680 dptf.tensorFields_.find(iter.key());
682 if (dptfIter != dptf.tensorFields_.end())
684 iter()->rmap(*dptfIter(), addr);
698 <<
"cannot be called for a genericFvPatchField" 699 " (actual type " << actualTypeName() <<
")" 700 <<
"\n on patch " << this->patch().name()
701 <<
" of field " << this->internalField().name()
702 <<
" in file " << this->internalField().objectPath()
703 <<
"\n You are probably trying to solve for a field with a " 704 "generic boundary condition." 719 <<
"cannot be called for a genericFvPatchField" 720 " (actual type " << actualTypeName() <<
")" 721 <<
"\n on patch " << this->patch().name()
722 <<
" of field " << this->internalField().name()
723 <<
" in file " << this->internalField().objectPath()
724 <<
"\n You are probably trying to solve for a field with a " 725 "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." 754 <<
"cannot be called for a genericFvPatchField" 755 " (actual type " << actualTypeName() <<
")" 756 <<
"\n on patch " << this->patch().name()
757 <<
" of field " << this->internalField().name()
758 <<
" in file " << this->internalField().objectPath()
759 <<
"\n You are probably trying to solve for a field with a " 760 "generic boundary condition." 774 if (iter().keyword() !=
"type" && iter().keyword() !=
"value")
779 && iter().stream().size()
780 && iter().stream()[0].isWord()
781 && iter().stream()[0].wordToken() ==
"nonuniform" 784 if (scalarFields_.found(iter().keyword()))
790 *scalarFields_.find(iter().keyword())()
793 else if (vectorFields_.found(iter().keyword()))
799 *vectorFields_.find(iter().keyword())()
802 else if (sphericalTensorFields_.found(iter().keyword()))
808 *sphericalTensorFields_.find(iter().keyword())()
811 else if (symmTensorFields_.found(iter().keyword()))
817 *symmTensorFields_.find(iter().keyword())()
820 else if (tensorFields_.found(iter().keyword()))
826 *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 specialization 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.