Commit Graph

2 Commits

Author SHA1 Message Date
Bård Skaflestad
858ca8fa49 Output Non-Linear Convergence to Separate File if Requested
This commit enables outputting non-linear convergence metrics, i.e.,
the MB and CNV values, per phase, for each non-linear iteration in
each timestep.  If the user passes the option value "iterations" to
the --extra-convergence-output command line option, this commit will
create a new output file, CASE.INFOITER, that holds

    * report step
    * time step within that report step
    * elapsed time
    * MB and CNV values per phase
    * well convergence status

for each non-linear iteration.

We use an asynchronous file writing procedure and confer ownership
of the report step's unprocessed convergence reports to this
procedure just before the end of

    SimulatorFullyImplicitBlackoilEbos::runStep()

At that point, the convergence reports are about to go out of scope.
The asynchronous protocol uses a dedicated queue of output requests,
class ConvergenceReportQueue, into which the producer-i.e., member
function runStep()-inserts new convergence reports and from which
the output thread, ConvergenceOutputThread::writeASynchronous(),
retrieves those requests before writing the file data.
2022-12-20 10:14:13 +01:00
Bård Skaflestad
63654a73fc Don't Output INFOSTEP File by Default
This commit introduces a new helper class,

    ConvergenceOutputConfiguration

which parses comma separated option strings into a runtime
configuration object for whether to output additional convergence
information and, if so, what information to output.

Supported option string values are

  * "none"       -- Dont want any additional convergence output.

  * "steps"      -- Want additional convergence output pertaining to the
                    converged solution at the end of each timestep.

  * "iterations" -- Want additional convergence output pertaining to each
                    non-linar ieration in each timestep.

Option value "none" overrides all other options.  In other words, if the
user requests "none", then there will be no additional convergence
output, even if there are other options in the option string.

We add a new option, ExtraConvergenceOutput (command line option
--extra-convergence-output), which takes a string argument expected
to be a comma separated combination of these options.  The default
value is "none".  Finally, make the INFOSTEP file output conditional
on the user supplying "steps" as an argument to the new option.
2022-12-15 13:02:09 +01:00