![]() |
User Guide
|
Visitor that solves ODEs using old solvers of NEURON More...
Visitor that solves ODEs using old solvers of NEURON
This pass solves ODEs in derivative block using cnexp, euler and derivimplicitmethod. This solved mimics original implementation in nocmodl/mod2c. The original ODEs get replaced with the solution and transformations are performed at AST level.
Definition at line 42 of file neuron_solve_visitor.hpp.
#include <neuron_solve_visitor.hpp>
Private Attributes | |
| bool | differential_equation = false |
| true while visiting differential equation More... | |
| symtab::SymbolTable * | program_symtab = nullptr |
| global symbol table More... | |
| std::map< std::string, std::string > | solve_blocks |
| a map holding solve block names and methods More... | |
| std::string | solve_method |
| method specified in solve block More... | |
| bool | derivative_block = false |
| visiting derivative block More... | |
| std::string | derivative_block_name |
| the derivative name currently being visited More... | |
| std::vector< std::shared_ptr< ast::Statement > > | euler_solution_expressions |
|
default |
|
overridevirtual |
visit node of type ast::BinaryExpression
we have to only solve odes under derivative block where lhs is variable
check if ode can be solved with cnexp method
Implements nmodl::visitor::Visitor.
Definition at line 50 of file neuron_solve_visitor.cpp.
|
overridevirtual |
visit node of type ast::DerivativeBlock
Implements nmodl::visitor::Visitor.
Definition at line 29 of file neuron_solve_visitor.cpp.
|
overridevirtual |
visit node of type ast::DiffEqExpression
Implements nmodl::visitor::Visitor.
Definition at line 43 of file neuron_solve_visitor.cpp.
|
overridevirtual |
visit node of type ast::Program
Implements nmodl::visitor::Visitor.
Definition at line 113 of file neuron_solve_visitor.cpp.
|
overridevirtual |
visit node of type ast::SolveBlock
Implements nmodl::visitor::Visitor.
Definition at line 21 of file neuron_solve_visitor.cpp.
|
private |
visiting derivative block
Definition at line 57 of file neuron_solve_visitor.hpp.
|
private |
the derivative name currently being visited
Definition at line 60 of file neuron_solve_visitor.hpp.
|
private |
true while visiting differential equation
Definition at line 45 of file neuron_solve_visitor.hpp.
|
private |
Definition at line 62 of file neuron_solve_visitor.hpp.
|
private |
global symbol table
Definition at line 48 of file neuron_solve_visitor.hpp.
|
private |
a map holding solve block names and methods
Definition at line 51 of file neuron_solve_visitor.hpp.
|
private |
method specified in solve block
Definition at line 54 of file neuron_solve_visitor.hpp.