31 const word& patchFieldType,
32 const word& actualPatchType,
40 <<
"patchFieldType = " << patchFieldType
41 <<
", actualPatchType = " << actualPatchType
42 <<
", patchType = " << p.type()
46 typename pointPatchConstructorTable::iterator cstrIter =
47 pointPatchConstructorTablePtr_->find(patchFieldType);
49 if (cstrIter == pointPatchConstructorTablePtr_->end())
52 <<
"Unknown patchField type " 53 << patchFieldType <<
nl <<
nl 54 <<
"Valid patchField types are :" <<
endl 55 << pointPatchConstructorTablePtr_->sortedToc()
61 actualPatchType == word::null
62 || actualPatchType != p.type()
65 typename pointPatchConstructorTable::iterator patchTypeCstrIter =
66 pointPatchConstructorTablePtr_->find(p.type());
68 if (patchTypeCstrIter != pointPatchConstructorTablePtr_->end())
70 return patchTypeCstrIter()(
p, iF);
74 return cstrIter()(
p, iF);
79 return cstrIter()(
p, iF);
87 const word& patchFieldType,
92 return New(patchFieldType, word::null, p, iF);
109 <<
"patchFieldType = " << patchFieldType
110 <<
", actualPatchType = " 112 <<
", patchType = " << p.type()
116 typename dictionaryConstructorTable::iterator cstrIter
117 = dictionaryConstructorTablePtr_->find(patchFieldType);
119 if (cstrIter == dictionaryConstructorTablePtr_->end())
121 if (!disallowGenericPointPatchField)
123 cstrIter = dictionaryConstructorTablePtr_->find(
"generic");
126 if (cstrIter == dictionaryConstructorTablePtr_->end())
131 ) <<
"Unknown patchField type " << patchFieldType
132 <<
" for patch type " << p.type() <<
nl <<
nl 133 <<
"Valid patchField types are :" <<
endl 134 << dictionaryConstructorTablePtr_->sortedToc()
141 !dict.
found(
"patchType")
145 typename dictionaryConstructorTable::iterator patchTypeCstrIter =
146 dictionaryConstructorTablePtr_->find(p.type());
150 patchTypeCstrIter != dictionaryConstructorTablePtr_->end()
151 && patchTypeCstrIter() != cstrIter()
157 ) <<
"inconsistent patch and patchField types for \n" 158 <<
" patch type " << p.type()
159 <<
" and patchField type " << patchFieldType
164 return cstrIter()(
p, iF,
dict);
182 typename patchMapperConstructorTable::iterator cstrIter =
183 patchMapperConstructorTablePtr_->find(ptf.type());
185 if (cstrIter == patchMapperConstructorTablePtr_->end())
188 <<
"Unknown patchField type " << ptf.type() <<
nl <<
nl 189 <<
"Valid patchField types are :" <<
endl 190 << patchMapperConstructorTablePtr_->sortedToc()
194 return cstrIter()(ptf,
p, iF, pfMapper);
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
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.
Abstract base class for point-mesh patch fields.
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
A class for handling words, derived from string.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
#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.
word patchFieldType(const PatchField &pf)
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.