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

Add one more status_log call #65

Merged
merged 2 commits into from
May 24, 2016
Merged

Add one more status_log call #65

merged 2 commits into from
May 24, 2016

Conversation

mnlevy1981
Copy link
Collaborator

One routine in marbl_diagnostics_mod (linear_root()) was still using print* to
write to stdout; added a status_log argument to the interface and passed the
message out.

One routine in marbl_diagnostics_mod (linear_root()) was still using print* to
write to stdout; added a status_log argument to the interface and passed the
message out.
@mnlevy1981
Copy link
Collaborator Author

This is just one more case that should've been fixed when we closed #23 (pull request #38)

@mnlevy1981
Copy link
Collaborator Author

Passes aux_pop_MARBL tests on yellowstone (intel and gnu), and builds successfully with nag on hobart. No change needed in the driver.

To find a root between x(1) and x(2), we require either y(1) and y(2) to be
opposite signs OR one of the two values to be 0. To check for a sign change, we
originally look to see if y(1)*y(2) > 0... but in this commit we update that to
explicitly look to see if (y(1) > 0 && y(2) > 0) or (y(1) < 0 && y(2) < 0).
This offers two improvements over the old code:

1) more detailed error message (can now say "both y values are positive" or
   "both y values are negative" instead of "y values have same sign")
2) Avoid potential for underflow (multiplying two very small positive numbers
   could result in 0)
@mnlevy1981 mnlevy1981 merged commit d401fc8 into marbl-ecosys:master May 24, 2016
@mnlevy1981 mnlevy1981 deleted the bugfix/more_status_log branch May 24, 2016 02:39
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.

1 participant