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 a Gaussian temperature interpolation for the plume feature #657

Merged
merged 6 commits into from
Feb 23, 2024

Conversation

jdannberg
Copy link
Contributor

I am here adding two images of what the test cases would look like with a grid file (but I thought they'd be faster to run with gwd-dat):

Cartesian:
plume_gaussian

Spherical:
plume_spherical

Copy link

github-actions bot commented Feb 18, 2024

Benchmark Main Feature Difference (99.9% CI)
Slab interpolation simple none 1.020 ± 0.005 (s=417) 1.012 ± 0.005 (s=472) -0.9% .. -0.7%
Slab interpolation curved simple none 1.024 ± 0.005 (s=451) 1.018 ± 0.006 (s=433) -0.7% .. -0.4%
Spherical slab interpolation simple none 1.169 ± 0.006 (s=401) 1.169 ± 0.007 (s=371) -0.1% .. +0.1%
Slab interpolation simple curved CMS 1.059 ± 0.004 (s=440) 1.056 ± 0.003 (s=413) -0.3% .. -0.2%
Spherical slab interpolation simple CMS 1.555 ± 0.010 (s=309) 1.557 ± 0.010 (s=272) -0.0% .. +0.3%
Spherical fault interpolation simple none 1.181 ± 0.008 (s=385) 1.181 ± 0.006 (s=379) -0.2% .. +0.1%
Cartesian min max surface 2.304 ± 0.022 (s=190) 2.303 ± 0.043 (s=203) -0.5% .. +0.5%
Spherical min max surface 7.226 ± 0.033 (s=76) 7.230 ± 0.026 (s=51) -0.2% .. +0.3%

@MFraters
Copy link
Member

The pictures look really cool! I will do my best to do a review in the coming week.

Copy link
Member

@MFraters MFraters left a comment

Choose a reason for hiding this comment

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

Looks good, just two minor comments. Can you also update the test reference result? Otherwise good to go.


prm.declare_entry("depths", Types::Array(Types::Double(0)),
"The temperature at the center of this feature in degree Kelvin."
"If the value is below zero, the an adiabatic temperature is used.");
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this description is correct.

"plume temperature and the outside temperature a smaller values has to be chosen "
"for the gaussian sigmas.");

// TODO: assert that the three have the same length
Copy link
Member

Choose a reason for hiding this comment

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

This todo belongs in parse_entries, and it looks like it is already done. I think you can just remove this.

Copy link

codecov bot commented Feb 22, 2024

Codecov Report

Attention: Patch coverage is 90.58824% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 92.78%. Comparing base (d6df754) to head (50921e5).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #657      +/-   ##
==========================================
- Coverage   92.85%   92.78%   -0.07%     
==========================================
  Files         105      106       +1     
  Lines        7176     7222      +46     
==========================================
+ Hits         6663     6701      +38     
- Misses        513      521       +8     
Files Coverage Δ
...ilder/features/plume_models/temperature/uniform.cc 96.15% <ø> (ø)
source/world_builder/utilities.cc 97.15% <100.00%> (ø)
source/world_builder/features/plume.cc 98.51% <95.45%> (+0.08%) ⬆️
...lder/features/plume_models/temperature/gaussian.cc 84.61% <84.61%> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d6df754...50921e5. Read the comment docs.

@MFraters MFraters added the ready to merge Pull request is ready to merge. May be waiting for tests to complete or other reviews. label Feb 22, 2024
@MFraters
Copy link
Member

hmm, I think you still need to include include/world_builder/features/feature_utilities.h

@jdannberg
Copy link
Contributor Author

I also looked at the test output of the changed test (in higher resolution):

comparison

The two main differences are that the very tip is now included as well in the sphere at the top (which is a rounding off question somewhere somehow I suspect), the other one is that the base of the plume tail is drawn to the max depth of the plume feature, even if it's below the deepest cross section given (which is a clear bugfix, because otherwise the max depth would be useless).

@MFraters
Copy link
Member

Sounds good to me. I think it should be good to go as soon as you include include/world_builder/features/feature_utilities.h

@jdannberg jdannberg force-pushed the plume_gaussian branch 2 times, most recently from 934505c to 19f3dc4 Compare February 23, 2024 00:21
@jdannberg
Copy link
Contributor Author

Okay, after several tries I think I now include all the things I need to include.

@MFraters MFraters merged commit ab932a5 into GeodynamicWorldBuilder:main Feb 23, 2024
31 of 34 checks passed
@MFraters
Copy link
Member

Can you still add a changelog entry in a follow up pull request?

@jdannberg
Copy link
Contributor Author

Sure. I thought this would just be a part of the plume feature. Do you want me to add it there or make a separate entry?

@MFraters
Copy link
Member

hmm, it is adding a new temperature model to the plume feature, so in that sense I think it is a notable change. I will leave it up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull request is ready to merge. May be waiting for tests to complete or other reviews.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants