34 const word& patchFieldType,
35 const word& actualPatchType,
37 const DimensionedField<Type, volMesh>& iF
41 <<
"patchFieldType = " << patchFieldType
42 <<
" : " <<
p.type() <<
nl;
44 auto* ctorPtr = patchConstructorTable(patchFieldType);
52 *patchConstructorTablePtr_
56 auto* patchTypeCtor = patchConstructorTable(
p.type());
60 actualPatchType == word::null
61 || actualPatchType !=
p.type()
66 return patchTypeCtor(
p, iF);
70 return ctorPtr(
p, iF);
75 tmp<fvPatchField<Type>> tfvp = ctorPtr(
p, iF);
80 tfvp.ref().patchType() = actualPatchType;
89 const word& patchFieldType,
91 const DimensionedField<Type, volMesh>& iF
94 return New(patchFieldType, word::null,
p, iF);
102 const DimensionedField<Type, volMesh>& iF,
103 const dictionary&
dict
106 const word patchFieldType(
dict.get<word>(
"type"));
109 <<
"patchFieldType = " << patchFieldType <<
nl;
111 auto* ctorPtr = dictionaryConstructorTable(patchFieldType);
115 if (!disallowGenericFvPatchField)
117 ctorPtr = dictionaryConstructorTable(
"generic");
123 <<
"Unknown patchField type " << patchFieldType
124 <<
" for patch type " <<
p.type() <<
nl <<
nl
125 <<
"Valid patchField types :" <<
endl
126 << dictionaryConstructorTablePtr_->sortedToc()
133 !
dict.found(
"patchType")
134 ||
dict.get<word>(
"patchType") !=
p.type()
137 auto* patchTypeCtor = dictionaryConstructorTable(
p.type());
139 if (patchTypeCtor && patchTypeCtor != ctorPtr)
142 <<
"inconsistent patch and patchField types for\n"
143 " patch type " <<
p.type()
144 <<
" and patchField type " << patchFieldType
149 return ctorPtr(
p, iF,
dict);
156 const fvPatchField<Type>& ptf,
158 const DimensionedField<Type, volMesh>& iF,
159 const fvPatchFieldMapper& pfMapper
163 <<
"Constructing fvPatchField<Type>" <<
nl;
165 auto* ctorPtr = patchMapperConstructorTable(ptf.type());
173 *patchMapperConstructorTablePtr_
177 return ctorPtr(ptf,
p, iF, pfMapper);