Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add SPARSE solver to SympySolver - resolves #26 #34

Merged
merged 5 commits into from
Mar 7, 2019

Conversation

lkeegan
Copy link
Contributor

@lkeegan lkeegan commented Mar 6, 2019

-for case when ODEs are coupled & linear:
-constructs backwards Euler linear system
-solves linear system by Gaussian elimination
-declares required new local variables in each solve block
-replaces ODEs (and adds new statements) with explicit solution of backwards Euler
-optionally finds CSE (common sub expressions)
-visitor logic altered to deal with each solve block separately
-added --cse flag to sympy options to enable CSE generation
-added -v,--verbose flag to enable debug logger output
-updated README with the new flags
-TODO: check it actually works (!), add tests

@lkeegan lkeegan added enhancement New feature or request visitor Visitor implementation python solver Solver and numerical methods labels Mar 6, 2019
Copy link
Contributor

@pramodk pramodk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks good, added minor comments.

README.md Outdated Show resolved Hide resolved
nmodl/ode.py Show resolved Hide resolved
nmodl/ode.py Outdated Show resolved Hide resolved
src/nmodl/main.cpp Outdated Show resolved Hide resolved
test/visitor/visitor.cpp Outdated Show resolved Hide resolved
src/visitors/sympy_solver_visitor.hpp Outdated Show resolved Hide resolved
src/visitors/sympy_solver_visitor.cpp Outdated Show resolved Hide resolved
src/visitors/sympy_solver_visitor.cpp Outdated Show resolved Hide resolved
-for case when ODEs are coupled & linear:
-constructs backwards Euler linear system
-solves linear system by Gaussian elimination
-declares required new local variables in each solve block
-replaces ODEs (and adds new statements) with explicit solution of backwards Euler
-optionally finds CSE (common sub expressions)
-visitor logic altered to deal with each solve block separately
-added --cse flag to sympy options to enable CSE generation
-added -v,--verbose flag to enable debug logger output
-updated README with the new flags
-TODO: check it actually works (!), add tests

Change-Id: I4dff1e5627be515c9c40d17a536d44cc679259af
Copy link
Contributor

@ohm314 ohm314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice, just a few minor suggestions

nmodl/ode.py Show resolved Hide resolved
src/nmodl/main.cpp Outdated Show resolved Hide resolved
src/nmodl/main.cpp Outdated Show resolved Hide resolved
src/visitors/sympy_solver_visitor.cpp Show resolved Hide resolved
Change-Id: I533bb8430800c200c398a11e3079011a889dfcbd
Change-Id: I1c8c74485d13ac8515059d973593dd9923520587
Change-Id: I4fb63c358b01e2cad0461f661b40108e3564c075
@pramodk pramodk merged commit d7d22b4 into master Mar 7, 2019
@pramodk pramodk deleted the coupled_linear_odes branch March 7, 2019 21:06
lkeegan added a commit that referenced this pull request Mar 8, 2019
For case when ODEs are coupled & linear:
  - constructs backwards Euler linear system
  - solves linear system by Gaussian elimination
  - declares required new local variables in each solve block
  - replaces ODEs (and adds new statements) with explicit solution of backwards Euler
  - optionally finds CSE (common sub expressions)
  - visitor logic altered to deal with each solve block separately
  - added --cse flag to sympy options to enable CSE generation
  - added -v,--verbose flag to enable debug logger output
  - updated README with the new flags
  - TODO: tests and integration tests, see #40 

Resolves #26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python solver Solver and numerical methods visitor Visitor implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants