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

Use Solution for zeroD objects #1663

Merged
merged 15 commits into from
Feb 21, 2024
Merged

Conversation

ischoegl
Copy link
Member

@ischoegl ischoegl commented Jan 21, 2024

Changes proposed in this pull request

  • Assign Solution to zeroD objects where possible
  • Implement instantiation of non-empty Reactor objects, and trigger deprecation warnings when attempting to create reactors without content whenever feasible
  • Some legacy routes for empty Reactor objects remain (example: legacy MATLAB toolbox)

If applicable, fill in the issue number this pull request is fixing

Prepares a future solution for #1457

If applicable, provide an example illustrating new features this pull request is introducing

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

Copy link

codecov bot commented Jan 21, 2024

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (8d676c0) 72.78% compared to head (62300d3) 72.77%.
Report is 5 commits behind head on main.

❗ Current head 62300d3 differs from pull request most recent head f653e69. Consider uploading reports for the commit f653e69 to get more accurate results

Files Patch % Lines
src/zeroD/ReactorBase.cpp 66.66% 4 Missing and 1 partial ⚠️
src/clib/ctreactor.cpp 50.00% 3 Missing ⚠️
src/zeroD/ReactorFactory.cpp 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1663      +/-   ##
==========================================
- Coverage   72.78%   72.77%   -0.01%     
==========================================
  Files         375      375              
  Lines       56610    56629      +19     
  Branches    20510    20521      +11     
==========================================
+ Hits        41201    41212      +11     
- Misses      12389    12395       +6     
- Partials     3020     3022       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ischoegl ischoegl marked this pull request as ready for review January 21, 2024 04:22
@ischoegl ischoegl requested a review from a team January 21, 2024 04:43
Copy link
Member

@speth speth left a comment

Choose a reason for hiding this comment

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

Thanks, @ischoegl, making this transition makes sense to me. I had just a few minor suggestions and questions regarding the implementation.

include/cantera/zeroD/Reservoir.h Outdated Show resolved Hide resolved
include/cantera/zeroD/ReactorBase.h Outdated Show resolved Hide resolved
interfaces/cython/cantera/reactor.pyx Show resolved Hide resolved
include/cantera/clib/ctreactor.h Outdated Show resolved Hide resolved
test/python/test_reactor.py Outdated Show resolved Hide resolved
test/python/test_reactor.py Outdated Show resolved Hide resolved
test/zeroD/test_zeroD.cpp Outdated Show resolved Hide resolved
@ischoegl
Copy link
Member Author

ischoegl commented Feb 20, 2024

@speth ... thanks for the review! As there aren't unit tests for that portion available yet, I tested the modifications of the "experimental" MATLAB toolbox locally (with the side-effect that I now have MATLAB for Apple Silicon installed). So I guess this should be ready ...

@ischoegl ischoegl requested a review from speth February 20, 2024 14:38
Copy link
Member

@speth speth left a comment

Choose a reason for hiding this comment

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

Thanks, @ischoegl. This looks good to me.

@speth speth merged commit a599b58 into Cantera:main Feb 21, 2024
42 of 47 checks passed
@ischoegl ischoegl deleted the use-Solution-for-zeroD branch February 21, 2024 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants