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

DRAFT: Shabansky fix #24

Closed
wants to merge 30 commits into from
Closed

Conversation

mghenderson64
Copy link
Contributor

Changes include:

  1. Added Lgm_FluxTubeVolume() to compute V = Integral of 1/|B| from south footpoint to north footpoint.
  2. Added example program using Lgm_FluxTubeVolume.
  3. Added a SimpleTrace.c code in Examples
  4. Cleaned up dipole test in Examples/LstarDipoleTest_omp. It works.
  5. Made extensive changes to drift-shell calculations to improve stability and make the two "I-Search" strategies work.
  6. Major change to Lgm_Trace(). This now pre-traces the FL in order to find the global Bmin. The approximate position is then fed into Lgm_TraceToMinBSurf() which then converges to the Bmin. Note that this really should be done in Lgm_TraceToMinBSurf() so that consistent results are obtained between Lgm_TraceToMinBSurf() and Lgm_Trace(). However, it only affects FLs with multiple minima.
  7. Some changes to Lgm_KdTree. Added memory managment routines and added some test for defined Objects before trying to access them (some problems dont require Objects, like the DstNN example, but would fail if it wasnt alloced.)
  8. Fixed the DstNN example code in Examples/KdTree.

…umeing r==1.0.

Fixed calculation of number of bounce regions -- it had a bug in it.
Fixed search for shabansky I/2 FL -- it often failed due to bracket being too narrow.
…and ComputeI_FromMltMlat2() routines in order to return ErrorStatus.
… tracing routine.

Added defaults for FluxtubeVolume tolerances.
Added some missing memory management in Lgm_FreeMagInfo_children().
… have multiple minima, I now do a pretrace and getm close to the global Bmin. This is then fed into the Lgm_TraceToMinBSurf() routine so that it converges on the true global Bmin. This fixes many issues with the Shabansky drift orbit stuff.

NOTE HOWEVER: This really should be donem in Lgm_TraceToMinBSurf() in order to get consistentm results. (This does only change things for FLs with multiple miniman.)
…arther than we expected (returns -2 now instead of -1). Allows us to detect this error in the calling routines.
…hat should be made between Lgm_TraceToMinBSurf() and the Lgm_Trace() convenience routine.
…get ISearchMethod1 working at the same time.
@drsteve
Copy link
Owner

drsteve commented Sep 19, 2019

Thanks @mghenderson64 - the Travis CI is reporting a failure to compile. It looks like Lgm_FluxTubeVolume.c is missing.

If you can commit that to the same branch and push it'll automatically update the pull request and resubmit the tests. Once they've run I'll take a closer look.

Copy link
Owner

@drsteve drsteve left a comment

Choose a reason for hiding this comment

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

A few questions/comments/requests, just working them as I go...
If I'm worrying about nothing on any of these, let me know.

  • There's no Makefile for the FluxTubeVolume example.
  • The FluxTubeVolume example doesn't compile for me as it doesn't know where to look for the function definition. Is a header file missing?
  • Travis CI is clearly mis-reporting the outcome of check. I get local failures of a number of tests. Can you run make check locally and inspect the output? My guess is that the algorithm changes would lead us to expect the observed regression test failures. If that's the case the expected results files should be updated.
  • Following the above, I think we still expect the weird Lm/L*/Lm failure, so don't worry about that test.
  • Examples/SimpleTrace doesn't have a Makefile Seems fine once compiled (but writes more output than I'd expect from an example program...)
  • Is it possible for the new while loop in BracketZero to get stuck? Should there be a loop counter or some other check so it can't get stuck?
  • Why was the Jensen-Cain stuff removed from Lgm_MagModelInfo_Set_MagModel? If it was removed in error can you please put it back (in Lgm_InitMagInfo.c)?
  • Line 234 of Lgm_Trace.c has a command hidden behind a check for a verbosity setting of -100!! Is this a debug that you're hiding? That you meant to remove? I guess it doesn't really hurt for it to be there, but it's never going to appear with any standard verbosity settings.
  • The section in Lgm_Trace (used to be line 258) removes a check for the return type in Lgm_TraceToMinBSurf. The changes to Lgm_TraceToMinBSurf.c only add comments about fixing the behaviour that would require this check - the behaviour isn't actually fixed yet. So shouldn't we be keeping this check?

@mghenderson64
Copy link
Contributor Author

mghenderson64 commented Sep 20, 2019 via email

@drsteve
Copy link
Owner

drsteve commented Jan 2, 2020

Hey @mghenderson64 - any luck updating this?
I've just merged an update to IGRF (since the 2020 coefficients are out) into the master branch, so you might want to rebase your branch against master to get the IGRF updates before you update test files, etc.

If you have issues with conflicts, etc. that are causing trouble, let me know and I can try to fix things.

@drsteve drsteve force-pushed the master branch 3 times, most recently from b024da6 to de532b9 Compare July 21, 2022 18:48
@drsteve drsteve marked this pull request as draft December 8, 2023 21:46
@drsteve drsteve changed the title Shabansky fix DRAFT: Shabansky fix Dec 8, 2023
@drsteve
Copy link
Owner

drsteve commented Feb 29, 2024

Closing as outdated due to #39 and #40

@drsteve drsteve closed this Feb 29, 2024
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.

2 participants