31 const word& patchFieldType,
32 const word& actualPatchType,
40 <<
"patchFieldType = " << patchFieldType
45 typename patchConstructorTable::iterator cstrIter =
46 patchConstructorTablePtr_->find(patchFieldType);
48 if (cstrIter == patchConstructorTablePtr_->end())
51 <<
"Unknown patchField type " 52 << patchFieldType <<
nl <<
nl 53 <<
"Valid patchField types are :" <<
endl 54 << patchConstructorTablePtr_->sortedToc()
58 typename patchConstructorTable::iterator patchTypeCstrIter =
59 patchConstructorTablePtr_->find(p.type());
63 actualPatchType == word::null
64 || actualPatchType != p.type()
67 if (patchTypeCstrIter != patchConstructorTablePtr_->end())
69 return patchTypeCstrIter()(
p, iF);
73 return cstrIter()(
p, iF);
81 if ((patchTypeCstrIter != patchConstructorTablePtr_->end()))
83 tfvp.
ref().patchType() = actualPatchType;
93 const word& patchFieldType,
98 return New(patchFieldType, word::null, p, iF);
110 const word patchFieldType(dict.
lookup(
"type"));
115 <<
"patchFieldType = " << patchFieldType
119 typename dictionaryConstructorTable::iterator cstrIter
120 = dictionaryConstructorTablePtr_->find(patchFieldType);
122 if (cstrIter == dictionaryConstructorTablePtr_->end())
124 if (!disallowGenericFvPatchField)
126 cstrIter = dictionaryConstructorTablePtr_->find(
"generic");
129 if (cstrIter == dictionaryConstructorTablePtr_->end())
134 ) <<
"Unknown patchField type " << patchFieldType
135 <<
" for patch type " << p.type() <<
nl <<
nl 136 <<
"Valid patchField types are :" <<
endl 137 << dictionaryConstructorTablePtr_->sortedToc()
144 !dict.
found(
"patchType")
148 typename dictionaryConstructorTable::iterator patchTypeCstrIter
149 = dictionaryConstructorTablePtr_->find(p.type());
153 patchTypeCstrIter != dictionaryConstructorTablePtr_->end()
154 && patchTypeCstrIter() != cstrIter()
160 ) <<
"inconsistent patch and patchField types for \n" 161 " patch type " << p.type()
162 <<
" and patchField type " << patchFieldType
167 return cstrIter()(
p, iF,
dict);
185 typename patchMapperConstructorTable::iterator cstrIter =
186 patchMapperConstructorTablePtr_->find(ptf.type());
188 if (cstrIter == patchMapperConstructorTablePtr_->end())
191 <<
"Unknown patchField type " << ptf.type() <<
nl <<
nl 192 <<
"Valid patchField types are :" <<
endl 193 << patchMapperConstructorTablePtr_->sortedToc()
197 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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
A class for handling words, derived from string.
Foam::fvPatchFieldMapper.
static tmp< fvPatchField< Type > > New(const word &, const fvPatch &, const DimensionedField< Type, volMesh > &)
Return a pointer to a new patchField created on freestore given.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
#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.
T & ref() const
Return non-const reference or generate a fatal error.
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.