Opm::SimulatorAdapter< T > Struct Template Reference

#include <simulator.hpp>

Inheritance diagram for Opm::SimulatorAdapter< T >:
Inheritance graph

Public Member Functions

virtual void init (const parameter::ParameterGroup &param, const UnstructuredGrid &grid, const IncompPropertiesInterface &props, const RockCompressibility *rock_comp_props, WellsManager &wells_manager, const std::vector< double > &src, const FlowBoundaryConditions *bcs, LinearSolverInterface &linsolver, const double *gravity)
 
virtual SimulatorReport run (SimulatorTimer &timer, TwophaseState &state, WellState &well_state)
 
virtual Event & timestep_completed ()
 
virtual void sync ()
 

Detailed Description

template<typename T>
struct Opm::SimulatorAdapter< T >

Instance of a concrete simulator that adhere to the interface. This adapter class allows us to bring into the simulator type class any class that has the necessary methods but not necessarily shares a common base class.

Template Parameters
TType of the actual simulator, e.g. SimulatorIncompTwophase

Member Function Documentation

template<typename T >
virtual void Opm::SimulatorAdapter< T >::init ( const parameter::ParameterGroup &  param,
const UnstructuredGrid &  grid,
const IncompPropertiesInterface &  props,
const RockCompressibility *  rock_comp_props,
WellsManager &  wells_manager,
const std::vector< double > &  src,
const FlowBoundaryConditions *  bcs,
LinearSolverInterface &  linsolver,
const double *  gravity 
)
inlinevirtual

Activate the reference by creating a new instance of the underlaying simulator with the given parameters and then point to it.

Implements Opm::Simulator.

template<typename T >
virtual SimulatorReport Opm::SimulatorAdapter< T >::run ( SimulatorTimer &  timer,
TwophaseState &  state,
WellState &  well_state 
)
inlinevirtual

Run the simulation.

This will run succesive timesteps until timer.done() is true. It will modify the reservoir and well states.

Parameters
[in,out]timerGoverns the requested reporting timesteps
[in,out]stateState of reservoir: pressure, fluxes
[in,out]well_stateState of wells: bhp, perforation rates
Returns
Simulation report, with timing data

Implements Opm::Simulator.

template<typename T >
virtual void Opm::SimulatorAdapter< T >::sync ( )
inlinevirtual

Notify the simulator that a callback has an interest in reading for reporting purposes the contents of the state argument that was passed to the run() method. The simulator will then flush any internal state which is currently not reflected in it.

See also
Opm::SimulatorIncompTwophase::sync

Implements Opm::Simulator.

template<typename T >
virtual Event& Opm::SimulatorAdapter< T >::timestep_completed ( )
inlinevirtual

Event that is signaled every time the simulator has completed a timestep.

Returns
Reference to the event object where callbacks can be registered.
See also
Opm::SimulatorIncompTwophase::timestep_completed

Implements Opm::Simulator.


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