Base class for generic sub-models requiring to be read from dictionary. Provides a mechanism to read and write properties from a dictionary to enable clean re-starts. Used by, e.g. clou dsub-models. More...
Public Member Functions | |
subModelBase (dictionary &properties) | |
Construct null. More... | |
subModelBase (dictionary &properties, const dictionary &dict, const word &baseName, const word &modelType, const word &dictExt="Coeffs") | |
Construct from components without name. More... | |
subModelBase (const word &modelName, dictionary &properties, const dictionary &dict, const word &baseName, const word &modelType) | |
Construct from components with name. More... | |
subModelBase (const subModelBase &smb) | |
Copy constructor. More... | |
virtual | ~subModelBase () |
Destructor. More... | |
const word & | modelName () const |
Return const access to the name of the sub-model. More... | |
const dictionary & | dict () const |
Return const access to the cloud dictionary. More... | |
const word & | baseName () const |
Return const access to the base name of the sub-model. More... | |
const word & | modelType () const |
Return const access to the sub-model type. More... | |
const dictionary & | coeffDict () const |
Return const access to the coefficients dictionary. More... | |
const dictionary & | properties () const |
Return const access to the properties dictionary. More... | |
virtual bool | defaultCoeffs (const bool printMsg) const |
Returns true if defaultCoeffs is true and outputs on printMsg. More... | |
virtual void | cacheFields (const bool store) |
Cache dependent sub-model fields. More... | |
virtual bool | writeTime () const =0 |
Flag to indicate when to write a property. More... | |
template<class Type > | |
Type | getBaseProperty (const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const |
Retrieve generic property from the base model. More... | |
template<class Type > | |
void | getBaseProperty (const word &entryName, Type &value) const |
Retrieve generic property from the base model. More... | |
template<class Type > | |
void | setBaseProperty (const word &entryName, const Type &value) |
Add generic property to the base model. More... | |
template<class Type > | |
void | getModelProperty (const word &entryName, Type &value) const |
Retrieve generic property from the sub-model. More... | |
template<class Type > | |
Type | getModelProperty (const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const |
Retrieve generic property from the sub-model. More... | |
template<class Type > | |
void | setModelProperty (const word &entryName, const Type &value) |
Add generic property to the sub-model. More... | |
virtual void | write (Ostream &os) const |
Write. More... | |
void | operator= (const subModelBase &)=delete |
Disallow default bitwise assignment. More... | |
Protected Member Functions | |
bool | inLine () const |
Flag to indicate whether data is/was read in-line. More... | |
Protected Attributes | |
const word | modelName_ |
Name of the sub-model. More... | |
dictionary & | properties_ |
Reference to properties dictionary e.g. for restart. More... | |
const dictionary | dict_ |
Copy of dictionary used during construction. More... | |
const word | baseName_ |
Name of the sub-model base class. More... | |
const word | modelType_ |
Type of the sub-model. More... | |
const dictionary | coeffDict_ |
Coefficients dictionary. More... | |
Base class for generic sub-models requiring to be read from dictionary. Provides a mechanism to read and write properties from a dictionary to enable clean re-starts. Used by, e.g. clou dsub-models.
Definition at line 51 of file subModelBase.H.
subModelBase | ( | dictionary & | properties | ) |
Construct null.
Definition at line 38 of file subModelBase.C.
Referenced by subModelBase::subModelBase().
subModelBase | ( | dictionary & | properties, |
const dictionary & | dict, | ||
const word & | baseName, | ||
const word & | modelType, | ||
const word & | dictExt = "Coeffs" |
||
) |
Construct from components without name.
Definition at line 50 of file subModelBase.C.
References subModelBase::subModelBase().
subModelBase | ( | const word & | modelName, |
dictionary & | properties, | ||
const dictionary & | dict, | ||
const word & | baseName, | ||
const word & | modelType | ||
) |
Construct from components with name.
Definition at line 68 of file subModelBase.C.
subModelBase | ( | const subModelBase & | smb | ) |
Copy constructor.
Definition at line 85 of file subModelBase.C.
|
virtual |
Destructor.
Definition at line 98 of file subModelBase.C.
|
protected |
Flag to indicate whether data is/was read in-line.
const Foam::word & modelName | ( | ) | const |
Return const access to the name of the sub-model.
Definition at line 104 of file subModelBase.C.
References subModelBase::modelName_.
Referenced by CloudFunctionObject< CloudType >::CloudFunctionObject(), and InjectionModel< CloudType >::info().
const Foam::dictionary & dict | ( | ) | const |
Return const access to the cloud dictionary.
Definition at line 110 of file subModelBase.C.
References subModelBase::dict_.
const Foam::word & baseName | ( | ) | const |
Return const access to the base name of the sub-model.
Definition at line 116 of file subModelBase.C.
References subModelBase::baseName_.
const Foam::word & modelType | ( | ) | const |
Return const access to the sub-model type.
Definition at line 122 of file subModelBase.C.
References subModelBase::modelType_.
Referenced by filmSubModelBase::filmType().
const Foam::dictionary & coeffDict | ( | ) | const |
Return const access to the coefficients dictionary.
Definition at line 128 of file subModelBase.C.
References subModelBase::coeffDict_.
Referenced by InjectionModel< CloudType >::InjectionModel().
const Foam::dictionary & properties | ( | ) | const |
Return const access to the properties dictionary.
Definition at line 134 of file subModelBase.C.
References subModelBase::properties_.
Referenced by LiquidEvaporation< CloudType >::dh(), and LiquidEvaporationBoil< CloudType >::dh().
|
virtual |
Returns true if defaultCoeffs is true and outputs on printMsg.
Definition at line 140 of file subModelBase.C.
References subModelBase::coeffDict_, Foam::decrIndent(), Foam::endl(), Foam::incrIndent(), Foam::indent(), Foam::Info, and dictionary::lookupOrDefault().
|
virtual |
Cache dependent sub-model fields.
Reimplemented in DispersionRASModel< CloudType >, Explicit< CloudType >, Implicit< CloudType >, Relaxation< CloudType >, and GradientDispersionRAS< CloudType >.
Definition at line 154 of file subModelBase.C.
|
pure virtual |
Flag to indicate when to write a property.
Implemented in CloudSubModelBase< CloudType >, CloudSubModelBase< Foam::DSMCCloud >, CloudSubModelBase< Foam::ReactingMultiphaseCloud< CloudType > >, CloudSubModelBase< Foam::MomentumCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::SprayCloud< CloudType > >, CloudSubModelBase< Foam::ReactingMultiphaseCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::MPPICCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::ReactingCloud< CloudType > >, CloudSubModelBase< Foam::ThermoCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::MomentumCloud< CloudType > >, CloudSubModelBase< Foam::CollidingCloud< CloudType > >, CloudSubModelBase< Foam::MPPICCloud< CloudType > >, CloudSubModelBase< Foam::CollidingCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::SprayCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::ThermoCloud< CloudType > >, CloudSubModelBase< Foam::ReactingCloud< Foam::DSMCCloud > >, and filmSubModelBase.
Type getBaseProperty | ( | const word & | entryName, |
const Type & | defaultValue = pTraits<Type>::zero |
||
) | const |
Retrieve generic property from the base model.
Definition at line 30 of file subModelBaseTemplates.C.
References dictionary::readIfPresent(), and dictionary::subDict().
Referenced by ejectionModelList::info(), and transferModelList::info().
void getBaseProperty | ( | const word & | entryName, |
Type & | value | ||
) | const |
Retrieve generic property from the base model.
Definition at line 49 of file subModelBaseTemplates.C.
References dictionary::readIfPresent(), subModelBase::setBaseProperty(), and dictionary::subDict().
void setBaseProperty | ( | const word & | entryName, |
const Type & | value | ||
) |
Add generic property to the base model.
Definition at line 64 of file subModelBaseTemplates.C.
References dictionary::add(), subModelBase::getModelProperty(), and dictionary::subDict().
Referenced by subModelBase::getBaseProperty(), ejectionModelList::info(), and transferModelList::info().
void getModelProperty | ( | const word & | entryName, |
Type & | value | ||
) | const |
Retrieve generic property from the sub-model.
Definition at line 84 of file subModelBaseTemplates.C.
References dictionary::found(), dictionary::readIfPresent(), and dictionary::subDict().
Referenced by subModelBase::setBaseProperty().
Type getModelProperty | ( | const word & | entryName, |
const Type & | defaultValue = pTraits<Type>::zero |
||
) | const |
Retrieve generic property from the sub-model.
Definition at line 107 of file subModelBaseTemplates.C.
References subModelBase::setModelProperty().
void setModelProperty | ( | const word & | entryName, |
const Type & | value | ||
) |
Add generic property to the sub-model.
Definition at line 120 of file subModelBaseTemplates.C.
References dictionary::add(), dictionary::found(), and dictionary::subDict().
Referenced by subModelBase::getModelProperty(), and InjectionModel< CloudType >::info().
|
virtual |
Write.
Reimplemented in DispersionRASModel< CloudType >, CloudSubModelBase< CloudType >, CloudSubModelBase< Foam::DSMCCloud >, CloudSubModelBase< Foam::ReactingMultiphaseCloud< CloudType > >, CloudSubModelBase< Foam::MomentumCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::SprayCloud< CloudType > >, CloudSubModelBase< Foam::ReactingMultiphaseCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::MPPICCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::ReactingCloud< CloudType > >, CloudSubModelBase< Foam::ThermoCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::MomentumCloud< CloudType > >, CloudSubModelBase< Foam::CollidingCloud< CloudType > >, CloudSubModelBase< Foam::MPPICCloud< CloudType > >, CloudSubModelBase< Foam::CollidingCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::SprayCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::ThermoCloud< CloudType > >, and CloudSubModelBase< Foam::ReactingCloud< Foam::DSMCCloud > >.
Definition at line 158 of file subModelBase.C.
References subModelBase::coeffDict_.
|
delete |
Disallow default bitwise assignment.
|
protected |
Name of the sub-model.
Definition at line 59 of file subModelBase.H.
Referenced by subModelBase::modelName().
|
protected |
Reference to properties dictionary e.g. for restart.
Definition at line 62 of file subModelBase.H.
Referenced by subModelBase::properties().
|
protected |
Copy of dictionary used during construction.
Definition at line 65 of file subModelBase.H.
Referenced by subModelBase::dict().
|
protected |
Name of the sub-model base class.
Definition at line 68 of file subModelBase.H.
Referenced by subModelBase::baseName().
|
protected |
Type of the sub-model.
Definition at line 71 of file subModelBase.H.
Referenced by subModelBase::modelType().
|
protected |
Coefficients dictionary.
Definition at line 74 of file subModelBase.H.
Referenced by subModelBase::coeffDict(), subModelBase::defaultCoeffs(), and subModelBase::write().