-
Notifications
You must be signed in to change notification settings - Fork 398
Update greenspline -C for writing intermediate grids #5714
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
Conversation
Currently, the modifiers +m and +M are mutually exclusive and thus it is only possible to output intermediary grids for the cumulative or incremental solution. However, since the main calculation time is in determining the solution, it is helpful to be able to write both types of grids at the same time. This PR relaces the +m and +M with two new modifiers that both can be set: +c for cumulative grids and +i for incremental grids. We now use the regular -Ggrdfile setting and automaticallly insert _inc_### or _cum_### before the file extension, and we start with eigenvalue 0 rather than calling it 1 (averything else in GMT starts at 0 so starting at 1 causes grief in batch and movie). The old +m|M modifier is honored in a backwards compatiple way with the original file template and mumbering scheme.
|
The example from the greenspline docs crashes with a seg fault: |
|
Yes it does! Of course I did not try that simple example, just my more complicate one. Will see why. |
|
Fixed. My case worked because I used +i also. Now it works in all cases. |
maxrjones
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two comments:
- The results from -C +ffile are written with 1 as the first eigenvalue. Should this be updated to zero similar to the grids?
- From the examples, value is optional. The docs should be updated accordingly with the default behavior specified.
Also, the -C[n] has an impact on which eigenvalues are eliminated for the fit, but not for what is written in the +f file output or the intermediate grids. Is this intentional?
|
Good points, likely answers:
|
|
Yes, I forgot to make a PS and check for height. I will do that and possibly add a -Y or change the plot heights a bit. Thanks! |
|
I have made those changes and clarified some of the logic which is due to the fact that the eigenvalues/vectors we receive are not sorted so we set those we dont want to zero, but those zeros are distributed across the full vector, hence we must loop over the length of the eigen value vector and skip if entry is zero. |
|
Also fixed the compile failure for Windows due to unsigned into loop variable in OpenMP... |
Currently, the modifiers +m and +M are mutually exclusive and thus it is only possible to output intermediary grids for the cumulative or incremental solution. However, since the main calculation time is in determining the solution, it is helpful to be able to write both types of grids at the same time. This PR replaces the +m and +M with two new modifiers that both can be set: +c for cumulative grids and +i for incremental grids. We now use the regular -Ggrdfile setting and automatically insert
_inc_###or_cum_###before the file extension (the number of ### is also determined), and we start numbering with eigenvalue 0 rather than calling it 1 (everything else in GMT starts at 0 so starting at 1 causes grief in batch and movie). The old +m|M modifiers are honored in a backwards compatible way with the original file name template and numbering scheme. All tests pass and a new replacement anim05.sh using the new system works as well.