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

26 lines
646 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 "export.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
}
}
void python::common::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)
.def_property_readonly( "num_wells", &Group2::numWells)
2019-06-27 14:08:22 +02:00
.def( "_vfp_table_nr", &get_vfp_table_nr )
.def_property_readonly( "well_names", &wellnames );
2019-06-27 14:08:22 +02:00
}