| 82 | void ExportPml(py::module &m); |
| 83 | |
| 84 | void ExportNgcompMesh (py::module &m) |
| 85 | { |
| 86 | py::module pml = m.def_submodule("pml", "module for perfectly matched layers"); |
| 87 | ExportPml(pml); |
| 88 | |
| 89 | |
| 90 | |
| 91 | py::enum_<VorB>(m, "VorB", "Enum specifying the codimension. VOL is volume, BND is boundary and BBND is codimension 2 (edges in 3D, points in 2D)") |
| 92 | .value("VOL", VOL) |
| 93 | .value("BND", BND) |
| 94 | .value("BBND", BBND) |
| 95 | .value("BBBND", BBBND) |
| 96 | .export_values() |
| 97 | .def("__call__", [](VorB vb, string name) { return RegionDescriptor{vb, name}; }) |
| 98 | ; |
| 99 | |
| 100 | py::class_<RegionDescriptor> (m, "RegionDescriptor") |
| 101 | .def(~py::self) |
| 102 | .def("__repr__", &ToString<RegionDescriptor>) |
| 103 | .def_property_readonly("vb", [](RegionDescriptor&rd) { return rd.vb; }) |
| 104 | .def_property_readonly("name", [](RegionDescriptor&rd) { return rd.name; }) |
| 105 | ; |
| 106 | |
| 107 | |
| 108 | py::class_<ElementId> (m, "ElementId", |
| 109 | docu_string(R"raw_string( |
| 110 | An element identifier containing element number and Volume/Boundary flag |
| 111 | |
| 112 | 3 __init__ overloads: |
| 113 | |
| 114 | 1) |
| 115 | |
| 116 | Parameters: |
| 117 | |
| 118 | vb : ngsolve.comp.VorB |
| 119 | input Volume or Boundary (VOL, BND, BBND, BBBND) |
| 120 | |
| 121 | nr : int |
| 122 | input element number |
| 123 | |
| 124 | |
| 125 | 2) |
| 126 | |
| 127 | Parameters: |
| 128 | |
| 129 | nr : int |
| 130 | input element number |
| 131 | |
| 132 | |
| 133 | 3) |
| 134 | |
| 135 | Parameters: |
| 136 | |
| 137 | el : ngcomp::Ngs_Element |
| 138 | input Ngs element |
| 139 | |
| 140 | )raw_string")) |
| 141 | .def(py::init<VorB,size_t>(), py::arg("vb"), py::arg("nr")) |
no test coverage detected