Skip to content

Prevent mask from being incorrectly used when Remapping on a non-supported space #2292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2025

Conversation

Sbozzolo
Copy link
Member

@Sbozzolo Sbozzolo commented Apr 15, 2025

Remapping.Remapper performs spectral interpolation. When interpolating, every point in a given element is used to calculate the target value. As a result, the result is incorrect if one or more of the nodes in an element are masked.

This commit prevents users from accidentally obtaining subtly incorrect results by calling the Remapper on a space that is not supported.

Note that if none of the nodes in an element are masked, the interpolation routine would be fine. A more refined implementation of this check could take this into consideration, but this is deferred to when such need arises.

`Remapping.Remapper` performs spectral interpolation. When interpolating, every
point in a given element is used to calculate the target value. As a result, the
result is incorrect if one or more of the nodes in an element are masked.

This commit prevents users from accidentally obtaining subtly incorrect results
by calling the Remapper on a space that is not supported.

Note that if none of the nodes in an element are masked, the interpolation
routine would be fine. A more refined implementation of this check could take
this into consideration.
@Sbozzolo Sbozzolo changed the title Prevent mask from being incorrectly used Prevent mask from being incorrectly used when Remapping on an non-supported space Apr 15, 2025
@Sbozzolo Sbozzolo changed the title Prevent mask from being incorrectly used when Remapping on an non-supported space Prevent mask from being incorrectly used when Remapping on a non-supported space Apr 15, 2025
@Sbozzolo Sbozzolo merged commit bc75cda into main Apr 16, 2025
33 of 35 checks passed
@Sbozzolo Sbozzolo deleted the gb/mask_error_remapper branch April 16, 2025 18:10
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