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 printDictionary print(
dict);
71 Internal::readField(
dict,
"internalField");
73 boundaryField_.readField(*
this,
dict.subDict(
"boundaryField"));
77 if (
dict.found(
"sources"))
79 sources_.readField(*
this,
dict.subDict(
"sources"));
83 sources_.readField(*
this, dictionary(
"sources",
dict));
86 if (
dict.found(
"referenceLevel"))
88 Type fieldAverage(pTraits<Type>(
dict.lookup(
"referenceLevel")));
94 boundaryField_[
patchi] == boundaryField_[
patchi] + fieldAverage;
100 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
103 const localIOdictionary
dict
124 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
129 this->readOpt() == IOobject::MUST_READ
130 || this->readOpt() == IOobject::MUST_READ_IF_MODIFIED
131 || (this->readOpt() == IOobject::READ_IF_PRESENT && this->headerOk())
137 if (this->size() != this->
mesh().size())
140 <<
" number of field elements = " << this->size()
141 <<
" number of mesh elements = "
146 readOldTimeIfPresent();
157 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
168 fieldPrevIterPtr_(nullptr),
175 <<
"Constructing field" <<
endl << this->info() <<
endl;
182 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
196 fieldPrevIterPtr_(nullptr),
197 boundaryField_(
mesh.
boundary(), *this, patchFieldTypes, actualPatchTypes),
198 sources_(*this, fieldSourceTypes, fieldSourceErrorLocation)
203 <<
"Constructing field" <<
endl << this->info() <<
endl;
210 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
221 fieldPrevIterPtr_(nullptr),
228 <<
"Constructing field" <<
endl << this->info() <<
endl;
237 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
251 fieldPrevIterPtr_(nullptr),
252 boundaryField_(
mesh.
boundary(), *this, patchFieldTypes, actualPatchTypes),
253 sources_(*this, fieldSourceTypes, fieldSourceErrorLocation)
258 <<
"Constructing field" <<
endl << this->info() <<
endl;
261 boundaryField_ == dt.
value();
267 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
278 fieldPrevIterPtr_(nullptr),
280 sources_(*this, stft)
285 <<
"Constructing field from components" <<
endl
286 << this->info() <<
endl;
293 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
299 const PrimitiveField<Type>& iField,
306 fieldPrevIterPtr_(nullptr),
308 sources_(*this, stft)
313 <<
"Constructing field from components" <<
endl
314 << this->info() <<
endl;
319 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
328 fieldPrevIterPtr_(nullptr),
336 if (this->size() != this->
mesh().size())
339 <<
" number of field elements = " << this->size()
340 <<
" number of mesh elements = " << this->
mesh().
size()
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() != this->
mesh().size())
375 <<
" number of field elements = " << this->size()
376 <<
" number of mesh elements = " << this->
mesh().
size()
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 field 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 field 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 field by moving" <<
endl << this->
info() <<
endl;
456 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
464 const_cast<
GeometricField<Type, GeoMesh, PrimitiveField>&>(tgf()),
468 fieldPrevIterPtr_(nullptr),
469 boundaryField_(*this, tgf().boundaryField_),
470 sources_(*this, tgf().sources_)
475 <<
"Constructing field from tmp" <<
endl << this->
info() <<
endl;
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 field as copy resetting IO params"
505 if (!readIfPresent())
512 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
522 const_cast<
GeometricField<Type, GeoMesh, PrimitiveField>&>(tgf()),
527 fieldPrevIterPtr_(nullptr),
528 boundaryField_(*this, tgf().boundaryField_),
529 sources_(*this, tgf().sources_)
534 <<
"Constructing field 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 field as copy resetting name"
565 copyOldTimes(newName, gf);
569 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
579 const_cast<
GeometricField<Type, GeoMesh, PrimitiveField>&>(tgf()),
583 fieldPrevIterPtr_(nullptr),
584 boundaryField_(*this, tgf().boundaryField_),
585 sources_(*this, tgf().sources_)
590 <<
"Constructing field 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 field 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),
646 boundaryField_(this->
mesh().
boundary(), *
this, patchFieldType),
647 sources_(*
this, tgf().sources_)
652 <<
"Constructing field 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 field from components" <<
endl
683 << this->info() <<
endl;
686 if (!readIfPresent())
688 boundaryField_.evaluate();
693 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
703 fieldPrevIterPtr_(
nullptr),
704 boundaryField_(this->
mesh().
boundary(), *
this, patchFieldType),
710 <<
"Constructing field from components" <<
endl
711 << this->info() <<
endl;
714 if (!readIfPresent())
716 boundaryField_.evaluate();
721 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
722 template<
template<
class>
class PrimitiveField2>
735 fieldPrevIterPtr_(nullptr),
743 sources_(*this, fieldSourceTypes, fieldSourceErrorLocation)
748 <<
"Constructing field as copy resetting IO params and patch types"
752 boundaryField_ == gf.boundaryField_;
754 if (!readIfPresent())
756 copyOldTimes(io, gf);
761 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
775 const_cast<
GeometricField<Type, GeoMesh, PrimitiveField>&>(tgf()),
780 fieldPrevIterPtr_(nullptr),
788 sources_(*this, fieldSourceTypes, fieldSourceErrorLocation)
793 <<
"Constructing field from tmp resetting IO params and patch types"
797 boundaryField_ == tgf().boundaryField_;
805 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
806 template<
template<
class>
class PrimitiveField2>
819 fieldPrevIterPtr_(nullptr),
827 sources_(*this, fieldSourceTypes, fieldSourceErrorLocation)
832 <<
"Constructing field from internal field and patch types"
840 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
853 fieldPrevIterPtr_(nullptr),
861 sources_(*this, fieldSourceTypes, fieldSourceErrorLocation)
866 <<
"Constructing field from tmp internal field and patch types"
876 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
887 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
905 Patch::calculatedType()
911 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
921 const bool cacheTmp = diField.
mesh().db().temporaryObjectCached(
name);
930 diField.
mesh().db().time().name(),
945 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
979 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1014 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1019 const GeoMesh&
mesh,
1047 fieldSourceErrorLocation
1054 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1058 const word& newName,
1062 const bool cacheTmp = tgf().db().temporaryObjectCached(newName);
1085 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1086 template<
template<
class>
class PrimitiveField2>
1090 const word& newName,
1119 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1123 const word& newName,
1128 const bool cacheTmp = tgf().db().temporaryObjectCached(newName);
1152 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1153 template<
template<
class>
class PrimitiveField2>
1157 const word& newName,
1186 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1190 const word& newName,
1195 const bool cacheTmp = tdf().db().temporaryObjectCached(newName);
1219 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1220 template<
template<
class>
class PrimitiveField2>
1224 const word& newName,
1252 fieldSourceErrorLocation
1259 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1263 const word& newName,
1271 const bool cacheTmp = tgf().db().temporaryObjectCached(newName);
1291 fieldSourceErrorLocation
1298 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1299 template<
template<
class>
class PrimitiveField2>
1303 const word& newName,
1331 fieldSourceErrorLocation
1338 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1342 const word& newName,
1350 const bool cacheTmp = tdf().db().temporaryObjectCached(newName);
1370 fieldSourceErrorLocation
1379 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1382 this->db().cacheTemporaryObject(*
this);
1390 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1394 this->setUpToDate();
1400 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1405 this->setUpToDate();
1411 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1416 this->setUpToDate();
1418 return boundaryField_;
1422 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1428 this->setUpToDate();
1429 return boundaryField_;
1433 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1438 this->setUpToDate();
1444 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1447 if (!fieldPrevIterPtr_)
1452 <<
"Allocating previous iteration field" <<
endl
1453 << this->info() <<
endl;
1459 this->
name() +
"PrevIter",
1465 *fieldPrevIterPtr_ == *
this;
1470 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1477 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1481 if (!fieldPrevIterPtr_)
1484 <<
"previous iteration field" <<
endl << this->info() <<
endl
1486 <<
" Use field.storePrevIter() at start of iteration."
1490 return *fieldPrevIterPtr_;
1494 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1498 this->setUpToDate();
1500 boundaryField_.evaluate();
1504 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1505 template<
template<
class>
class PrimitiveField2>
1511 Internal::reset(gf);
1514 sources_.reset(*
this, gf.
sources());
1518 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1532 PrimitiveField<Type>::transfer(tgf.ref());
1540 sources_.reset(*
this, gf.
sources());
1546 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1547 template<
template<
class>
class PrimitiveField2>
1559 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1565 bool needRef =
true;
1569 if (boundaryField_[
patchi].fixesValue())
1582 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1593 <<
"Relaxing" <<
endl << this->info()
1602 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1614 this->
name() +
"Final"
1628 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1631 relax(relaxationFactor());
1635 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1636 template<
template<
class>
class PrimitiveField2>
1648 <<
"Relaxing" <<
endl << this->info()
1661 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1662 template<
template<
class>
class PrimitiveField2>
1668 relax(tgf, relaxationFactor());
1672 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1680 return this->
name() +
"Final";
1684 return this->
name();
1689 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1695 os <<
"min/max(" << this->
name() <<
") = "
1702 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1715 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1723 this->
name() +
".T()",
1729 Foam::T(result.
ref().primitiveFieldRef(), primitiveField());
1730 Foam::T(result.
ref().boundaryFieldRef(), boundaryField());
1736 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1761 Foam::component(Component.ref().primitiveFieldRef(), primitiveField(), d);
1762 Foam::component(Component.ref().boundaryFieldRef(), boundaryField(), d);
1768 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1769 template<
template<
class>
class PrimitiveField2>
1782 boundaryFieldRef().replace(d, gcf.boundaryField());
1786 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1787 template<
template<
class>
class PrimitiveField2>
1807 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1815 boundaryFieldRef().replace(d, ds.
value());
1819 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1830 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1841 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1855 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1859 boundaryFieldRef().negate();
1865 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1879 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1893 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1894 template<
template<
class>
class PrimitiveField2>
1907 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1935 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1936 template<
template<
class>
class PrimitiveField2>
1953 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1959 internalFieldRef() = dt;
1960 boundaryFieldRef() = dt.
value();
1964 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1970 internalFieldRef() =
Zero;
1971 boundaryFieldRef() =
Zero;
1975 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1976 template<
template<
class>
class PrimitiveField2>
1989 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2016 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2017 template<
template<
class>
class PrimitiveField2>
2034 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2040 internalFieldRef() = dt;
2041 boundaryFieldRef() == dt.
value();
2045 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2051 internalFieldRef() =
Zero;
2052 boundaryFieldRef() ==
Zero;
2056 #define COMPUTED_ASSIGNMENT(TYPE, op) \
2058 template<class Type, class GeoMesh, template<class> class PrimitiveField> \
2059 template<template<class> class PrimitiveField2> \
2060 void Foam::GeometricField<Type, GeoMesh, PrimitiveField>::operator op \
2062 const GeometricField<TYPE, GeoMesh, PrimitiveField2>& gf \
2065 checkFieldOperation(*this, gf, #op); \
2067 internalFieldRef() op gf.internalField(); \
2068 boundaryFieldRef() op gf.boundaryField(); \
2071 template<class Type, class GeoMesh, template<class> class PrimitiveField> \
2072 template<template<class> class PrimitiveField2> \
2073 void Foam::GeometricField<Type, GeoMesh, PrimitiveField>::operator op \
2075 const tmp<GeometricField<TYPE, GeoMesh, PrimitiveField2>>& tgf \
2078 operator op(tgf()); \
2082 template<class Type, class GeoMesh, template<class> class PrimitiveField> \
2083 void Foam::GeometricField<Type, GeoMesh, PrimitiveField>::operator op \
2085 const dimensioned<TYPE>& dt \
2088 internalFieldRef() op dt; \
2089 boundaryFieldRef() op dt.value(); \
2097 #undef COMPUTED_ASSIGNMENT
2102 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2113 if (!gf.sources_.empty())
2122 "Ostream& operator<<(Ostream&, "
2123 "const GeometricField<Type, GeoMesh, PrimitiveField>&)"
2130 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2145 #undef checkFieldAssignment
2146 #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...
const dimensionSet & dimensions() const
Return dimensions.
PrimitiveField< Type > FieldType
Type of the field from which this DimensionedField is derived.
const GeoMesh & mesh() const
Return mesh.
Pre-declare SubField and related Field type.
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.
PrimitiveField< Type >::cmptType cmptType
Component type of the elements of the field.
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.
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.
writeOption & writeOpt() const
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.
void copyOldTimes(const IOobject &io, const OtherOldTime< OtherPrimitiveField > &)
Copy the old-times from the given field.
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.
virtual const objectRegistry & db() const
Return the object registry - resolve conflict polyMesh/lduMesh.
const fvSolution & solution() const
Return the fvSolution.
label size() const
Return fvMesh size.
const Time & time() const
Return time.
bool temporaryObjectCached(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.
bool isTmp() const
Return true if this is really a temporary object.
void clear() const
If object pointer points to valid object:
T & ref() const
Return non-const reference or generate a fatal error.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
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 InfoInFunction
Report an information message using Foam::Info.
const dimensionSet dimless
errorManipArg< error, int > exit(error &err, const int errNo=1)
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
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)
void component(GeometricField< typename GeometricField< Type, GeoMesh, PrimitiveField1 >::cmptType, GeoMesh, PrimitiveField1 > &gcf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf, const direction d)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
word patchFieldType(const PatchField &pf)
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.
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
faceListList boundary(nPatches)
conserve primitiveFieldRef()+