From 08fc8573b3bc61adb382bbd7dafc6a5ef4ff8510 Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Thu, 15 Jun 2017 22:00:51 -0500 Subject: [PATCH 1/2] Refiner: fix unused argument (closes #55 on gitlab). --- pytential/qbx/__init__.py | 4 +--- pytential/qbx/refinement.py | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/pytential/qbx/__init__.py b/pytential/qbx/__init__.py index 2212b005..8a3822c3 100644 --- a/pytential/qbx/__init__.py +++ b/pytential/qbx/__init__.py @@ -218,8 +218,7 @@ class QBXLayerPotentialSource(LayerPotentialSourceBase): from pytential.qbx.refinement import refine_for_global_qbx from meshmode.discretization.poly_element import ( - InterpolatoryQuadratureSimplexGroupFactory, - QuadratureSimplexGroupFactory) + InterpolatoryQuadratureSimplexGroupFactory) if target_order is None: target_order = self.density_discr.groups[0].order @@ -228,7 +227,6 @@ class QBXLayerPotentialSource(LayerPotentialSourceBase): self, self.refiner_code_container, InterpolatoryQuadratureSimplexGroupFactory(target_order), - QuadratureSimplexGroupFactory(self.fine_order), kernel_length_scale=kernel_length_scale, maxiter=maxiter) diff --git a/pytential/qbx/refinement.py b/pytential/qbx/refinement.py index 8efd9a88..9034e5fb 100644 --- a/pytential/qbx/refinement.py +++ b/pytential/qbx/refinement.py @@ -477,7 +477,7 @@ def make_empty_refine_flags(queue, lpot_source, use_base_fine_discr=False): # {{{ main entry point def refine_for_global_qbx(lpot_source, code_container, - group_factory, fine_group_factory, kernel_length_scale=None, + group_factory, kernel_length_scale=None, # FIXME: Set debug=False once everything works. refine_flags=None, debug=True, maxiter=50): """ @@ -491,10 +491,6 @@ def refine_for_global_qbx(lpot_source, code_container, :class:`meshmode.mesh.discretization.ElementGroupFactory`. Used for discretizing the coarse refined mesh. - :arg fine_group_factory: An instance of - :class:`meshmode.mesh.discretization.ElementGroupFactory`. Used for - oversample the refined mesh at the finest level. - :arg kernel_length_scale: The kernel length scale, or *None* if not applicable. All panels are refined to below this size. -- GitLab From dc9c9c3b0ee1ae3c8adb7d8cf1000846f623f8cd Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Thu, 15 Jun 2017 22:03:32 -0500 Subject: [PATCH 2/2] Fix source refinement test for refine_for_global_qbx() change. --- test/test_global_qbx.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/test_global_qbx.py b/test/test_global_qbx.py index c5f77476..45f8d9f1 100644 --- a/test/test_global_qbx.py +++ b/test/test_global_qbx.py @@ -85,11 +85,9 @@ def run_source_refinement_test(ctx_getter, mesh, order, helmholtz_k=None): from meshmode.discretization import Discretization from meshmode.discretization.poly_element import ( - InterpolatoryQuadratureSimplexGroupFactory, - QuadratureSimplexGroupFactory) + InterpolatoryQuadratureSimplexGroupFactory) factory = InterpolatoryQuadratureSimplexGroupFactory(order) - fine_factory = QuadratureSimplexGroupFactory(4 * order) discr = Discretization(cl_ctx, mesh, factory) @@ -105,7 +103,7 @@ def run_source_refinement_test(ctx_getter, mesh, order, helmholtz_k=None): lpot_source, conn = refine_for_global_qbx( lpot_source, RefinerCodeContainer(cl_ctx), - factory, fine_factory, **refiner_extra_kwargs) + factory, **refiner_extra_kwargs) from pytential.qbx.utils import get_centers_on_side -- GitLab