File: group.cpp

package info (click to toggle)
opm-common 2022.10%2Bds-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 78,468 kB
  • sloc: cpp: 164,554; python: 2,872; sh: 216; xml: 174; ansic: 149; pascal: 136; makefile: 12
file content (25 lines) | stat: -rw-r--r-- 626 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <opm/input/eclipse/Schedule/Group/Group.hpp>
#include <pybind11/stl.h>
#include "export.hpp"


namespace {

  const std::vector<std::string> wellnames( const Group& g ) {
        return g.wells( );
    }

     int get_vfp_table_nr( const Group& g ) {
        return g.getGroupNetVFPTable();
    }
}

void python::common::export_Group(py::module& module) {

  py::class_< Group >( module, "Group")
    .def_property_readonly( "name", &Group::name)
    .def_property_readonly( "num_wells", &Group::numWells)     
    .def( "_vfp_table_nr", &get_vfp_table_nr )
    .def_property_readonly( "well_names", &wellnames );

}