31 const word& patchFieldType,
32 const word& actualPatchType,
42 typename patchConstructorTable::iterator cstrIter =
43 patchConstructorTablePtr_->find(patchFieldType);
45 if (cstrIter == patchConstructorTablePtr_->end())
48 <<
"Unknown patchField type " 49 << patchFieldType <<
nl <<
nl 50 <<
"Valid patchField types are :" <<
endl 51 << patchConstructorTablePtr_->sortedToc()
57 actualPatchType == word::null
58 || actualPatchType != p.type()
61 typename patchConstructorTable::iterator patchTypeCstrIter =
62 patchConstructorTablePtr_->find(p.type());
64 if (patchTypeCstrIter != patchConstructorTablePtr_->end())
66 return patchTypeCstrIter()(
p, iF);
70 return cstrIter()(
p, iF);
75 return cstrIter()(
p, iF);
83 const word& patchFieldType,
88 return New(patchFieldType, word::null, p, iF);
105 const word patchFieldType(dict.
lookup(
"type"));
107 typename dictionaryConstructorTable::iterator cstrIter
108 = dictionaryConstructorTablePtr_->find(patchFieldType);
110 if (cstrIter == dictionaryConstructorTablePtr_->end())
112 if (!disallowGenericFvsPatchField)
114 cstrIter = dictionaryConstructorTablePtr_->find(
"generic");
117 if (cstrIter == dictionaryConstructorTablePtr_->end())
122 ) <<
"Unknown patchField type " << patchFieldType
123 <<
" for patch type " << p.type() <<
nl <<
nl 124 <<
"Valid patchField types are :" <<
endl 125 << dictionaryConstructorTablePtr_->sortedToc()
132 !dict.
found(
"patchType")
136 typename dictionaryConstructorTable::iterator patchTypeCstrIter
137 = dictionaryConstructorTablePtr_->find(p.type());
141 patchTypeCstrIter != dictionaryConstructorTablePtr_->end()
142 && patchTypeCstrIter() != cstrIter()
148 ) <<
"inconsistent patch and patchField types for \n" 149 " patch type " << p.type()
150 <<
" and patchField type " << patchFieldType
155 return cstrIter()(
p, iF,
dict);
173 typename patchMapperConstructorTable::iterator cstrIter =
174 patchMapperConstructorTablePtr_->find(ptf.type());
176 if (cstrIter == patchMapperConstructorTablePtr_->end())
179 <<
"Unknown patchField type " << ptf.type() <<
nl <<
nl 180 <<
"Valid patchField types are :" <<
endl 181 << patchMapperConstructorTablePtr_->sortedToc()
185 typename patchMapperConstructorTable::iterator
186 patchTypeCstrIter = patchMapperConstructorTablePtr_->find(p.type());
188 if (patchTypeCstrIter != patchMapperConstructorTablePtr_->end())
190 return patchTypeCstrIter()(ptf,
p, iF, pfMapper);
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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
static tmp< fvsPatchField< Type > > New(const word &, const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Return a pointer to a new patchField created on freestore given.
A class for handling words, derived from string.
Foam::fvPatchFieldMapper.
#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...
A class for managing temporary objects.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
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.