31 const word& patchFieldType,
32 const word& actualPatchType,
39 Info<<
"fvPatchField<Type>::New(const word&, const word&, " 40 "const fvPatch&, const DimensionedField<Type, volMesh>&) :" 47 typename patchConstructorTable::iterator cstrIter =
48 patchConstructorTablePtr_->find(patchFieldType);
50 if (cstrIter == patchConstructorTablePtr_->end())
54 "fvPatchField<Type>::New(const word&, const word&, const fvPatch&," 55 "const DimensionedField<Type, volMesh>&)" 56 ) <<
"Unknown patchField type " 57 << patchFieldType <<
nl <<
nl 58 <<
"Valid patchField types are :" <<
endl 59 << patchConstructorTablePtr_->sortedToc()
63 typename patchConstructorTable::iterator patchTypeCstrIter =
64 patchConstructorTablePtr_->find(p.type());
68 actualPatchType == word::null
69 || actualPatchType != p.type()
72 if (patchTypeCstrIter != patchConstructorTablePtr_->end())
74 return patchTypeCstrIter()(
p, iF);
78 return cstrIter()(
p, iF);
86 if ((patchTypeCstrIter != patchConstructorTablePtr_->end()))
88 tfvp().patchType() = actualPatchType;
98 const word& patchFieldType,
103 return New(patchFieldType, word::null, p, iF);
115 const word patchFieldType(dict.
lookup(
"type"));
119 Info<<
"fvPatchField<Type>::New(const fvPatch&, " 120 "const DimensionedField<Type, volMesh>&, " 121 "const dictionary&) : patchFieldType=" << patchFieldType
125 typename dictionaryConstructorTable::iterator cstrIter
126 = dictionaryConstructorTablePtr_->find(patchFieldType);
128 if (cstrIter == dictionaryConstructorTablePtr_->end())
130 if (!disallowGenericFvPatchField)
132 cstrIter = dictionaryConstructorTablePtr_->find(
"generic");
135 if (cstrIter == dictionaryConstructorTablePtr_->end())
139 "fvPatchField<Type>::New(const fvPatch&, " 140 "const DimensionedField<Type, volMesh>&, " 141 "const dictionary&)",
143 ) <<
"Unknown patchField type " << patchFieldType
144 <<
" for patch type " << p.type() <<
nl <<
nl 145 <<
"Valid patchField types are :" <<
endl 146 << dictionaryConstructorTablePtr_->sortedToc()
153 !dict.
found(
"patchType")
157 typename dictionaryConstructorTable::iterator patchTypeCstrIter
158 = dictionaryConstructorTablePtr_->find(p.type());
162 patchTypeCstrIter != dictionaryConstructorTablePtr_->end()
163 && patchTypeCstrIter() != cstrIter()
168 "fvPatchField<Type>::New(const fvPatch&, " 169 "const DimensionedField<Type, volMesh>&, " 170 "const dictionary&)",
172 ) <<
"inconsistent patch and patchField types for \n" 173 " patch type " << p.type()
174 <<
" and patchField type " << patchFieldType
179 return cstrIter()(
p, iF,
dict);
194 Info<<
"fvPatchField<Type>::New(const fvPatchField<Type>&, " 195 "const fvPatch&, const DimensionedField<Type, volMesh>&, " 196 "const fvPatchFieldMapper&) : " 197 "constructing fvPatchField<Type>" 201 typename patchMapperConstructorTable::iterator cstrIter =
202 patchMapperConstructorTablePtr_->find(ptf.type());
204 if (cstrIter == patchMapperConstructorTablePtr_->end())
208 "fvPatchField<Type>::New(const fvPatchField<Type>&, " 209 "const fvPatch&, const DimensionedField<Type, volMesh>&, " 210 "const fvPatchFieldMapper&)" 211 ) <<
"Unknown patchField type " << ptf.type() <<
nl <<
nl 212 <<
"Valid patchField types are :" <<
endl 213 << patchMapperConstructorTablePtr_->sortedToc()
217 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)
static tmp< fvPatchField< Type > > New(const word &, const fvPatch &, const DimensionedField< Type, volMesh > &)
Return a pointer to a new patchField created on freestore given.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
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.