opm-common
Loading...
Searching...
No Matches
Opm::out::Summary Class Reference

Computational engine for calculating summary vectors (2D curves as a function of time) and writing these values to the summary file. More...

#include <Summary.hpp>

Classes

struct  DynamicSimulatorState
 Layer of indirection for transferring dynamic state objects into vector calculation engine. More...
class  SummaryImplementation

Public Member Functions

 Summary (SummaryConfig &sumcfg, const EclipseState &es, const EclipseGrid &grid, const Schedule &sched, const std::string &basename="", const bool writeEsmry=false)
 Constructor.
 ~Summary ()
 Destructor.
void add_timestep (const SummaryState &st, const int report_step, const int ministep_id, const bool isSubstep)
 Linearise summary values into internal buffer for output purposes.
void eval (const int report_step, const double secs_elapsed, const DynamicSimulatorState &values, SummaryState &summary_state) const
 Calculate summary vector values.
void write (const bool is_final_summary=false) const
 Write all current summary vector buffers to output files.

Detailed Description

Computational engine for calculating summary vectors (2D curves as a function of time) and writing these values to the summary file.

Supports formatted and unformatted, unified and separate summary files.

Constructor & Destructor Documentation

◆ Summary()

Opm::out::Summary::Summary ( SummaryConfig & sumcfg,
const EclipseState & es,
const EclipseGrid & grid,
const Schedule & sched,
const std::string & basename = "",
const bool writeEsmry = false )

Constructor.

Parameters
[in,out]sumcfgOn input, the full collection of summary vectors requested in the run's SUMMARY section. On exit, also contains those additional summary vectors needed to evaluate any UDQ defining expressions.
[in]esRun's static parameters such as region definitions. The Summary object retains a reference to this object, so its lifetime should not exceed that of the EclipseState object.
[in]gridRun's active cells. The Summary object retains a reference to this object, so its lifetime should not exceed that of the EclipseGrid object.
[in]schedRun's dynamic objects. The Summary object retains a reference to this object, so its lifetime should not exceed that of the Schedule object.
[in]basenameRun's base name. Needed to create names of summary output files.
[in]writeEsmryWhether or not to additionally create a "transposed" .ESMRY output file during the simulation run. ESMRY files typically load faster into post-processing tools such as qsummary and ResInsight than traditional SMSPEC/UNSMRY files, especially if the user only needs to view a small number of vectors. On the other hand, ESMRY files typically require more memory while writing.

◆ ~Summary()

Opm::out::Summary::~Summary ( )

Destructor.

Needed for PIMPL idiom.

Member Function Documentation

◆ add_timestep()

void Opm::out::Summary::add_timestep ( const SummaryState & st,
const int report_step,
const int ministep_id,
const bool isSubstep )

Linearise summary values into internal buffer for output purposes.

Parameters
[in]stSummary values from most recent call to eval(). Source object from which to retrieve the values that go into the output buffer.
[in]report_stepOne-based report step index for which to create output. This is the number that gets incorporated into the file extension of "separate" summary output files (i.e., .S000n). Report_step=0 represents time zero.
[in]ministep_idZero based count of time steps performed.
[in]isSubstepWhether or not we're being called in the middle of a report step.

◆ eval()

void Opm::out::Summary::eval ( const int report_step,
const double secs_elapsed,
const DynamicSimulatorState & values,
SummaryState & summary_state ) const

Calculate summary vector values.

Parameters
[in]report_stepOne-based report step index for which to create output. This is the number that gets incorporated into the file extension of "separate" summary output files (i.e., .S000n). Report_step=0 represents time zero.
[in]secs_elapsedElapsed physical time in seconds since start of simulation.
[in]valuesDynamic state values from simulator.
[in,out]summary_stateSummary vector values. On exit, holds updated values for all vectors that are not user-defined quantities. UDQs are calculated in UDQConfig::eval() which should be called shortly after calling Summary::eval().

◆ write()

void Opm::out::Summary::write ( const bool is_final_summary = false) const

Write all current summary vector buffers to output files.

Parameters
[in]is_final_summaryWhether or not this is the final summary output request. When set to true, this guarantees that runs which request the creation of a "transposed" .ESMRY output file will create ESMRY file output containing all summary vector values.

The documentation for this class was generated from the following files:
  • opm/output/eclipse/Summary.hpp
  • opm/output/eclipse/Summary.cpp