Files
opm-common/python/cxx/group.cpp
Steinar Foss 0bc150794d python: Schedule bound directly by pybind11.
python: exposes Schedule.

python: added constructor for Schedule.

test_schedule: reintroduced most tests.

python test_schedule: all test works.

python test_wells. opened up some tests.

test_wells: opened up most.

test_wells.py ok.
2019-09-21 11:53:29 +02:00

26 lines
646 B
C++

#include <opm/parser/eclipse/EclipseState/Schedule/Group/Group2.hpp>
#include <pybind11/stl.h>
#include "export.hpp"
namespace {
const std::vector<std::string> wellnames( const Group2& g ) {
return g.wells( );
}
int get_vfp_table_nr( const Group2& g ) {
return g.getGroupNetVFPTable();
}
}
void python::common::export_Group(py::module& module) {
py::class_< Group2 >( module, "Group")
.def_property_readonly( "name", &Group2::name)
.def_property_readonly( "num_wells", &Group2::numWells)
.def( "_vfp_table_nr", &get_vfp_table_nr )
.def_property_readonly( "well_names", &wellnames );
}