mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Pull Substep Checking out of *Log() Functions
This commit removes the 'substep' parameter from the output module's outputProdLog(), outputInjLog(), and outputCumLog() member functions. This parameter was only used in the same way in internal conditions in each member function and we can enforce that check on the outside without losing expressivity.
This commit is contained in:
parent
91fdded473
commit
6b18cbafc6
@ -200,7 +200,7 @@ EclGenericOutputBlackoilModule(const EclipseState& eclState,
|
||||
enableFlows_ = false;
|
||||
enableFlowsn_ = false;
|
||||
|
||||
for (const auto& block : this->schedule_) { // Uses Schedule::begin() and Schedule::end()
|
||||
for (const auto& block : this->schedule_) {
|
||||
const auto& rstkw = block.rst_config().keywords;
|
||||
|
||||
if (! anyFlores_) {
|
||||
@ -226,37 +226,35 @@ EclGenericOutputBlackoilModule<FluidSystem,Scalar>::
|
||||
|
||||
template<class FluidSystem, class Scalar>
|
||||
void EclGenericOutputBlackoilModule<FluidSystem,Scalar>::
|
||||
outputCumLog(std::size_t reportStepNum, const bool substep, bool forceDisableCumOutput)
|
||||
outputCumLog(std::size_t reportStepNum, bool forceDisableCumOutput)
|
||||
{
|
||||
if (!substep && !forceDisableCumOutput) {
|
||||
logOutput_.cumulative(reportStepNum,
|
||||
[this](const std::string& name)
|
||||
{ return this->isDefunctParallelWell(name); });
|
||||
}
|
||||
if (forceDisableCumOutput) { return; }
|
||||
|
||||
logOutput_.cumulative(reportStepNum,
|
||||
[this](const std::string& name)
|
||||
{ return this->isDefunctParallelWell(name); });
|
||||
}
|
||||
|
||||
template<class FluidSystem,class Scalar>
|
||||
void EclGenericOutputBlackoilModule<FluidSystem,Scalar>::
|
||||
outputProdLog(std::size_t reportStepNum,
|
||||
const bool substep,
|
||||
bool forceDisableProdOutput)
|
||||
outputProdLog(std::size_t reportStepNum, bool forceDisableProdOutput)
|
||||
{
|
||||
if (!substep && !forceDisableProdOutput) {
|
||||
logOutput_.production(reportStepNum,
|
||||
[this](const std::string& name)
|
||||
{ return this->isDefunctParallelWell(name); });
|
||||
}
|
||||
if (forceDisableProdOutput) { return; }
|
||||
|
||||
logOutput_.production(reportStepNum,
|
||||
[this](const std::string& name)
|
||||
{ return this->isDefunctParallelWell(name); });
|
||||
}
|
||||
|
||||
template<class FluidSystem,class Scalar>
|
||||
void EclGenericOutputBlackoilModule<FluidSystem,Scalar>::
|
||||
outputInjLog(std::size_t reportStepNum, const bool substep, bool forceDisableInjOutput)
|
||||
outputInjLog(std::size_t reportStepNum, bool forceDisableInjOutput)
|
||||
{
|
||||
if (!substep && !forceDisableInjOutput) {
|
||||
logOutput_.injection(reportStepNum,
|
||||
[this](const std::string& name)
|
||||
{ return this->isDefunctParallelWell(name); });
|
||||
}
|
||||
if (forceDisableInjOutput) { return; }
|
||||
|
||||
logOutput_.injection(reportStepNum,
|
||||
[this](const std::string& name)
|
||||
{ return this->isDefunctParallelWell(name); });
|
||||
}
|
||||
|
||||
template<class FluidSystem,class Scalar>
|
||||
|
@ -63,17 +63,14 @@ public:
|
||||
|
||||
// write cumulative production and injection reports to output
|
||||
void outputCumLog(std::size_t reportStepNum,
|
||||
const bool substep,
|
||||
bool forceDisableCumOutput);
|
||||
|
||||
// write production report to output
|
||||
void outputProdLog(std::size_t reportStepNum,
|
||||
const bool substep,
|
||||
bool forceDisableProdOutput);
|
||||
|
||||
// write injection report to output
|
||||
void outputInjLog(std::size_t reportStepNum,
|
||||
const bool substep,
|
||||
bool forceDisableInjOutput);
|
||||
|
||||
// write Fluid In Place to output log
|
||||
|
@ -254,9 +254,6 @@ public:
|
||||
eclOutputModule_->outputFipresvLog(miscSummaryData, regionData, reportStepNum,
|
||||
isSubStep, simulator_.gridView().comm());
|
||||
}
|
||||
bool forceDisableProdOutput = false;
|
||||
bool forceDisableInjOutput = false;
|
||||
bool forceDisableCumOutput = false;
|
||||
|
||||
// Add TCPU
|
||||
if (totalCpuTime != 0.0) {
|
||||
@ -311,11 +308,16 @@ public:
|
||||
this->udqState());
|
||||
}
|
||||
|
||||
{
|
||||
OPM_TIMEBLOCK(outputXXX);
|
||||
eclOutputModule_->outputProdLog(reportStepNum, isSubStep, forceDisableProdOutput);
|
||||
eclOutputModule_->outputInjLog(reportStepNum, isSubStep, forceDisableInjOutput);
|
||||
eclOutputModule_->outputCumLog(reportStepNum, isSubStep, forceDisableCumOutput);
|
||||
if (! isSubStep) {
|
||||
OPM_TIMEBLOCK(outputProdInjLogs);
|
||||
|
||||
const bool forceDisableProdOutput = false;
|
||||
const bool forceDisableInjOutput = false;
|
||||
const bool forceDisableCumOutput = false;
|
||||
|
||||
eclOutputModule_->outputProdLog(reportStepNum, forceDisableProdOutput);
|
||||
eclOutputModule_->outputInjLog(reportStepNum, forceDisableInjOutput);
|
||||
eclOutputModule_->outputCumLog(reportStepNum, forceDisableCumOutput);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user