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());
102 if (
e.isDict() && !
e.keyword().isPattern())
104 const labelList patchIDs = bmesh_.findIndices
138 if (bmesh_[
patchi].
type() == emptyPolyPatch::typeName)
145 emptyPolyPatch::typeName,
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>
214 const BoundaryMesh& bmesh,
243 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
246 const BoundaryMesh& bmesh,
247 const DimensionedField<Type, GeoMesh>& field,
252 FieldField<PatchField, Type>(bmesh.size()),
255 if (GeometricField<Type, PatchField, GeoMesh>::debug)
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())
310 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
313 const BoundaryMesh& bmesh,
314 const DimensionedField<Type, GeoMesh>& field,
315 const PtrList<PatchField<Type>>& ptfl
318 FieldField<PatchField, Type>(bmesh.size()),
321 if (GeometricField<Type, PatchField, GeoMesh>::debug)
333 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
336 const DimensionedField<Type, GeoMesh>& field,
337 const GeometricBoundaryField<Type, PatchField, GeoMesh>& btf
340 FieldField<PatchField, Type>(btf.size()),
343 if (GeometricField<Type, PatchField, GeoMesh>::debug)
355 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
358 const BoundaryMesh& bmesh,
359 const DimensionedField<Type, GeoMesh>& field,
360 const dictionary&
dict
363 FieldField<PatchField, Type>(bmesh.size()),
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>
648 if (isA<processorPolyPatch>(pbm[
patchi]))
656 this->
operator[](0).internalField()
669 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
681 <<
indent << token::BEGIN_BLOCK <<
nl
691 "GeometricBoundaryField<Type, PatchField, GeoMesh>::"
692 "writeEntry(const word& keyword, Ostream& os) const"
699 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
709 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
712 GeometricBoundaryField<Type, PatchField, GeoMesh>&& bf
719 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
729 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
730 template<
template<
class>
class OtherPatchField>
740 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
751 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
764 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
778 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
779 template<
template<
class>
class OtherPatchField>
793 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
801 this->operator[](
patchi) == t;
808 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
815 os << static_cast<const FieldField<PatchField, Type>&>(bf);
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
void operator=(const FieldField< PatchField, Type > &)
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
Generic GeometricBoundaryField class.
lduInterfaceFieldPtrsList scalarInterfaces() const
Return a list of pointers for each patch field with only those.
void readField(const Internal &field, const dictionary &dict)
Read the boundary field.
wordList types() const
Return a list of the patch field types.
tmp< GeometricBoundaryField > boundaryNeighbourField() const
Return BoundaryField of the values on the other side of couples.
void evaluate()
Evaluate boundary conditions.
LduInterfaceFieldPtrsList< Type > interfaces() const
Return a list of pointers for each patch field with only those.
void writeEntry(const word &keyword, Ostream &os) const
Write boundary field as dictionary entry.
void updateCoeffs()
Update the boundary condition coefficients.
GeoMesh::BoundaryMesh BoundaryMesh
Type of boundary mesh on which this boundary is instantiated.
tmp< GeometricBoundaryField > boundaryInternalField() const
Return BoundaryField of the cell values neighbouring.
void reset(const GeometricBoundaryField< Type, PatchField, GeoMesh > &)
Reset the boundary field contents to the given field.
GeometricBoundaryField(const BoundaryMesh &)
Construct from a BoundaryMesh.
Generic GeometricField class.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
virtual const fileName & name() const
Return the name of the stream.
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
An STL-conforming const_reverse_iterator.
bool set(const label) const
Is element set.
label size() const
Return the number of elements in the UPtrList.
A list of keyword definitions, which are a keyword followed by any number of values (e....
A keyword and a list of tokens is an 'entry'.
const polyMesh & mesh() const
Return the mesh reference.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
A wordRe is a word, but can also have a regular expression for matching words.
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define InfoInFunction
Report an information message using Foam::Info.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
const dimensionedScalar e
Elementary charge.
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< word > wordList
A List of words.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
To & refCast(From &r)
Reference type cast template function.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
Ostream & incrIndent(Ostream &os)
Increment the indent level.
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
word patchFieldType(const PatchField &pf)
word name(const complex &)
Return a string representation of a complex.
Ostream & indent(Ostream &os)
Indent stream.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
points setSize(newPointi)