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

Reorganize reaction rate classes #1223

Merged
merged 7 commits into from
Mar 20, 2022
Merged

Reorganize reaction rate classes #1223

merged 7 commits into from
Mar 20, 2022

Conversation

speth
Copy link
Member

@speth speth commented Mar 20, 2022

Changes proposed in this pull request

  • Move each implementation of a ReactionRate (e.g. TwoTempPlasmaRate) to a header file of its own, along with the implementation of the corresponding ReactionData class. By making rate implementations self-contained, I think this makes it easier for users to see how to add new ones of their own.
  • Move the ReactionFactory declaration into an internal header file, so it can be removed after 2.6 without having to go through a deprecation cycle. (this class was introduced after Cantera 2.5, and so has never been a part of the released API)
  • Deprecate the update_C and updateRC methods of ChebyshevRate and PlogRate, which are used directly only by the "legacy" rate methods.

Checklist

  • The pull request includes a clear description of this code change
  • Commit messages have short titles and reference relevant issues
  • Build passes (scons build & scons test) and unit tests address code coverage
  • Style & formatting of contributed code follows contributing guidelines
  • The pull request is ready for review

@ischoegl
Copy link
Member

ischoegl commented Mar 20, 2022

@speth ... I have absolutely no problem with this proposition (it makes sense). Would it make sense to also introduce BulkRate.h as envisioned in #1219? It is the direct correspondence to InterfaceRate ....

PS: also marked this as relevant for the beta release ...

PPS: For #1219 this is just 96d42a0 and bcf6ca7 (and potentially ab47b50)

@codecov
Copy link

codecov bot commented Mar 20, 2022

Codecov Report

Merging #1223 (ac14f3d) into main (4bfd2a8) will decrease coverage by 0.00%.
The diff coverage is 90.47%.

@@            Coverage Diff             @@
##             main    #1223      +/-   ##
==========================================
- Coverage   65.44%   65.44%   -0.01%     
==========================================
  Files         320      327       +7     
  Lines       46321    46321              
  Branches    19688    19688              
==========================================
- Hits        30315    30314       -1     
  Misses      13475    13475              
- Partials     2531     2532       +1     
Impacted Files Coverage Δ
include/cantera/kinetics/Arrhenius.h 70.90% <ø> (-11.57%) ⬇️
include/cantera/kinetics/Custom.h 85.71% <ø> (ø)
include/cantera/kinetics/Kinetics.h 36.52% <ø> (ø)
include/cantera/kinetics/Reaction.h 100.00% <ø> (ø)
include/cantera/kinetics/RxnRates.h 90.90% <ø> (-2.43%) ⬇️
src/kinetics/ReactionFactory.cpp 93.65% <ø> (+4.76%) ⬆️
src/kinetics/ReactionFactory.h 90.00% <ø> (ø)
src/kinetics/ReactionRateFactory.cpp 94.82% <ø> (ø)
src/kinetics/RxnRates.cpp 78.26% <ø> (-14.47%) ⬇️
src/kinetics/importKinetics.cpp 74.60% <ø> (ø)
... and 21 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@speth
Copy link
Member Author

speth commented Mar 20, 2022

I like the changes in bcf6ca7. I actually think they make the BulkRate class almost unnecessary. I'd like to see what I can get out of pursuing that in a separate PR, since this one already has so much cut-and-paste rearrangement that I think it would be harder to see the specific changes related to that refactoring.

Copy link
Member

@ischoegl ischoegl left a comment

Choose a reason for hiding this comment

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

As far as I am aware, this is just code reorganization …

@speth speth merged commit 5f94a85 into Cantera:main Mar 20, 2022
@speth speth deleted the reaction-reorg branch March 20, 2022 20:49
@speth speth mentioned this pull request Mar 21, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants