34 const word& patchFieldType,
35 const word& actualPatchType,
37 const DimensionedField<Type, surfaceMesh>& iF
42 auto* ctorPtr = patchConstructorTable(patchFieldType);
50 *patchConstructorTablePtr_
56 actualPatchType == word::null
57 || actualPatchType !=
p.type()
60 auto* patchTypeCtor = patchConstructorTable(
p.type());
64 return patchTypeCtor(
p, iF);
68 return ctorPtr(
p, iF);
75 const word& patchFieldType,
77 const DimensionedField<Type, surfaceMesh>& iF
80 return New(patchFieldType, word::null,
p, iF);
88 const DimensionedField<Type, surfaceMesh>& iF,
89 const dictionary&
dict
94 const word patchFieldType(
dict.get<word>(
"type"));
96 auto* ctorPtr = dictionaryConstructorTable(patchFieldType);
100 if (!disallowGenericFvsPatchField)
102 ctorPtr = dictionaryConstructorTable(
"generic");
108 <<
"Unknown patchField type " << patchFieldType
109 <<
" for patch type " <<
p.type() <<
nl <<
nl
110 <<
"Valid patchField types :" <<
endl
111 << dictionaryConstructorTablePtr_->sortedToc()
118 !
dict.found(
"patchType")
119 ||
dict.get<word>(
"patchType") !=
p.type()
122 auto* patchTypeCtor = dictionaryConstructorTable(
p.type());
124 if (patchTypeCtor && patchTypeCtor != ctorPtr)
127 <<
"inconsistent patch and patchField types for\n"
128 " patch type " <<
p.type()
129 <<
" and patchField type " << patchFieldType
134 return ctorPtr(
p, iF,
dict);
141 const fvsPatchField<Type>& ptf,
143 const DimensionedField<Type, surfaceMesh>& iF,
144 const fvPatchFieldMapper& pfMapper
149 auto* ctorPtr = patchMapperConstructorTable(ptf.type());
157 *patchMapperConstructorTablePtr_
161 auto* patchTypeCtor = patchMapperConstructorTable(
p.type());
165 return patchTypeCtor(ptf,
p, iF, pfMapper);
168 return ctorPtr(ptf,
p, iF, pfMapper);