ENH: cloudSolution - added log/Info output control
This commit is contained in:
parent
161fab8d60
commit
b94bf625a5
@ -39,6 +39,7 @@ Foam::cloudSolution::cloudSolution(const fvMesh& mesh, const dictionary& dict)
|
||||
active_(dict.lookup("active")),
|
||||
transient_(false),
|
||||
calcFrequency_(1),
|
||||
logFrequency_(1),
|
||||
maxCo_(0.3),
|
||||
iter_(1),
|
||||
trackTime_(0.0),
|
||||
@ -82,6 +83,7 @@ Foam::cloudSolution::cloudSolution(const cloudSolution& cs)
|
||||
active_(cs.active_),
|
||||
transient_(cs.transient_),
|
||||
calcFrequency_(cs.calcFrequency_),
|
||||
logFrequency_(cs.logFrequency_),
|
||||
maxCo_(cs.maxCo_),
|
||||
iter_(cs.iter_),
|
||||
trackTime_(cs.trackTime_),
|
||||
@ -101,6 +103,7 @@ Foam::cloudSolution::cloudSolution(const fvMesh& mesh)
|
||||
active_(false),
|
||||
transient_(false),
|
||||
calcFrequency_(0),
|
||||
logFrequency_(0),
|
||||
maxCo_(GREAT),
|
||||
iter_(0),
|
||||
trackTime_(0.0),
|
||||
@ -153,6 +156,8 @@ void Foam::cloudSolution::read()
|
||||
dict_.readIfPresent("maxCo", maxCo_);
|
||||
dict_.readIfPresent("deltaTMax", deltaTMax_);
|
||||
|
||||
dict_.readIfPresent("logFrequency", logFrequency_);
|
||||
|
||||
if (steadyState())
|
||||
{
|
||||
dict_.readEntry("calcFrequency", calcFrequency_);
|
||||
@ -264,6 +269,15 @@ bool Foam::cloudSolution::canEvolve()
|
||||
}
|
||||
|
||||
|
||||
bool Foam::cloudSolution::log() const
|
||||
{
|
||||
return
|
||||
active_
|
||||
&& (logFrequency_ > 0)
|
||||
&& (mesh_.time().timeIndex() % logFrequency_ == 0);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::cloudSolution::output() const
|
||||
{
|
||||
return active_ && mesh_.time().writeTime();
|
||||
|
@ -71,6 +71,10 @@ class cloudSolution
|
||||
// NOTE: Steady operation only
|
||||
label calcFrequency_;
|
||||
|
||||
//- Output log frequency - carrier steps per cloud step
|
||||
// Default = 1
|
||||
label logFrequency_;
|
||||
|
||||
//- Maximum particle Courant number
|
||||
// Max fraction of current cell that can be traversed in a single
|
||||
// step
|
||||
@ -210,9 +214,12 @@ public:
|
||||
bool solveThisStep() const;
|
||||
|
||||
//- Returns true if possible to evolve the cloud and sets timestep
|
||||
// parameters
|
||||
//- parameters
|
||||
bool canEvolve();
|
||||
|
||||
//- Returns true if possible to log this step
|
||||
bool log() const;
|
||||
|
||||
//- Returns true if writing this step
|
||||
bool output() const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user