34 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
48 label nUnset = this->size();
55 if (dEntry.isDict() && dEntry.keyword().isLiteral())
57 const label patchi = bmesh_.findPatchID(dEntry.keyword());
87 for (
auto iter =
dict.crbegin(); iter !=
dict.crend(); ++iter)
89 const entry& dEntry = *iter;
94 bmesh_.indices(dEntry.
keyword(),
true);
98 if (!this->
set(patchi))
119 if (!this->
set(patchi))
121 if (bmesh_[patchi].
type() == emptyPolyPatch::typeName)
128 emptyPolyPatch::typeName,
147 dict.subDict(bmesh_[patchi].name())
159 if (!this->
set(patchi))
161 if (bmesh_[patchi].
type() == cyclicPolyPatch::typeName)
164 <<
"Cannot find patchField entry for cyclic "
165 << bmesh_[patchi].name() <<
endl
166 <<
"Is your field uptodate with split cyclics?" <<
endl
167 <<
"Run foamUpgradeCyclics to convert mesh and fields"
173 <<
"Cannot find patchField entry for "
183 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
194 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
199 const word& patchFieldType
223 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
227 const DimensionedField<Type, GeoMesh>&
field,
232 FieldField<PatchField, Type>(bmesh.size()),
239 patchFieldTypes.size() != this->size()
240 || (constraintTypes.size() && (constraintTypes.size() != this->size()))
244 <<
"Incorrect number of patch type specifications given" <<
nl
245 <<
" Number of patches in mesh = " << bmesh.size()
246 <<
" number of patch type specifications = "
247 << patchFieldTypes.size()
251 if (constraintTypes.size())
260 patchFieldTypes[patchi],
261 constraintTypes[patchi],
277 patchFieldTypes[patchi],
287 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
291 const DimensionedField<Type, GeoMesh>&
field,
292 const PtrList<PatchField<Type>>& ptfl
295 FieldField<PatchField, Type>(bmesh.size()),
307 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
310 const DimensionedField<Type, GeoMesh>&
field,
311 const typename GeometricField<Type, PatchField, GeoMesh>::Boundary& btf
314 FieldField<PatchField, Type>(btf.size()),
326 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
329 const DimensionedField<Type, GeoMesh>&
field,
330 const typename GeometricField<Type, PatchField, GeoMesh>::Boundary& btf,
332 const word& patchFieldType
335 FieldField<PatchField, Type>(btf.size()),
340 for (
const label patchi : patchIDs)
356 if (!this->
set(patchi))
364 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
367 const typename GeometricField<Type, PatchField, GeoMesh>::Boundary& btf
370 FieldField<PatchField, Type>(btf),
377 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
381 const DimensionedField<Type, GeoMesh>&
field,
382 const dictionary&
dict
385 FieldField<PatchField, Type>(bmesh.size()),
394 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
401 this->operator[](patchi).updateCoeffs();
406 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
442 bmesh_.mesh().globalData().patchSchedule();
444 forAll(patchSchedule, patchEvali)
446 if (patchSchedule[patchEvali].
init)
448 this->operator[](patchSchedule[patchEvali].
patch)
453 this->operator[](patchSchedule[patchEvali].
patch)
461 <<
"Unsupported communications type "
468 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
478 list[patchi] = pff[patchi].type();
485 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
491 BoundaryInternalField(*
this);
493 forAll(BoundaryInternalField, patchi)
495 BoundaryInternalField[patchi] ==
496 this->operator[](patchi).patchInternalField();
499 return BoundaryInternalField;
503 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
512 isA<LduInterfaceField<Type>>(this->operator[](patchi));
516 list.
set(patchi, lduPtr);
524 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
534 isA<lduInterfaceField>(this->
operator[](patchi));
538 list.
set(patchi, lduPtr);
546 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
553 os.beginBlock(keyword);
554 this->writeEntries(
os);
561 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
569 os.beginBlock(this->
operator[](patchi).
patch().
name());
570 os << this->operator[](patchi);
578 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
581 const typename GeometricField<Type, PatchField, GeoMesh>::
589 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
592 const FieldField<PatchField, Type>& ptff
599 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
609 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
612 const typename GeometricField<Type, PatchField, GeoMesh>::
618 this->operator[](patchi) == bf[patchi];
623 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
626 const FieldField<PatchField, Type>& ptff
631 this->operator[](patchi) == ptff[patchi];
636 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
644 this->operator[](patchi) == t;
651 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
655 const typename GeometricField<Type, PatchField, GeoMesh>::
659 os << static_cast<const FieldField<PatchField, Type>&>(bf);