Skip to content
Snippets Groups Projects
Commit 4b684b7f authored by René Fritze's avatar René Fritze Committed by Tim Keil
Browse files

[py] emit bindings for all available_grid_types

closes #56
parent 88f54b8b
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@ status = 1a3bcab04b011a5d6e44f9983cae6ff89fa695e8 bin (heads/master)
07f9700459c616186737a9a34277f2edee76f475 dune-uggrid (v2.6.0-1-g07f97004)
+bf48b2929a26dc043925c41672570600b936f032 dune-xt-common (heads/fix_issue_149)
cad4071f7722374d5131c21244970e93c98ad6ba dune-xt-data (remotes/origin/HEAD)
+0bdb4e53bdc193530299611b01c35ed152b4cc8d dune-xt-functions (heads/update_license)
+88f54b8bf6e02817cc9ac082bfb1fcd54a3efd7e dune-xt-functions (heads/dailywork-tim)
08242248ae7d1e79018fc2e91e85bccdd453107a dune-xt-grid (remotes/origin/HEAD)
0c3b93e32d48b7b389db1c3572d567bff272190c dune-xt-la (remotes/origin/HEAD)
09d0378f616b94d68bcdd9fc6114813181849ec0 scripts (heads/master)
......@@ -93,7 +93,7 @@ commit = cad4071f7722374d5131c21244970e93c98ad6ba
[submodule.dune-xt-functions]
remote = https://github.com/dune-community/dune-xt-functions.git
status = c0b1735fab0ecbd4bb4f1eaa27cb65fe813e98f0 .vcsetup (remotes/origin/HEAD)
commit = 0bdb4e53bdc193530299611b01c35ed152b4cc8d
commit = 88f54b8bf6e02817cc9ac082bfb1fcd54a3efd7e
[submodule.dune-xt-grid]
remote = https://github.com/dune-community/dune-xt-grid.git
......
......@@ -12,4 +12,3 @@
#
# File for module specific CMake tests.
# ~~~
......@@ -31,6 +31,7 @@
#include <python/dune/xt/functions/indicator.hh>
#include <python/dune/xt/common/exceptions.bindings.hh>
#include <python/dune/xt/grid/available_types.hh>
template <class G>
void addbind_for_Grid(pybind11::module& m)
......@@ -59,6 +60,19 @@ void addbind_for_Grid(pybind11::module& m)
} // ... addbind_for_Grid(...)
template <class Tuple = Dune::XT::Grid::bindings::AvailableTypes>
void all_grids(pybind11::module& m)
{
addbind_for_Grid<typename Tuple::head_type>(m);
all_grids<typename Tuple::tail_type>(m);
} // ... addbind_for_Grid(...)
template <>
void all_grids<boost::tuples::null_type>(pybind11::module&)
{}
PYBIND11_MODULE(_functions, m)
{
namespace py = pybind11;
......@@ -135,17 +149,8 @@ PYBIND11_MODULE(_functions, m)
bind_ExpressionFunction<3, 2, 2>(m);
bind_ExpressionFunction<3, 3, 3>(m);
addbind_for_Grid<Dune::YaspGrid<1, Dune::EquidistantOffsetCoordinates<double, 1>>>(m);
addbind_for_Grid<Dune::YaspGrid<2, Dune::EquidistantOffsetCoordinates<double, 2>>>(m);
#if HAVE_DUNE_ALUGRID
addbind_for_Grid<Dune::ALUGrid<2, 2, Dune::simplex, Dune::conforming>>(m);
#endif
#if HAVE_UG
addbind_for_Grid<Dune::UGGrid<2>>(m);
#endif
//#if HAVE_ALBERTA
// addbind_for_Grid<Dune::AlbertaGrid<2, 2>>(m, "2d_simplex_albertagrid");
//#endif
all_grids(m);
Dune::XT::Common::bindings::add_initialization(m, "dune.xt.functions");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment