2017-11-06 15:04:35 +01:00
|
|
|
#include <vector> // workaround for missing import in opm-parser/Equil.hpp
|
2017-08-31 13:49:09 +02:00
|
|
|
#include <opm/parser/eclipse/EclipseState/EclipseConfig.hpp>
|
2017-08-31 13:49:09 +02:00
|
|
|
#include <opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp>
|
|
|
|
|
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
|
2017-08-31 13:49:09 +02:00
|
|
|
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
|
|
|
|
#include <opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.hpp>
|
|
|
|
|
|
2019-08-15 11:19:18 +02:00
|
|
|
#include "common.hpp"
|
2017-09-07 14:38:31 +02:00
|
|
|
|
|
|
|
|
|
2019-09-13 09:22:49 +02:00
|
|
|
void python::common::export_EclipseConfig(py::module& module)
|
2017-09-07 14:38:31 +02:00
|
|
|
{
|
2018-01-30 07:46:03 +01:00
|
|
|
py::class_< EclipseConfig >( module, "EclipseConfig" )
|
|
|
|
|
.def( "init", &EclipseConfig::init, ref_internal)
|
|
|
|
|
.def( "restart", &EclipseConfig::restart, ref_internal);
|
2017-09-07 14:38:31 +02:00
|
|
|
|
2018-01-30 07:46:03 +01:00
|
|
|
py::class_< SummaryConfig >( module, "SummaryConfig")
|
|
|
|
|
.def( "__contains__", &SummaryConfig::hasKeyword );
|
2017-09-07 14:38:31 +02:00
|
|
|
|
2018-01-30 07:46:03 +01:00
|
|
|
py::class_< InitConfig >( module, "InitConfig")
|
2017-09-07 14:38:31 +02:00
|
|
|
.def( "hasEquil", &InitConfig::hasEquil )
|
|
|
|
|
.def( "restartRequested", &InitConfig::restartRequested )
|
2018-01-30 07:46:03 +01:00
|
|
|
.def( "getRestartStep" , &InitConfig::getRestartStep );
|
2017-09-07 14:38:31 +02:00
|
|
|
|
2018-01-30 07:46:03 +01:00
|
|
|
py::class_< RestartConfig >( module, "RestartConfig")
|
2017-09-07 14:38:31 +02:00
|
|
|
.def( "getKeyword", &RestartConfig::getKeyword )
|
|
|
|
|
.def( "getFirstRestartStep", &RestartConfig::getFirstRestartStep )
|
2019-01-22 11:49:08 +01:00
|
|
|
.def( "getWriteRestartFile", &RestartConfig::getWriteRestartFile, py::arg("reportStep"), py::arg("log") = true);
|
2017-09-07 14:38:31 +02:00
|
|
|
|
2018-01-30 07:46:03 +01:00
|
|
|
py::class_< SimulationConfig >( module, "SimulationConfig")
|
2018-07-09 16:54:15 +02:00
|
|
|
.def("hasThresholdPressure", &SimulationConfig::useThresholdPressure )
|
2017-09-07 14:38:31 +02:00
|
|
|
.def("useCPR", &SimulationConfig::useCPR )
|
|
|
|
|
.def("hasDISGAS", &SimulationConfig::hasDISGAS )
|
2018-01-30 07:46:03 +01:00
|
|
|
.def("hasVAPOIL", &SimulationConfig::hasVAPOIL );
|
2017-08-31 13:49:09 +02:00
|
|
|
}
|