Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2031 +/- ##
==========================================
- Coverage 76.45% 76.41% -0.05%
==========================================
Files 464 463 -1
Lines 54949 54945 -4
Branches 9305 9308 +3
==========================================
- Hits 42013 41985 -28
- Misses 9810 9829 +19
- Partials 3126 3131 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
21951d3 to
397048e
Compare
397048e to
5611ff2
Compare
|
While this is ready, it should probably be merged/rebased after adoption of #1974. |
The example is equivalent to the diff_flame.m example.
Also, update and simplify.
Fix domain type (example used strained flame!) and eliminate flame.m utility.
Make MATLAB API consistent with C++.
By default, the MATLAB toolbox ctBuildInterface step may change function signatures while retaining CLib function names. Specifically, instances of length parameters are removed. This commit changes the wrapped function names to add the prefix 'm'.
Also, ensure that objects exist before calling destructor.
5611ff2 to
fae1039
Compare
| if (m_solution) { | ||
| auto thermo = m_solution->thermo(); | ||
| thermo->setMoleFractionsByName(xin); | ||
| thermo->getMassFractions(m_yin.data()); | ||
| needJacUpdate(); | ||
| } else { | ||
| m_xstr = xin; | ||
| } |
There was a problem hiding this comment.
I think I understand the direction this is going -- I imagine by Cantera 3.3 we'll be requiring the Solution object to initialize the Domain1D object, so this will always be available. But I'm a little confused at what in the Matlab interface made this necessary to tackle now and could use a little clarification.
There was a problem hiding this comment.
You're correct that in Cantera 3.3, we'll always have the Solution and will have this ability, i.e., the if clause can be removed.
The reason I included it here is that I really disliked the interface for the CounterFlowDiffusionFlame object (the only Python-FlameBase-like composite object that is currently implemented). It required the phases to be passed separately from the boundary objects, and the phases had to be separate copies of the same mechanism to work correctly. There wasn't a clean way to simplify this in MATLAB, so I decided to add this capability in C++. As you see in the flamespeed.cpp sample, this means that you no longer have to reset some of the states before starting to solve.
Changes proposed in this pull request
mto functions wrapped by MATLAB to disambiguate from CLib (most of the churn) .. see MATLAB toolbox changes CLib signatures #2006%%createsh1level header insphinx-gallery(also a lot of churn)flame1.m, which erroneously used a strained flow domain (!)inprocessvsoutofprocess)ctBuildInterfaceinto a single fileInlet1D::updateStateto ensure an inlet can be fully set up prior toSim1DassemblyIf applicable, fill in the issue number this pull request is fixing
Closes #2006, partially addresses #2030
If applicable, provide an example illustrating new features this pull request is introducing
Checklist
scons build&scons test) and unit tests address code coverage