python connection: exposed directly via pybind11.
python connection. added property pos. removed shedule.py. test_connection.py passed. test_wells.py: test_completion passes. removed opm.io.config. renamed test_state2.py -> test_state.py.
This commit is contained in:
@@ -12,6 +12,10 @@ std::string direction( const Connection& c ) {
|
||||
return Connection::Direction2String( c.dir() );
|
||||
}
|
||||
|
||||
std::tuple<int, int, int> get_pos( const Connection& conn ) {
|
||||
return std::make_tuple(conn.getI(), conn.getJ(), conn.getK());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -20,9 +24,10 @@ void python::common::export_Connection(py::module& module) {
|
||||
py::class_< Connection >( module, "Connection")
|
||||
.def_property_readonly("direction", &direction )
|
||||
.def_property_readonly("state", &state )
|
||||
.def_property_readonly( "I", &Connection::getI )
|
||||
.def_property_readonly( "J", &Connection::getJ )
|
||||
.def_property_readonly( "K", &Connection::getK )
|
||||
.def_property_readonly( "i", &Connection::getI )
|
||||
.def_property_readonly( "j", &Connection::getJ )
|
||||
.def_property_readonly( "j", &Connection::getK )
|
||||
.def_property_readonly( "pos", &get_pos )
|
||||
.def_property_readonly( "attached_to_segment", &Connection::attachedToSegment )
|
||||
.def_property_readonly( "center_depth", &Connection::depth)
|
||||
.def_property_readonly( "rw", &Connection::rw)
|
||||
@@ -30,7 +35,7 @@ void python::common::export_Connection(py::module& module) {
|
||||
.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)
|
||||
.def_property_readonly( "CF", &Connection::CF)
|
||||
.def_property_readonly( "Kh", &Connection::Kh)
|
||||
.def_property_readonly( "cf", &Connection::CF)
|
||||
.def_property_readonly( "kh", &Connection::Kh)
|
||||
.def_property_readonly( "well_pi", &Connection::wellPi );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user