36 const word& patchFieldType,
37 const word& actualPatchType,
44 Info<<
"fvsPatchField<Type>::New(const word&, const word&" 45 ", const fvPatch&, const Field<Type>&) : " 46 "constructing fvsPatchField<Type>" 50 typename patchConstructorTable::iterator cstrIter =
51 patchConstructorTablePtr_->find(patchFieldType);
53 if (cstrIter == patchConstructorTablePtr_->end())
57 "fvsPatchField<Type>::New(const word&, const word&, const fvPatch&" 58 ", const Field<Type>&)" 59 ) <<
"Unknown patchField type " 60 << patchFieldType <<
nl <<
nl 61 <<
"Valid patchField types are :" <<
endl 62 << patchConstructorTablePtr_->sortedToc()
69 || actualPatchType != p.type()
72 typename patchConstructorTable::iterator patchTypeCstrIter =
73 patchConstructorTablePtr_->find(p.type());
75 if (patchTypeCstrIter != patchConstructorTablePtr_->end())
77 return patchTypeCstrIter()(
p, iF);
81 return cstrIter()(
p, iF);
86 return cstrIter()(
p, iF);
94 const word& patchFieldType,
113 Info<<
"fvsPatchField<Type>::New(const fvPatch&, const Field<Type>&, " 114 "const dictionary&) : " 115 "constructing fvsPatchField<Type>" 119 const word patchFieldType(dict.
lookup(
"type"));
121 typename dictionaryConstructorTable::iterator cstrIter
122 = dictionaryConstructorTablePtr_->find(patchFieldType);
124 if (cstrIter == dictionaryConstructorTablePtr_->end())
126 if (!disallowGenericFvsPatchField)
128 cstrIter = dictionaryConstructorTablePtr_->find(
"generic");
131 if (cstrIter == dictionaryConstructorTablePtr_->end())
135 "fvsPatchField<Type>::New(const fvPatch&, const Field<Type>&, " 136 "const dictionary&)",
138 ) <<
"Unknown patchField type " << patchFieldType
139 <<
" for patch type " << p.type() <<
nl <<
nl 140 <<
"Valid patchField types are :" <<
endl 141 << dictionaryConstructorTablePtr_->sortedToc()
148 !dict.
found(
"patchType")
152 typename dictionaryConstructorTable::iterator patchTypeCstrIter
153 = dictionaryConstructorTablePtr_->find(p.type());
157 patchTypeCstrIter != dictionaryConstructorTablePtr_->end()
158 && patchTypeCstrIter() != cstrIter()
163 "fvsPatchField<Type>const fvPatch&, const Field<Type>&, " 164 "const dictionary&)",
166 ) <<
"inconsistent patch and patchField types for \n" 167 " patch type " << p.type()
168 <<
" and patchField type " << patchFieldType
173 return cstrIter()(
p, iF,
dict);
190 Info<<
"fvsPatchField<Type>::New(const fvsPatchField<Type>&," 191 " const fvPatch&, const Field<Type>&, " 192 "const fvPatchFieldMapper&) : " 193 "constructing fvsPatchField<Type>" 197 typename patchMapperConstructorTable::iterator cstrIter =
198 patchMapperConstructorTablePtr_->find(ptf.type());
200 if (cstrIter == patchMapperConstructorTablePtr_->end())
204 "fvsPatchField<Type>::New(const fvsPatchField<Type>&, " 205 "const fvPatch&, const Field<Type>&, " 206 "const fvPatchFieldMapper&)" 207 ) <<
"Unknown patchField type " << ptf.type() <<
nl <<
nl 208 <<
"Valid patchField types are :" <<
endl 209 << patchMapperConstructorTablePtr_->sortedToc()
213 typename patchMapperConstructorTable::iterator
214 patchTypeCstrIter = patchMapperConstructorTablePtr_->find(p.type());
216 if (patchTypeCstrIter != patchMapperConstructorTablePtr_->end())
218 return patchTypeCstrIter()(ptf,
p, iF, pfMapper);
222 return cstrIter()(ptf,
p, iF, pfMapper);
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for handling words, derived from string.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Foam::fvPatchFieldMapper.
A list of keyword definitions, which are a keyword followed by any number of values (e...
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
static tmp< fvsPatchField< Type > > New(const word &, const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
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.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.
A class for managing temporary objects.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
static const word null
An empty word.