36 const word& patchFieldType,
43 Info<<
"fvsPatchField<Type>::New(const word&, const fvPatch&, "
44 "const Field<Type>&) : "
45 "constructing fvsPatchField<Type>"
49 typename patchConstructorTable::iterator cstrIter =
50 patchConstructorTablePtr_->find(patchFieldType);
52 if (cstrIter == patchConstructorTablePtr_->end())
56 "fvsPatchField<Type>::New(const word&, const fvPatch&, "
58 ) <<
"Unknown patchTypefield type " << patchFieldType
60 <<
"Valid patchField types are :" <<
endl
61 << patchConstructorTablePtr_->sortedToc()
65 typename patchConstructorTable::iterator patchTypeCstrIter =
66 patchConstructorTablePtr_->find(p.type());
68 if (patchTypeCstrIter != patchConstructorTablePtr_->end())
70 return patchTypeCstrIter()(
p, iF);
74 return cstrIter()(
p, iF);
89 Info<<
"fvsPatchField<Type>::New(const fvPatch&, const Field<Type>&, "
90 "const dictionary&) : "
91 "constructing fvsPatchField<Type>"
97 typename dictionaryConstructorTable::iterator cstrIter
98 = dictionaryConstructorTablePtr_->find(patchFieldType);
100 if (cstrIter == dictionaryConstructorTablePtr_->end())
102 if (!disallowDefaultFvsPatchField)
104 cstrIter = dictionaryConstructorTablePtr_->find(
"default");
107 if (cstrIter == dictionaryConstructorTablePtr_->end())
111 "fvsPatchField<Type>::New(const fvPatch&, const Field<Type>&, "
112 "const dictionary&)",
114 ) <<
"Unknown patchField type " << patchFieldType
115 <<
" for patch type " << p.type() <<
endl <<
endl
116 <<
"Valid patchField types are :" <<
endl
117 << dictionaryConstructorTablePtr_->sortedToc()
124 !dict.
found(
"patchType")
128 typename dictionaryConstructorTable::iterator patchTypeCstrIter
129 = dictionaryConstructorTablePtr_->find(p.type());
133 patchTypeCstrIter != dictionaryConstructorTablePtr_->end()
134 && patchTypeCstrIter() != cstrIter()
139 "fvsPatchField<Type>const fvPatch&, const Field<Type>&, "
140 "const dictionary&)",
142 ) <<
"inconsistent patch and patchField types for \n"
143 " patch type " << p.type()
144 <<
" and patchField type " << patchFieldType
149 return cstrIter()(
p, iF, dict);
166 Info<<
"fvsPatchField<Type>::New(const fvsPatchField<Type>&,"
167 " const fvPatch&, const Field<Type>&, "
168 "const fvPatchFieldMapper&) : "
169 "constructing fvsPatchField<Type>"
173 typename patchMapperConstructorTable::iterator cstrIter =
174 patchMapperConstructorTablePtr_->find(ptf.type());
176 if (cstrIter == patchMapperConstructorTablePtr_->end())
180 "fvsPatchField<Type>::New(const fvsPatchField<Type>&, "
181 "const fvPatch&, const Field<Type>&, "
182 "const fvPatchFieldMapper&)"
183 ) <<
"unknown patchTypefield type " << ptf.type() <<
endl <<
endl
184 <<
"Valid patchField types are :" <<
endl
185 << patchMapperConstructorTablePtr_->sortedToc()
189 typename patchMapperConstructorTable::iterator
190 patchTypeCstrIter = patchMapperConstructorTablePtr_->find(p.type());
192 if (patchTypeCstrIter != patchMapperConstructorTablePtr_->end())
194 return patchTypeCstrIter()(ptf,
p, iF, pfMapper);
198 return cstrIter()(ptf,
p, iF, pfMapper);