diff --git a/pytential/qbx/__init__.py b/pytential/qbx/__init__.py index f31ec75646640d599316c9dbae17e6818557e327..34ab06319764fa2c9efca2860171e376c2a8ea45 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,