35 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
53 label nUnset = this->size();
59 if (iter().isDict() && !iter().keyword().isPattern())
61 label patchi = bmesh_.findPatchID(iter().keyword());
104 const labelList patchIDs = bmesh_.findIndices
114 if (!this->
set(patchi))
138 if (bmesh_[
patchi].
type() == emptyPolyPatch::typeName)
145 emptyPolyPatch::typeName,
164 dict.
subDict(bmesh_[patchi].name())
177 if (bmesh_[
patchi].
type() == cyclicPolyPatch::typeName)
182 ) <<
"Cannot find patchField entry for cyclic " 190 ) <<
"Cannot find patchField entry for " 200 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
211 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
216 const word& patchFieldType
243 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
262 patchFieldTypes.
size() != this->size()
263 || (constraintTypes.
size() && (constraintTypes.
size() != this->size()))
267 <<
"Incorrect number of patch type specifications given" <<
nl 268 <<
" Number of patches in mesh = " << bmesh.size()
269 <<
" number of patch type specifications = " 270 << patchFieldTypes.
size()
274 if (constraintTypes.
size())
284 constraintTypes[patchi],
310 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
315 const PtrList<PatchField<Type>>& ptfl
333 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
355 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
366 readField(field, dict);
372 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
382 this->operator[](
patchi).updateCoeffs();
387 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
397 Pstream::defaultCommsType == Pstream::commsTypes::blocking
398 || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
401 label nReq = Pstream::nRequests();
405 this->operator[](
patchi).initEvaluate(Pstream::defaultCommsType);
412 && Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
415 Pstream::waitRequests(nReq);
420 this->operator[](
patchi).evaluate(Pstream::defaultCommsType);
423 else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
426 bmesh_.mesh().globalData().patchSchedule();
428 forAll(patchSchedule, patchEvali)
430 if (patchSchedule[patchEvali].init)
432 this->operator[](patchSchedule[patchEvali].patch)
433 .initEvaluate(Pstream::commsTypes::scheduled);
437 this->operator[](patchSchedule[patchEvali].patch)
438 .evaluate(Pstream::commsTypes::scheduled);
445 <<
"Unsupported communications type " 446 << Pstream::commsTypeNames[Pstream::defaultCommsType]
452 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
469 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
487 result[
patchi] == this->operator[](
patchi).patchInternalField();
494 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
512 Pstream::defaultCommsType == Pstream::commsTypes::blocking
513 || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
516 const label nReq = Pstream::nRequests();
520 if (this->
operator[](
patchi).coupled())
523 .initPatchNeighbourField(Pstream::defaultCommsType);
531 && Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
534 Pstream::waitRequests(nReq);
539 if (this->
operator[](
patchi).coupled())
543 .patchNeighbourField(Pstream::defaultCommsType);
547 else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
550 bmesh_.mesh().globalData().patchSchedule();
552 forAll(patchSchedule, patchEvali)
554 if (this->
operator[](patchSchedule[patchEvali].patch).coupled())
556 if (patchSchedule[patchEvali].init)
558 this->operator[](patchSchedule[patchEvali].patch)
559 .initPatchNeighbourField(Pstream::defaultCommsType);
563 result[patchSchedule[patchEvali].patch] =
564 this->operator[](patchSchedule[patchEvali].patch)
565 .patchNeighbourField(Pstream::defaultCommsType);
573 <<
"Unsupported communications type " 574 << Pstream::commsTypeNames[Pstream::defaultCommsType]
582 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
607 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
616 if (isA<lduInterfaceField>(this->
operator[](
patchi)))
621 &refCast<const lduInterfaceField>
633 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
649 if (isA<processorPolyPatch>(pbm[
patchi]))
655 this->operator[](patchi).reset(btf[patchi]);
662 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
674 <<
indent << token::BEGIN_BLOCK << nl
684 "GeometricBoundaryField<Type, PatchField, GeoMesh>::" 685 "writeEntry(const word& keyword, Ostream& os) const" 692 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
693 void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::operator=
702 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
703 void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::operator=
712 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
713 void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::operator=
722 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
723 template<
template<
class>
class OtherPatchField>
724 void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::operator=
733 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
744 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
745 void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::operator==
757 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
771 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
772 template<
template<
class>
class OtherPatchField>
786 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
787 void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::operator==
794 this->operator[](
patchi) == t;
801 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
808 os << static_cast<const FieldField<PatchField, Type>&>(bf);
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
const_reverse_iterator rbegin() const
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
#define forAll(list, i)
Loop across all elements in list.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
Ostream & indent(Ostream &os)
Indent stream.
const keyType & keyword() const
Return keyword.
tmp< GeometricBoundaryField > boundaryInternalField() const
Return BoundaryField of the cell values neighbouring.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
void readField(const Internal &field, const dictionary &dict)
Read the boundary field.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
T & ref() const
Return non-const reference or generate a fatal error.
To & refCast(From &r)
Reference type cast template function.
void size(const label)
Override size to be inconsistent with allocated storage.
lduInterfaceFieldPtrsList scalarInterfaces() const
Return a list of pointers for each patch field with only those.
wordList types() const
Return a list of the patch field types.
Ostream & endl(Ostream &os)
Add newline and flush stream.
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
virtual const dictionary & dict() const =0
Return dictionary if this entry is a dictionary.
Generic GeometricField class.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
points setSize(newPointi)
void evaluate()
Evaluate boundary conditions.
pointMesh ::BoundaryMesh BoundaryMesh
Type of boundary mesh on which this boundary is instantiated.
A class for handling words, derived from string.
virtual const fileName & name() const
Return the name of the stream.
void reset(const Internal &, const GeometricBoundaryField< Type, PatchField, GeoMesh > &)
Reset the boundary field contents to the given field.
tmp< GeometricBoundaryField > boundaryNeighbourField() const
Return BoundaryField of the values on the other side of couples.
errorManip< error > abort(error &err)
A wordRe is a word, but can also have a regular expression for matching words.
void updateCoeffs()
Update the boundary condition coefficients.
virtual bool isDict() const
Return true if this entry is a dictionary.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const const_reverse_iterator & rend() const
bool set(const label) const
Is element set.
const Mesh & mesh() const
Return mesh.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
GeometricBoundaryField(const BoundaryMesh &)
Construct from a BoundaryMesh.
word name(const complex &)
Return a string representation of a complex.
An STL-conforming const_reverse_iterator.
Generic GeometricBoundaryField class.
label size() const
Return the number of elements in the UPtrList.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
void writeEntry(const word &keyword, Ostream &os) const
Write boundary field as dictionary entry.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
LduInterfaceFieldPtrsList< Type > interfaces() const
Return a list of pointers for each patch field with only those.
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
A class for managing temporary objects.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
const dimensionedScalar e
Elementary charge.
tmp< FieldField< PatchField, Type > > clone() const
Clone.
A keyword and a list of tokens is an 'entry'.
bool isPattern() const
Should be treated as a match rather than a literal string.
#define InfoInFunction
Report an information message using Foam::Info.