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 SimulationDataContainer > 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 SimulationDataContainer > reservoirState_
 
std::shared_ptr< const WellState > wellState_
 
std::unique_ptr< OutputWriter > writer_
 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

◆ SimulatorOutputBase()

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 SimulationDataContainer >  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.

Examples
/var/opm/opm-verteq/opm/verteq/SimulatorOutput.hpp.

◆ ~SimulatorOutputBase()

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

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

Examples
/var/opm/opm-verteq/opm/verteq/SimulatorOutput.hpp.

Member Function Documentation

◆ operator std::function< void()

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

◆ sync()

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

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

Reimplemented in Opm::SimulatorOutput< Simulator >.

Examples
/var/opm/opm-verteq/opm/verteq/SimulatorOutput.hpp.

◆ writeOutput()

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

Call the writers that were created based on the parameters.

Examples
/var/opm/opm-verteq/opm/verteq/SimulatorOutput.hpp.

Member Data Documentation

◆ reservoirState_

std::shared_ptr<const SimulationDataContainer> Opm::SimulatorOutputBase::reservoirState_
protected

◆ timeMap_

std::shared_ptr<const TimeMap> Opm::SimulatorOutputBase::timeMap_
protected

◆ timer_

std::shared_ptr<const SimulatorTimer> Opm::SimulatorOutputBase::timer_
protected

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

Examples
/var/opm/opm-verteq/opm/verteq/SimulatorOutput.hpp.

◆ wellState_

std::shared_ptr<const WellState> Opm::SimulatorOutputBase::wellState_
protected

◆ writer_

std::unique_ptr<OutputWriter> Opm::SimulatorOutputBase::writer_
protected

Created locally and destructed together with us.

Examples
/var/opm/opm-verteq/opm/verteq/SimulatorOutput.hpp.

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