diff --git a/python/dune/perftool/blockstructured/accumulation.py b/python/dune/perftool/blockstructured/accumulation.py deleted file mode 100644 index 30629bc56b4a8412249eb4f5e0542cb95d54d2aa..0000000000000000000000000000000000000000 --- a/python/dune/perftool/blockstructured/accumulation.py +++ /dev/null @@ -1,17 +0,0 @@ -from dune.perftool.pdelab.localoperator import (AccumulationSpace) -from dune.perftool.blockstructured.tools import micro_index_to_macro_index - - -class BlockstructuredAccumulationSpace(AccumulationSpace): - def __init__(self, - lfs=None, - index=None, - restriction=None, - element=None, - ): - AccumulationSpace.__init__(self, - lfs=lfs, - index=micro_index_to_macro_index(index), - restriction=restriction, - element=element, - ) \ No newline at end of file diff --git a/python/dune/perftool/pdelab/localoperator.py b/python/dune/perftool/pdelab/localoperator.py index 20110f207eed1c1105dde9c2a0588178ac8f203b..dfc8e5d2f0d19560a6830609385ec823f2d4bef3 100644 --- a/python/dune/perftool/pdelab/localoperator.py +++ b/python/dune/perftool/pdelab/localoperator.py @@ -185,6 +185,7 @@ def class_type_from_cache(classtag): return basename, basename + tparam_str +@backend(interface="AccumulationSpace") class AccumulationSpace(Record): def __init__(self, lfs=None, @@ -245,23 +246,19 @@ def determine_accumulation_space(expr, number, measure, idims=None): iname, = get_backend("lfs_inames", selector=option_switch("blockstructured"))(subel, ma.restriction, count=number) lfsi = Variable(iname) + if get_option("blockstructured"): + from dune.perftool.blockstructured.tools import micro_index_to_macro_index + lfsi =micro_index_to_macro_index(lfsi) # If the LFS is not yet a pymbolic expression, make it one from pymbolic.primitives import Expression if not isinstance(lfs, Expression): lfs = Variable(lfs) - if get_option("blockstructured"): - from dune.perftool.blockstructured.accumulation import BlockstructuredAccumulationSpace - return BlockstructuredAccumulationSpace(lfs=lfs, - index=lfsi, - restriction=ma.restriction, - ) - else: - return AccumulationSpace(lfs=lfs, - index=lfsi, - restriction=ma.restriction, - ) + return AccumulationSpace(lfs=lfs, + index=lfsi, + restriction=ma.restriction, + ) def boundary_predicates(expr, measure, subdomain_id, visitor):