modcc: parse and process `LINEAR` blocks (#840)
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
Showing
- modcc/CMakeLists.txt 1 addition, 0 deletionsmodcc/CMakeLists.txt
- modcc/expression.cpp 22 additions, 0 deletionsmodcc/expression.cpp
- modcc/expression.hpp 18 additions, 1 deletionmodcc/expression.hpp
- modcc/lexer.cpp 24 additions, 0 deletionsmodcc/lexer.cpp
- modcc/lexer.hpp 3 additions, 0 deletionsmodcc/lexer.hpp
- modcc/linearrewriter.cpp 88 additions, 0 deletionsmodcc/linearrewriter.cpp
- modcc/linearrewriter.hpp 6 additions, 0 deletionsmodcc/linearrewriter.hpp
- modcc/module.cpp 44 additions, 1 deletionmodcc/module.cpp
- modcc/msparse.hpp 6 additions, 0 deletionsmodcc/msparse.hpp
- modcc/parser.cpp 74 additions, 50 deletionsmodcc/parser.cpp
- modcc/parser.hpp 1 addition, 1 deletionmodcc/parser.hpp
- modcc/solvers.cpp 98 additions, 4 deletionsmodcc/solvers.cpp
- modcc/solvers.hpp 43 additions, 1 deletionmodcc/solvers.hpp
- modcc/symge.cpp 42 additions, 17 deletionsmodcc/symge.cpp
- modcc/token.cpp 2 additions, 0 deletionsmodcc/token.cpp
- modcc/token.hpp 1 addition, 1 deletionmodcc/token.hpp
- modcc/visitor.hpp 1 addition, 0 deletionsmodcc/visitor.hpp
- test/unit-modcc/test_msparse.cpp 6 additions, 0 deletionstest/unit-modcc/test_msparse.cpp
- test/unit-modcc/test_parser.cpp 2 additions, 2 deletionstest/unit-modcc/test_parser.cpp
- test/unit/CMakeLists.txt 4 additions, 1 deletiontest/unit/CMakeLists.txt
Please register or sign in to comment