diff --git a/pytential/qbx/__init__.py b/pytential/qbx/__init__.py index d3cd843a7e1a0b42ab49be23e02d3e6c35d302ef..b3bb102f66416aa34eb8f3867de4edd8a409ba66 100644 --- a/pytential/qbx/__init__.py +++ b/pytential/qbx/__init__.py @@ -106,6 +106,12 @@ class QBXLayerPotentialSource(LayerPotentialSourceBase): # {{{ argument processing + if fine_order is None: + raise ValueError("fine_order must be provided.") + + if qbx_order is None: + raise ValueError("qbx_order must be provided.") + if target_stick_out_factor is not _not_provided: from warnings import warn warn("target_stick_out_factor has been renamed to " diff --git a/test/test_global_qbx.py b/test/test_global_qbx.py index d0128819b8d01d3c3d6c33b84f7848f9b6a5a9a7..86832d6eb2fb33b7ada862a96e1f748d5f5da050 100644 --- a/test/test_global_qbx.py +++ b/test/test_global_qbx.py @@ -96,7 +96,9 @@ def run_source_refinement_test(ctx_getter, mesh, order, helmholtz_k=None): from pytential.qbx.utils import TreeCodeContainer - lpot_source = QBXLayerPotentialSource(discr, order) + lpot_source = QBXLayerPotentialSource(discr, + qbx_order=order, # not used in refinement + fine_order=order) del discr expansion_disturbance_tolerance = 0.025 @@ -239,7 +241,9 @@ def test_target_association(ctx_getter, curve_name, curve_f, nelements, discr = Discretization(cl_ctx, mesh, factory) - lpot_source, conn = QBXLayerPotentialSource(discr, order).with_refinement() + lpot_source, conn = QBXLayerPotentialSource(discr, + qbx_order=order, # not used in target association + fine_order=order).with_refinement() del discr from pytential.qbx.utils import get_interleaved_centers @@ -417,7 +421,9 @@ def test_target_association_failure(ctx_getter): InterpolatoryQuadratureSimplexGroupFactory factory = InterpolatoryQuadratureSimplexGroupFactory(order) discr = Discretization(cl_ctx, mesh, factory) - lpot_source = QBXLayerPotentialSource(discr, order) + lpot_source = QBXLayerPotentialSource(discr, + qbx_order=order, # not used in target association + fine_order=order) # }}}