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

Add magnetic gradiometry forwards for prisms #97

Merged
merged 38 commits into from
Oct 7, 2024

Conversation

santisoler
Copy link
Member

@santisoler santisoler commented Sep 27, 2024

Add forward modelling functions for the magnetic gradiometry components due to rectangular prisms: spatial derivatives of the magnetic field components. Include third-order kernel functions that are needed to compute the derivatives of the magnetic field components. Create private function to evaluate the kernels on the vertices of the prism provided its magnetization so we can reduce the amount of repeated code in the magnetic forward modelling functions. Add tests for the new functions.

TODO:

  • Add test for singular points: on vertices, on edges, on interior points.
  • Add tests (and check) if derivatives on faces are correct.
  • Remove print statements in tests

Update the signs in the documentation and in the implementation of each
kernel. Also make the kernels to return zero on singular points (not on
vertices) so when computing on lines shared with the edges are not falling
in division by zero errors and the limits for those cases are well
resolved.
Singular points for the grad components should be the same as the ones
for the magnetic field components: interior points, edges and vertices.
Reduce repeated code by dumping the evaluation of the kernels on its own
private function.
@santisoler santisoler marked this pull request as ready for review October 2, 2024 23:28
@santisoler
Copy link
Member Author

I'm quite happy with this PR. We have plenty of tests and the docstrings look good. I'll merge it. If we think about anything else we want to modify, we can do it later on.

@santisoler santisoler merged commit 36b36e1 into fatiando:main Oct 7, 2024
16 checks passed
@santisoler santisoler deleted the mag-grad branch October 7, 2024 21:02
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