File: group.cpp

package info (click to toggle)
opm-common 2025.10%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 96,952 kB
  • sloc: cpp: 291,772; python: 3,609; sh: 198; xml: 174; pascal: 136; makefile: 12
file content (23 lines) | stat: -rw-r--r-- 668 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <opm/input/eclipse/Schedule/Group/Group.hpp>
#include <pybind11/stl.h>
#include "export.hpp"

#include <python/cxx/OpmCommonPythonDoc.hpp>

namespace {

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

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

  using namespace Opm::Common::DocStrings;

  py::class_< Group >( module, "Group", GroupClass_docstring)
    .def_property_readonly( "name", &Group::name, Group_name_docstring)
    .def_property_readonly( "num_wells", &Group::numWells, Group_num_wells_docstring)
    .def_property_readonly( "well_names", &wellnames, Group_well_names_docstring);

}