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

refactored Peierls to use log(stress) in the log strain rate function #5325

Merged
merged 1 commit into from Aug 11, 2023

Conversation

bobmyhill
Copy link
Member

Minor refactoring of the new compute_exact_log_strain_rate_and_derivative() function in Peierls creep to use the log stress. This has two benefits:

  • The function now returns F(x) and F'(x), rather than F(exp(x)) and F'(exp(x)). This will make it easier to use SUNDIALS in the future.
  • It requires slightly fewer operations.

FYI @lhy11009

@@ -187,11 +187,12 @@ namespace aspect
// Apply a strict cutoff if this option is chosen by user. A strain rate cutoff
// will be first computed and then compared to the input strain rate. A cutoff
// on stress will be triggered if the input strain rate is smaller.
double log_strain_rate = std::log(strain_rate);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
double log_strain_rate = std::log(strain_rate);
const double log_strain_rate = std::log(strain_rate);

@bobmyhill bobmyhill force-pushed the refactor_peierls branch 3 times, most recently from fe5392a to eebc58a Compare July 15, 2023 00:26
@bobmyhill
Copy link
Member Author

/rebuild

@lhy11009
Copy link
Contributor

@bobmyhill Thanks for notifying me, I could see your point very clearly in the PR.

@gassmoeller
Copy link
Member

This looks ready, seems like we just forgot to merge it after the hackathon.

@gassmoeller gassmoeller merged commit 2ab13e4 into geodynamics:main Aug 11, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants