Skip to content

Commit 5495e90

Browse files
committed
avoid duplicate register error
1 parent 448811a commit 5495e90

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/bindings.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ template <typename Number>
2020
void bind_vector(pybind11::module& module) {
2121
typedef dealii::Vector<Number> Vector;
2222
typedef typename Vector::size_type size_type;
23-
py::class_<Vector>(module, "Vector")
23+
py::class_<Vector>(module, "Vector", py::buffer_protocol())
2424
.def(py::init<>())
2525
.def(py::init<const Vector&>())
2626
.def(py::init<const size_type>())

lib/py_elasticity.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
namespace py = pybind11;
1818

1919
PYBIND11_MODULE(dealii_elasticity, m) {
20+
py::module::import("pymor_dealii_bindings");
2021

2122
m.doc() = "deal.II elasticity example";
2223

0 commit comments

Comments
 (0)