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),
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;
231 boundaryField_ == dt.
value();
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
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>
329 fieldPrevIterPtr_(nullptr),
337 if (this->size() != this->
mesh().size())
340 <<
" number of field elements = " << this->size()
341 <<
" number of mesh elements = " << this->
mesh().
size()
345 readOldTimeIfPresent();
350 <<
"Finishing read-construction of" <<
endl << this->info() <<
endl;
355 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
366 fieldPrevIterPtr_(nullptr),
374 if (this->size() != this->
mesh().size())
377 <<
" number of field elements = " << this->size()
378 <<
" number of mesh elements = " << this->
mesh().
size()
385 <<
"Finishing dictionary-construct of "
391 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
399 fieldPrevIterPtr_(
nullptr),
400 boundaryField_(*
this, gf.boundaryField_),
401 sources_(*
this, gf.sources_)
406 <<
"Constructing field as copy" <<
endl << this->info() <<
endl;
409 this->writeOpt() = IOobject::NO_WRITE;
413 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
414 template<
template<
class>
class PrimitiveField2>
422 fieldPrevIterPtr_(nullptr),
423 boundaryField_(*this, gf.boundaryField_),
424 sources_(*this, gf.sources_)
429 <<
"Constructing field as copy" <<
endl << this->info() <<
endl;
432 this->writeOpt() = IOobject::NO_WRITE;
436 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
444 fieldPrevIterPtr_(nullptr),
445 boundaryField_(*this, gf.boundaryField_),
446 sources_(*this, gf.sources_)
451 <<
"Constructing field by moving" <<
endl << this->info() <<
endl;
454 this->writeOpt() = IOobject::NO_WRITE;
458 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
470 fieldPrevIterPtr_(
nullptr),
471 boundaryField_(*
this, tgf().boundaryField_),
472 sources_(*
this, tgf().sources_)
477 <<
"Constructing field from tmp" <<
endl << this->info() <<
endl;
480 this->writeOpt() = IOobject::NO_WRITE;
486 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
487 template<
template<
class>
class PrimitiveField2>
496 fieldPrevIterPtr_(nullptr),
497 boundaryField_(*this, gf.boundaryField_),
498 sources_(*this, gf.sources_)
503 <<
"Constructing field as copy resetting IO params"
507 if (!readIfPresent())
514 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
524 const_cast<
GeometricField<Type, GeoMesh, PrimitiveField>&>(tgf()),
529 fieldPrevIterPtr_(nullptr),
530 boundaryField_(*this, tgf().boundaryField_),
531 sources_(*this, tgf().sources_)
536 <<
"Constructing field from tmp resetting IO params"
546 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
547 template<
template<
class>
class PrimitiveField2>
556 fieldPrevIterPtr_(nullptr),
557 boundaryField_(*this, gf.boundaryField_),
558 sources_(*this, gf.sources_)
563 <<
"Constructing field as copy resetting name"
567 copyOldTimes(newName, gf);
571 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
585 fieldPrevIterPtr_(nullptr),
586 boundaryField_(*this, tgf().boundaryField_),
587 sources_(*this, tgf().sources_)
592 <<
"Constructing field from tmp resetting name"
600 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
601 template<
template<
class>
class PrimitiveField2>
611 fieldPrevIterPtr_(nullptr),
613 sources_(*this, gf.sources_)
618 <<
"Constructing field as copy resetting IO params"
622 boundaryField_ == gf.boundaryField_;
624 if (!readIfPresent())
626 copyOldTimes(io, gf);
631 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
647 fieldPrevIterPtr_(
nullptr),
648 boundaryField_(this->
mesh().
boundary(), *
this, patchFieldType),
649 sources_(*
this, tgf().sources_)
654 <<
"Constructing field as copy resetting IO params"
658 boundaryField_ == tgf().boundaryField_;
666 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
667 template<
template<
class>
class PrimitiveField2>
677 fieldPrevIterPtr_(
nullptr),
678 boundaryField_(this->
mesh().
boundary(), *
this, patchFieldType),
684 <<
"Constructing field from components" <<
endl
685 << this->info() <<
endl;
688 if (!readIfPresent())
690 boundaryField_.evaluate();
695 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
705 fieldPrevIterPtr_(
nullptr),
712 <<
"Constructing field from components" <<
endl
713 << this->info() <<
endl;
716 if (!readIfPresent())
718 boundaryField_.evaluate();
723 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
724 template<
template<
class>
class PrimitiveField2>
737 fieldPrevIterPtr_(nullptr),
745 sources_(*this, fieldSourceTypes, fieldSourceErrorLocation)
750 <<
"Constructing field as copy resetting IO params and patch types"
754 boundaryField_ == gf.boundaryField_;
756 if (!readIfPresent())
758 copyOldTimes(io, gf);
763 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
777 const_cast<
GeometricField<Type, GeoMesh, PrimitiveField>&>(tgf()),
782 fieldPrevIterPtr_(nullptr),
790 sources_(*this, fieldSourceTypes, fieldSourceErrorLocation)
795 <<
"Constructing field from tmp resetting IO params and patch types"
799 boundaryField_ == tgf().boundaryField_;
807 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
808 template<
template<
class>
class PrimitiveField2>
821 fieldPrevIterPtr_(nullptr),
829 sources_(*this, fieldSourceTypes, fieldSourceErrorLocation)
834 <<
"Constructing field from internal field and patch types"
842 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
855 fieldPrevIterPtr_(nullptr),
863 sources_(*this, fieldSourceTypes, fieldSourceErrorLocation)
868 <<
"Constructing field from tmp internal field and patch types"
878 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
889 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
907 Patch::calculatedType()
913 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
923 const bool cacheTmp = diField.
mesh().db().temporaryObjectCached(
name);
932 diField.
mesh().db().time().name(),
947 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
981 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1016 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1021 const GeoMesh&
mesh,
1049 fieldSourceErrorLocation
1056 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1060 const word& newName,
1064 const bool cacheTmp = tgf().db().temporaryObjectCached(newName);
1087 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1088 template<
template<
class>
class PrimitiveField2>
1092 const word& newName,
1121 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1125 const word& newName,
1130 const bool cacheTmp = tgf().db().temporaryObjectCached(newName);
1154 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1155 template<
template<
class>
class PrimitiveField2>
1159 const word& newName,
1188 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1192 const word& newName,
1197 const bool cacheTmp = tdf().db().temporaryObjectCached(newName);
1221 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1222 template<
template<
class>
class PrimitiveField2>
1226 const word& newName,
1254 fieldSourceErrorLocation
1261 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1265 const word& newName,
1273 const bool cacheTmp = tgf().db().temporaryObjectCached(newName);
1293 fieldSourceErrorLocation
1300 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1301 template<
template<
class>
class PrimitiveField2>
1305 const word& newName,
1333 fieldSourceErrorLocation
1340 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1344 const word& newName,
1352 const bool cacheTmp = tdf().db().temporaryObjectCached(newName);
1372 fieldSourceErrorLocation
1381 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1384 this->db().cacheTemporaryObject(*
this);
1392 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1396 this->setUpToDate();
1402 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1407 this->setUpToDate();
1413 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1418 this->setUpToDate();
1420 return boundaryField_;
1424 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1430 this->setUpToDate();
1431 return boundaryField_;
1435 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1440 this->setUpToDate();
1446 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1449 if (!fieldPrevIterPtr_)
1454 <<
"Allocating previous iteration field" <<
endl
1455 << this->info() <<
endl;
1461 this->
name() +
"PrevIter",
1467 *fieldPrevIterPtr_ == *
this;
1472 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1479 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1483 if (!fieldPrevIterPtr_)
1486 <<
"previous iteration field" <<
endl << this->info() <<
endl
1488 <<
" Use field.storePrevIter() at start of iteration."
1492 return *fieldPrevIterPtr_;
1496 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1500 this->setUpToDate();
1502 boundaryField_.evaluate();
1506 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1507 template<
template<
class>
class PrimitiveField2>
1513 Internal::reset(gf);
1516 sources_.reset(*
this, gf.
sources());
1520 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1534 PrimitiveField<Type>::transfer(tgf.ref());
1542 sources_.reset(*
this, gf.
sources());
1548 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1549 template<
template<
class>
class PrimitiveField2>
1561 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1567 bool needRef =
true;
1571 if (boundaryField_[
patchi].fixesValue())
1584 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1595 <<
"Relaxing" <<
endl << this->info()
1604 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1616 this->
name() +
"Final"
1630 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1633 relax(relaxationFactor());
1637 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1638 template<
template<
class>
class PrimitiveField2>
1650 <<
"Relaxing" <<
endl << this->info()
1663 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1664 template<
template<
class>
class PrimitiveField2>
1670 relax(tgf, relaxationFactor());
1674 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1682 return this->
name() +
"Final";
1686 return this->
name();
1691 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1697 os <<
"min/max(" << this->
name() <<
") = "
1704 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1717 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1725 this->
name() +
".T()",
1731 Foam::T(result.
ref().primitiveFieldRef(), primitiveField());
1732 Foam::T(result.
ref().boundaryFieldRef(), boundaryField());
1738 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1763 Foam::component(Component.ref().primitiveFieldRef(), primitiveField(), d);
1764 Foam::component(Component.ref().boundaryFieldRef(), boundaryField(), d);
1770 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1771 template<
template<
class>
class PrimitiveField2>
1784 boundaryFieldRef().replace(d, gcf.boundaryField());
1788 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1789 template<
template<
class>
class PrimitiveField2>
1809 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1817 boundaryFieldRef().replace(d, ds.
value());
1821 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1832 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1843 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1857 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1861 boundaryFieldRef().negate();
1867 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1881 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1895 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1896 template<
template<
class>
class PrimitiveField2>
1909 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1937 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1938 template<
template<
class>
class PrimitiveField2>
1955 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1961 internalFieldRef() = dt;
1962 boundaryFieldRef() = dt.
value();
1966 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1972 internalFieldRef() =
Zero;
1973 boundaryFieldRef() =
Zero;
1977 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
1978 template<
template<
class>
class PrimitiveField2>
1991 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2018 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2019 template<
template<
class>
class PrimitiveField2>
2036 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2042 internalFieldRef() = dt;
2043 boundaryFieldRef() == dt.
value();
2047 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2053 internalFieldRef() =
Zero;
2054 boundaryFieldRef() ==
Zero;
2058 #define COMPUTED_ASSIGNMENT(TYPE, op) \
2060 template<class Type, class GeoMesh, template<class> class PrimitiveField> \
2061 template<template<class> class PrimitiveField2> \
2062 void Foam::GeometricField<Type, GeoMesh, PrimitiveField>::operator op \
2064 const GeometricField<TYPE, GeoMesh, PrimitiveField2>& gf \
2067 checkFieldOperation(*this, gf, #op); \
2069 internalFieldRef() op gf.internalField(); \
2070 boundaryFieldRef() op gf.boundaryField(); \
2073 template<class Type, class GeoMesh, template<class> class PrimitiveField> \
2074 template<template<class> class PrimitiveField2> \
2075 void Foam::GeometricField<Type, GeoMesh, PrimitiveField>::operator op \
2077 const tmp<GeometricField<TYPE, GeoMesh, PrimitiveField2>>& tgf \
2080 operator op(tgf()); \
2084 template<class Type, class GeoMesh, template<class> class PrimitiveField> \
2085 void Foam::GeometricField<Type, GeoMesh, PrimitiveField>::operator op \
2087 const dimensioned<TYPE>& dt \
2090 internalFieldRef() op dt; \
2091 boundaryFieldRef() op dt.value(); \
2099 #undef COMPUTED_ASSIGNMENT
2104 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2115 if (!gf.sources_.empty())
2124 "Ostream& operator<<(Ostream&, "
2125 "const GeometricField<Type, GeoMesh, PrimitiveField>&)"
2132 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
2147 #undef checkFieldAssignment
2148 #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.
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.
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()+