2424import numpy .linalg as la
2525from abc import ABC , abstractmethod
2626
27- from typing import Sequence , Optional , List , Tuple
27+ from typing import Generic , Sequence , Optional , List , Tuple
2828from pytools import memoize_method
2929
3030import loopy as lp
3333 DiscretizationElementAxisTag , DiscretizationDOFAxisTag )
3434from pytools import memoize_in , keyed_memoize_method
3535from arraycontext import (
36- ArrayContext , NotAnArrayContainerError ,
36+ ArrayContext , ArrayT , ArrayOrContainerT , NotAnArrayContainerError ,
3737 serialize_container , deserialize_container , make_loopy_program ,
3838 tag_axes
3939 )
4040from arraycontext .metadata import NameHint
41- from arraycontext .container import ArrayT , ArrayOrContainerT
4241
4342from meshmode .discretization import Discretization , ElementGroupBase
4443from meshmode .dof_array import DOFArray
@@ -54,7 +53,7 @@ def _reshape_and_preserve_tags(
5453# {{{ interpolation batch
5554
5655@dataclass
57- class InterpolationBatch :
56+ class InterpolationBatch ( Generic [ ArrayT ]) :
5857 """One interpolation batch captures how a batch of elements *within* an
5958 element group should be an interpolated. Note that while it's possible that
6059 an interpolation batch takes care of interpolating an entire element group
@@ -178,7 +177,7 @@ def _global_from_element_indices(
178177# {{{ _FromGroupPickData
179178
180179@dataclass
181- class _FromGroupPickData :
180+ class _FromGroupPickData ( Generic [ ArrayT ]) :
182181 """Represents information needed to pick DOFs from one source element
183182 group to a target element group. Note that the connection between these
184183 groups must be such that the information transfer can occur by indirect
0 commit comments