From de8fb39aa266bb327937e84230df804d14c60575 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 4 Sep 2017 22:21:49 -0500 Subject: [PATCH] FMMLIB integration: let order vary by level --- pytential/qbx/fmmlib.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/pytential/qbx/fmmlib.py b/pytential/qbx/fmmlib.py index f0021cce..618b1df0 100644 --- a/pytential/qbx/fmmlib.py +++ b/pytential/qbx/fmmlib.py @@ -189,14 +189,6 @@ class QBXFMMLibExpansionWrangler(FMMLibExpansionWrangler): else: helmholtz_k = kernel_extra_kwargs[k_name] - self.level_orders = [ - fmm_level_to_order(level) - for level in range(self.geo_data.tree().nlevels)] - - # FIXME: For now - from pytools import single_valued - assert single_valued(self.level_orders) - dipole_vec = None if source_deriv_name is not None: dipole_vec = np.array([ @@ -211,8 +203,7 @@ class QBXFMMLibExpansionWrangler(FMMLibExpansionWrangler): dipole_vec=dipole_vec, dipoles_already_reordered=True, - # FIXME - nterms=fmm_level_to_order(0), + fmm_level_to_nterms=fmm_level_to_order, ifgrad=ifgrad) @@ -516,6 +507,8 @@ class QBXFMMLibExpansionWrangler(FMMLibExpansionWrangler): center2=qbx_centers[:, tgt_icenter_vec], expn2=expn2.T, + level_for_projection=isrc_level, + **kwargs).T if self.dim == 3: @@ -582,6 +575,8 @@ class QBXFMMLibExpansionWrangler(FMMLibExpansionWrangler): center2=tgt_center, nterms2=self.qbx_order, + level_for_projection=isrc_level, + **kwargs)[..., 0].T qbx_expansions[tgt_icenter] += tmp_loc_exp -- GitLab