Skip to content

Temperature unit#639

Merged
adamdempsey90 merged 5 commits into
mainfrom
dempsey/temp_unit
May 27, 2026
Merged

Temperature unit#639
adamdempsey90 merged 5 commits into
mainfrom
dempsey/temp_unit

Conversation

@adamdempsey90

Copy link
Copy Markdown
Collaborator

Dealing with an issue in Artemis, flipping this fixes it. I think this is consistent with how the mass, time, and length units are interpreted in this function.

PR Summary

PR Checklist

  • Adds a test for any bugs fixed. Adds tests for new features.
  • Format your changes by using the make format command after configuring with cmake.
  • Document any new features, update documentation for changes made.
  • Make sure the copyright notice on any files you modified is up to date.
  • After creating a pull request, note it in the CHANGELOG.md file.
  • LANL employees: make sure tests pass both on the github CI and on the Darwin CI
  • If ML was used, make sure to add a disclaimer at the top of a file indicating ML was used to assist in generating the file.
  • If Agentic AI was used, have the AI generate a "proposed changes" markdown file and store it in the plan_histories folder, with a filename the same as the MR number.

If preparing for a new release, in addition please check the following:

  • Update the version in cmake.
  • Move the changes in the CHANGELOG.md file under a new header for the new release, and reset the categories.
  • Maintainers: ensure spackages are up to date:
    • LANL-internal team, update XCAP spackages
    • Current maintainer of upstream spackages, submit MR to spack

@adamdempsey90

Copy link
Copy Markdown
Collaborator Author

Reminder to add simple unit test

: UnitSystem(std::forward<T>(t), eos_units_init::thermal_units_init_tag,
(length_unit * length_unit * length_unit) / mass_unit,
(time_unit * time_unit) / (length_unit * length_unit), temp_unit) {}
(time_unit * time_unit) / (length_unit * length_unit), 1.0 / temp_unit) {}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

relative to the densithy and sie, this looks correct. Users may need to make changes on their end.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, just like the original commit that changed this, this will be breaking

@Yurlungur Yurlungur left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the fix. I think this was an incomplete fix from before. I won't block the merge, but should we add a test? If not, just push back and I'll click merge.

@Yurlungur Yurlungur self-assigned this May 26, 2026
@Yurlungur Yurlungur added the bug Something isn't working label May 26, 2026
@adamdempsey90

adamdempsey90 commented May 27, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for the fix. I think this was an incomplete fix from before. I won't block the merge, but should we add a test? If not, just push back and I'll click merge.

Test added. I pulled the exact values from Artemis that were causing the issue. If you switch 1. / temperature to temperature in the UnitSystem creation, the test will fail.

@Yurlungur

Copy link
Copy Markdown
Collaborator

Assuming tests are passing on re-git, merge when ready

@adamdempsey90 adamdempsey90 merged commit 44a6120 into main May 27, 2026
9 checks passed
@adamdempsey90 adamdempsey90 deleted the dempsey/temp_unit branch May 27, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants