Skip to content

Conversation

@nick-morse
Copy link
Contributor

Adding a find_points_tol optional input for interpolate_all_stat_and_pstat_fields_onto_points in RS_budgets.py to be used in the call to Probes

Copilot AI review requested due to automatic review settings January 21, 2026 15:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a find_points_tol parameter to the interpolate_all_stat_and_pstat_fields_onto_points function in RS_budgets.py to allow users to control the tolerance used when finding interpolation points in the underlying Probes class.

Changes:

  • Added find_points_tol as an optional parameter to interpolate_all_stat_and_pstat_fields_onto_points function signature
  • Passed the find_points_tol parameter to all three Probes instantiations within the function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if_pass_points_to_rank0_only=True,
interpolation_output_fname="interpolated_fields.hdf5"
interpolation_output_fname="interpolated_fields.hdf5",
find_points_tol=None
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using None as the default value for find_points_tol will cause the parameter to be passed as None to the Probes class, overriding its default value. This could lead to runtime errors since the downstream find_points method expects a float, not None. Consider either conditionally passing the parameter only when it's not None, or using the same default value as the Probes class (e.g., np.finfo(np.double).eps * 10).

Copilot uses AI. Check for mistakes.
max_pts=128,
output_fname = interpolation_output_fname
output_fname = interpolation_output_fname,
find_points_tol=find_points_tol
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing find_points_tol=None will override the default value in the Probes class. If find_points_tol is None in the function signature, this should be conditionally passed (only if not None) or a proper default value should be used instead of None.

Copilot uses AI. Check for mistakes.
max_pts=128,
output_fname = interpolation_output_fname
output_fname = interpolation_output_fname,
find_points_tol=find_points_tol
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing find_points_tol=None will override the default value in the Probes class. If find_points_tol is None in the function signature, this should be conditionally passed (only if not None) or a proper default value should be used instead of None.

Copilot uses AI. Check for mistakes.
max_pts=128,
output_fname = interpolation_output_fname
output_fname = interpolation_output_fname,
find_points_tol=find_points_tol
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing find_points_tol=None will override the default value in the Probes class. If find_points_tol is None in the function signature, this should be conditionally passed (only if not None) or a proper default value should be used instead of None.

Copilot uses AI. Check for mistakes.
@adperezm
Copy link
Collaborator

Nice! thanks! :D

@adperezm adperezm merged commit 3f40e5d into ExtremeFLOW:main Jan 22, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants