Clean up Numba functions for potential field simulations#1663
Merged
Conversation
Make the gravity simulation to use the dictionary to get the desired Numba function upon request. This simplifies the simulation code removing the need to define private attributes for each one of them.
Raise a NotImplementedError on diagonal of G.T @ G when forward_only and using geoana as engine.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1663 +/- ##
==========================================
- Coverage 86.20% 86.19% -0.02%
==========================================
Files 416 416
Lines 54970 54914 -56
Branches 5129 5124 -5
==========================================
- Hits 47388 47331 -57
Misses 6164 6164
- Partials 1418 1419 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Make use of the `parallel` variable when defining decorated functions in the dictionary comprehension.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Declutter the potential field simulations by defining dictionaries with Numba functions for gravity and magnetics. This way the simulations don't need to define private attributes for each one of them: they can just get the desired function in a single line. Raise
NotImplementedErroron diagonal of G.T @ G when"forward_only"and usinggeoanaas engine. Specify which type of error should be raised in thexfailparameters present in some tests.PR Checklist
expect style.
to a Pull Request
@simpeg/simpeg-developerswhen ready for review.Reference issue
What does this implement/fix?
Additional information