CVODE codgen for NEURON
The implementation works as follows:
- find any
DERIVATIVEblocks, and copy them intoDERIVATIVE_ORIGINAL_FUNCTIONandDERIVATIVE_ORIGINAL_JACOBIAN. This is done since thecnexp(and some other visitors) solve the ODEs in-place, so the information aboutf(x)(and consequently its Jacobian) is lost. Why two new constructs instead of one? Because NMODL cannot insert two identical blocks (it doesn't matter if they have a different name) in the symbol table -
DERIVATIVE_ORIGINAL_FUNCTIONbasically replacesx' = f(x)withDx = f(x), whileDERIVATIVE_ORIGINAL_JACOBIANreplacesx' = f(x)withDx = Dx / (1 - dt * J(f)), whereJis the Jacobian of the transformation (computed analytically using SymPy)
TODO:
- [ ] add tests for KINETIC
- [ ] fix issue with CONSERVE statement
Codecov Report
Attention: Patch coverage is 13.58025% with 70 lines in your changes missing coverage. Please review.
Project coverage is 86.22%. Comparing base (
9ee3226) to head (9d09481).
| Files | Patch % | Lines |
|---|---|---|
| src/codegen/codegen_neuron_cpp_visitor.cpp | 13.58% | 70 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #1399 +/- ##
==========================================
- Coverage 86.65% 86.22% -0.44%
==========================================
Files 182 182
Lines 13626 13704 +78
==========================================
+ Hits 11808 11816 +8
- Misses 1818 1888 +70
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Logfiles from GitLab pipeline #228090 (:white_check_mark:) have been uploaded here!
Status and direct links:
Logfiles from GitLab pipeline #229219 (:white_check_mark:) have been uploaded here!
Status and direct links:
Logfiles from GitLab pipeline #229740 (:no_entry:) have been uploaded here!
Status and direct links:
Logfiles from GitLab pipeline #230612 (:no_entry:) have been uploaded here!
Status and direct links:
Logfiles from GitLab pipeline #230618 (:white_check_mark:) have been uploaded here!
Status and direct links:
Logfiles from GitLab pipeline #230746 (:white_check_mark:) have been uploaded here!
Status and direct links:
Closing in favor of #1493