34 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
57 if (iter().isDict() && !iter().keyword().isPattern())
59 const label patchi = bmesh_.findIndex(iter().keyword());
80 if (iter().isDict() && !iter().keyword().isPattern())
83 bmesh_.findIndices(
wordRe(iter().keyword()),
true);
105 if (bmesh_[
patchi].
type() == emptyPolyPatch::typeName)
107 patchEntries.
set(
patchi, NullObjectPtr<entry>());
150 emptyPolyPatch::typeName,
159 <<
"Cannot find patchField entry for "
168 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
179 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
182 const BoundaryMesh& bmesh,
211 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
214 const BoundaryMesh& bmesh,
230 patchFieldTypes.
size() != this->size()
231 || (constraintTypes.
size() && (constraintTypes.
size() != this->size()))
235 <<
"Incorrect number of patch type specifications given" <<
nl
236 <<
" Number of patches in mesh = " << bmesh.size()
237 <<
" number of patch type specifications = "
238 << patchFieldTypes.
size()
242 if (constraintTypes.
size())
278 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
281 const BoundaryMesh& bmesh,
282 const DimensionedField<Type, GeoMesh>& field,
283 const PtrList<PatchField<Type>>& ptfl
286 FieldField<PatchField, Type>(bmesh.size()),
289 if (GeometricField<Type, PatchField, GeoMesh>::debug)
301 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
304 const DimensionedField<Type, GeoMesh>& field,
305 const GeometricBoundaryField<Type, PatchField, GeoMesh>& btf
308 FieldField<PatchField, Type>(btf.size()),
311 if (GeometricField<Type, PatchField, GeoMesh>::debug)
323 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
326 const BoundaryMesh& bmesh,
327 const DimensionedField<Type, GeoMesh>& field,
328 const dictionary&
dict
331 FieldField<PatchField, Type>(bmesh.size()),
334 readField(field,
dict);
340 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
350 this->operator[](
patchi).updateCoeffs();
355 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
365 Pstream::defaultCommsType == Pstream::commsTypes::blocking
366 || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
369 label nReq = Pstream::nRequests();
373 this->operator[](
patchi).initEvaluate(Pstream::defaultCommsType);
380 && Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
383 Pstream::waitRequests(nReq);
388 this->operator[](
patchi).evaluate(Pstream::defaultCommsType);
391 else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
394 bmesh_.mesh().globalData().patchSchedule();
396 forAll(patchSchedule, patchEvali)
398 if (patchSchedule[patchEvali].init)
400 this->operator[](patchSchedule[patchEvali].patch)
401 .initEvaluate(Pstream::commsTypes::scheduled);
405 this->operator[](patchSchedule[patchEvali].patch)
406 .evaluate(Pstream::commsTypes::scheduled);
413 <<
"Unsupported communications type "
414 << Pstream::commsTypeNames[Pstream::defaultCommsType]
420 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
437 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
455 result[
patchi] == this->operator[](
patchi).patchInternalField();
462 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
480 Pstream::defaultCommsType == Pstream::commsTypes::blocking
481 || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
484 const label nReq = Pstream::nRequests();
488 if (this->
operator[](patchi).coupled())
491 .initPatchNeighbourField(Pstream::defaultCommsType);
499 && Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
502 Pstream::waitRequests(nReq);
507 if (this->
operator[](patchi).coupled())
511 .patchNeighbourField(Pstream::defaultCommsType);
515 else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
518 bmesh_.mesh().globalData().patchSchedule();
520 forAll(patchSchedule, patchEvali)
522 if (this->
operator[](patchSchedule[patchEvali].patch).coupled())
524 if (patchSchedule[patchEvali].init)
526 this->operator[](patchSchedule[patchEvali].patch)
527 .initPatchNeighbourField(Pstream::defaultCommsType);
531 result[patchSchedule[patchEvali].patch] =
532 this->operator[](patchSchedule[patchEvali].patch)
533 .patchNeighbourField(Pstream::defaultCommsType);
541 <<
"Unsupported communications type "
542 << Pstream::commsTypeNames[Pstream::defaultCommsType]
550 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
565 this->
operator[](patchi)
575 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
584 if (isA<lduInterfaceField>(this->
operator[](patchi)))
589 &refCast<const lduInterfaceField>
591 this->
operator[](patchi)
601 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
616 if (isA<processorPolyPatch>(pbm[
patchi]))
624 this->
operator[](0).internalField()
637 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
649 <<
indent << token::BEGIN_BLOCK <<
nl
659 "GeometricBoundaryField<Type, PatchField, GeoMesh>::"
660 "writeEntry(const word& keyword, Ostream& os) const"
667 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
677 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
680 GeometricBoundaryField<Type, PatchField, GeoMesh>&& bf
687 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
697 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
698 template<
template<
class>
class OtherPatchField>
708 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
719 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
732 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
746 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
747 template<
template<
class>
class OtherPatchField>
761 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
769 this->operator[](
patchi) == t;
776 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
783 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...
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
An STL-conforming const_reverse_iterator.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
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....
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)
errorManipArg< error, int > exit(error &err, const int errNo=1)
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.
word name(const bool)
Return a word representation of a bool.
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)
bool isNull(const T &t)
Return true if t is a reference to the nullObject of type T.
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)