Go to the documentation of this file.
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>
589 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
599 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
609 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
618 this->operator[](patchi) == bf[patchi];
623 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
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>
659 os << static_cast<const FieldField<PatchField, Type>&>(bf);
A keyword and a list of tokens is an 'entry'.
List< label > labelList
A List of labels.
points setSize(newPointi)
void set(List< bool > &bools, const labelRange &range)
Set the specified range 'on' in a boolList.
A class for handling words, derived from Foam::string.
Boundary(const BoundaryMesh &bmesh)
Construct from a BoundaryMesh, setting patches later.
virtual bool isDict() const noexcept
Return true if this entry is a dictionary.
void writeEntries(Ostream &os) const
Write dictionary entries of the individual boundary fields.
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
const keyType & keyword() const noexcept
Return keyword.
Ostream & endl(Ostream &os)
Add newline and flush stream.
GeoMesh::BoundaryMesh BoundaryMesh
tmp< FieldField< PatchField, Type > > clone() const
Clone.
static commsTypes defaultCommsType
Default commsType.
void evaluate()
Evaluate boundary conditions.
void updateCoeffs()
Update the boundary condition coefficients.
#define forAll(list, i)
Loop across all elements in list.
List< word > wordList
A List of words.
LduInterfaceFieldPtrsList< Type > interfaces() const
void readField(const Internal &field, const dictionary &dict)
Read the boundary field.
#define DebugInFunction
Report an information message using Foam::Info.
wordList types() const
Return a list of the patch types.
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
static const Enum< commsTypes > commsTypeNames
Names of the communication types.
void operator=(const FieldField< Field, Type > &)
Copy assignment.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
errorManip< error > abort(error &err)
virtual const dictionary & dict() const =0
Return dictionary, if entry is a dictionary.
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
errorManipArg< error, int > exit(error &err, const int errNo=1)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const const LduInterfaceField< Type > * set(const label i) const
static label nRequests()
Get number of outstanding requests.
const std::string patch
OpenFOAM patch number as a std::string.
static bool & parRun() noexcept
Test if this a parallel run.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Generic GeometricField class.
bool isLiteral() const noexcept
The keyType is treated as literal, not as pattern.
void writeEntry(const word &keyword, Ostream &os) const
Write boundary field as dictionary entry.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
lduInterfaceFieldPtrsList scalarInterfaces() const
Boundary boundaryInternalField() const