mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Write total solver time to TCPU.
This commit is contained in:
@@ -389,7 +389,7 @@ public:
|
|||||||
Dune::Timer perfTimer;
|
Dune::Timer perfTimer;
|
||||||
perfTimer.start();
|
perfTimer.start();
|
||||||
const double nextstep = adaptiveTimeStepping ? adaptiveTimeStepping->suggestedNextStep() : -1.0;
|
const double nextstep = adaptiveTimeStepping ? adaptiveTimeStepping->suggestedNextStep() : -1.0;
|
||||||
output_writer_.writeTimeStep( timer, state, well_state, solver->model(), false, nextstep );
|
output_writer_.writeTimeStep( timer, state, well_state, solver->model(), false, nextstep, report);
|
||||||
report.output_write_time += perfTimer.stop();
|
report.output_write_time += perfTimer.stop();
|
||||||
|
|
||||||
prev_well_state = well_state;
|
prev_well_state = well_state;
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||||
#include <opm/core/wells/DynamicListEconLimited.hpp>
|
#include <opm/core/wells/DynamicListEconLimited.hpp>
|
||||||
#include <opm/core/simulator/BlackoilState.hpp>
|
#include <opm/core/simulator/BlackoilState.hpp>
|
||||||
|
#include <opm/core/simulator/SimulatorReport.hpp>
|
||||||
|
|
||||||
#include <opm/output/data/Cells.hpp>
|
#include <opm/output/data/Cells.hpp>
|
||||||
#include <opm/output/data/Solution.hpp>
|
#include <opm/output/data/Solution.hpp>
|
||||||
@@ -228,8 +229,9 @@ namespace Opm
|
|||||||
const SimulationDataContainer& reservoirState,
|
const SimulationDataContainer& reservoirState,
|
||||||
const Opm::WellStateFullyImplicitBlackoil& wellState,
|
const Opm::WellStateFullyImplicitBlackoil& wellState,
|
||||||
const Model& physicalModel,
|
const Model& physicalModel,
|
||||||
bool substep = false,
|
const bool substep = false,
|
||||||
const double nextstep = -1.0);
|
const double nextstep = -1.0,
|
||||||
|
const SimulatorReport& simulatorReport = SimulatorReport());
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -989,8 +991,9 @@ namespace Opm
|
|||||||
const SimulationDataContainer& localState,
|
const SimulationDataContainer& localState,
|
||||||
const WellStateFullyImplicitBlackoil& localWellState,
|
const WellStateFullyImplicitBlackoil& localWellState,
|
||||||
const Model& physicalModel,
|
const Model& physicalModel,
|
||||||
bool substep,
|
const bool substep,
|
||||||
const double nextstep)
|
const double nextstep,
|
||||||
|
const SimulatorReport& simulatorReport)
|
||||||
{
|
{
|
||||||
data::Solution localCellData{};
|
data::Solution localCellData{};
|
||||||
const RestartConfig& restartConfig = eclipseState_.getRestartConfig();
|
const RestartConfig& restartConfig = eclipseState_.getRestartConfig();
|
||||||
@@ -1022,9 +1025,11 @@ namespace Opm
|
|||||||
// Add suggested next timestep to extra data.
|
// Add suggested next timestep to extra data.
|
||||||
extraRestartData["OPMEXTRA"] = std::vector<double>(1, nextstep);
|
extraRestartData["OPMEXTRA"] = std::vector<double>(1, nextstep);
|
||||||
|
|
||||||
// @@@ HACK @@@
|
// Add TCPU if simulatorReport is not defaulted.
|
||||||
// Add TCPU
|
const double totalSolverTime = simulatorReport.solver_time;
|
||||||
miscSummaryData["TCPU"] = 100.0;
|
if (totalSolverTime != 0.0) {
|
||||||
|
miscSummaryData["TCPU"] = totalSolverTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
writeTimeStepWithCellProperties(timer, localState, localCellData, localWellState, miscSummaryData, extraRestartData, substep);
|
writeTimeStepWithCellProperties(timer, localState, localCellData, localWellState, miscSummaryData, extraRestartData, substep);
|
||||||
|
|||||||
Reference in New Issue
Block a user