Opm::ActionHandler< Scalar > Class Template Reference

Class handling Action support in simulator. More...

#include <ActionHandler.hpp>

Public Types

using TransFunc = std::function< void(bool)>
 Function handle to update transmissiblities. More...
 

Public Member Functions

 ActionHandler (EclipseState &ecl_state, Schedule &schedule, Action::State &actionState, SummaryState &summaryState, BlackoilWellModelGeneric< Scalar > &wellModel, Parallel::Communication comm)
 
void applyActions (int reportStep, double sim_time, const TransFunc &updateTrans)
 
void evalUDQAssignments (const unsigned episodeIdx, UDQState &udq_state)
 Evaluates UDQ assign statements. More...
 
void applySimulatorUpdate (int report_step, const SimulatorUpdate &sim_update, const TransFunc &updateTrans, bool &commit_wellstate)
 

Detailed Description

template<class Scalar>
class Opm::ActionHandler< Scalar >

Class handling Action support in simulator.

Member Typedef Documentation

◆ TransFunc

template<class Scalar >
using Opm::ActionHandler< Scalar >::TransFunc = std::function<void(bool)>

Function handle to update transmissiblities.

Constructor & Destructor Documentation

◆ ActionHandler()

template<class Scalar >
Opm::ActionHandler< Scalar >::ActionHandler ( EclipseState &  ecl_state,
Schedule &  schedule,
Action::State &  actionState,
SummaryState &  summaryState,
BlackoilWellModelGeneric< Scalar > &  wellModel,
Parallel::Communication  comm 
)

Constructor.

Parameters
[in,out]ecl_stateContainer of static properties such as permeability and transmissibility.
[in,out]scheduleContainer of dynamic objects, such as wells.
[in,out]actionStateDynamic state object for all actions.
[in,out]summaryStateDynamic state object for all summary vectors.
[in,out]wellModelSimulation wells on this rank.
[in]commMPI communicator object linking all simulation ranks.

Member Function Documentation

◆ applyActions()

template<class Scalar >
void Opm::ActionHandler< Scalar >::applyActions ( int  reportStep,
double  sim_time,
const TransFunc updateTrans 
)

Run all pending actions.

Parameters
[in]reportStepZero-based report step index.
[in]sim_timeElapsed time since simulation start.
[in]updateTransCall-back for affecting transmissibility updates. Typically invoked if the action triggers a keyword like MULTZ.

◆ applySimulatorUpdate()

template<class Scalar >
void Opm::ActionHandler< Scalar >::applySimulatorUpdate ( int  report_step,
const SimulatorUpdate &  sim_update,
const TransFunc updateTrans,
bool &  commit_wellstate 
)

Convey dynamic updates triggered by an action block back to the running simulator.

This function is run after applyAction has been completed in the Schedule implementation. The sim_update argument should have members & flags for the simulator properties which need to be updated. This functionality is probably not complete.

Parameters
[in]report_stepZero-based report step index.
[in]sim_updateAction's resulting simulator update.
[in]updateTransCall-back for affecting transmissibility updates. Typically invoked if the action triggers a keyword like MULTZ.
[out]commit_wellstateWhether or not the action affected any simulation wells which, in turn, may require rebuilding internal data structures in the simulator and therefore would require preserving the dynamic well and group states prior to doing so.

◆ evalUDQAssignments()

template<class Scalar >
void Opm::ActionHandler< Scalar >::evalUDQAssignments ( const unsigned  episodeIdx,
UDQState &  udq_state 
)

Evaluates UDQ assign statements.

Parameters
[in]episodeIdxZero-based report step index.
[in,out]udq_stateDynamic state of all user-defined quantities.

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