diff --git a/python/dune/xt/grid/boundaryinfo.bindings.hh b/python/dune/xt/grid/boundaryinfo.bindings.hh index 63d3841ffa010cbb5d1672aae526efa3336e3fec..9c2b173f674346fdc80388eb862459f7eb937a9c 100644 --- a/python/dune/xt/grid/boundaryinfo.bindings.hh +++ b/python/dune/xt/grid/boundaryinfo.bindings.hh @@ -45,22 +45,30 @@ public: const auto gridname = XT::Grid::bindings::grid_name<typename GP::GridType>::value(); try { // guard since we might not be the first to do so for this grid/intersection - std::string postfix{layer_names[layer] + "_layer_" + gridname}; - m.def((std::string("available_boundary_infos_on_") + postfix).c_str(), + m.def("available_boundary_infos", [](const GP& /*grid_provider*/) { return XT::Grid::BoundaryInfoFactory<I>::available(); }, "grid_provider"_a); - m.def((std::string("default_boundary_info_config_on_") + postfix).c_str(), + m.def("default_boundary_info_config_on_", [](const GP& /*grid_provider*/, const std::string& type) { return XT::Grid::BoundaryInfoFactory<I>::default_config(type); }, "grid_provider"_a, "type"_a); - m.def((std::string("make_boundary_info_on_") + postfix).c_str(), + m.def("make_boundary_info_on_", [](const GP& /*grid_provider*/, const Common::Configuration& cfg) { return XT::Grid::BoundaryInfoFactory<I>::create(cfg).release(); }, "grid_provider"_a, "cfg"_a); + std::string postfix{layer_names[layer] + "_layer_" + gridname}; + m.def((std::string("available_boundary_infos_on_") + postfix).c_str(), + []() { return XT::Grid::BoundaryInfoFactory<I>::available(); }); + m.def((std::string("default_boundary_info_config_on_") + postfix).c_str(), + [](const std::string& type) { return XT::Grid::BoundaryInfoFactory<I>::default_config(type); }, + "type"_a); + m.def((std::string("make_boundary_info_on_") + postfix).c_str(), + [](const Common::Configuration& cfg) { return XT::Grid::BoundaryInfoFactory<I>::create(cfg).release(); }, + "cfg"_a); } catch (std::runtime_error&) { } } // ... bind(...)