From a6d47763c5ecbff3bcf281bfc10e2dd3ab87a88d Mon Sep 17 00:00:00 2001 From: Nick Morse Date: Wed, 21 Jan 2026 11:55:37 +0100 Subject: [PATCH 1/3] added find_points_tol to interpolate_all_stat_and_pstat_fields_onto_points in RS_budgets --- pysemtools/postprocessing/statistics/RS_budgets.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pysemtools/postprocessing/statistics/RS_budgets.py b/pysemtools/postprocessing/statistics/RS_budgets.py index 2c3da9f..71600d1 100644 --- a/pysemtools/postprocessing/statistics/RS_budgets.py +++ b/pysemtools/postprocessing/statistics/RS_budgets.py @@ -776,7 +776,8 @@ def interpolate_all_stat_and_pstat_fields_onto_points( if_do_dssum_before_interp=True, if_create_boundingBox_for_interp=False, if_pass_points_to_rank0_only=True, - interpolation_output_fname="interpolated_fields.hdf5" + interpolation_output_fname="interpolated_fields.hdf5", + find_points_tol: float = np.finfo(np.double).eps * 10 ): from mpi4py import MPI # equivalent to the use of MPI_init() in C @@ -965,7 +966,8 @@ def interpolate_all_stat_and_pstat_fields_onto_points( msh=msh, point_interpolator_type="multiple_point_legendre_numpy", max_pts=128, - output_fname = interpolation_output_fname + output_fname = interpolation_output_fname, + find_points_tol=find_points_tol ) else: if comm.Get_rank() == 0: @@ -975,7 +977,8 @@ def interpolate_all_stat_and_pstat_fields_onto_points( msh=msh, point_interpolator_type="multiple_point_legendre_numpy", max_pts=128, - output_fname = interpolation_output_fname + output_fname = interpolation_output_fname, + find_points_tol=find_points_tol ) else: probes = Probes( @@ -984,7 +987,8 @@ def interpolate_all_stat_and_pstat_fields_onto_points( msh=msh, point_interpolator_type="multiple_point_legendre_numpy", max_pts=128, - output_fname = interpolation_output_fname + output_fname = interpolation_output_fname, + find_points_tol=find_points_tol ) ########################################################################################### From 60feffbbaf745dc584ff55b4e7077ad3208f1ae6 Mon Sep 17 00:00:00 2001 From: Nick Morse Date: Wed, 21 Jan 2026 13:40:29 +0100 Subject: [PATCH 2/3] fix default value --- pysemtools/postprocessing/statistics/RS_budgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysemtools/postprocessing/statistics/RS_budgets.py b/pysemtools/postprocessing/statistics/RS_budgets.py index 71600d1..7fd4542 100644 --- a/pysemtools/postprocessing/statistics/RS_budgets.py +++ b/pysemtools/postprocessing/statistics/RS_budgets.py @@ -777,7 +777,7 @@ def interpolate_all_stat_and_pstat_fields_onto_points( if_create_boundingBox_for_interp=False, if_pass_points_to_rank0_only=True, interpolation_output_fname="interpolated_fields.hdf5", - find_points_tol: float = np.finfo(np.double).eps * 10 + find_points_tol=None ): from mpi4py import MPI # equivalent to the use of MPI_init() in C From a92a89db5822918ee19e93d1792e57ae1bb16360 Mon Sep 17 00:00:00 2001 From: Nick Morse Date: Wed, 21 Jan 2026 21:15:11 +0100 Subject: [PATCH 3/3] fix to make find_points_tol truly optional --- .../postprocessing/statistics/RS_budgets.py | 41 +++++++------------ 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/pysemtools/postprocessing/statistics/RS_budgets.py b/pysemtools/postprocessing/statistics/RS_budgets.py index 7fd4542..d45de03 100644 --- a/pysemtools/postprocessing/statistics/RS_budgets.py +++ b/pysemtools/postprocessing/statistics/RS_budgets.py @@ -959,37 +959,24 @@ def interpolate_all_stat_and_pstat_fields_onto_points( # point_interpolator_type="multiple_point_legendre_numpy", \ # global_tree_type="domain_binning" , \ # max_pts = 256 ) + + probe_kwargs = { + "comm": comm, + "msh": msh, + "point_interpolator_type": "multiple_point_legendre_numpy", + "max_pts": 128, + "output_fname": interpolation_output_fname, + } + if find_points_tol is not None: + probe_kwargs["find_points_tol"] = find_points_tol + if not if_pass_points_to_rank0_only: - probes = Probes( - comm, - probes=xyz, - msh=msh, - point_interpolator_type="multiple_point_legendre_numpy", - max_pts=128, - output_fname = interpolation_output_fname, - find_points_tol=find_points_tol - ) + probes = Probes(probes=xyz, **probe_kwargs) else: if comm.Get_rank() == 0: - probes = Probes( - comm, - probes=xyz, - msh=msh, - point_interpolator_type="multiple_point_legendre_numpy", - max_pts=128, - output_fname = interpolation_output_fname, - find_points_tol=find_points_tol - ) + probes = Probes(probes=xyz, **probe_kwargs) else: - probes = Probes( - comm, - probes=None, - msh=msh, - point_interpolator_type="multiple_point_legendre_numpy", - max_pts=128, - output_fname = interpolation_output_fname, - find_points_tol=find_points_tol - ) + probes = Probes(probes=None, **probe_kwargs) ########################################################################################### for fname in these_names: