Files
opm-common/sunbeam/eclipse_config.cpp
Jens Gåsemyr Magnus 11fe32df4f Add support for dynamic parser extensions
Sunbeam can now be used to parse eclipse files to deck representations.
Added support for dynamic parser extensions which can be used to handle
unsupported eclipse keywords when parsing to deck representations.

Fixed missing function declarations
2017-09-05 13:24:06 +02:00

55 lines
2.1 KiB
C++

#include <boost/python.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 "eclipse_config.hpp"
namespace py = boost::python;
using namespace Opm;
using ref = py::return_internal_reference<>;
using copy = py::return_value_policy< py::copy_const_reference >;
namespace eclipse_config {
void export_EclipseConfig()
{
py::class_< EclipseConfig >( "EclipseConfig", py::no_init )
.def( "summary", &EclipseConfig::summary, ref())
.def( "init", &EclipseConfig::init, ref())
.def( "restart", &EclipseConfig::restart, ref())
.def( "simulation", &EclipseConfig::simulation, ref())
;
py::class_< SummaryConfig >( "SummaryConfig", py::no_init )
.def( "__contains__", &SummaryConfig::hasKeyword )
;
py::class_< InitConfig >( "InitConfig", py::no_init )
.def( "hasEquil", &InitConfig::hasEquil )
.def( "restartRequested", &InitConfig::restartRequested )
.def( "getRestartStep" , &InitConfig::getRestartStep )
;
py::class_< RestartConfig >( "RestartConfig", py::no_init )
.def( "getKeyword", &RestartConfig::getKeyword )
.def( "getFirstRestartStep", &RestartConfig::getFirstRestartStep )
.def( "getWriteRestartFile", &RestartConfig::getWriteRestartFile )
;
py::class_< SimulationConfig >( "SimulationConfig", py::no_init )
.def("hasThresholdPressure", &SimulationConfig::hasThresholdPressure )
.def("useCPR", &SimulationConfig::useCPR )
.def("hasDISGAS", &SimulationConfig::hasDISGAS )
.def("hasVAPOIL", &SimulationConfig::hasVAPOIL )
;
}
}