Go to the documentation of this file.
34 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
49 label nUnset = this->size();
56 if (dEntry.isDict() && dEntry.keyword().isLiteral())
58 const label patchi = bmesh_.findPatchID(dEntry.keyword());
88 for (
auto iter =
dict.crbegin(); iter !=
dict.crend(); ++iter)
90 const entry& dEntry = *iter;
95 bmesh_.indices(dEntry.
keyword(),
true);
99 if (!this->set(patchi))
120 if (!this->set(patchi))
122 if (bmesh_[patchi].
type() == emptyPolyPatch::typeName)
129 emptyPolyPatch::typeName,
148 dict.subDict(bmesh_[patchi].name())
160 if (!this->set(patchi))
162 if (bmesh_[patchi].
type() == cyclicPolyPatch::typeName)
165 <<
"Cannot find patchField entry for cyclic "
166 << bmesh_[patchi].name() <<
endl
167 <<
"Is your field uptodate with split cyclics?" <<
endl
168 <<
"Run foamUpgradeCyclics to convert mesh and fields"
174 <<
"Cannot find patchField entry for "
184 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
196 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
202 const word& patchFieldType
226 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
231 const DimensionedField<Type, GeoMesh>&
field,
236 FieldField<PatchField, Type>(bmesh.size()),
243 patchFieldTypes.size() != this->size()
244 || (constraintTypes.size() && (constraintTypes.size() != this->size()))
248 <<
"Incorrect number of patch type specifications given" <<
nl
249 <<
" Number of patches in mesh = " << bmesh.size()
250 <<
" number of patch type specifications = "
251 << patchFieldTypes.size()
255 if (constraintTypes.size())
264 patchFieldTypes[patchi],
265 constraintTypes[patchi],
281 patchFieldTypes[patchi],
291 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
296 const DimensionedField<Type, GeoMesh>&
field,
297 const PtrList<PatchField<Type>>& ptfl
300 FieldField<PatchField, Type>(bmesh.size()),
312 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
316 const DimensionedField<Type, GeoMesh>&
field,
317 const typename GeometricField<Type, PatchField, GeoMesh>::
321 FieldField<PatchField, Type>(btf.size()),
333 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
337 const typename GeometricField<Type, PatchField, GeoMesh>::
341 FieldField<PatchField, Type>(btf),
348 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
353 const DimensionedField<Type, GeoMesh>&
field,
354 const dictionary&
dict
357 FieldField<PatchField, Type>(bmesh.size()),
366 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
374 this->operator[](patchi).updateCoeffs();
379 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
416 bmesh_.mesh().globalData().patchSchedule();
418 forAll(patchSchedule, patchEvali)
420 if (patchSchedule[patchEvali].init)
422 this->operator[](patchSchedule[patchEvali].
patch)
427 this->operator[](patchSchedule[patchEvali].
patch)
435 <<
"Unsuported communications type "
442 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
453 list[patchi] = pff[patchi].type();
460 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
466 BoundaryInternalField(*
this);
468 forAll(BoundaryInternalField, patchi)
470 BoundaryInternalField[patchi] ==
471 this->operator[](patchi).patchInternalField();
474 return BoundaryInternalField;
478 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
485 forAll(interfaces, patchi)
494 this->
operator[](patchi)
504 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
511 forAll(interfaces, patchi)
513 if (isA<lduInterfaceField>(this->
operator[](patchi)))
518 &refCast<const lduInterfaceField>
520 this->
operator[](patchi)
530 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
535 this->writeEntries(os);
542 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
549 os << this->operator[](patchi);
557 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
569 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
580 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
591 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
601 this->operator[](patchi) == bf[patchi];
606 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
615 this->operator[](patchi) == ptff[patchi];
620 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
629 this->operator[](patchi) == t;
636 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
644 os << static_cast<const FieldField<PatchField, Type>&>(bf);
A keyword and a list of tokens is an 'entry'.
points setSize(newPointi)
A class for handling words, derived from Foam::string.
const keyType & keyword() const
Return keyword.
Boundary(const BoundaryMesh &bmesh)
Construct from a BoundaryMesh.
void writeEntries(Ostream &os) const
Write dictionary entries of the individual boundary fields.
static bool & parRun()
Is this a parallel run?
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
const const LduInterfaceField< Type > * set(const label i) const
Return const pointer to element (if set) or nullptr.
Ostream & endl(Ostream &os)
Add newline and flush stream.
GeoMesh::BoundaryMesh BoundaryMesh
Type of boundary mesh on which this.
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
Return a list of pointers for each patch field with only those.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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.
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,...
friend Ostream & operator(Ostream &, const GeometricField< Type, PatchField, GeoMesh > &)
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
Return a list of pointers for each patch field with only those.
Boundary boundaryInternalField() const
Return BoundaryField of the cell values neighbouring.