Files
opm-common/python/cxx/group.cpp

25 lines
565 B
C++
Raw Normal View History

2019-08-09 10:48:43 +02:00
#include <opm/parser/eclipse/EclipseState/Schedule/Group/Group2.hpp>
2019-06-27 14:08:22 +02:00
#include <pybind11/stl.h>
#include "common.hpp"
2019-06-27 14:08:22 +02:00
namespace {
2019-08-09 10:48:43 +02:00
const std::vector<std::string> wellnames( const Group2& g ) {
return g.wells( );
2019-06-27 14:08:22 +02:00
}
2019-08-09 10:48:43 +02:00
int get_vfp_table_nr( const Group2& g ) {
return g.getGroupNetVFPTable();
2019-06-27 14:08:22 +02:00
}
}
2019-08-15 11:35:28 +02:00
void opmcommon_python::export_Group(py::module& module) {
2019-06-27 14:08:22 +02:00
2019-08-09 10:48:43 +02:00
py::class_< Group2 >( module, "Group")
.def_property_readonly( "name", &Group2::name)
2019-06-27 14:08:22 +02:00
.def( "_vfp_table_nr", &get_vfp_table_nr )
.def( "_wellnames", &wellnames );
}