Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@prisae
Copy link
Member

@prisae prisae commented Aug 27, 2024

Summary

Add an ElectricDipole to simpeg/electromagnetics/frequency_domain/sources.py similar to MagDipole.

Last piece for SimPEG(emg3d).

PR Checklist

  • If this is a work in progress PR, set as a Draft PR
  • Linted my code according to the style guides.
  • Added tests to verify changes to the code.
  • Added necessary documentation to any new functions/classes following the
    expect style.
  • Marked as ready for review (if this is was a draft PR), and converted
    to a Pull Request
  • Tagged @simpeg/simpeg-developers when ready for review.

@simpeg/simpeg-developers - I think this is ready, feedback welcomed!

@codecov
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

❌ Patch coverage is 60.00000% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.01%. Comparing base (1d73907) to head (b25c82b).

Files with missing lines Patch % Lines
tests/em/fdem/forward/test_FDEM_sources.py 40.00% 8 Missing and 1 partial ⚠️
...impeg/electromagnetics/frequency_domain/sources.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1525      +/-   ##
==========================================
- Coverage   86.02%   86.01%   -0.02%     
==========================================
  Files         419      419              
  Lines       54795    54820      +25     
  Branches     5204     5208       +4     
==========================================
+ Hits        47137    47152      +15     
- Misses       6261     6270       +9     
- Partials     1397     1398       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@santisoler santisoler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @prisae for opening this PR! It looks good to me! I just left one minor suggestion in the docstring.

@santisoler
Copy link
Member

@dccowan, I think this PR is ready to be merged, but I'd like to hear your thoughts on it.

@prisae prisae mentioned this pull request Aug 28, 2024
6 tasks
@prisae
Copy link
Member Author

prisae commented Sep 6, 2024

I rewrote the part of SimPEG(emg3d) to use the RawVec-versions, which is more general for any possible source field. So I do not need this PR any longer.

However, it might still be valuable to have it. Indeed, it is just a special case of LineCurrent, so I changed it to be a subclass of LineCurrent. But because it is only a single point, it requires the orientation. Not sure if my implementation as such works.

Let me know if I shall close it, or if it is worth bringing it in.

@santisoler
Copy link
Member

Hi @prisae! During last week's SimPEG meeting, @lheagy mentioned that the ElectricDipole class won't work with SimPEG simulation as it is because it lacks the s_m and s_e methods. I'm not sure how useful would be to have this class in SimPEG since you don't need it anymore. Maybe @lheagy and @dccowan can comment on that.

@prisae
Copy link
Member Author

prisae commented Sep 9, 2024

Since the latest push it does have the s_e and s_m methods, as it is now just a special case of LineCurrent. But I am not entirely sure if it works this way with orientation. However, in the corresponding MagDipole this seems to work. Anyway, I am fine either way!

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.

3 participants