diff --git a/python/dune/perftool/pdelab/driver/gridfunctionspace.py b/python/dune/perftool/pdelab/driver/gridfunctionspace.py index 66df4819c860583f35ea0b53c45826dc5758604a..bf20ff6695941280b39d5680a6ca087ca4e54da2 100644 --- a/python/dune/perftool/pdelab/driver/gridfunctionspace.py +++ b/python/dune/perftool/pdelab/driver/gridfunctionspace.py @@ -300,8 +300,9 @@ def define_gfs(element, is_dirichlet, name, root): @preamble def define_power_gfs(element, is_dirichlet, name, subgfs, root): gfstype = type_gfs(element, is_dirichlet, root=root) - return ["{} {}({});".format(gfstype, name, subgfs), - "{}.name(\"{}\");".format(name, name)] + names = ["using namespace Dune::Indices;"] + names = names + ["{0}.child(_{1}).name(\"{0}_{1}\");".format(name, i) for i in range(element.num_sub_elements())] + return ["{} {}({});".format(gfstype, name, subgfs)] + names @preamble