Skip to content
Snippets Groups Projects
  • Nora Abi Akar's avatar
    modcc: parse and process `LINEAR` blocks (#840) · 336c0574
    Nora Abi Akar authored and Benjamin Cumming's avatar Benjamin Cumming committed
    Add support for parsing and processing `LINEAR` blocks: 
    
    Changes: 
    * `SOLVE` expressions can be called from inside an `INITIAL` block, but only if they are solving a linear system
    * Tilde expressions can now be either linear expressions or reaction expressions
    * Linear expressions need to be rewritten before being sent to the solver, this is done using `LinearRewriter`
    * The linear system is setup in `LinearSolverVisitor` fills the lhs and rhs of the symbolic matrix   
    * The matrix is recued using `gj_reduce`, which now works on non-diagonal matrices. 
    
    Fixes #839 
    336c0574