6#include <dune/common/bitsetvector.hh>
7#include <dune/python/pybind11/eigen.h>
8#include <dune/python/pybind11/functional.h>
9#include <dune/python/pybind11/pybind11.h>
10#include <dune/python/pybind11/stl.h>
15template <
class BoundaryPatch,
class... options>
17 using pybind11::operator
""_a;
19 using GridView =
typename BoundaryPatch::GridView;
21 cls.def(
pybind11::init([](
const GridView& gv, Eigen::Ref<Eigen::VectorX<bool>> vec) {
22 Dune::BitSetVector<1> bitSetVector;
23 bitSetVector.resize(vec.size());
24 for (
size_t i = 0; i < vec.size(); ++i)
25 bitSetVector[i] = vec[i];
26 return new BoundaryPatch(gv, bitSetVector);
28 pybind11::keep_alive<1, 2>(), pybind11::keep_alive<1, 3>());
30 cls.def(
"gridView", &BoundaryPatch::gridView);
void init(int argc, char **argv, bool enableFileLogger=true)
Initializes the Ikarus framework.
Definition: init.hh:82
Definition: flatassembler.hh:21
void registerBoundaryPatch(pybind11::handle scope, pybind11::class_< BoundaryPatch, options... > cls)
Definition: boundarypatch.hh:16