-
Notifications
You must be signed in to change notification settings - Fork 33
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
Reorganize the implementation of the mass conserving temperature prof… #588
Reorganize the implementation of the mass conserving temperature prof… #588
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #588 +/- ##
==========================================
- Coverage 93.49% 93.38% -0.12%
==========================================
Files 92 92
Lines 6346 6270 -76
==========================================
- Hits 5933 5855 -78
- Misses 413 415 +2
... and 10 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
057a94c
to
964bdb0
Compare
|
include/world_builder/features/subducting_plate_models/temperature/mass_conserving.h
Outdated
Show resolved
Hide resolved
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.
This is a simple shifting of existing code into a new function. None of the code being moved inside the new functions has changed. The new function name is chosen to highlight that the this function returns the temperature from the two analytic temperature equations.
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.
This looks good to me @MFraters can you take a look.
964bdb0
to
556927e
Compare
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.
Looks good, thanks!
I add a small new function "get_temperature_analytic" to extract the calculation of the temperature from the analytic solution in the slab mass-conserving temperature profile.
If the top heat content and the adjusted distance are computed elsewhere. Then only one more line is needed to compute the temperature:
This would make further implementation of splining the temperature profile easier
While doing this, I migrate the plate model summation number as a separate constant variable in the file include/world_builder/features/subducting_plate_models/temperature/mass_conserving.h
@mibillen and @MFraters , could you give a review on this?