2019-06-19 11:41:37 +02:00
|
|
|
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Connection.hpp>
|
2018-07-09 16:54:15 +02:00
|
|
|
|
2019-09-13 09:40:13 +02:00
|
|
|
#include "export.hpp"
|
2018-07-09 16:54:15 +02:00
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
|
|
std::string state( const Connection& c ) {
|
2019-08-27 23:14:32 +02:00
|
|
|
return Connection::State2String( c.state() );
|
2018-07-09 16:54:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::string direction( const Connection& c ) {
|
2019-08-28 07:06:58 +02:00
|
|
|
return Connection::Direction2String( c.dir() );
|
2018-07-09 16:54:15 +02:00
|
|
|
}
|
|
|
|
|
|
2019-10-09 16:25:08 +02:00
|
|
|
std::tuple<int, int, int> get_pos( const Connection& conn ) {
|
|
|
|
|
return std::make_tuple(conn.getI(), conn.getJ(), conn.getK());
|
|
|
|
|
}
|
|
|
|
|
|
2018-07-09 16:54:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2019-09-13 09:22:49 +02:00
|
|
|
void python::common::export_Connection(py::module& module) {
|
2018-07-09 16:54:15 +02:00
|
|
|
|
|
|
|
|
py::class_< Connection >( module, "Connection")
|
|
|
|
|
.def_property_readonly("direction", &direction )
|
|
|
|
|
.def_property_readonly("state", &state )
|
2019-10-09 16:25:08 +02:00
|
|
|
.def_property_readonly( "i", &Connection::getI )
|
|
|
|
|
.def_property_readonly( "j", &Connection::getJ )
|
|
|
|
|
.def_property_readonly( "j", &Connection::getK )
|
|
|
|
|
.def_property_readonly( "pos", &get_pos )
|
2018-07-09 16:54:15 +02:00
|
|
|
.def_property_readonly( "attached_to_segment", &Connection::attachedToSegment )
|
2018-09-17 21:34:39 +02:00
|
|
|
.def_property_readonly( "center_depth", &Connection::depth)
|
|
|
|
|
.def_property_readonly( "rw", &Connection::rw)
|
|
|
|
|
.def_property_readonly( "complnum", &Connection::complnum)
|
|
|
|
|
.def_property_readonly( "number", &Connection::complnum) // This is deprecated; complnum is the "correct" proeprty name
|
|
|
|
|
.def_property_readonly( "sat_table_id", &Connection::satTableId)
|
|
|
|
|
.def_property_readonly( "segment_number", &Connection::segment)
|
2019-10-09 16:25:08 +02:00
|
|
|
.def_property_readonly( "cf", &Connection::CF)
|
|
|
|
|
.def_property_readonly( "kh", &Connection::Kh)
|
2018-09-17 21:34:39 +02:00
|
|
|
.def_property_readonly( "well_pi", &Connection::wellPi );
|
2018-07-09 16:54:15 +02:00
|
|
|
}
|