python connection. added property pos. removed shedule.py. test_connection.py passed. test_wells.py: test_completion passes. removed opm.io.config. renamed test_state2.py -> test_state.py.
44 lines
2.1 KiB
C++
44 lines
2.1 KiB
C++
#include <vector> // workaround for missing import in opm-parser/Equil.hpp
|
|
#include <opm/parser/eclipse/EclipseState/EclipseConfig.hpp>
|
|
#include <opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp>
|
|
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
|
|
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
|
#include <opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.hpp>
|
|
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
|
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
|
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
|
|
|
|
|
#include "export.hpp"
|
|
|
|
|
|
void python::common::export_EclipseConfig(py::module& module)
|
|
{
|
|
py::class_< EclipseConfig >( module, "EclipseConfig" )
|
|
.def( "init", &EclipseConfig::init, ref_internal)
|
|
.def( "restart", &EclipseConfig::restart, ref_internal);
|
|
|
|
py::class_< SummaryConfig >( module, "SummaryConfig")
|
|
.def(py::init([](const Deck& deck, const EclipseState& state, const Schedule& schedule) {
|
|
return SummaryConfig( deck, schedule, state.getTableManager() );
|
|
} ) )
|
|
|
|
.def( "__contains__", &SummaryConfig::hasKeyword );
|
|
|
|
py::class_< InitConfig >( module, "InitConfig")
|
|
.def( "hasEquil", &InitConfig::hasEquil )
|
|
.def( "restartRequested", &InitConfig::restartRequested )
|
|
.def( "getRestartStep" , &InitConfig::getRestartStep );
|
|
|
|
py::class_< RestartConfig >( module, "RestartConfig")
|
|
.def( "getKeyword", &RestartConfig::getKeyword )
|
|
.def( "getFirstRestartStep", &RestartConfig::getFirstRestartStep )
|
|
.def( "getWriteRestartFile", &RestartConfig::getWriteRestartFile, py::arg("reportStep"), py::arg("log") = true);
|
|
|
|
py::class_< SimulationConfig >( module, "SimulationConfig")
|
|
.def("hasThresholdPressure", &SimulationConfig::useThresholdPressure )
|
|
.def("useCPR", &SimulationConfig::useCPR )
|
|
.def("hasDISGAS", &SimulationConfig::hasDISGAS )
|
|
.def("hasVAPOIL", &SimulationConfig::hasVAPOIL );
|
|
}
|