From 49256f75cae12fc6d93a5978bd142516e5fb130e Mon Sep 17 00:00:00 2001 From: Hao Gao Date: Mon, 2 Sep 2019 22:36:43 -0500 Subject: [PATCH] Fix cost model incompatibility with pyfmmlib --- pytential/qbx/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pytential/qbx/__init__.py b/pytential/qbx/__init__.py index f31ec756..34ab0631 100644 --- a/pytential/qbx/__init__.py +++ b/pytential/qbx/__init__.py @@ -576,7 +576,14 @@ class QBXLayerPotentialSource(LayerPotentialSourceBase): del strengths cost_model_result = ( self.cost_model(wrangler, geo_data, kernel, kernel_arguments)) - return wrangler.full_output_zeros(), cost_model_result + + from pytools.obj_array import with_object_array_or_scalar + output_placeholder = with_object_array_or_scalar( + wrangler.finalize_potentials, + wrangler.full_output_zeros() + ) + + return output_placeholder, cost_model_result return self._dispatch_compute_potential_insn( queue, insn, bound_expr, evaluate, -- GitLab