-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
Deprecate 'R' in C++ setter nomenclature in favor of 'D' #1433
Conversation
3bc6829
to
99ebacd
Compare
Codecov Report
@@ Coverage Diff @@
## main #1433 +/- ##
==========================================
- Coverage 70.96% 70.92% -0.04%
==========================================
Files 369 369
Lines 55201 55229 +28
Branches 18176 18194 +18
==========================================
Hits 39173 39173
- Misses 13567 13595 +28
Partials 2461 2461
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I appreciate the attempt to improve the consistency of the different interfaces. I'm wondering about the usefulness of this whole family of functions, though -- basically,
Unless there's some interesting use case, I think I'd support deprecating all of the "full-state" versions at least and combining |
I'm not totally sure which functions you're referring to @speth. I will say that, with respect to the PV property pair, these are extremely common in thermodynamic systems from intro textbooks. Or, possibly, in a cycle where the volume or pressure are held constant through a process, so you don't know the temperature at the other end (for example, "the mixture is heated at constant pressure until the volume has tripled").
I think removing the full-state versions would be fine. I think as long as both DP and PV are available (even if they're dependent/interrelated) it would also be fine. |
Looks like I opened a can of worms here ... this was supposed to be simple! 🤣 My main incentive was to make the nomenclature consistent, but I do see that there's a lot of boilerplate code. At the same time, the I tend to agree that keeping both |
I think @speth was suggesting to remove PDY and PDX, as those aren't as likely to be used. |
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.
Just a couple comments for food for thought
c9c5f47
to
b51a06c
Compare
@speth and @bryanwweber ... I deprecated all full state setters using |
b51a06c
to
2b5eb74
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 to me!
I wasn't originally advocating for the removal of the TPX
/TPY
setters or the TRX
/TRY
setters, but I'm quite happy to see the latter set go.
Changes proposed in this pull request
While Cantera's Python nomenclature uses
TD
/TDX
/TDY
andDP
/DPX
/DPY
, other API's use the older (?) nomenclatureTR
/TRX
/TRY
andRP
/RPX
/RPY
. This PR seeks to implement a uniform nomenclature.In addition, a new
is added to
ct.h
, which is needed for work in #1182.Checklist
scons build
&scons test
) and unit tests address code coverage