Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
isuruf committed May 29, 2023
1 parent b8ed9e1 commit dd379d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions pytential/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,11 @@ class PointPotentialSource(_SumpyP2PMixin, PotentialSource):
def __init__(self, nodes, *,
fmm_order: Optional[int] = False,
fmm_level_to_order: Optional[Union[bool, Callable[..., int]]] = None,
expansion_factory: Optional[DefaultExpansionFactory] \
expansion_factory: Optional[DefaultExpansionFactory]
= default_expansion_factory,
tree_build_kwargs: Optional[Mapping] = None,
trav_build_kwargs: Optional[Mapping] = None,
setup_actx: Optional[ArrayContext] = None
):
setup_actx: Optional[ArrayContext] = None):
"""
:arg nodes: The point potential source given as a
:class:`pyopencl.array.Array`
Expand All @@ -136,7 +135,8 @@ def __init__(self, nodes, *,
If both arguments are not given a direct point-to-point calculation
is used.
:arg fmm_level_to_order: An optional callable that returns the FMM order
to use for a given level. Mutually exclusive with *fmm_order* argument.
to use for a given level. Mutually exclusive with *fmm_order*
argument.
:arg expansion_factory: An expansion factory to get the expansion objects
when an FMM is used.
:arg tree_build_kwargs: Keyword arguments to be passed when building the
Expand Down Expand Up @@ -262,11 +262,11 @@ def _get_tree(self, target_discr):
@memoize_method
def _get_exec_insn_func(self, source_kernels, target_kernels, target_discr):
if self.fmm_level_to_order is False:
sources = self._nodes
targets = flatten(target_discr.nodes(), self._setup_actx, leaf_class=DOFArray)
def exec_insn(actx, strengths, kernel_args, dtype, return_timing_data):
sources = self._nodes
targets = flatten(target_discr.nodes(), actx, leaf_class=DOFArray)
p2p = self.get_p2p(actx, source_kernels=source_kernels,
target_kernels=target_kernels)
target_kernels=target_kernels)

evt, output = p2p(actx.queue,
targets=targets,
Expand Down
2 changes: 1 addition & 1 deletion test/test_scalar_int_eq.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def run_int_eq_test(actx,
# Sample test run:
# 'test_integral_equation(cl._csc, EllipseIntEqTestCase(LaplaceKernel, "dirichlet", +1), visualize=True)' # noqa: E501

@pytest.mark.parametrize("case", cases)
@pytest.mark.parametrize("case", (cases[0],))
def test_integral_equation(actx_factory, case, visualize=False):
logging.basicConfig(level=logging.INFO)

Expand Down

0 comments on commit dd379d7

Please sign in to comment.