Collects necessary output values and pass it to opm-output. More...

#include <EclWriter.hpp>

Inheritance diagram for Opm::EclWriter< TypeTag >:
Inheritance graph

Public Member Functions

 EclWriter (Simulator &simulator)
 
 ~EclWriter ()
 
const EquilGrid & globalGrid () const
 
void evalSummaryState (bool isSubStep)
 collect and pass data and pass it to eclIO writer More...
 
void writeInitialFIPReport ()
 Writes the initial FIP report as configured in RPTSOL. More...
 
void writeOutput (data::Solution &&localCellData, const SimulatorTimer &timer, bool isSubStep)
 
void beginRestart ()
 
void endRestart ()
 
const OutputBlackOilModule< TypeTag > & outputModule () const
 
OutputBlackOilModule< TypeTag > & mutableOutputModule () const
 
Scalar restartTimeStepSize () const
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 
const EclipseIO & eclIO () const
 
void writeInit (const std::function< unsigned int(unsigned int)> &map)
 
void setTransmissibilities (const TransmissibilityType *globalTrans)
 
void setSubStepReport (const SimulatorReportSingle &report)
 
void setSimulationReport (const SimulatorReport &report)
 
const std::vector< NNCdata > & getOutputNnc () const
 
const CollectDataOnIORankTypecollectOnIORank () const
 

Static Public Member Functions

static void registerParameters ()
 

Protected Member Functions

const TransmissibilityTypeglobalTrans () const
 
unsigned int gridEquilIdxToGridIdx (unsigned int elemIndex) const
 
void doWriteOutput (const int reportStepNum, const bool isSubStep, data::Solution &&localCellData, data::Wells &&localWellData, data::GroupAndNetworkValues &&localGroupAndNetworkData, data::Aquifers &&localAquiferData, WellTestState &&localWTestState, const Action::State &actionState, const UDQState &udqState, const SummaryState &summaryState, const std::vector< GetPropType< TypeTag, Properties::Scalar > > &thresholdPressure, GetPropType< TypeTag, Properties::Scalar > curTime, GetPropType< TypeTag, Properties::Scalar > nextStepSize, bool doublePrecision, bool isFlowsn, std::array< FlowsData< double >, 3 > &&flowsn, bool isFloresn, std::array< FlowsData< double >, 3 > &&floresn)
 
void evalSummary (int reportStepNum, GetPropType< TypeTag, Properties::Scalar > curTime, const data::Wells &localWellData, const data::WellBlockAveragePressures &localWBPData, const data::GroupAndNetworkValues &localGroupAndNetworkData, const std::map< int, data::AquiferData > &localAquiferData, const std::map< std::pair< std::string, int >, double > &blockData, const std::map< std::string, double > &miscSummaryData, const std::map< std::string, std::vector< double > > &regionData, const Inplace &inplace, const Inplace &initialInPlace, const InterRegFlowMap &interRegFlows, SummaryState &summaryState, UDQState &udqState)
 

Protected Attributes

CollectDataOnIORankType collectOnIORank_
 
const GetPropType< TypeTag, Properties::Grid > & grid_
 
const GetPropType< TypeTag, Properties::GridView > & gridView_
 
const Schedule & schedule_
 
const EclipseState & eclState_
 
std::unique_ptr< EclipseIO > eclIO_
 
std::unique_ptr< TaskletRunner > taskletRunner_
 
const TransmissibilityTypeglobalTrans_
 
const Dune::CartesianIndexMapper< GetPropType< TypeTag, Properties::Grid > > & cartMapper_
 
const Dune::CartesianIndexMapper< GetPropType< TypeTag, Properties::EquilGrid > > * equilCartMapper_
 
const GetPropType< TypeTag, Properties::EquilGrid > * equilGrid_
 
SimulatorReportSingle sub_step_report_
 
SimulatorReport simulation_report_
 
std::vector< NNCdata > outputNnc_
 

Detailed Description

template<class TypeTag>
class Opm::EclWriter< TypeTag >

Collects necessary output values and pass it to opm-output.

Caveats:

  • For this class to do do anything meaningful, you will have to have the OPM module opm-output.
  • The only DUNE grid which is currently supported is Dune::CpGrid from the OPM module "opm-grid". Using another grid won't fail at compile time but you will provoke a fatal exception as soon as you try to write an ECL output file.
  • This class requires to use the black oil model with the element centered finite volume discretization.

Constructor & Destructor Documentation

◆ EclWriter()

◆ ~EclWriter()

template<class TypeTag >
Opm::EclWriter< TypeTag >::~EclWriter ( )
inline

Member Function Documentation

◆ beginRestart()

◆ collectOnIORank()

const CollectDataOnIORankType & Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::collectOnIORank ( ) const
inlineinherited

◆ doWriteOutput()

void Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::doWriteOutput ( const int  reportStepNum,
const bool  isSubStep,
data::Solution &&  localCellData,
data::Wells &&  localWellData,
data::GroupAndNetworkValues &&  localGroupAndNetworkData,
data::Aquifers &&  localAquiferData,
WellTestState &&  localWTestState,
const Action::State &  actionState,
const UDQState &  udqState,
const SummaryState &  summaryState,
const std::vector< GetPropType< TypeTag, Properties::Scalar > > &  thresholdPressure,
GetPropType< TypeTag, Properties::Scalar >  curTime,
GetPropType< TypeTag, Properties::Scalar >  nextStepSize,
bool  doublePrecision,
bool  isFlowsn,
std::array< FlowsData< double >, 3 > &&  flowsn,
bool  isFloresn,
std::array< FlowsData< double >, 3 > &&  floresn 
)
protectedinherited

◆ eclIO()

const EclipseIO & Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::eclIO
inherited

◆ endRestart()

template<class TypeTag >
void Opm::EclWriter< TypeTag >::endRestart ( )
inline

◆ evalSummary()

void Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::evalSummary ( int  reportStepNum,
GetPropType< TypeTag, Properties::Scalar >  curTime,
const data::Wells &  localWellData,
const data::WellBlockAveragePressures &  localWBPData,
const data::GroupAndNetworkValues &  localGroupAndNetworkData,
const std::map< int, data::AquiferData > &  localAquiferData,
const std::map< std::pair< std::string, int >, double > &  blockData,
const std::map< std::string, double > &  miscSummaryData,
const std::map< std::string, std::vector< double > > &  regionData,
const Inplace &  inplace,
const Inplace &  initialInPlace,
const InterRegFlowMap interRegFlows,
SummaryState &  summaryState,
UDQState &  udqState 
)
protectedinherited

◆ evalSummaryState()

template<class TypeTag >
void Opm::EclWriter< TypeTag >::evalSummaryState ( bool  isSubStep)
inline

collect and pass data and pass it to eclIO writer

References Opm::CollectDataOnIORank< Grid, EquilGrid, GridView >::collect(), Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid >, GetPropType< TypeTag, Properties::EquilGrid >, GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::ElementMapper >, GetPropType< TypeTag, Properties::Scalar > >::collectOnIORank_, Opm::InterRegFlowMap::compress(), Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid >, GetPropType< TypeTag, Properties::EquilGrid >, GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::ElementMapper >, GetPropType< TypeTag, Properties::Scalar > >::evalSummary(), Opm::EclWriter< TypeTag >::evalSummaryState(), Opm::CollectDataOnIORank< Grid, EquilGrid, GridView >::globalBlockData(), Opm::CollectDataOnIORank< Grid, EquilGrid, GridView >::globalInterRegFlows(), Opm::CollectDataOnIORank< Grid, EquilGrid, GridView >::isIORank(), Opm::CollectDataOnIORank< Grid, EquilGrid, GridView >::isParallel(), Opm::SimulatorReportSingle::max_linear_iterations, Opm::SimulatorReportSingle::min_linear_iterations, OPM_BEGIN_PARALLEL_TRY_CATCH, OPM_END_PARALLEL_TRY_CATCH, Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid >, GetPropType< TypeTag, Properties::EquilGrid >, GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::ElementMapper >, GetPropType< TypeTag, Properties::Scalar > >::simulation_report_, Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid >, GetPropType< TypeTag, Properties::EquilGrid >, GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::ElementMapper >, GetPropType< TypeTag, Properties::Scalar > >::sub_step_report_, Opm::SimulatorReport::success, Opm::SimulatorReportSingle::total_linear_iterations, and Opm::SimulatorReportSingle::total_newton_iterations.

Referenced by Opm::EclWriter< TypeTag >::evalSummaryState().

◆ getOutputNnc()

const std::vector< NNCdata > & Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::getOutputNnc ( ) const
inlineinherited

◆ globalGrid()

template<class TypeTag >
const EquilGrid & Opm::EclWriter< TypeTag >::globalGrid ( ) const
inline

◆ globalTrans()

const EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::TransmissibilityType & Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::globalTrans
protectedinherited

◆ gridEquilIdxToGridIdx()

unsigned int Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::gridEquilIdxToGridIdx ( unsigned int  elemIndex) const
protectedinherited

◆ mutableOutputModule()

template<class TypeTag >
OutputBlackOilModule< TypeTag > & Opm::EclWriter< TypeTag >::mutableOutputModule ( ) const
inline

◆ outputModule()

template<class TypeTag >
const OutputBlackOilModule< TypeTag > & Opm::EclWriter< TypeTag >::outputModule ( ) const
inline

◆ registerParameters()

template<class TypeTag >
static void Opm::EclWriter< TypeTag >::registerParameters ( )
inlinestatic

◆ restartTimeStepSize()

template<class TypeTag >
Scalar Opm::EclWriter< TypeTag >::restartTimeStepSize ( ) const
inline

◆ serializeOp()

template<class TypeTag >
template<class Serializer >
void Opm::EclWriter< TypeTag >::serializeOp ( Serializer &  serializer)
inline

◆ setSimulationReport()

void Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::setSimulationReport ( const SimulatorReport report)
inlineinherited

◆ setSubStepReport()

void Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::setSubStepReport ( const SimulatorReportSingle report)
inlineinherited

◆ setTransmissibilities()

void Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::setTransmissibilities ( const TransmissibilityType globalTrans)
inlineinherited

◆ writeInit()

void Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::writeInit ( const std::function< unsigned int(unsigned int)> &  map)
inherited

◆ writeInitialFIPReport()

◆ writeOutput()

Member Data Documentation

◆ cartMapper_

const Dune::CartesianIndexMapper<GetPropType< TypeTag, Properties::Grid > >& Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::cartMapper_
protectedinherited

◆ collectOnIORank_

CollectDataOnIORankType Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::collectOnIORank_
protectedinherited

◆ eclIO_

std::unique_ptr<EclipseIO> Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::eclIO_
protectedinherited

◆ eclState_

const EclipseState& Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::eclState_
protectedinherited

◆ equilCartMapper_

const Dune::CartesianIndexMapper<GetPropType< TypeTag, Properties::EquilGrid > >* Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::equilCartMapper_
protectedinherited

◆ equilGrid_

const GetPropType< TypeTag, Properties::EquilGrid > * Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::equilGrid_
protectedinherited

◆ globalTrans_

const TransmissibilityType* Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::globalTrans_
protectedinherited

◆ grid_

const GetPropType< TypeTag, Properties::Grid > & Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::grid_
protectedinherited

◆ gridView_

const GetPropType< TypeTag, Properties::GridView > & Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::gridView_
protectedinherited

◆ outputNnc_

std::vector<NNCdata> Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::outputNnc_
mutableprotectedinherited

◆ schedule_

const Schedule& Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::schedule_
protectedinherited

◆ simulation_report_

SimulatorReport Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::simulation_report_
protectedinherited

◆ sub_step_report_

SimulatorReportSingle Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::sub_step_report_
protectedinherited

◆ taskletRunner_

std::unique_ptr<TaskletRunner> Opm::EclGenericWriter< GetPropType< TypeTag, Properties::Grid > , GetPropType< TypeTag, Properties::EquilGrid > , GetPropType< TypeTag, Properties::GridView > , GetPropType< TypeTag, Properties::ElementMapper > , GetPropType< TypeTag, Properties::Scalar > >::taskletRunner_
protectedinherited

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