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>
509 forAll(interfaces, patchi)
518 this->
operator[](patchi)
528 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
535 forAll(interfaces, patchi)
537 if (isA<lduInterfaceField>(this->
operator[](patchi)))
542 &refCast<const lduInterfaceField>
544 this->
operator[](patchi)
554 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
562 this->writeEntries(os);
569 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
578 os << this->operator[](patchi);
586 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
597 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
607 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
617 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
626 this->operator[](patchi) == bf[patchi];
631 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
639 this->operator[](patchi) == ptff[patchi];
644 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
652 this->operator[](patchi) == t;
659 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
667 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.
const keyType & keyword() const
Return keyword.
Boundary(const BoundaryMesh &bmesh)
Construct from a BoundaryMesh, setting patches later.
void writeEntries(Ostream &os) const
Write dictionary entries of the individual boundary fields.
static bool & parRun()
Test if this a parallel run, or allow modify access.
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
Ostream & endl(Ostream &os)
Add newline and flush stream.
GeoMesh::BoundaryMesh BoundaryMesh
tmp< FieldField< PatchField, Type > > clone() const
Clone.
static commsTypes defaultCommsType
Default commsType.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
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.
virtual bool isDict() const
Return true if this entry is a dictionary.
#define DebugInFunction
Report an information message using Foam::Info.
word name(const complex &c)
Return string representation of complex.
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.
virtual Ostream & endBlock()
Write end block group.
void operator=(const FieldField< Field, Type > &)
Copy assignment.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
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.
To & refCast(From &r)
Reference type cast template function.
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.
const TargetType * isA(const Type &t)
Check if dynamic_cast to TargetType is possible.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const const LduInterfaceField< Type > * set(const label i) const
Return const pointer to element (can be nullptr),.
static label nRequests()
Get number of outstanding requests.
const std::string patch
OpenFOAM patch number as a std::string.
#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
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