Go to the documentation of this file.
41 <<
"Trying to construct an genericFvPatchField on patch "
42 << this->patch().name()
57 actualTypeName_(
dict.lookup(
"type")),
60 if (!
dict.found(
"value"))
65 ) <<
"\n Cannot find 'value' entry"
66 <<
" on patch " << this->patch().name()
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()
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()
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()
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()
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()
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()
304 tensorFields_.insert(iter().keyword(), fPtr);
313 <<
"\n on patch " << this->patch().name()
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()
462 sphericalTensorFields_.insert
476 symmTensorFields_.insert
567 sphericalTensorFields_,
606 refCast<const genericFvPatchField<Type> >(ptf);
620 iter()->rmap(*dptfIter(), addr);
636 iter()->rmap(*dptfIter(), addr);
643 sphericalTensorFields_,
652 iter()->rmap(*dptfIter(), addr);
668 iter()->rmap(*dptfIter(), addr);
684 iter()->rmap(*dptfIter(), addr);
698 <<
"cannot be called for a genericFvPatchField"
699 " (actual type " << actualTypeName_ <<
")"
700 <<
"\n on patch " << this->patch().name()
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()
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()
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()
759 <<
"\n You are probably trying to solve for a field with a "
760 "generic boundary condition."
770 os.
writeKeyword(
"type") << actualTypeName_ << token::END_STATEMENT <<
nl;
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()))
786 scalarFields_.find(iter().keyword())()
787 ->writeEntry(iter().keyword(), os);
789 else if (vectorFields_.found(iter().keyword()))
791 vectorFields_.find(iter().keyword())()
792 ->writeEntry(iter().keyword(), os);
794 else if (sphericalTensorFields_.found(iter().keyword()))
796 sphericalTensorFields_.find(iter().keyword())()
797 ->writeEntry(iter().keyword(), os);
799 else if (symmTensorFields_.found(iter().keyword()))
801 symmTensorFields_.find(iter().keyword())()
802 ->writeEntry(iter().keyword(), os);
804 else if (tensorFields_.found(iter().keyword()))
806 tensorFields_.find(iter().keyword())()
807 ->writeEntry(iter().keyword(), os);
817 this->writeEntry(
"value", os);
This boundary condition provides a generic version of the calculated condition, useful as a fallback ...
tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
Templated 3D tensor derived from VectorSpace adding construction from 9 components,...
genericFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
A templated class for holding compound tokens.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
A class for managing temporary objects.
rDeltaT dimensionedInternalField()
const word & wordToken() const
An STL-conforming const_iterator.
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
A token holds items read from Istream.
const compound & compoundToken() const
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Field< symmTensor > symmTensorField
Specialisation of Field<T> for symmTensor.
Pre-declare SubField and related Field type.
HashPtrTable< tensorField > tensorFields_
HashPtrTable< sphericalTensorField > sphericalTensorFields_
HashPtrTable< vectorField > vectorFields_
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
volVectorField vectorField(fieldObject, mesh)
compound & transferCompoundToken(const Istream &is)
virtual void write(Ostream &) const
Write.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Field< sphericalTensor > sphericalTensorField
Specialisation of Field<T> for sphericalTensor.
HashPtrTable< scalarField > scalarFields_
This boundary condition is not designed to be evaluated; it is assmued that the value is assigned via...
errorManip< error > abort(error &err)
HashPtrTable< symmTensorField > symmTensorFields_
Templated 3D SphericalTensor derived from VectorSpace adding construction from 1 component,...
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
A HashTable specialization for hashing pointers.
To & dynamicCast(From &r)
Reference type cast template function,.
volScalarField scalarField(fieldObject, mesh)
void putBack(const token &)
Put back token.
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Return the matrix source coefficients corresponding to the.
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Foam::fvPatchFieldMapper.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool isPunctuation() const
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...