Skip to content

Fix logic error when zeros_outside was True#410

Merged
jcapriot merged 3 commits intosimpeg:mainfrom
jcapriot:bugfix/tree_mesh_interp_zero_out
Dec 2, 2025
Merged

Fix logic error when zeros_outside was True#410
jcapriot merged 3 commits intosimpeg:mainfrom
jcapriot:bugfix/tree_mesh_interp_zero_out

Conversation

@jcapriot
Copy link
Member

Fixes #409.

Previously it would skip doing anything at all if zeros_outside was True, (even if the value was inside the mesh) on the interpolation matrix for the cell_centered, face_ and edge_ interpolation matrices. This fixes the logic by computing interpolation for zeros_outside=False (as before) and also continuing if the zeros_outside is True, but the location was inside.

Still need to add some tests here really quick

@jcapriot jcapriot merged commit c776388 into simpeg:main Dec 2, 2025
30 checks passed
@jcapriot jcapriot deleted the bugfix/tree_mesh_interp_zero_out branch December 2, 2025 20:44
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.

BUG: Incorrect logic for zero_outside=True interpolation on TreeMesh for cell_centered, edge, and face interpolation matrices.

1 participant