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

21 lines
481 B
C++
Raw Permalink Normal View History

#include <opm/input/eclipse/Schedule/Group/Group.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 {
const std::vector<std::string> wellnames( const Group& g ) {
2019-08-09 10:48:43 +02:00
return g.wells( );
2019-06-27 14:08:22 +02:00
}
}
void python::common::export_Group(py::module& module) {
2019-06-27 14:08:22 +02:00
py::class_< Group >( module, "Group")
.def_property_readonly( "name", &Group::name)
.def_property_readonly( "num_wells", &Group::numWells)
.def_property_readonly( "well_names", &wellnames );
2019-06-27 14:08:22 +02:00
}