![]() |
User Guide
|
Replace solve block statements with actual solution node in the AST. More...
Replace solve block statements with actual solution node in the AST.
Once SympySolverVisitor or NeuronSolveVisitor is ran, solve blocks can be replaced with solution expression node that represent solution that is going to be solved. All solve statements appearing in breakpoint block get added to NrnState block as solution expression.
Definition at line 35 of file solve_block_visitor.hpp.
#include <solve_block_visitor.hpp>
Private Member Functions | |
ast::SolutionExpression * | create_solution_expression (ast::SolveBlock &solve_block) |
Create solution expression node that will be used for solve block. More... | |
Private Attributes | |
symtab::SymbolTable * | symtab = nullptr |
bool | in_breakpoint_block = false |
ast::StatementVector | nrn_state_solve_statements |
solve expression statements for NrnState block More... | |
|
default |
|
private |
Create solution expression node that will be used for solve block.
solve_block | solve block used to describe node to solve and method |
Depending on the solver used, solve block is converted to solve expression statement that will be used to replace solve block. Note that the blocks are clones instead of shared_ptr because DerivimplicitCallback is currently contain whole node instead of just pointer.
find out the block that is going to solved
in case of derivimplicit method if neuron solver is used (i.e. not sympy) then the solution is not in place but we have to create a callback to newton solver
typically derivimplicit is used for derivative block only
Definition at line 42 of file solve_block_visitor.cpp.
|
overridevirtual |
visit node of type ast::BreakpointBlock
Implements nmodl::visitor::Visitor.
Definition at line 21 of file solve_block_visitor.cpp.
|
overridevirtual |
Replace solve blocks with solution expression.
node | Ast node for SOLVE statement in the mod file |
Implements nmodl::visitor::Visitor.
Definition at line 87 of file solve_block_visitor.cpp.
|
overridevirtual |
visit node of type ast::Program
add new node NrnState with solve blocks from breakpoint block
Implements nmodl::visitor::Visitor.
Definition at line 100 of file solve_block_visitor.cpp.
|
private |
Definition at line 39 of file solve_block_visitor.hpp.
|
private |
solve expression statements for NrnState block
Definition at line 42 of file solve_block_visitor.hpp.
|
private |
Definition at line 37 of file solve_block_visitor.hpp.