35 #define checkFieldAssignment(gf1, gf2) \
39 static_cast<const regIOobject*>(&gf1) \
40 == static_cast<const regIOobject*>(&gf2) \
43 FatalErrorInFunction \
44 << "attempted assignment to self for field " \
45 << (gf1).name() << abort(FatalError); \
49 #define checkFieldOperation(gf1, gf2, op) \
51 if ((gf1).mesh() != (gf2).mesh()) \
53 FatalErrorInFunction \
54 << "different mesh for fields " \
55 << (gf1).name() << " and " << (gf2).name() \
56 << " during operation " << op \
57 << abort(FatalError); \
63 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
66 const dictionary&
dict
69 Internal::readField(
dict,
"internalField");
71 boundaryField_.readField(*
this,
dict.subDict(
"boundaryField"));
75 if (
dict.found(
"sources"))
77 sources_.readField(*
this,
dict.subDict(
"sources"));
81 sources_.readField(*
this, dictionary(
dict.name()/
"sources",
dict));
84 if (
dict.found(
"referenceLevel"))
86 Type fieldAverage(pTraits<Type>(
dict.lookup(
"referenceLevel")));
92 boundaryField_[
patchi] == boundaryField_[
patchi] + fieldAverage;
98 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
101 const localIOdictionary
dict
122 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
127 this->readOpt() == IOobject::MUST_READ
128 || this->readOpt() == IOobject::MUST_READ_IF_MODIFIED
132 <<
"read option IOobject::MUST_READ or MUST_READ_IF_MODIFIED"
133 <<
" suggests that a read constructor for field " << this->
name()
134 <<
" would be more appropriate." <<
endl;
138 this->readOpt() == IOobject::READ_IF_PRESENT
145 if (this->size() != GeoMesh::size(this->
mesh()))
148 <<
" number of field elements = " << this->size()
149 <<
" number of mesh elements = "
150 << GeoMesh::size(this->
mesh())
154 readOldTimeIfPresent();
165 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
176 fieldPrevIterPtr_(nullptr),
189 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
202 fieldPrevIterPtr_(nullptr),
203 boundaryField_(
mesh.
boundary(), *this, patchFieldTypes, actualPatchTypes),
204 sources_(*this, fieldSourceTypes)
215 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
226 fieldPrevIterPtr_(nullptr),
235 boundaryField_ == dt.
value();
241 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
254 fieldPrevIterPtr_(nullptr),
255 boundaryField_(
mesh.
boundary(), *this, patchFieldTypes, actualPatchTypes),
256 sources_(*this, fieldSourceTypes)
263 boundaryField_ == dt.
value();
269 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
280 fieldPrevIterPtr_(
nullptr),
282 sources_(*
this, stft)
287 <<
"Constructing from components" <<
endl << this->info() <<
endl;
294 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
300 const PrimitiveField<Type>& iField,
307 fieldPrevIterPtr_(nullptr),
309 sources_(*this, stft)
314 <<
"Constructing from components" <<
endl << this->info() <<
endl;
319 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
328 fieldPrevIterPtr_(nullptr),
336 if (this->size() != GeoMesh::size(this->
mesh()))
339 <<
" number of field elements = " << this->size()
340 <<
" number of mesh elements = " << GeoMesh::size(this->
mesh())
344 readOldTimeIfPresent();
349 <<
"Finishing read-construction of" <<
endl << this->info() <<
endl;
354 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
364 fieldPrevIterPtr_(
nullptr),
372 if (this->size() != GeoMesh::size(this->
mesh()))
375 <<
" number of field elements = " << this->size()
376 <<
" number of mesh elements = " << GeoMesh::size(this->
mesh())
383 <<
"Finishing dictionary-construct of "
389 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
397 fieldPrevIterPtr_(nullptr),
398 boundaryField_(*this, gf.boundaryField_),
399 sources_(*this, gf.sources_)
404 <<
"Constructing as copy" <<
endl << this->info() <<
endl;
407 this->writeOpt() = IOobject::NO_WRITE;
411 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
412 template<
template<
class>
class PrimitiveField2>
420 fieldPrevIterPtr_(nullptr),
421 boundaryField_(*this, gf.boundaryField_),
422 sources_(*this, gf.sources_)
427 <<
"Constructing as copy" <<
endl << this->info() <<
endl;
430 this->writeOpt() = IOobject::NO_WRITE;
434 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
442 fieldPrevIterPtr_(nullptr),
443 boundaryField_(*this, gf.boundaryField_),
444 sources_(*this, gf.sources_)
449 <<
"Constructing by moving" <<
endl << this->info() <<
endl;
452 this->writeOpt() = IOobject::NO_WRITE;
456 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
468 fieldPrevIterPtr_(nullptr),
469 boundaryField_(*this, tgf().boundaryField_),
470 sources_(*this, tgf().sources_)
475 <<
"Constructing from tmp" <<
endl << this->info() <<
endl;
478 this->writeOpt() = IOobject::NO_WRITE;
484 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
485 template<
template<
class>
class PrimitiveField2>
494 fieldPrevIterPtr_(nullptr),
495 boundaryField_(*this, gf.boundaryField_),
496 sources_(*this, gf.sources_)
501 <<
"Constructing as copy resetting IO params"
505 if (!readIfPresent())
507 copyOldTimes(io, gf);
512 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
527 fieldPrevIterPtr_(
nullptr),
528 boundaryField_(*
this, tgf().boundaryField_),
529 sources_(*
this, tgf().sources_)
534 <<
"Constructing from tmp resetting IO params"
544 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
545 template<
template<
class>
class PrimitiveField2>
554 fieldPrevIterPtr_(nullptr),
555 boundaryField_(*this, gf.boundaryField_),
556 sources_(*this, gf.sources_)
561 <<
"Constructing as copy resetting name"
565 copyOldTimes(newName, gf);
569 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
583 fieldPrevIterPtr_(nullptr),
584 boundaryField_(*this, tgf().boundaryField_),
585 sources_(*this, tgf().sources_)
590 <<
"Constructing from tmp resetting name"
598 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
599 template<
template<
class>
class PrimitiveField2>
609 fieldPrevIterPtr_(nullptr),
611 sources_(*this, gf.sources_)
616 <<
"Constructing as copy resetting IO params"
620 boundaryField_ == gf.boundaryField_;
622 if (!readIfPresent())
624 copyOldTimes(io, gf);
629 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
645 fieldPrevIterPtr_(nullptr),
647 sources_(*this, tgf().sources_)
652 <<
"Constructing as copy resetting IO params"
656 boundaryField_ == tgf().boundaryField_;
664 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
665 template<
template<
class>
class PrimitiveField2>
675 fieldPrevIterPtr_(nullptr),
682 <<
"Constructing from components" <<
endl << this->info() <<
endl;
685 if (!readIfPresent())
687 boundaryField_.evaluate();
692 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
702 fieldPrevIterPtr_(nullptr),
709 <<
"Constructing from components" <<
endl << this->info() <<
endl;
712 if (!readIfPresent())
714 boundaryField_.evaluate();
719 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
720 template<
template<
class>
class PrimitiveField2>
732 fieldPrevIterPtr_(nullptr),
740 sources_(*this, fieldSourceTypes)
745 <<
"Constructing as copy resetting IO params and patch types"
749 boundaryField_ == gf.boundaryField_;
751 if (!readIfPresent())
753 copyOldTimes(io, gf);
758 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
776 fieldPrevIterPtr_(nullptr),
784 sources_(*this, fieldSourceTypes)
789 <<
"Constructing from tmp resetting IO params and patch types"
793 boundaryField_ == tgf().boundaryField_;
801 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
802 template<
template<
class>
class PrimitiveField2>
814 fieldPrevIterPtr_(nullptr),
822 sources_(*this, fieldSourceTypes)
827 <<
"Constructing from internal field and patch types"
835 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
847 fieldPrevIterPtr_(nullptr),
855 sources_(*this, fieldSourceTypes)
860 <<
"Constructing from tmp internal field and patch types"
870 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
881 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
892 this->
mesh().thisDb().time().
name(),
893 this->
mesh().thisDb(),
899 Patch::calculatedType()
905 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
915 const bool cacheTmp = diField.
mesh().thisDb().cacheTemporaryObject(
name);
924 diField.
mesh().thisDb().time().name(),
925 diField.
mesh().thisDb(),
939 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
973 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1008 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1046 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1050 const word& newName,
1054 const bool cacheTmp = tgf().db().cacheTemporaryObject(newName);
1077 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1078 template<
template<
class>
class PrimitiveField2>
1082 const word& newName,
1111 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1115 const word& newName,
1120 const bool cacheTmp = tgf().db().cacheTemporaryObject(newName);
1144 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1145 template<
template<
class>
class PrimitiveField2>
1149 const word& newName,
1178 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1182 const word& newName,
1187 const bool cacheTmp = tdf().db().cacheTemporaryObject(newName);
1211 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1212 template<
template<
class>
class PrimitiveField2>
1216 const word& newName,
1249 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1253 const word& newName,
1260 const bool cacheTmp = tgf().db().cacheTemporaryObject(newName);
1286 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1287 template<
template<
class>
class PrimitiveField2>
1291 const word& newName,
1324 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1328 const word& newName,
1335 const bool cacheTmp = tdf().db().cacheTemporaryObject(newName);
1363 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1366 this->db().cacheTemporaryObject(*
this);
1374 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1378 this->setUpToDate();
1384 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1389 this->setUpToDate();
1395 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1400 this->setUpToDate();
1402 return boundaryField_;
1406 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1412 this->setUpToDate();
1413 return boundaryField_;
1417 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1422 this->setUpToDate();
1428 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1431 if (!fieldPrevIterPtr_)
1436 <<
"Allocating previous iteration field" <<
endl
1437 << this->info() <<
endl;
1443 this->
name() +
"PrevIter",
1449 *fieldPrevIterPtr_ == *
this;
1454 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1461 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1465 if (!fieldPrevIterPtr_)
1468 <<
"previous iteration field" <<
endl << this->info() <<
endl
1470 <<
" Use field.storePrevIter() at start of iteration."
1474 return *fieldPrevIterPtr_;
1478 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1482 this->setUpToDate();
1484 boundaryField_.evaluate();
1488 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1489 template<
template<
class>
class PrimitiveField2>
1495 Internal::reset(gf);
1498 sources_.reset(*
this, gf.
sources());
1502 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1516 PrimitiveField<Type>::transfer(tgf.ref());
1524 sources_.reset(*
this, gf.
sources());
1530 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1531 template<
template<
class>
class PrimitiveField2>
1543 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1549 bool needRef =
true;
1553 if (boundaryField_[
patchi].fixesValue())
1566 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1577 <<
"Relaxing" <<
endl << this->info()
1586 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1598 this->
name() +
"Final"
1612 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1615 relax(relaxationFactor());
1619 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1620 template<
template<
class>
class PrimitiveField2>
1632 <<
"Relaxing" <<
endl << this->info()
1645 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1646 template<
template<
class>
class PrimitiveField2>
1652 relax(tgf, relaxationFactor());
1656 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1664 return this->
name() +
"Final";
1668 return this->
name();
1673 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1679 os <<
"min/max(" << this->
name() <<
") = "
1686 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1699 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1707 this->
name() +
".T()",
1713 Foam::T(result.
ref().primitiveFieldRef(), primitiveField());
1714 Foam::T(result.
ref().boundaryFieldRef(), boundaryField());
1720 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1745 Foam::component(Component.ref().primitiveFieldRef(), primitiveField(), d);
1746 Foam::component(Component.ref().boundaryFieldRef(), boundaryField(), d);
1752 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1753 template<
template<
class>
class PrimitiveField2>
1766 boundaryFieldRef().replace(d, gcf.boundaryField());
1770 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1771 template<
template<
class>
class PrimitiveField2>
1791 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1799 boundaryFieldRef().replace(d, ds.
value());
1803 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1814 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1825 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1839 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1843 boundaryFieldRef().negate();
1849 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1863 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1877 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1878 template<
template<
class>
class PrimitiveField2>
1891 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1919 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1920 template<
template<
class>
class PrimitiveField2>
1937 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1943 internalFieldRef() = dt;
1944 boundaryFieldRef() = dt.
value();
1948 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1954 internalFieldRef() =
Zero;
1955 boundaryFieldRef() =
Zero;
1959 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1960 template<
template<
class>
class PrimitiveField2>
1973 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2000 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2001 template<
template<
class>
class PrimitiveField2>
2018 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2024 internalFieldRef() = dt;
2025 boundaryFieldRef() == dt.
value();
2029 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2035 internalFieldRef() =
Zero;
2036 boundaryFieldRef() ==
Zero;
2040 #define COMPUTED_ASSIGNMENT(TYPE, op) \
2042 template<class Type, class GeoMesh, template<class> class PrimitiveField> \
2043 template<template<class> class PrimitiveField2> \
2044 void Foam::GeometricField<Type, GeoMesh, PrimitiveField>::operator op \
2046 const GeometricField<TYPE, GeoMesh, PrimitiveField2>& gf \
2049 checkFieldOperation(*this, gf, #op); \
2051 internalFieldRef() op gf.internalField(); \
2052 boundaryFieldRef() op gf.boundaryField(); \
2055 template<class Type, class GeoMesh, template<class> class PrimitiveField> \
2056 template<template<class> class PrimitiveField2> \
2057 void Foam::GeometricField<Type, GeoMesh, PrimitiveField>::operator op \
2059 const tmp<GeometricField<TYPE, GeoMesh, PrimitiveField2>>& tgf \
2062 operator op(tgf()); \
2066 template<class Type, class GeoMesh, template<class> class PrimitiveField> \
2067 void Foam::GeometricField<Type, GeoMesh, PrimitiveField>::operator op \
2069 const dimensioned<TYPE>& dt \
2072 internalFieldRef() op dt; \
2073 boundaryFieldRef() op dt.value(); \
2081 #undef COMPUTED_ASSIGNMENT
2086 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2097 if (!gf.sources_.empty())
2106 "Ostream& operator<<(Ostream&, "
2107 "const GeometricField<Type, GeoMesh, PrimitiveField>&)"
2114 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2129 #undef checkFieldAssignment
2130 #undef checkFieldOperation
#define checkFieldOperation(gf1, gf2, op)
#define COMPUTED_ASSIGNMENT(TYPE, op)
#define checkFieldAssignment(gf1, gf2)
#define forAll(list, i)
Loop across all elements in list.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
GeoMesh::Mesh Mesh
Type of mesh on which this DimensionedField is instantiated.
const dimensionSet & dimensions() const
Return dimensions.
PrimitiveField< Type > FieldType
Type of the field from which this DimensionedField is derived.
const Mesh & mesh() const
Return mesh.
Pre-declare SubField and related Field type.
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
Generic GeometricBoundaryField class.
void writeEntry(const word &keyword, Ostream &os) const
Write boundary field as dictionary entry.
Part of a geometric field used for setting the values associated with optional sources.
void writeEntry(const word &keyword, Ostream &os) const
Write sources as dictionary entry.
Generic GeometricField class.
void max(const dimensioned< Type > &)
tmp< GeometricField< Type, GeoMesh, Field > > T() const
Return transpose (only if it is a tensor field)
Sources & sourcesRef()
Return a reference to the sources.
bool writeData(Ostream &) const
WriteData member function required by regIOobject.
void writeMinMax(Ostream &os) const
Helper function to write the min and max to an Ostream.
void relax()
Relax current field with respect to the cached previous iteration.
void maxMin(const dimensioned< Type > &minDt, const dimensioned< Type > &maxDt)
const GeometricField< Type, GeoMesh, Field > & prevIter() const
Return previous iteration field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Internal::FieldType & primitiveFieldRef()
Return a reference to the primitive field.
Boundary & boundaryFieldRefNoStoreOldTimes()
Return a reference to the boundary field without storing old times.
tmp< GeometricField< cmptType, GeoMesh, Field > > component(const direction) const
Return a component of the field.
const Sources & sources() const
Return const-reference to the sources.
const Internal & internalField() const
Return a const-reference to the dimensioned internal field.
void min(const dimensioned< Type > &)
friend class GeometricField
Declare friendship with other geometric fields.
Internal & internalFieldRef()
Return a reference to the dimensioned internal field.
Field< Type >::cmptType cmptType
Component type of the elements of the field.
void replace(const direction, const GeometricField< cmptType, GeoMesh, PrimitiveField2 > &)
Replace a component field of the field.
tmp< GeometricField< Type, GeoMesh, PrimitiveField > > clone() const
Clone.
bool needReference() const
Does the field need a reference level for solution.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
virtual ~GeometricField()
Destructor.
const Internal::FieldType & primitiveField() const
Return a const-reference to the primitive field.
void reset(const GeometricField< Type, GeoMesh, PrimitiveField2 > &)
Reset the field contents to the given field.
scalar relaxationFactor() const
Return the field relaxation factor read from fvSolution.
void clearPrevIter()
Delete the previous iteration field.
void storePrevIter() const
Store the field as the previous iteration value.
word select(bool final) const
Select the final iteration parameters if `final' is true.
void correctBoundaryConditions()
Correct boundary field.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
tmp< GeometricField< Type, GeoMesh, PrimitiveField > > cloneUnSliced() const
Clone un-sliced.
A HashTable specialisation for hashing pointers.
An STL-conforming hash table.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const fileName & local() const
fileName & instance() const
Return the instance directory, constant, system, <time> etc.
const objectRegistry & db() const
Return the local objectRegistry.
InfoProxy< IOobject > info() const
Return info proxy.
bool good() const
Return true if next operation might succeed.
Class to add into field types to provide old-time storage and retrieval.
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...
void clear()
Clear the PtrList, i.e. set size to zero deleting all the.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Dimension set for the base types.
Generic dimensioned Type class.
const Type & value() const
Return const reference to value.
const word & name() const
Return const reference to name.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
virtual const objectRegistry & thisDb() const
Return the object registry - resolve conflict polyMesh/lduMesh.
const fvSolution & solution() const
Return the fvSolution.
const Time & time() const
Return time.
bool cacheTemporaryObject(const word &name) const
Return true if given name is in the cacheTemporaryObjects set.
static bool finalIteration(const objectRegistry ®istry)
Lookup solutionControl from the objectRegistry and return finalIter.
Selector class for relaxation factors, solver type and solution.
scalar fieldRelaxationFactor(const word &name) const
Return the relaxation factor for the given field.
A class for managing temporary objects.
void clear() const
If object pointer points to valid object:
T & ref() const
Return non-const reference or generate a fatal error.
A class for handling words, derived from string.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
Template functions to aid in the implementation of demand driven data.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
#define WarningInFunction
Report a warning using Foam::Warning.
#define InfoInFunction
Report an information message using Foam::Info.
errorManipArg< error, int > exit(error &err, const int errNo=1)
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
const HashTable< dimensionSet > & dimensions()
Get the table of dimension sets.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const HashSet< word > &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the specified type.
void deleteDemandDrivenData(DataType *&dataPtr)
errorManip< error > abort(error &err)
const dimensionSet dimless
void T(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
void component(LagrangianPatchField< typename LagrangianPatchField< Type >::cmptType > &sf, const LagrangianPatchField< Type > &f, const direction d)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
word patchFieldType(const PatchField &pf)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void operator+=(fvMatrix< Type > &fvEqn, const CarrierEqn< Type > &cEqn)
Add to a finite-volume equation.
faceListList boundary(nPatches)
conserve primitiveFieldRef()+