Skip to content
Snippets Groups Projects
Commit 1f393aef authored by Andrew Heather's avatar Andrew Heather Committed by Mark OLESEN
Browse files

ENH: subModelBase - added log data member

parent b94bf625
No related branches found
No related tags found
1 merge request!583ENH: added option to control log frequency of lagrangian calculations
......@@ -45,7 +45,8 @@ Foam::subModelBase::subModelBase(dictionary& properties)
dict_(),
baseName_(),
modelType_(),
coeffDict_()
coeffDict_(),
log(properties.getOrDefault<bool>("log", true))
{}
......@@ -63,7 +64,8 @@ Foam::subModelBase::subModelBase
dict_(dict),
baseName_(baseName),
modelType_(modelType),
coeffDict_(dict.subDict(modelType + dictExt))
coeffDict_(dict.subDict(modelType + dictExt)),
log(coeffDict_.getOrDefault<bool>("log", true))
{}
......@@ -81,7 +83,8 @@ Foam::subModelBase::subModelBase
dict_(dict),
baseName_(baseName),
modelType_(modelType),
coeffDict_(dict)
coeffDict_(dict),
log(coeffDict_.getOrDefault<bool>("log", true))
{}
......@@ -92,13 +95,8 @@ Foam::subModelBase::subModelBase(const subModelBase& smb)
dict_(smb.dict_),
baseName_(smb.baseName_),
modelType_(smb.modelType_),
coeffDict_(smb.coeffDict_)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::subModelBase::~subModelBase()
coeffDict_(smb.coeffDict_),
log(coeffDict_.getOrDefault<bool>("log", true))
{}
......@@ -145,6 +143,7 @@ bool Foam::subModelBase::defaultCoeffs(const bool printMsg) const
bool def = coeffDict_.getOrDefault("defaultCoeffs", false);
if (printMsg && def)
{
// Note: not using Log<< for output
Info<< incrIndent;
Info<< indent << "Employing default coefficients" << endl;
Info<< decrIndent;
......
......@@ -91,6 +91,12 @@ protected:
public:
// Public Data
//- Flag to write log into Info
bool log;
// Constructors
//- Construct null
......@@ -121,7 +127,7 @@ public:
//- Destructor
virtual ~subModelBase();
virtual ~subModelBase() = default;
// Member Functions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment