Skip to content
Snippets Groups Projects
Commit fce3dd52 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[P|functions.gridfunction] expose dim_domain and dim_range

parent ba78f04a
No related branches found
No related tags found
3 merge requests!41Fix compilation with icc, several other changes,!39Make functions copyable,!35dailywork-ftschindler
Pipeline #63665 failed
...@@ -340,6 +340,11 @@ bind_GridFunctionInterface(pybind11::module& m, const std::string& grid_id) ...@@ -340,6 +340,11 @@ bind_GridFunctionInterface(pybind11::module& m, const std::string& grid_id)
std::string("GridFunctionInterface__" + grid_id + "_to_" + Common::to_string(r) + "x" + Common::to_string(rC)) std::string("GridFunctionInterface__" + grid_id + "_to_" + Common::to_string(r) + "x" + Common::to_string(rC))
.c_str()); .c_str());
c.def_property_readonly("dim_domain", [](const C& /*self*/) { return size_t(G::dimension); });
if (rC == 1)
c.def_property_readonly("dim_range", [](const C& /*self*/) { return size_t(r); });
else
c.def_property_readonly("dim_range", [](const C& /*self*/) { return std::make_pair(size_t(r), size_t(rC)); });
c.def_property_readonly("static_id", [](const C& /*self*/) { return C::static_id(); }); c.def_property_readonly("static_id", [](const C& /*self*/) { return C::static_id(); });
c.def_property_readonly("name", [](const C& self) { return self.name(); }); c.def_property_readonly("name", [](const C& self) { return self.name(); });
......
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