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