flow_ebos: print statistics about failed time steps

the performance summary at the end of a Norne run which are printed by
`flow_ebos` now looks like this on my machine:

```
Total time (seconds):         773.757
Solver time (seconds):        753.349
 Assembly time (seconds):     377.218 (Failed: 23.537; 6.23965%)
 Linear solve time (seconds): 352.022 (Failed: 23.2757; 6.61201%)
 Update time (seconds):       16.3658 (Failed: 1.13149; 6.91375%)
 Output write time (seconds): 22.5991
Overall Well Iterations:      870 (Failed: 35; 4.02299%)
Overall Linearizations:       2098 (Failed: 136; 6.48236%)
Overall Newton Iterations:    1756 (Failed: 136; 7.74487%)
Overall Linear Iterations:    26572 (Failed: 1786; 6.72136%)
```

for the flow_legacy family, nothing changes.
This commit is contained in:
Andreas Lauser
2017-04-10 15:55:30 +02:00
parent 88e4646b71
commit ef2a560fb3
13 changed files with 126 additions and 14 deletions

View File

@@ -147,6 +147,9 @@ public:
WellState prev_well_state;
ExtraData extra;
failureReport_ = SimulatorReport();
if (output_writer_.isRestart()) {
// This is a restart, populate WellState and ReservoirState state objects from restart file
output_writer_.initFromRestartFile(props_.phaseUsage(), grid(), state, prev_well_state, extra);
@@ -319,11 +322,13 @@ public:
stepReport = adaptiveTimeStepping->step( timer, *solver, state, well_state, event, output_writer_,
output_writer_.requireFIPNUM() ? &fipnum : nullptr );
report += stepReport;
failureReport_ += adaptiveTimeStepping->failureReport();
}
else {
// solve for complete report step
stepReport = solver->step(timer, state, well_state);
report += stepReport;
failureReport_ += solver->failureReport();
if( terminal_output_ )
{
@@ -407,6 +412,10 @@ public:
return report;
}
/** \brief Returns the simulator report for the failed substeps of the simulation.
*/
const SimulatorReport& failureReport() const { return failureReport_; };
const Grid& grid() const
{ return ebosSimulator_.gridManager().grid(); }
@@ -830,6 +839,8 @@ protected:
typedef RateConverter::SurfaceToReservoirVoidage<FluidSystem, std::vector<int> > RateConverterType;
typedef typename Solver::SolverParameters SolverParameters;
SimulatorReport failureReport_;
const parameter::ParameterGroup param_;
ModelParameters model_param_;
SolverParameters solver_param_;