Skip to content

Commit 542d3b7

Browse files
committed
fix tests
1 parent b8ed9e1 commit 542d3b7

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

pytential/source.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,11 @@ class PointPotentialSource(_SumpyP2PMixin, PotentialSource):
122122
def __init__(self, nodes, *,
123123
fmm_order: Optional[int] = False,
124124
fmm_level_to_order: Optional[Union[bool, Callable[..., int]]] = None,
125-
expansion_factory: Optional[DefaultExpansionFactory] \
125+
expansion_factory: Optional[DefaultExpansionFactory]
126126
= default_expansion_factory,
127127
tree_build_kwargs: Optional[Mapping] = None,
128128
trav_build_kwargs: Optional[Mapping] = None,
129-
setup_actx: Optional[ArrayContext] = None
130-
):
129+
setup_actx: Optional[ArrayContext] = None):
131130
"""
132131
:arg nodes: The point potential source given as a
133132
:class:`pyopencl.array.Array`
@@ -136,7 +135,8 @@ def __init__(self, nodes, *,
136135
If both arguments are not given a direct point-to-point calculation
137136
is used.
138137
:arg fmm_level_to_order: An optional callable that returns the FMM order
139-
to use for a given level. Mutually exclusive with *fmm_order* argument.
138+
to use for a given level. Mutually exclusive with *fmm_order*
139+
argument.
140140
:arg expansion_factory: An expansion factory to get the expansion objects
141141
when an FMM is used.
142142
:arg tree_build_kwargs: Keyword arguments to be passed when building the
@@ -222,7 +222,6 @@ def ambient_dim(self):
222222

223223
def op_group_features(self, expr):
224224
from pytential.utils import sort_arrays_together
225-
from sumpy.kernel import TargetTransformationRemover
226225
# since IntGs with the same source kernels and densities calculations
227226
# for P2E and E2E are the same and only differs in E2P depending on the
228227
# target kernel, we group all IntGs with same source kernels and densities.
@@ -262,11 +261,11 @@ def _get_tree(self, target_discr):
262261
@memoize_method
263262
def _get_exec_insn_func(self, source_kernels, target_kernels, target_discr):
264263
if self.fmm_level_to_order is False:
265-
sources = self._nodes
266-
targets = flatten(target_discr.nodes(), self._setup_actx, leaf_class=DOFArray)
267264
def exec_insn(actx, strengths, kernel_args, dtype, return_timing_data):
265+
sources = self._nodes
266+
targets = flatten(target_discr.nodes(), actx, leaf_class=DOFArray)
268267
p2p = self.get_p2p(actx, source_kernels=source_kernels,
269-
target_kernels=target_kernels)
268+
target_kernels=target_kernels)
270269

271270
evt, output = p2p(actx.queue,
272271
targets=targets,

0 commit comments

Comments
 (0)