Repository navigation
Avoid unnecessary elastic parameter calculations in SH mode - #1283
Merged
danielpeter merged 1 commit intoOct 13, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## devel #1283 +/- ##
=======================================
Coverage 49.46% 49.46%
=======================================
Files 171 171
Lines 31303 31304 +1
Branches 4951 4952 +1
=======================================
+ Hits 15483 15484 +1
Misses 15820 15820
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
thanks for updating the PR! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Avoid computing the Lamé parameter lambda and related quantities
when neither P_SV nor AXISYM is enabled.
In the SH case, these quantities are unused. The shear modulus
remains computed as before.
The change is confined to compute_forces_viscoelastic.F90.
Performance
Tested with the Tape2007 example using a serial gfortran build
with -O3 -finline-functions.
Baseline CPU user time (mean): approximately 6.73 s
Optimized CPU user times: 6.01, 6.03, 6.11, 6.01, 6.03 s
Optimized mean: 6.04 s
CPU time reduction: approximately 10.3%.
Numerical validation
All 132 generated seismogram files were compared using SHA-256.
Every file was bit-for-bit identical to the baseline output.
The P-SV and AXISYM calculations retain their original expressions.
Those configurations have not been separately benchmarked.
Note
This replaces the previous PR, which was closed because it
targeted master rather than devel.
The optimization commit has been cherry-picked directly onto
the current devel branch, without unrelated master commits.