diff --git a/meshmode/discretization/connection/refinement.py b/meshmode/discretization/connection/refinement.py index 2cf1358040411c548219fd85fdcef60f58a34d54..fb06dc5db1be04d8f34b5c41bc495558bc2bc3dd 100644 --- a/meshmode/discretization/connection/refinement.py +++ b/meshmode/discretization/connection/refinement.py @@ -30,6 +30,8 @@ import pyopencl.array # noqa import logging logger = logging.getLogger(__name__) +from pytools import log_process + # {{{ Build interpolation batches for group @@ -110,6 +112,7 @@ def _build_interpolation_batches_for_group( # }}} +@log_process(logger) def make_refinement_connection(refiner, coarse_discr, group_factory): """Return a :class:`meshmode.discretization.connection.DiscretizationConnection` @@ -144,8 +147,6 @@ def make_refinement_connection(refiner, coarse_discr, group_factory): group_factory, real_dtype=coarse_discr.real_dtype) - logger.info("building refinement connection: start") - groups = [] with cl.CommandQueue(fine_discr.cl_context) as queue: for group_idx, (coarse_discr_group, fine_discr_group, record) in \ @@ -157,8 +158,6 @@ def make_refinement_connection(refiner, coarse_discr, group_factory): queue, group_idx, coarse_discr_group, fine_discr_group, record)))) - logger.info("building refinement connection: done") - return DirectDiscretizationConnection( from_discr=coarse_discr, to_discr=fine_discr, diff --git a/meshmode/mesh/generation.py b/meshmode/mesh/generation.py index ac4928b748d1ed0b1d1cc265fdc49d31ee80240c..03b89ba512607ec975d24c4a45e9a32d751ad493 100644 --- a/meshmode/mesh/generation.py +++ b/meshmode/mesh/generation.py @@ -31,6 +31,7 @@ import modepy as mp import logging logger = logging.getLogger(__name__) +from pytools import log_process __doc__ = """ @@ -785,6 +786,7 @@ def generate_warped_rect_mesh(dim, order, n): # {{{ warp_and_refine_until_resolved +@log_process(logger) def warp_and_refine_until_resolved( unwarped_mesh_or_refiner, warp_callable, est_rel_interp_tolerance): """Given an original ("un-warped") :class:`meshmode.mesh.Mesh` and a @@ -803,8 +805,6 @@ def warp_and_refine_until_resolved( from modepy.modal_decay import simplex_interp_error_coefficient_estimator_matrix from meshmode.mesh.refinement import Refiner, RefinerWithoutAdjacency - logger.info("warp_and_refine_until_resolved: start") - if isinstance(unwarped_mesh_or_refiner, (Refiner, RefinerWithoutAdjacency)): refiner = unwarped_mesh_or_refiner unwarped_mesh = refiner.get_current_mesh() @@ -855,8 +855,6 @@ def warp_and_refine_until_resolved( unwarped_mesh = refiner.refine(refine_flags) iteration += 1 - logger.info("warp_and_refine_until_resolved: done") - return unwarped_mesh # }}} diff --git a/setup.py b/setup.py index f9778b8cd8c32fa63bc61237043d984d880ec331..688e9f92c8dbf573b4b5702da2cd50b420ca08d1 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ def main(): "modepy", "gmsh_interop", "six", - "pytools>=2013.1", + "pytools>=2018.4", "pytest>=2.3", "loo.py>=2014.1", ],