Opm::SimulatorOutputBase Class Reference

#include <SimulatorOutput.hpp>

Inheritance diagram for Opm::SimulatorOutputBase:
Inheritance graph

Protected Member Functions

 SimulatorOutputBase (const parameter::ParameterGroup &p, std::shared_ptr< const EclipseState > eclipseState, const Opm::PhaseUsage &phaseUsage, std::shared_ptr< const UnstructuredGrid > grid, std::shared_ptr< const SimulatorTimer > timer, std::shared_ptr< const SimulatorState > state, std::shared_ptr< const WellState > wellState)
 
virtual ~SimulatorOutputBase ()
 
 operator std::function< void ()>()
 
virtual void writeOutput ()
 Call the writers that were created based on the parameters. More...
 
virtual void sync ()
 Make sure that the simulator state is up to date before writing. More...
 

Protected Attributes

std::shared_ptr< const
SimulatorTimer
timer_
 Just hold a reference to these objects that are owned elsewhere. More...
 
std::shared_ptr< const TimeMap > timeMap_
 
std::shared_ptr< const
SimulatorState
reservoirState_
 
std::shared_ptr< const WellStatewellState_
 
std::unique_ptr< OutputWriterwriter_
 Created locally and destructed together with us. More...
 

Detailed Description

Encapsulate output writing from simulators. This is essentially a function object holding curried arguments to the writing backend which is used when invoked through the event handler (which passes on no arguments on it own).

Constructor & Destructor Documentation

Opm::SimulatorOutputBase::SimulatorOutputBase ( const parameter::ParameterGroup p,
std::shared_ptr< const EclipseState >  eclipseState,
const Opm::PhaseUsage phaseUsage,
std::shared_ptr< const UnstructuredGrid grid,
std::shared_ptr< const SimulatorTimer timer,
std::shared_ptr< const SimulatorState state,
std::shared_ptr< const WellState wellState 
)
protected

Curry arguments for the output writer. These arguments are passed to the simulator, but is not passed on to the event handler so it need to pick them up from the object members.

virtual Opm::SimulatorOutputBase::~SimulatorOutputBase ( )
protectedvirtual

We need a destructor in the compilation unit to avoid the OutputWriter being a complete type here.

Member Function Documentation

Opm::SimulatorOutputBase::operator std::function< void ( )
protected

Conversion operator which allows the object to be directly passed into an Event and used as a handler.

See also
Opm::SimulatorIncompTwophase::timestep_completed
virtual void Opm::SimulatorOutputBase::sync ( )
protectedvirtual

Make sure that the simulator state is up to date before writing.

Reimplemented in Opm::SimulatorOutput< Simulator >.

virtual void Opm::SimulatorOutputBase::writeOutput ( )
protectedvirtual

Call the writers that were created based on the parameters.

Member Data Documentation

std::shared_ptr<const SimulatorState> Opm::SimulatorOutputBase::reservoirState_
protected
std::shared_ptr<const TimeMap> Opm::SimulatorOutputBase::timeMap_
protected
std::shared_ptr<const SimulatorTimer> Opm::SimulatorOutputBase::timer_
protected

Just hold a reference to these objects that are owned elsewhere.

std::shared_ptr<const WellState> Opm::SimulatorOutputBase::wellState_
protected
std::unique_ptr<OutputWriter> Opm::SimulatorOutputBase::writer_
protected

Created locally and destructed together with us.


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