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

Fix bug in greenspline for -E -C #8109

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Fix bug in greenspline for -E -C #8109

merged 1 commit into from
Nov 29, 2023

Conversation

PaulWessel
Copy link
Member

@PaulWessel PaulWessel commented Nov 29, 2023

See this forum post for background. Where we need to evaluate the solution we compute the distance between two points and if nonzero we evaluate the Green's function. But, in one place we placed the calculation after the zero-check and of course r was always zero and the calculation of the surface did not happen.

Hopefully not more issues but this one is obvious so we fix it in this simple PR.

Wherever we need to evalute the solution we compute the distance been two points and if nonzero we evaluate the Green's function.  But, in one place we placed the calculation after the zero-check and of course r was always zero and the calculation of the surface did not happen.
@PaulWessel PaulWessel added the bug Something isn't working label Nov 29, 2023
@PaulWessel PaulWessel added this to the 6.5.0 milestone Nov 29, 2023
@PaulWessel PaulWessel requested a review from Esteban82 November 29, 2023 17:17
@PaulWessel PaulWessel self-assigned this Nov 29, 2023
Copy link
Member

@Esteban82 Esteban82 left a comment

Choose a reason for hiding this comment

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

Thanks. It works!

@Esteban82 Esteban82 merged commit 454aa69 into master Nov 29, 2023
6 checks passed
@Esteban82 Esteban82 deleted the greenspline-fix branch November 29, 2023 17:31
@PaulWessel
Copy link
Member Author

Misfit file now looks like this so I think it is now working (again):

# Command : gmt greenspline geo.txt -Sc -C -Ggeo.grd -Z2 -Emisfit.txt -R158:00W/156:58W/18:00N/19:40N -I1m
# eigenno	eigenval	var_percent	rms
0	59177476.7	65.8905533939	752.198173843
1	37281370.3447	92.0418967819	752.120969527
2	19324372.0562	99.0681055505	752.118091663
3	6863523.97604	99.9544541832	752.118066259
4	1200156.86214	99.9815552443	751.647630375
5	641289.879832	99.9892930717	749.851543745
6	527868.265693	99.9945358486	717.129582791
7	390481.243194	99.997404717	707.146351065
...

@Esteban82
Copy link
Member

Really? I have different values. I didn't compare it with the original animation.

anim05.mp4

@Esteban82
Copy link
Member

Really? I have different values. I didn't compare it with the original animation.

PD: My mistake. I only see the first values.

anim05.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants