Skip to content
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

Make prism kernels return np.nan on vertices #108

Merged
merged 6 commits into from
Nov 20, 2024
Merged

Make prism kernels return np.nan on vertices #108

merged 6 commits into from
Nov 20, 2024

Conversation

santisoler
Copy link
Member

@santisoler santisoler commented Nov 14, 2024

Make the 2nd and 3rd order kernel functions for prisms to return np.nan when the observation points matches any vertex of the prisms. Fixes division-by-zero error when evaluating kernel_enu when radius is zero, and makes the behavior consistent with the other third-order kernels.

Relevant issues/PRs:

This is related to a bug noticed by @thibaut-kobold in SimPEG's Mattermost channel.

Make the 3rd order kernel functions for prisms to return `np.nan` when
the observation points matches any vertex of the prisms. Fixes
division-by-zero error when evaluating `kernel_enu` when `radius` is
zero, and makes the behaviour consistent with the other third-order
kernels.
@santisoler santisoler changed the title Make prism kernels return np.nan on vertices Make prism kernels return np.nan on vertices Nov 20, 2024
@santisoler santisoler marked this pull request as ready for review November 20, 2024 23:17
@santisoler santisoler merged commit e385811 into main Nov 20, 2024
16 checks passed
@santisoler santisoler deleted the vertices branch November 20, 2024 23:31
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.

1 participant