31 const word& patchFieldType,
32 const word& actualPatchType,
42 typename pointPatchConstructorTable::iterator cstrIter =
43 pointPatchConstructorTablePtr_->find(patchFieldType);
45 if (cstrIter == pointPatchConstructorTablePtr_->end())
48 <<
"Unknown patchFieldType type " 49 << patchFieldType <<
nl <<
nl 50 <<
"Valid patchField types are :" <<
endl 51 << pointPatchConstructorTablePtr_->sortedToc()
59 actualPatchType == word::null
60 || actualPatchType != p.type()
66 typename pointPatchConstructorTable::iterator patchTypeCstrIter =
67 pointPatchConstructorTablePtr_->find(p.type());
69 if (patchTypeCstrIter == pointPatchConstructorTablePtr_->end())
72 <<
"inconsistent patch and patchField types for \n" 73 <<
" patch type " << p.type()
74 <<
" and patchField type " << patchFieldType
78 return patchTypeCstrIter()(
p, iF);
83 if (pointPatchConstructorTablePtr_->found(p.type()))
85 pfPtr().patchType() = actualPatchType;
96 const word& patchFieldType,
101 return New(patchFieldType, word::null, p, iF);
120 typename dictionaryConstructorTable::iterator cstrIter
121 = dictionaryConstructorTablePtr_->find(patchFieldType);
123 if (cstrIter == dictionaryConstructorTablePtr_->end())
125 if (!disallowGenericPointPatchField)
127 cstrIter = dictionaryConstructorTablePtr_->find(
"generic");
130 if (cstrIter == dictionaryConstructorTablePtr_->end())
135 ) <<
"Unknown patchField type " << patchFieldType
136 <<
" for patch type " << p.type() <<
nl <<
nl 137 <<
"Valid patchField types are :" <<
endl 138 << dictionaryConstructorTablePtr_->sortedToc()
148 !dict.
found(
"patchType")
160 typename dictionaryConstructorTable::iterator patchTypeCstrIter
161 = dictionaryConstructorTablePtr_->find(p.type());
163 if (patchTypeCstrIter == dictionaryConstructorTablePtr_->end())
168 ) <<
"inconsistent patch and patchField types for \n" 169 <<
" patch type " << p.type()
170 <<
" and patchField type " << patchFieldType
174 return patchTypeCstrIter()(
p, iF,
dict);
178 return cstrIter()(
p, iF,
dict);
196 typename patchMapperConstructorTable::iterator cstrIter =
197 patchMapperConstructorTablePtr_->find(ptf.type());
199 if (cstrIter == patchMapperConstructorTablePtr_->end())
202 <<
"Unknown patchField type " 203 << ptf.type() <<
nl <<
nl 204 <<
"Valid patchField types are :" <<
endl 205 << patchMapperConstructorTablePtr_->sortedToc()
209 return cstrIter()(ptf,
p, iF, pfMapper);
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.
Foam::pointPatchFieldMapper.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Abstract base class for point-mesh patch fields.
A class for handling words, derived from string.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
virtual const word & constraintType() const
Return the constraint type this pointPatch implements.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Basic pointPatch represents a set of points from the mesh.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static autoPtr< pointPatchField< Type > > New(const word &, const pointPatch &, const DimensionedField< Type, pointMesh > &)
Return a pointer to a new patchField created on freestore given.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
#define InfoInFunction
Report an information message using Foam::Info.