-
Notifications
You must be signed in to change notification settings - Fork 0
Add extrap options #67
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -80,6 +80,19 @@ struct ThermoOptionsImpl final : public SpeciesThermoImpl { | |||||||||||||||||||||
| }; | ||||||||||||||||||||||
| using ThermoOptions = std::shared_ptr<ThermoOptionsImpl>; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| struct ExtrapOptions { | ||||||||||||||||||||||
| // Logarithmic change in pressure (dlnp = ln(p_new / p_old)) | ||||||||||||||||||||||
| ADD_ARG(double, dlnp) = 0.; | ||||||||||||||||||||||
| ADD_ARG(double, dz) = 0.; | ||||||||||||||||||||||
| // Gravitational acceleration (m/s^2), positive | ||||||||||||||||||||||
| ADD_ARG(double, grav) = 0; | ||||||||||||||||||||||
|
||||||||||||||||||||||
| ADD_ARG(double, grav) = 0; | |
| ADD_ARG(double, grav) = 0.; |
Copilot
AI
Dec 16, 2025
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.
The comments for struct fields are misplaced. The comment "// Height change (m)" on line 90 should appear before the dz field on line 86, not before ds_dz. Similarly, the comment "// Gravitational acceleration (m/s^2), positive" on line 87-88 should appear before the grav field on line 88. Consider reorganizing the fields and comments so that each comment directly precedes its corresponding field definition.
| ADD_ARG(double, dz) = 0.; | |
| // Gravitational acceleration (m/s^2), positive | |
| ADD_ARG(double, grav) = 0; | |
| ADD_ARG(double, ds_dlnp) = 0; | |
| // Height change (m) | |
| // Height change (m) | |
| ADD_ARG(double, dz) = 0.; | |
| // Gravitational acceleration (m/s^2), positive | |
| ADD_ARG(double, grav) = 0; | |
| ADD_ARG(double, ds_dlnp) = 0; |
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.
The parameter order for
extrapolate_dzhas been changed from the original(temp, pres, xfrac, grav, dz, ds_dz, verbose)to(temp, pres, xfrac, dz, grav, ds_dz, verbose). This is a breaking API change - the positions ofdzandgravhave been swapped. Existing Python code using this function will silently get incorrect results (e.g., passinggrav=9.8, dz=100will be interpreted asdz=9.8, grav=100). Either restore the original parameter order or ensure this breaking change is intentional and well-documented.