From 53eab946e8fc50b8d2a57a3d30ae9236753def44 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 28 Aug 2017 19:28:29 -0500 Subject: [PATCH] Fix line-Taylor QBX tests for rscale --- sumpy/expansion/local.py | 6 ++++-- test/test_qbx.py | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sumpy/expansion/local.py b/sumpy/expansion/local.py index 317900fb..9e891a2d 100644 --- a/sumpy/expansion/local.py +++ b/sumpy/expansion/local.py @@ -57,7 +57,8 @@ class LineTaylorLocalExpansion(LocalExpansionBase): def get_coefficient_identifiers(self): return list(range(self.order+1)) - def coefficients_from_source(self, avec, bvec): + def coefficients_from_source(self, avec, bvec, rscale): + # no point in heeding rscale here--just ignore it if bvec is None: raise RuntimeError("cannot use line-Taylor expansions in a setting " "where the center-target vector is not known at coefficient " @@ -97,7 +98,8 @@ class LineTaylorLocalExpansion(LocalExpansionBase): .subs("tau", 0) for i in self.get_coefficient_identifiers()] - def evaluate(self, coeffs, bvec): + def evaluate(self, coeffs, bvec, rscale): + # no point in heeding rscale here--just ignore it from pytools import factorial return sym.Add(*( coeffs[self.get_storage_index(i)] / factorial(i) diff --git a/test/test_qbx.py b/test/test_qbx.py index aa86edf8..3758a5d7 100644 --- a/test/test_qbx.py +++ b/test/test_qbx.py @@ -82,8 +82,11 @@ def test_direct(ctx_getter): radius = 7 * h centers = unit_circle * (1 - radius) + expansion_radii = np.ones(n) * radius + strengths = (sigma * h,) - evt, (result_qbx,) = lpot(queue, targets, sources, centers, strengths) + evt, (result_qbx,) = lpot(queue, targets, sources, centers, strengths, + expansion_radii=expansion_radii) eocrec.add_data_point(h, np.max(np.abs(result_ref - result_qbx))) -- GitLab