Skip to content

Commit 53b6fc3

Browse files
committed
Fix jump and target derivative tests
1 parent a57eb87 commit 53b6fc3

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

sumpy/test/test_kernels.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,13 +902,13 @@ def test_jump(
902902
dlp_knl = DirectionalSourceDerivative(kernel)
903903

904904
from sumpy.qbx import LayerPotential
905-
lpot = LayerPotential(actx.context,
905+
lpot = LayerPotential(
906906
expansion=LineTaylorLocalExpansion(kernel, order=order),
907907
source_kernels=(dlp_knl,),
908908
target_kernels=(kernel,),
909909
value_dtypes=np.complex128,)
910910

911-
_evt, (y,) = lpot(actx.queue,
911+
y, = lpot(actx,
912912
actx.from_numpy(targets),
913913
actx.from_numpy(geo.nodes),
914914
actx.from_numpy(centers),

sumpy/test/test_target_deriv.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,11 @@ def test_lpot_dx_jump_relation_convergence(
7575
from sumpy.qbx import LayerPotential
7676
expansion = LineTaylorLocalExpansion(knl, qbx_order)
7777
lplot_dx = LayerPotential(
78-
actx.context,
7978
expansion=expansion,
8079
target_kernels=(AxisTargetDerivative(0, knl),),
8180
source_kernels=(knl,)
8281
)
8382
lplot_dy = LayerPotential(
84-
actx.context,
8583
expansion=expansion,
8684
target_kernels=(AxisTargetDerivative(1, knl),),
8785
source_kernels=(knl,)
@@ -96,34 +94,35 @@ def test_lpot_dx_jump_relation_convergence(
9694
weights_nodes = actx.from_numpy(weights_nodes_h)
9795

9896
expansion_radii_h = 4 * target_geo.area_elements / nsources
97+
expansion_radii = actx.from_numpy(expansion_radii_h)
9998
centers_in = actx.from_numpy(
10099
targets_h - target_geo.normals * expansion_radii_h)
101100
centers_out = actx.from_numpy(
102101
targets_h + target_geo.normals * expansion_radii_h)
103102

104103
strengths = (weights_nodes,)
105-
_, (eval_in_dx,) = lplot_dx(
106-
actx.queue,
104+
(eval_in_dx,) = lplot_dx(
105+
actx,
107106
targets, sources, centers_in, strengths,
108-
expansion_radii=expansion_radii_h
107+
expansion_radii=expansion_radii
109108
)
110109

111-
_, (eval_in_dy,) = lplot_dy(
112-
actx.queue,
110+
(eval_in_dy,) = lplot_dy(
111+
actx,
113112
targets, sources, centers_in, strengths,
114-
expansion_radii=expansion_radii_h
113+
expansion_radii=expansion_radii
115114
)
116115

117-
_, (eval_out_dx,) = lplot_dx(
118-
actx.queue,
116+
(eval_out_dx,) = lplot_dx(
117+
actx,
119118
targets, sources, centers_out, strengths,
120-
expansion_radii=expansion_radii_h
119+
expansion_radii=expansion_radii
121120
)
122121

123-
_, (eval_out_dy,) = lplot_dy(
124-
actx.queue,
122+
(eval_out_dy,) = lplot_dy(
123+
actx,
125124
targets, sources, centers_out, strengths,
126-
expansion_radii=expansion_radii_h
125+
expansion_radii=expansion_radii
127126
)
128127

129128
eval_in_dx = actx.to_numpy(eval_in_dx)

0 commit comments

Comments
 (0)