35 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
60 if (iter().isDict() && !iter().keyword().isPattern())
62 const label patchi = bmesh_.findIndex(iter().keyword());
83 if (iter().isDict() && !iter().keyword().isPattern())
86 bmesh_.findIndices(
wordRe(iter().keyword()),
true);
110 patchEntries.
set(
patchi, NullObjectPtr<entry>());
162 <<
"Cannot find patchField entry for "
171 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
178 FieldField<GeoMesh::template PatchField, Type>(bmesh.size()),
183 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
192 FieldField<GeoMesh::template PatchField, Type>(bmesh.size()),
216 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
226 FieldField<GeoMesh::template PatchField, Type>(bmesh.size()),
236 patchFieldTypes.
size() != this->size()
237 || (constraintTypes.
size() && (constraintTypes.
size() != this->size()))
241 <<
"Incorrect number of patch type specifications given" <<
nl
242 <<
" Number of patches in mesh = " << bmesh.size()
243 <<
" number of patch type specifications = "
244 << patchFieldTypes.
size()
248 if (constraintTypes.
size())
284 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
293 FieldField<GeoMesh::template PatchField, Type>(bmesh.size()),
308 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
316 FieldField<GeoMesh::template PatchField, Type>(btf.size()),
331 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
340 FieldField<GeoMesh::template PatchField, Type>(bmesh.size()),
347 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
348 template<
template<
class>
class PrimitiveField2>
356 FieldField<GeoMesh::template PatchField, Type>(btf.size()),
373 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
383 this->operator[](
patchi).updateCoeffs();
388 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
427 bmesh_.mesh().globalData().patchSchedule();
429 forAll(patchSchedule, patchEvali)
431 if (patchSchedule[patchEvali].init)
433 this->operator[](patchSchedule[patchEvali].patch)
438 this->operator[](patchSchedule[patchEvali].patch)
446 <<
"Unsupported communications type "
453 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
470 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
480 resultType& result = tresult.
ref();
484 result[
patchi] == this->operator[](
patchi).patchInternalField();
491 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
508 if (this->
operator[](
patchi).coupled())
527 if (this->
operator[](
patchi).coupled())
541 bmesh_.mesh().globalData().patchSchedule();
543 forAll(patchSchedule, patchEvali)
545 if (this->
operator[](patchSchedule[patchEvali].patch).coupled())
547 if (patchSchedule[patchEvali].init)
549 this->operator[](patchSchedule[patchEvali].patch)
556 patchSchedule[patchEvali].patch,
557 this->
operator[](patchSchedule[patchEvali].patch)
567 <<
"Unsupported communications type "
576 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
586 resultType& result = tresult.
ref();
598 if (this->
operator[](
patchi).coupled())
617 if (this->
operator[](
patchi).coupled())
628 bmesh_.mesh().globalData().patchSchedule();
630 forAll(patchSchedule, patchEvali)
632 if (this->
operator[](patchSchedule[patchEvali].patch).coupled())
634 if (patchSchedule[patchEvali].init)
636 this->operator[](patchSchedule[patchEvali].patch)
641 result[patchSchedule[patchEvali].patch] =
642 this->operator[](patchSchedule[patchEvali].patch)
651 <<
"Unsupported communications type "
660 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
685 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
694 if (isA<lduInterfaceField>(this->
operator[](
patchi)))
699 &refCast<const lduInterfaceField>
711 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
726 if (isA<processorPolyPatch>(pbm[
patchi]))
734 this->
operator[](0).internalField()
747 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
769 "GeometricBoundaryField<Type, GeoMesh, PrimitiveField>::"
770 "writeEntry(const word& keyword, Ostream& os) const"
777 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
785 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
787 operator=(GeometricBoundaryField<Type, GeoMesh, PrimitiveField>&& bf)
793 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
801 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
802 template<
template<
class>
class OtherPatchField>
810 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
818 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
829 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
840 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
841 template<
template<
class>
class OtherPatchField>
852 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
858 this->operator[](
patchi) == t;
865 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
#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...
tmp< FieldField< GeoMesh::template PatchField, Type > > clone() const
Clone.
void operator=(const FieldField< Field, Type > &)
Generic GeometricBoundaryField class.
PtrList< Field< Type > > coupledNeighbourField() const
Return BoundaryField of the values on the other side of couples.
tmp< GeometricBoundaryField > boundaryNeighbourField() const
Return BoundaryField with the values on the other side of couples.
lduInterfaceFieldPtrsList scalarInterfaces() const
Return a list of pointers for each patch field with only those.
friend class GeometricBoundaryField
Declare friendship with other geometric boundary fields.
void readField(const Internal &field, const dictionary &dict)
Read the boundary field.
wordList types() const
Return a list of the patch field types.
void evaluate()
Evaluate boundary conditions.
LduInterfaceFieldPtrsList< Type > interfaces() const
Return a list of pointers for each patch field with only those.
void operator==(const GeometricBoundaryField &)
Forced assignment to.
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 &)
Reset the boundary field contents to the given field.
void operator=(const GeometricBoundaryField &)
Assignment operator.
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,...
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.
An STL-conforming const_reverse_iterator.
static const NamedEnum< commsTypes, 3 > commsTypeNames
static label nRequests()
Get number of outstanding requests.
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
static bool & parRun()
Is this a parallel run?
static commsTypes defaultCommsType
Default commsType.
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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
A keyword and a list of tokens is an 'entry'.
const polyMesh & mesh() const
Return the mesh reference.
const polyBoundaryMesh & boundary() const
Return boundary mesh.
Enables the printing of a dictionary and subsequently looked-up defaulted entries.
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.
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.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
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 LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
bool isNull(const T &t)
Return true if t is a reference to the nullObject of type T.
Ostream & indent(Ostream &os)
Indent stream.
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
points setSize(newPointi)