FEAT: Added additional tools for Fortran calling codes#1154
FEAT: Added additional tools for Fortran calling codes#1154speth merged 3 commits intoCantera:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1154 +/- ##
==========================================
- Coverage 73.76% 66.09% -7.67%
==========================================
Files 370 314 -56
Lines 48983 44980 -4003
Branches 0 19146 +19146
==========================================
- Hits 36133 29731 -6402
+ Misses 12850 12665 -185
- Partials 0 2584 +2584
Continue to review full report at Codecov.
|
speth
left a comment
There was a problem hiding this comment.
Thanks for this contribution. While I eventually expect to be able to generate much of this interface in an automated fashion (Cantera/enhancements#39), that's still in it's early stages, so updates to this interface as it exists now are welcome.
I mostly had a few formatting suggestions. The other thing that I think would be valuable is calling a few of these new functions from the existing Fortran 90 test program (samples/f90/demo.f90).
The new logger does not exit on an error so the calling code can handle errors itself.
Addressed points raised in the review on pull request. Added calls to new routines in the sample F90 program and cleaned up a few of the routine interfaces to remove deprecated/unused info.
dc6b7f2 to
03cd88d
Compare
speth
left a comment
There was a problem hiding this comment.
Thanks for the updates -- the changes look good to me. I hadn't intended for you to have to update the style of any surrounding code, only what was new in this PR, but thanks for taking on a few of those updates anyway.
I just pushed an update to your branch to add a couple comments to the NoExitLogger.h header so that it will appear in the documentation and so that it has the usual license statement carried by all Cantera source files.
Two small things, which you can update at your discretion, would be (1) to add yourself to the AUTHORS file and (2) to update update the email address that's set for Git on your computer to one that is associated with your GitHub account so those commits will be attributed correctly. There are some hopefully helpful instructions here: https://stackoverflow.com/questions/3042437/how-to-change-the-commit-author-for-one-specific-commit.
|
No problem on updates -- I ask the folks I develop with to always leave a file better than they left it, so bringing the whole file up to date is worth the couple of extra seconds it took to find-replace things. I think the tests that failed when I first pushed the latest updates were due to the Fortran test having additional output from the calls to the new functions, and I wasn't comfortable changing the blessed solution without somebody "official" checking it out first. |
|
Right, I forgot about the changes to the blessed output file. Since the changes are pretty simple (just some additional output lines), I would suggest copying those extra lines from |
|
Done and pushed! Hopefully the tests will all pass now. |
This wraps a few additional functions into Fortran that we use in our calling code, and also adds a new feature -- an error logger that does not exit from within Cantera so a calling code can handle errors that arise. Mostly useful for Fortran calling codes that cannot catch exceptions.