My Project
Opm::OutputWriter Class Referenceabstract

Interface for writing non-compositional (blackoil, two-phase) simulation state to files. More...

#include <OutputWriter.hpp>

Public Member Functions

virtual ~OutputWriter ()
 Allow derived classes to be used in the unique_ptr that is returned from the create() method. More...
 
virtual void writeInit (const NNC &nnc)=0
 Write the static data (grid, PVT curves, etc) to disk. More...
 
virtual void writeTimeStep (int report_step, time_t current_posix_time, double seconds_elapsed, data::Solution reservoirState, data::Wells, bool isSubstep)=0
 Write a blackoil reservoir state to disk for later inspection with visualization tools like ResInsight. More...
 

Detailed Description

Interface for writing non-compositional (blackoil, two-phase) simulation state to files.

Use the create() function to setup a chain of writer based on the configuration values, e.g.

ParameterGroup params (argc, argv, false);
auto parser = std::make_shared <const Deck> (
params.get <string> ("deck_filename"));
std::unique_ptr <OutputWriter> writer =
OutputWriter::create (params, parser);
// before the first timestep
writer->writeInit( current_posix_time, time_since_epoch_at_start );
// after each timestep
writer->writeTimeStep

Constructor & Destructor Documentation

◆ ~OutputWriter()

virtual Opm::OutputWriter::~OutputWriter ( )
inlinevirtual

Allow derived classes to be used in the unique_ptr that is returned from the create() method.

(Every class that should be delete'd should have a proper constructor, and if the base class isn't virtual then the compiler won't call the right one when the unique_ptr goes out of scope).

Member Function Documentation

◆ writeInit()

virtual void Opm::OutputWriter::writeInit ( const NNC nnc)
pure virtual

Write the static data (grid, PVT curves, etc) to disk.

This routine should be called before the first timestep (i.e. when timer.currentStepNum () == 0)

◆ writeTimeStep()

virtual void Opm::OutputWriter::writeTimeStep ( int  report_step,
time_t  current_posix_time,
double  seconds_elapsed,
data::Solution  reservoirState,
data::Wells  ,
bool  isSubstep 
)
pure virtual

Write a blackoil reservoir state to disk for later inspection with visualization tools like ResInsight.

Parameters
[in]report_stepThe current report step
[in]current_posix_timeSeconds elapsed since epoch
[in]seconds_elapsedSeconds elapsed since simulation start
[in]reservoirStateThe thermodynamic state of the reservoir
[in]wellsWell data

This routine should be called after the timestep has been advanced, i.e. timer.currentStepNum () > 0.


The documentation for this class was generated from the following file: