x[id] = _args[1];
So, the R
in AST needs to be renamed with _args[1]
.
-Definition at line 2129 of file codegen_neuron_cpp_visitor.cpp.
+Definition at line 2145 of file codegen_neuron_cpp_visitor.cpp.
diff --git a/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html b/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html
index a57e29bf4..9d6a3c13c 100644
--- a/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html
+++ b/doxygen/src_2codegen_2codegen__neuron__cpp__visitor_8cpp_source.html
@@ -1580,725 +1580,741 @@
- 1487 print_initial_block(info.initial_node);
- 1488 printer->pop_block();
-
- 1490 printer->pop_block();
-
-
-
- 1494 printer->add_newline(2);
-
- 1496 ParamVector args = {{
"",
"const _nrn_model_sorted_token&",
"",
"_sorted_token"},
- 1497 {
"",
"NrnThread*",
"",
"nt"},
- 1498 {
"",
"Memb_list*",
"",
"_ml_arg"},
- 1499 {
"",
"int",
"",
"_type"}};
-
- 1501 printer->fmt_push_block(
"static void {}({})",
-
- 1503 get_parameter_str(args));
-
+ 1487 for (
auto state: info.state_vars) {
+ 1488 auto state_name = state->get_name();
+ 1489 auto lhs_name = get_variable_name(state_name);
+ 1490 auto rhs_name = get_variable_name(state_name +
"0");
+
+ 1492 if (!state->is_array()) {
+ 1493 auto state_name = state->get_name();
+ 1494 printer->fmt_line(
"{} = {};", lhs_name, rhs_name);
+
+ 1496 auto n_elements = state->get_length();
+ 1497 printer->fmt_push_block(
"for(size_t _i = 0; _i < {}; ++_i)", n_elements);
+ 1498 printer->fmt_line(
"{}[_i] = {};", lhs_name, rhs_name);
+ 1499 printer->pop_block();
+
+
+
+ 1503 print_initial_block(info.initial_node);
+ 1504 printer->pop_block();
- 1506 printer->add_multi_line(
- 1507 "_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};");
+ 1506 printer->pop_block();
+
- 1509 printer->fmt_line(
"auto inst = make_instance_{}(_lmc);", info.mod_suffix);
- 1510 printer->fmt_line(
"auto node_data = make_node_data_{}(*nt, *_ml_arg);", info.mod_suffix);
- 1511 printer->fmt_line(
"auto nodecount = _ml_arg->nodecount;");
- 1512 printer->push_block(
"for (int id = 0; id < nodecount; id++)");
-
- 1514 if (breakpoint_exist()) {
- 1515 printer->add_line(
"int node_id = node_data.nodeindices[id];");
- 1516 printer->fmt_line(
"node_data.node_diagonal[node_id] += inst.{}[id];",
-
-
-
+
+ 1510 printer->add_newline(2);
+
+ 1512 ParamVector args = {{
"",
"const _nrn_model_sorted_token&",
"",
"_sorted_token"},
+ 1513 {
"",
"NrnThread*",
"",
"nt"},
+ 1514 {
"",
"Memb_list*",
"",
"_ml_arg"},
+ 1515 {
"",
"int",
"",
"_type"}};
+
+ 1517 printer->fmt_push_block(
"static void {}({})",
+
+ 1519 get_parameter_str(args));
- 1521 printer->pop_block();
- 1522 printer->pop_block();
-
+
+ 1522 printer->add_multi_line(
+ 1523 "_nrn_mechanism_cache_range _lmc{_sorted_token, *nt, *_ml_arg, _type};");
-
-
-
-
-
-
-
-
-
-
-
+ 1525 printer->fmt_line(
"auto inst = make_instance_{}(_lmc);", info.mod_suffix);
+ 1526 printer->fmt_line(
"auto node_data = make_node_data_{}(*nt, *_ml_arg);", info.mod_suffix);
+ 1527 printer->fmt_line(
"auto nodecount = _ml_arg->nodecount;");
+ 1528 printer->push_block(
"for (int id = 0; id < nodecount; id++)");
+
+ 1530 if (breakpoint_exist()) {
+ 1531 printer->add_line(
"int node_id = node_data.nodeindices[id];");
+ 1532 printer->fmt_line(
"node_data.node_diagonal[node_id] += inst.{}[id];",
+
+
+
-
-
-
- 1540 printer->add_newline(2);
-
-
- 1543 printer->fmt_push_block(
"static void {}(Prop* _prop)", method);
- 1544 printer->add_line(
"Datum *_ppvar = nullptr;");
-
- 1546 if (info.point_process) {
- 1547 printer->push_block(
"if (nrn_point_prop_)");
- 1548 printer->add_multi_line(R
"CODE(
- 1549 _nrn_mechanism_access_alloc_seq(_prop) = _nrn_mechanism_access_alloc_seq(nrn_point_prop_);
- 1550 _ppvar = _nrn_mechanism_access_dparam(nrn_point_prop_);
-
- 1552 printer->chain_block("else");
-
- 1554 if (info.semantic_variable_count) {
- 1555 printer->fmt_line(
"_ppvar = nrn_prop_datum_alloc(mech_type, {}, _prop);",
- 1556 info.semantic_variable_count);
- 1557 printer->add_line(
"_nrn_mechanism_access_dparam(_prop) = _ppvar;");
-
- 1559 printer->add_multi_line(R
"CODE(
- 1560 _nrn_mechanism_cache_instance _lmc{_prop};
- 1561 size_t const _iml = 0;
-
- 1563 printer->fmt_line("assert(_nrn_mechanism_get_num_vars(_prop) == {});",
- 1564 codegen_float_variables.size());
- 1565 if (float_variables_size()) {
- 1566 printer->add_line(
"/*initialize range parameters*/");
- 1567 for (
size_t i_param = 0; i_param < info.range_parameter_vars.size(); ++i_param) {
- 1568 const auto var = info.range_parameter_vars[i_param];
- 1569 if (var->is_array()) {
-
-
- 1572 const auto& var_name = var->get_name();
- 1573 auto var_pos = position_of_float_var(var_name);
- 1574 double var_value = var->get_value() ==
nullptr ? 0.0 : *var->get_value();
-
- 1576 printer->fmt_line(
"_lmc.template fpfield<{}>(_iml) = {}; /* {} */",
-
- 1578 fmt::format(
"_parameter_defaults[{}]", i_param),
-
-
-
- 1582 if (info.point_process) {
- 1583 printer->pop_block();
-
-
- 1586 if (info.semantic_variable_count) {
- 1587 printer->add_line(
"_nrn_mechanism_access_dparam(_prop) = _ppvar;");
-
-
- 1590 const auto codegen_int_variables_size = codegen_int_variables.size();
+ 1537 printer->pop_block();
+ 1538 printer->pop_block();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1556 printer->add_newline(2);
+
+
+ 1559 printer->fmt_push_block(
"static void {}(Prop* _prop)", method);
+ 1560 printer->add_line(
"Datum *_ppvar = nullptr;");
+
+ 1562 if (info.point_process) {
+ 1563 printer->push_block(
"if (nrn_point_prop_)");
+ 1564 printer->add_multi_line(R
"CODE(
+ 1565 _nrn_mechanism_access_alloc_seq(_prop) = _nrn_mechanism_access_alloc_seq(nrn_point_prop_);
+ 1566 _ppvar = _nrn_mechanism_access_dparam(nrn_point_prop_);
+
+ 1568 printer->chain_block("else");
+
+ 1570 if (info.semantic_variable_count) {
+ 1571 printer->fmt_line(
"_ppvar = nrn_prop_datum_alloc(mech_type, {}, _prop);",
+ 1572 info.semantic_variable_count);
+ 1573 printer->add_line(
"_nrn_mechanism_access_dparam(_prop) = _ppvar;");
+
+ 1575 printer->add_multi_line(R
"CODE(
+ 1576 _nrn_mechanism_cache_instance _lmc{_prop};
+ 1577 size_t const _iml = 0;
+
+ 1579 printer->fmt_line("assert(_nrn_mechanism_get_num_vars(_prop) == {});",
+ 1580 codegen_float_variables.size());
+ 1581 if (float_variables_size()) {
+ 1582 printer->add_line(
"/*initialize range parameters*/");
+ 1583 for (
size_t i_param = 0; i_param < info.range_parameter_vars.size(); ++i_param) {
+ 1584 const auto var = info.range_parameter_vars[i_param];
+ 1585 if (var->is_array()) {
+
+
+ 1588 const auto& var_name = var->get_name();
+ 1589 auto var_pos = position_of_float_var(var_name);
+ 1590 double var_value = var->get_value() ==
nullptr ? 0.0 : *var->get_value();
- 1592 if (info.diam_used || info.area_used) {
- 1593 for (
size_t i = 0; i < codegen_int_variables.size(); ++i) {
- 1594 auto var_info = codegen_int_variables[i];
-
- 1596 printer->add_line(
"Symbol * morphology_sym = hoc_lookup(\"morphology\");");
- 1597 printer->fmt_line(
"Prop * morphology_prop = need_memb(morphology_sym);");
-
-
- 1600 "_ppvar[{}] = _nrn_mechanism_get_param_handle(morphology_prop, 0);", i);
-
-
- 1603 printer->fmt_line(
"_ppvar[{}] = _nrn_mechanism_get_area_handle(nrn_alloc_node_);",
-
-
-
-
-
- 1609 for (
const auto& ion: info.ions) {
- 1610 printer->fmt_line(
"Symbol * {}_sym = hoc_lookup(\"{}_ion\");", ion.name, ion.name);
- 1611 printer->fmt_line(
"Prop * {}_prop = need_memb({}_sym);", ion.name, ion.name);
-
- 1613 if (ion.is_exterior_conc_written()) {
- 1614 printer->fmt_line(
"nrn_check_conc_write(_prop, {}_prop, 0);", ion.name);
-
-
- 1617 if (ion.is_interior_conc_written()) {
- 1618 printer->fmt_line(
"nrn_check_conc_write(_prop, {}_prop, 1);", ion.name);
-
-
- 1621 int conc = ion.is_conc_written() ? 3 : int(ion.is_conc_read());
- 1622 int rev = ion.is_rev_written() ? 3 : int(ion.is_rev_read());
-
- 1624 printer->fmt_line(
"nrn_promote({}_prop, {}, {});", ion.name, conc, rev);
-
- 1626 for (
size_t i = 0; i < codegen_int_variables_size; ++i) {
- 1627 const auto& var = codegen_int_variables[i];
+ 1592 printer->fmt_line(
"_lmc.template fpfield<{}>(_iml) = {}; /* {} */",
+
+ 1594 fmt::format(
"_parameter_defaults[{}]", i_param),
+
+
+
+ 1598 if (info.point_process) {
+ 1599 printer->pop_block();
+
+
+ 1602 if (info.semantic_variable_count) {
+ 1603 printer->add_line(
"_nrn_mechanism_access_dparam(_prop) = _ppvar;");
+
+
+ 1606 const auto codegen_int_variables_size = codegen_int_variables.size();
+
+ 1608 if (info.diam_used || info.area_used) {
+ 1609 for (
size_t i = 0; i < codegen_int_variables.size(); ++i) {
+ 1610 auto var_info = codegen_int_variables[i];
+
+ 1612 printer->add_line(
"Symbol * morphology_sym = hoc_lookup(\"morphology\");");
+ 1613 printer->fmt_line(
"Prop * morphology_prop = need_memb(morphology_sym);");
+
+
+ 1616 "_ppvar[{}] = _nrn_mechanism_get_param_handle(morphology_prop, 0);", i);
+
+
+ 1619 printer->fmt_line(
"_ppvar[{}] = _nrn_mechanism_get_area_handle(nrn_alloc_node_);",
+
+
+
+
+
+ 1625 for (
const auto& ion: info.ions) {
+ 1626 printer->fmt_line(
"Symbol * {}_sym = hoc_lookup(\"{}_ion\");", ion.name, ion.name);
+ 1627 printer->fmt_line(
"Prop * {}_prop = need_memb({}_sym);", ion.name, ion.name);
- 1629 const std::string& var_name = var.symbol->get_name();
-
-
- 1632 std::string ion_var_name = std::string(var_name.begin() + 4, var_name.end());
- 1633 if (ion.is_ionic_variable(ion_var_name) ||
- 1634 ion.is_current_derivative(ion_var_name) || ion.is_rev_potential(ion_var_name)) {
- 1635 printer->fmt_line(
"_ppvar[{}] = _nrn_mechanism_get_param_handle({}_prop, {});",
-
-
- 1638 ion.variable_index(ion_var_name));
-
-
- 1641 if (ion.is_style(var_name)) {
-
- 1643 "_ppvar[{}] = {{neuron::container::do_not_search, "
- 1644 "&(_nrn_mechanism_access_dparam({}_prop)[0].literal_value<int>())}};",
-
-
-
-
-
-
-
-
-
- 1654 printer->pop_block();
-
-
-
-
-
-
-
-
-
- 1664 if (!nrn_state_required()) {
-
+ 1629 if (ion.is_exterior_conc_written()) {
+ 1630 printer->fmt_line(
"nrn_check_conc_write(_prop, {}_prop, 0);", ion.name);
+
+
+ 1633 if (ion.is_interior_conc_written()) {
+ 1634 printer->fmt_line(
"nrn_check_conc_write(_prop, {}_prop, 1);", ion.name);
+
+
+ 1637 int conc = ion.is_conc_written() ? 3 : int(ion.is_conc_read());
+ 1638 int rev = ion.is_rev_written() ? 3 : int(ion.is_rev_read());
+
+ 1640 printer->fmt_line(
"nrn_promote({}_prop, {}, {});", ion.name, conc, rev);
+
+ 1642 for (
size_t i = 0; i < codegen_int_variables_size; ++i) {
+ 1643 const auto& var = codegen_int_variables[i];
+
+ 1645 const std::string& var_name = var.symbol->get_name();
+
+
+ 1648 std::string ion_var_name = std::string(var_name.begin() + 4, var_name.end());
+ 1649 if (ion.is_ionic_variable(ion_var_name) ||
+ 1650 ion.is_current_derivative(ion_var_name) || ion.is_rev_potential(ion_var_name)) {
+ 1651 printer->fmt_line(
"_ppvar[{}] = _nrn_mechanism_get_param_handle({}_prop, {});",
+
+
+ 1654 ion.variable_index(ion_var_name));
+
+
+ 1657 if (ion.is_style(var_name)) {
+
+ 1659 "_ppvar[{}] = {{neuron::container::do_not_search, "
+ 1660 "&(_nrn_mechanism_access_dparam({}_prop)[0].literal_value<int>())}};",
+
+
+
+
+
-
- 1668 printer->add_newline(2);
-
-
- 1671 printer->push_block(
"for (int id = 0; id < nodecount; id++)");
- 1672 printer->add_line(
"int node_id = node_data.nodeindices[id];");
- 1673 printer->add_line(
"auto* _ppvar = _ml_arg->pdata[id];");
- 1674 printer->add_line(
"auto v = node_data.node_voltages[node_id];");
-
-
-
-
-
- 1680 if (ion_variable_struct_required()) {
- 1681 throw std::runtime_error(
"Not implemented.");
+
+
+
+ 1670 printer->pop_block();
+
+
+
+
+
+
+
+
+
+ 1680 if (!nrn_state_required()) {
+
-
- 1685 for (
auto& statement: read_statements) {
- 1686 printer->add_line(statement);
-
-
- 1689 if (info.nrn_state_block) {
- 1690 info.nrn_state_block->visit_children(*
this);
-
-
- 1693 if (info.currents.empty() && info.breakpoint_node !=
nullptr) {
- 1694 auto block = info.breakpoint_node->get_statement_block();
- 1695 print_statement_block(*block,
false,
false);
-
-
-
- 1699 for (
auto& statement: write_statements) {
- 1700 const auto& text = process_shadow_update_statement(statement,
BlockType::State);
- 1701 printer->add_line(text);
-
-
- 1704 printer->pop_block();
- 1705 printer->pop_block();
-
-
+ 1684 printer->add_newline(2);
+
+
+ 1687 printer->push_block(
"for (int id = 0; id < nodecount; id++)");
+ 1688 printer->add_line(
"int node_id = node_data.nodeindices[id];");
+ 1689 printer->add_line(
"auto* _ppvar = _ml_arg->pdata[id];");
+ 1690 printer->add_line(
"auto v = node_data.node_voltages[node_id];");
+
+
+
+
+
+ 1696 if (ion_variable_struct_required()) {
+ 1697 throw std::runtime_error(
"Not implemented.");
+
+
+
+ 1701 for (
auto& statement: read_statements) {
+ 1702 printer->add_line(statement);
+
+
+ 1705 if (info.nrn_state_block) {
+ 1706 info.nrn_state_block->visit_children(*
this);
+
-
-
-
-
-
- 1714 return get_arg_str(nrn_current_parameters());
-
-
-
-
- 1719 if (ion_variable_struct_required()) {
- 1720 throw std::runtime_error(
"Not implemented.");
-
-
- 1723 ParamVector params = {{
"",
"_nrn_mechanism_cache_range&",
"",
"_lmc"},
- 1724 {
"",
"NrnThread*",
"",
"nt"},
- 1725 {
"",
"Datum*",
"",
"_ppvar"},
- 1726 {
"",
"Datum*",
"",
"_thread"}};
-
- 1728 if (info.thread_callback_register) {
- 1729 auto type_name = fmt::format(
"{}&", thread_variables_struct());
- 1730 params.emplace_back(
"", type_name,
"",
"_thread_vars");
-
- 1732 params.emplace_back(
"",
"size_t",
"",
"id");
- 1733 params.emplace_back(
"", fmt::format(
"{}&", instance_struct()),
"",
"inst");
- 1734 params.emplace_back(
"", fmt::format(
"{}&", node_data_struct()),
"",
"node_data");
- 1735 params.emplace_back(
"",
"double",
"",
"v");
-
-
+ 1709 if (info.currents.empty() && info.breakpoint_node !=
nullptr) {
+ 1710 auto block = info.breakpoint_node->get_statement_block();
+ 1711 print_statement_block(*block,
false,
false);
+
+
+
+ 1715 for (
auto& statement: write_statements) {
+ 1716 const auto& text = process_shadow_update_statement(statement,
BlockType::State);
+ 1717 printer->add_line(text);
+
+
+ 1720 printer->pop_block();
+ 1721 printer->pop_block();
+
+
+
+
+
+
+
+
+ 1730 return get_arg_str(nrn_current_parameters());
+
+
+
+
+ 1735 if (ion_variable_struct_required()) {
+ 1736 throw std::runtime_error(
"Not implemented.");
+
-
-
-
- 1742 const auto& args = nrn_current_parameters();
-
- 1744 printer->add_newline(2);
- 1745 printer->fmt_push_block(
"inline double nrn_current_{}({})",
-
- 1747 get_parameter_str(args));
- 1748 printer->add_line(
"double current = 0.0;");
- 1749 print_statement_block(*block,
false,
false);
- 1750 for (
auto& current: info.currents) {
- 1751 const auto& name = get_variable_name(current);
- 1752 printer->fmt_line(
"current += {};", name);
-
- 1754 printer->add_line(
"return current;");
- 1755 printer->pop_block();
-
-
-
-
-
-
- 1762 print_statement_block(*block,
false,
false);
- 1763 if (!info.currents.empty()) {
-
- 1765 for (
const auto& current: info.currents) {
- 1766 auto var = breakpoint_current(current);
- 1767 sum += get_variable_name(var);
- 1768 if (¤t != &info.currents.back()) {
-
-
-
- 1772 printer->fmt_line(
"double rhs = {};", sum);
-
-
-
- 1776 for (
const auto& conductance: info.conductances) {
- 1777 auto var = breakpoint_current(conductance.variable);
- 1778 sum += get_variable_name(var);
- 1779 if (&conductance != &info.conductances.back()) {
-
-
-
- 1783 printer->fmt_line(
"double g = {};", sum);
-
- 1785 for (
const auto& conductance: info.conductances) {
- 1786 if (!conductance.ion.empty()) {
-
-
- 1789 const auto& rhs = get_variable_name(conductance.variable);
-
-
- 1792 printer->add_line(text);
-
-
-
-
-
-
-
- 1800 printer->fmt_line(
"double I1 = nrn_current_{}({}+0.001);",
-
- 1802 nrn_current_arguments());
- 1803 for (
auto& ion: info.ions) {
- 1804 for (
auto& var: ion.writes) {
- 1805 if (ion.is_ionic_current(var)) {
- 1806 const auto& name = get_variable_name(var);
- 1807 printer->fmt_line(
"double di{} = {};", ion.name, name);
-
+ 1739 ParamVector params = {{
"",
"_nrn_mechanism_cache_range&",
"",
"_lmc"},
+ 1740 {
"",
"NrnThread*",
"",
"nt"},
+ 1741 {
"",
"Datum*",
"",
"_ppvar"},
+ 1742 {
"",
"Datum*",
"",
"_thread"}};
+
+ 1744 if (info.thread_callback_register) {
+ 1745 auto type_name = fmt::format(
"{}&", thread_variables_struct());
+ 1746 params.emplace_back(
"", type_name,
"",
"_thread_vars");
+
+ 1748 params.emplace_back(
"",
"size_t",
"",
"id");
+ 1749 params.emplace_back(
"", fmt::format(
"{}&", instance_struct()),
"",
"inst");
+ 1750 params.emplace_back(
"", fmt::format(
"{}&", node_data_struct()),
"",
"node_data");
+ 1751 params.emplace_back(
"",
"double",
"",
"v");
+
+
+
+
+
+
+ 1758 const auto& args = nrn_current_parameters();
+
+ 1760 printer->add_newline(2);
+ 1761 printer->fmt_push_block(
"inline double nrn_current_{}({})",
+
+ 1763 get_parameter_str(args));
+ 1764 printer->add_line(
"double current = 0.0;");
+ 1765 print_statement_block(*block,
false,
false);
+ 1766 for (
auto& current: info.currents) {
+ 1767 const auto& name = get_variable_name(current);
+ 1768 printer->fmt_line(
"current += {};", name);
+
+ 1770 printer->add_line(
"return current;");
+ 1771 printer->pop_block();
+
+
+
+
+
+
+ 1778 print_statement_block(*block,
false,
false);
+ 1779 if (!info.currents.empty()) {
+
+ 1781 for (
const auto& current: info.currents) {
+ 1782 auto var = breakpoint_current(current);
+ 1783 sum += get_variable_name(var);
+ 1784 if (¤t != &info.currents.back()) {
+
+
+
+ 1788 printer->fmt_line(
"double rhs = {};", sum);
+
+
+
+ 1792 for (
const auto& conductance: info.conductances) {
+ 1793 auto var = breakpoint_current(conductance.variable);
+ 1794 sum += get_variable_name(var);
+ 1795 if (&conductance != &info.conductances.back()) {
+
+
+
+ 1799 printer->fmt_line(
"double g = {};", sum);
+
+ 1801 for (
const auto& conductance: info.conductances) {
+ 1802 if (!conductance.ion.empty()) {
+
+
+ 1805 const auto& rhs = get_variable_name(conductance.variable);
+
+
+ 1808 printer->add_line(text);
- 1811 printer->fmt_line(
"double I0 = nrn_current_{}({});", info.mod_suffix, nrn_current_arguments());
- 1812 printer->add_line(
"double rhs = I0;");
-
- 1814 printer->add_line(
"double g = (I1-I0)/0.001;");
- 1815 for (
auto& ion: info.ions) {
- 1816 for (
auto& var: ion.writes) {
- 1817 if (ion.is_ionic_current(var)) {
-
- 1819 auto rhs = fmt::format(
"(di{}-{})/0.001", ion.name, get_variable_name(var));
- 1820 if (info.point_process) {
-
- 1822 rhs += fmt::format(
"*1.e2/{}", area);
-
-
-
- 1826 printer->add_line(text);
-
-
-
-
-
-
-
-
- 1835 printer->add_line(
"int node_id = node_data.nodeindices[id];");
- 1836 printer->add_line(
"double v = node_data.node_voltages[node_id];");
- 1837 printer->add_line(
"auto* _ppvar = _ml_arg->pdata[id];");
-
- 1839 for (
auto& statement: read_statements) {
- 1840 printer->add_line(statement);
-
-
- 1843 if (info.conductances.empty()) {
- 1844 print_nrn_cur_non_conductance_kernel();
-
- 1846 print_nrn_cur_conductance_kernel(node);
-
-
-
- 1850 for (
auto& statement: write_statements) {
-
- 1852 printer->add_line(text);
-
-
- 1855 if (info.point_process) {
-
- 1857 printer->fmt_line(
"double mfactor = 1.e2/{};", area);
- 1858 printer->add_line(
"g = g*mfactor;");
- 1859 printer->add_line(
"rhs = rhs*mfactor;");
-
-
-
-
+
+
+
+
+
+ 1816 printer->fmt_line(
"double I1 = nrn_current_{}({}+0.001);",
+
+ 1818 nrn_current_arguments());
+ 1819 for (
auto& ion: info.ions) {
+ 1820 for (
auto& var: ion.writes) {
+ 1821 if (ion.is_ionic_current(var)) {
+ 1822 const auto& name = get_variable_name(var);
+ 1823 printer->fmt_line(
"double di{} = {};", ion.name, name);
+
+
+
+ 1827 printer->fmt_line(
"double I0 = nrn_current_{}({});", info.mod_suffix, nrn_current_arguments());
+ 1828 printer->add_line(
"double rhs = I0;");
+
+ 1830 printer->add_line(
"double g = (I1-I0)/0.001;");
+ 1831 for (
auto& ion: info.ions) {
+ 1832 for (
auto& var: ion.writes) {
+ 1833 if (ion.is_ionic_current(var)) {
+
+ 1835 auto rhs = fmt::format(
"(di{}-{})/0.001", ion.name, get_variable_name(var));
+ 1836 if (info.point_process) {
+
+ 1838 rhs += fmt::format(
"*1.e2/{}", area);
+
+
+
+ 1842 printer->add_line(text);
+
+
+
+
+
+
+
+
+ 1851 printer->add_line(
"int node_id = node_data.nodeindices[id];");
+ 1852 printer->add_line(
"double v = node_data.node_voltages[node_id];");
+ 1853 printer->add_line(
"auto* _ppvar = _ml_arg->pdata[id];");
+
+ 1855 for (
auto& statement: read_statements) {
+ 1856 printer->add_line(statement);
+
+
+ 1859 if (info.conductances.empty()) {
+ 1860 print_nrn_cur_non_conductance_kernel();
+
+ 1862 print_nrn_cur_conductance_kernel(node);
+
-
-
-
-
-
+
+ 1866 for (
auto& statement: write_statements) {
+
+ 1868 printer->add_line(text);
+
-
-
-
- 1874 if (!nrn_cur_required()) {
-
+ 1871 if (info.point_process) {
+
+ 1873 printer->fmt_line(
"double mfactor = 1.e2/{};", area);
+ 1874 printer->add_line(
"g = g*mfactor;");
+ 1875 printer->add_line(
"rhs = rhs*mfactor;");
- 1878 if (info.conductances.empty()) {
- 1879 print_nrn_current(*info.breakpoint_node);
-
-
- 1882 printer->add_newline(2);
- 1883 printer->add_line(
"/** update current */");
-
-
- 1886 printer->push_block(
"for (int id = 0; id < nodecount; id++)");
- 1887 print_nrn_cur_kernel(*info.breakpoint_node);
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ 1890 if (!nrn_cur_required()) {
+
+
- 1894 printer->add_line(
"node_data.node_rhs[node_id] -= rhs;");
-
- 1896 if (breakpoint_exist()) {
- 1897 printer->fmt_line(
"inst.{}[id] = g;",
-
-
-
- 1901 printer->pop_block();
-
-
-
-
-
-
-
+ 1894 if (info.conductances.empty()) {
+ 1895 print_nrn_current(*info.breakpoint_node);
+
+
+ 1898 printer->add_newline(2);
+ 1899 printer->add_line(
"/** update current */");
+
+
+ 1902 printer->push_block(
"for (int id = 0; id < nodecount; id++)");
+ 1903 print_nrn_cur_kernel(*info.breakpoint_node);
+
+
+
+
+
-
- 1911 printer->pop_block();
-
-
-
-
-
-
+ 1910 printer->add_line(
"node_data.node_rhs[node_id] -= rhs;");
+
+ 1912 if (breakpoint_exist()) {
+ 1913 printer->fmt_line(
"inst.{}[id] = g;",
+
+
+
+ 1917 printer->pop_block();
-
- 1920 print_standard_includes();
- 1921 print_neuron_includes();
-
- 1923 if (info.thread_callback_register) {
- 1924 printer->add_line(
"extern void _nrn_thread_reg(int, int, void(*)(Datum*));");
-
-
-
-
-
- 1930 print_global_macros();
- 1931 print_mechanism_variables_macros();
-
- 1933 printer->add_line(
"extern Node* nrn_alloc_node_;");
-
-
-
-
- 1938 printer->add_newline();
- 1939 printer->add_line(
"/* NEURON global macro definitions */");
- 1940 if (info.vectorize) {
- 1941 printer->add_multi_line(R
"CODE(
-
- 1943 #define NRN_VECTORIZED 1
-
-
- 1946 printer->add_multi_line(R
"CODE(
- 1947 /* NOT VECTORIZED */
- 1948 #define NRN_VECTORIZED 0
-
-
-
-
-
-
- 1955 printer->add_newline();
- 1956 printer->add_line(
"static constexpr auto number_of_datum_variables = ",
-
-
- 1959 printer->add_line(
"static constexpr auto number_of_floating_point_variables = ",
-
-
- 1962 printer->add_newline();
- 1963 printer->add_multi_line(R
"CODE(
-
- 1965 template <typename T>
- 1966 using _nrn_mechanism_std_vector = std::vector<T>;
- 1967 using _nrn_model_sorted_token = neuron::model_sorted_token;
- 1968 using _nrn_mechanism_cache_range = neuron::cache::MechanismRange<number_of_floating_point_variables, number_of_datum_variables>;
- 1969 using _nrn_mechanism_cache_instance = neuron::cache::MechanismInstance<number_of_floating_point_variables, number_of_datum_variables>;
- 1970 using _nrn_non_owning_id_without_container = neuron::container::non_owning_identifier_without_container;
- 1971 template <typename T>
- 1972 using _nrn_mechanism_field = neuron::mechanism::field<T>;
- 1973 template <typename... Args>
- 1974 void _nrn_mechanism_register_data_fields(Args&&... args) {
- 1975 neuron::mechanism::register_data_fields(std::forward<Args>(args)...);
-
-
-
-
- 1980 if (info.point_process) {
- 1981 printer->add_line(
"extern Prop* nrn_point_prop_;");
-
- 1983 printer->add_line(
"Prop* hoc_getdata_range(int type);");
-
-
-
- 1987 if (info.table_count > 0) {
- 1988 printer->add_line(
"void _nrn_thread_table_reg(int, nrn_thread_table_check_t);");
-
-
-
-
-
- 1994 print_mechanism_global_var_structure(print_initializers);
- 1995 print_mechanism_range_var_structure(print_initializers);
- 1996 print_node_data_structure(print_initializers);
- 1997 print_thread_variables_structure(print_initializers);
- 1998 print_make_instance();
- 1999 print_make_node_data();
-
-
-
-
- 2004 if (!info.vectorize) {
-
-
- 2007 printer->add_multi_line(R
"CODE(
-
- 2009 inst->v_unused[id] = v;
-
-
-
-
-
-
- 2016 printer->add_multi_line(R
"CODE(
-
- 2018 inst->g_unused[id] = g;
-
-
-
-
-
-
-
- 2026 print_hoc_py_wrapper_function_definitions();
- 2027 for (
const auto& procedure: info.procedures) {
- 2028 print_procedure(*procedure);
-
- 2030 for (
const auto&
function: info.functions) {
- 2031 print_function(*
function);
-
-
-
-
-
- 2037 print_net_receive();
-
-
-
-
-
- 2043 print_backend_info();
- 2044 print_headers_include();
- 2045 print_macro_definitions();
- 2046 print_neuron_global_variable_declarations();
- 2047 print_namespace_start();
- 2048 print_nmodl_constants();
- 2049 print_prcellstate_macros();
- 2050 print_mechanism_info();
- 2051 print_data_structures(
true);
-
- 2053 print_function_prototypes();
- 2054 print_functors_definitions();
- 2055 print_global_variables_for_hoc();
- 2056 print_thread_memory_callbacks();
- 2057 print_compute_functions();
- 2058 print_sdlists_init(
true);
- 2059 print_mechanism_register();
- 2060 print_namespace_stop();
-
-
-
- 2064 throw std::runtime_error(
"Not implemented.");
-
-
-
-
-
-
- 2071 if (printing_net_init) {
- 2072 throw std::runtime_error(
"Not implemented. [jfiwoei]");
-
-
- 2075 std::string weight_pointer =
"nullptr";
-
-
- 2078 if (!printing_net_receive) {
- 2079 point_process +=
".get<Point_process*>()";
-
- 2081 const auto& tqitem = get_variable_name(
"tqitem",
false);
+
+
+
+
+
+
+
+
+ 1927 printer->pop_block();
+
+
+
+
+
+
+
+
+ 1936 print_standard_includes();
+ 1937 print_neuron_includes();
+
+ 1939 if (info.thread_callback_register) {
+ 1940 printer->add_line(
"extern void _nrn_thread_reg(int, int, void(*)(Datum*));");
+
+
+
+
+
+ 1946 print_global_macros();
+ 1947 print_mechanism_variables_macros();
+
+ 1949 printer->add_line(
"extern Node* nrn_alloc_node_;");
+
+
+
+
+ 1954 printer->add_newline();
+ 1955 printer->add_line(
"/* NEURON global macro definitions */");
+ 1956 if (info.vectorize) {
+ 1957 printer->add_multi_line(R
"CODE(
+
+ 1959 #define NRN_VECTORIZED 1
+
+
+ 1962 printer->add_multi_line(R
"CODE(
+ 1963 /* NOT VECTORIZED */
+ 1964 #define NRN_VECTORIZED 0
+
+
+
+
+
+
+ 1971 printer->add_newline();
+ 1972 printer->add_line(
"static constexpr auto number_of_datum_variables = ",
+
+
+ 1975 printer->add_line(
"static constexpr auto number_of_floating_point_variables = ",
+
+
+ 1978 printer->add_newline();
+ 1979 printer->add_multi_line(R
"CODE(
+
+ 1981 template <typename T>
+ 1982 using _nrn_mechanism_std_vector = std::vector<T>;
+ 1983 using _nrn_model_sorted_token = neuron::model_sorted_token;
+ 1984 using _nrn_mechanism_cache_range = neuron::cache::MechanismRange<number_of_floating_point_variables, number_of_datum_variables>;
+ 1985 using _nrn_mechanism_cache_instance = neuron::cache::MechanismInstance<number_of_floating_point_variables, number_of_datum_variables>;
+ 1986 using _nrn_non_owning_id_without_container = neuron::container::non_owning_identifier_without_container;
+ 1987 template <typename T>
+ 1988 using _nrn_mechanism_field = neuron::mechanism::field<T>;
+ 1989 template <typename... Args>
+ 1990 void _nrn_mechanism_register_data_fields(Args&&... args) {
+ 1991 neuron::mechanism::register_data_fields(std::forward<Args>(args)...);
+
+
+
+
+ 1996 if (info.point_process) {
+ 1997 printer->add_line(
"extern Prop* nrn_point_prop_;");
+
+ 1999 printer->add_line(
"Prop* hoc_getdata_range(int type);");
+
+
+
+ 2003 if (info.table_count > 0) {
+ 2004 printer->add_line(
"void _nrn_thread_table_reg(int, nrn_thread_table_check_t);");
+
+
+
+
+
+ 2010 print_mechanism_global_var_structure(print_initializers);
+ 2011 print_mechanism_range_var_structure(print_initializers);
+ 2012 print_node_data_structure(print_initializers);
+ 2013 print_thread_variables_structure(print_initializers);
+ 2014 print_make_instance();
+ 2015 print_make_node_data();
+
+
+
+
+ 2020 if (!info.vectorize) {
+
+
+ 2023 printer->add_multi_line(R
"CODE(
+
+ 2025 inst->v_unused[id] = v;
+
+
+
+
+
+
+ 2032 printer->add_multi_line(R
"CODE(
+
+ 2034 inst->g_unused[id] = g;
+
+
+
+
+
+
+
+ 2042 print_hoc_py_wrapper_function_definitions();
+ 2043 for (
const auto& procedure: info.procedures) {
+ 2044 print_procedure(*procedure);
+
+ 2046 for (
const auto&
function: info.functions) {
+ 2047 print_function(*
function);
+
+
+
+
+
+ 2053 print_net_receive();
+
+
+
+
+
+ 2059 print_backend_info();
+ 2060 print_headers_include();
+ 2061 print_macro_definitions();
+ 2062 print_neuron_global_variable_declarations();
+ 2063 print_namespace_start();
+ 2064 print_nmodl_constants();
+ 2065 print_prcellstate_macros();
+ 2066 print_mechanism_info();
+ 2067 print_data_structures(
true);
+
+ 2069 print_function_prototypes();
+ 2070 print_functors_definitions();
+ 2071 print_global_variables_for_hoc();
+ 2072 print_thread_memory_callbacks();
+ 2073 print_compute_functions();
+ 2074 print_sdlists_init(
true);
+ 2075 print_mechanism_register();
+ 2076 print_namespace_stop();
+
+
+
+ 2080 throw std::runtime_error(
"Not implemented.");
+
- 2083 printer->fmt_text(
"{}(/* tqitem */ &{}, {}, {}, {} + ",
- 2084 info.artificial_cell ?
"artcell_net_send" :
"net_send",
-
-
-
- 2088 get_variable_name(
"t"));
- 2089 print_vector_elements(arguments,
", ");
- 2090 printer->add_text(
')');
-
-
-
- 2094 const auto& point_process = get_variable_name(
"point_process",
false);
- 2095 const auto& tqitem = get_variable_name(
"tqitem",
false);
-
- 2097 printer->fmt_text(
"{}(/* tqitem */ &{}, {}, ",
- 2098 info.artificial_cell ?
"artcell_net_move" :
"net_move",
-
-
-
-
- 2103 printer->add_text(
')');
-
-
-
-
-
- 2109 printer->fmt_text(
"net_event({}, t)", point_process);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 2133 auto n_parameters = parameters.size();
- 2134 for (
size_t i = 0; i < n_parameters; ++i) {
- 2135 const auto& name = parameters[i]->get_node_name();
-
-
-
-
-
-
-
-
-
- 2145 printing_net_receive =
true;
- 2146 auto node = info.net_receive_node;
-
-
-
-
- 2151 ParamVector args = {{
"",
"Point_process*",
"",
"_pnt"},
- 2152 {
"",
"double*",
"",
"_args"},
- 2153 {
"",
"double",
"",
"flag"}};
-
- 2155 printer->fmt_push_block(
"static void nrn_net_receive_{}({})",
-
- 2157 get_parameter_str(args));
-
-
-
- 2161 printer->add_line(
"_nrn_mechanism_cache_instance _lmc{_pnt->prop};");
- 2162 printer->add_line(
"auto * nt = static_cast<NrnThread*>(_pnt->_vnt);");
- 2163 printer->add_line(
"auto * _ppvar = _nrn_mechanism_access_dparam(_pnt->prop);");
-
- 2165 printer->fmt_line(
"auto inst = make_instance_{}(_lmc);", info.mod_suffix);
- 2166 printer->fmt_line(
"// nocmodl has a nullptr dereference for thread variables.");
- 2167 printer->fmt_line(
"// NMODL will fail to compile at a later point, because of");
- 2168 printer->fmt_line(
"// missing '_thread_vars'.");
- 2169 printer->fmt_line(
"Datum * _thread = nullptr;");
+
+
+
+
+ 2087 if (printing_net_init) {
+ 2088 throw std::runtime_error(
"Not implemented. [jfiwoei]");
+
+
+ 2091 std::string weight_pointer =
"nullptr";
+
+
+ 2094 if (!printing_net_receive) {
+ 2095 point_process +=
".get<Point_process*>()";
+
+ 2097 const auto& tqitem = get_variable_name(
"tqitem",
false);
+
+ 2099 printer->fmt_text(
"{}(/* tqitem */ &{}, {}, {}, {} + ",
+ 2100 info.artificial_cell ?
"artcell_net_send" :
"net_send",
+
+
+
+ 2104 get_variable_name(
"t"));
+ 2105 print_vector_elements(arguments,
", ");
+ 2106 printer->add_text(
')');
+
+
+
+ 2110 const auto& point_process = get_variable_name(
"point_process",
false);
+ 2111 const auto& tqitem = get_variable_name(
"tqitem",
false);
+
+ 2113 printer->fmt_text(
"{}(/* tqitem */ &{}, {}, ",
+ 2114 info.artificial_cell ?
"artcell_net_move" :
"net_move",
+
+
+
+
+ 2119 printer->add_text(
')');
+
+
+
+
+
+ 2125 printer->fmt_text(
"net_event({}, t)", point_process);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2149 auto n_parameters = parameters.size();
+ 2150 for (
size_t i = 0; i < n_parameters; ++i) {
+ 2151 const auto& name = parameters[i]->get_node_name();
+
+
+
+
+
+
+
+
+
+ 2161 printing_net_receive =
true;
+ 2162 auto node = info.net_receive_node;
+
+
+
+
+ 2167 ParamVector args = {{
"",
"Point_process*",
"",
"_pnt"},
+ 2168 {
"",
"double*",
"",
"_args"},
+ 2169 {
"",
"double",
"",
"flag"}};
- 2171 printer->add_line(
"size_t id = 0;");
- 2172 printer->add_line(
"double t = nt->_t;");
-
- 2174 print_statement_block(*node->get_statement_block(),
false,
false);
-
- 2176 printer->add_newline();
- 2177 printer->pop_block();
- 2178 printing_net_receive =
false;
-
+ 2171 printer->fmt_push_block(
"static void nrn_net_receive_{}({})",
+
+ 2173 get_parameter_str(args));
+
+
+
+ 2177 printer->add_line(
"_nrn_mechanism_cache_instance _lmc{_pnt->prop};");
+ 2178 printer->add_line(
"auto * nt = static_cast<NrnThread*>(_pnt->_vnt);");
+ 2179 printer->add_line(
"auto * _ppvar = _nrn_mechanism_access_dparam(_pnt->prop);");
-
-
-
-
-
-
-
-
-
-
+ 2181 printer->fmt_line(
"auto inst = make_instance_{}(_lmc);", info.mod_suffix);
+ 2182 printer->fmt_line(
"// nocmodl has a nullptr dereference for thread variables.");
+ 2183 printer->fmt_line(
"// NMODL will fail to compile at a later point, because of");
+ 2184 printer->fmt_line(
"// missing '_thread_vars'.");
+ 2185 printer->fmt_line(
"Datum * _thread = nullptr;");
+
+ 2187 printer->add_line(
"size_t id = 0;");
+ 2188 printer->add_line(
"double t = nt->_t;");
+
+ 2190 print_statement_block(*node->get_statement_block(),
false,
false);
-
-
+ 2192 printer->add_newline();
+ 2193 printer->pop_block();
+ 2194 printing_net_receive =
false;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static bool starts_with(const std::string &haystack, const std::string &needle)
Check if haystack starts with needle.
-void print_nrn_destructor() override
Print nrn_destructor function definition.
+void print_nrn_destructor() override
Print nrn_destructor function definition.
Base class for all AST node.
bool is_index
if this is pure index (e.g.
-void print_nrn_cur_non_conductance_kernel() override
Print the nrn_cur kernel without NMODL conductance keyword provisions.
+void print_nrn_cur_non_conductance_kernel() override
Print the nrn_cur kernel without NMODL conductance keyword provisions.
std::string py_function_signature(const std::string &function_or_procedure_name) const
Get the signature of the npy <func_or_proc_name> function.
Helper to represent information about index/int variables.
-void print_nrn_cur() override
Print nrn_cur / current update function definition.
-void print_macro_definitions()
Print all NEURON macros.
-void print_net_event_call(const ast::FunctionCall &node) override
Print call to net_event.
+void print_nrn_cur() override
Print nrn_cur / current update function definition.
+void print_macro_definitions()
Print all NEURON macros.
+void print_net_event_call(const ast::FunctionCall &node) override
Print call to net_event.
static constexpr char POINT_PROCESS_VARIABLE[]
inbuilt neuron variable for point process
void print_neuron_includes()
Print includes from NEURON.
static constexpr char NRN_JACOB_METHOD[]
nrn_jacob method in generated code
@@ -2307,13 +2323,13 @@
void print_hoc_py_wrapper_function_body(const ast::Block *function_or_procedure_block, InterpreterWrapper wrapper_type)
std::string internal_method_arguments() override
Arguments for functions that are defined and used internally.
std::shared_ptr< symtab::Symbol > SymbolType
-void print_nrn_alloc() override
Print nrn_alloc function definition.
+void print_nrn_alloc() override
Print nrn_alloc function definition.
static constexpr char VOLTAGE_UNUSED_VARIABLE[]
range variable for voltage when unused (for vectorized model)
std::string register_mechanism_arguments() const override
Arguments for register_mech or point_register_mech function.
int position_of_int_var(const std::string &name) const override
Determine the position in the data array for a given int variable.
const ArgumentVector & get_parameters() const noexcept override
Getter for member variable NetReceiveBlock::parameters.
-std::string nrn_current_arguments()
+std::string nrn_current_arguments()
std::string table_thread_function_name() const
Name of the threaded table checking function.
bool optimize_ion_variable_copies() const override
Check if ion variable copies should be avoided.
std::string hoc_function_name(const std::string &function_or_procedure_name) const
All functions and procedures need a hoc <func_or_proc_name> to be available to the HOC interpreter.
@@ -2325,20 +2341,20 @@
Visitor for printing C++ code compatible with legacy api of NEURON
std::string backend_name() const override
Name of the code generation backend.
std::string process_verbatim_text(std::string const &text) override
Process a verbatim block for possible variable renaming.
-ParamVector nrn_current_parameters()
+ParamVector nrn_current_parameters()
void print_global_param_default_values()
Print global struct with default value of RANGE PARAMETERs.
std::string name
name of the ion
static constexpr char NTHREAD_DT_VARIABLE[]
dt variable in neuron thread structure
-void print_g_unused() const override
Set g_unused (conductance) for NRN_PRCELLSTATE feature.
-void visit_watch_statement(const ast::WatchStatement &node) override
TODO: Edit for NEURON.
+void print_g_unused() const override
Set g_unused (conductance) for NRN_PRCELLSTATE feature.
+void visit_watch_statement(const ast::WatchStatement &node) override
TODO: Edit for NEURON.
virtual bool is_procedure_block() const noexcept
Check if the ast node is an instance of ast::ProcedureBlock.
-void print_net_send_call(const ast::FunctionCall &node) override
Print call to net_send.
+void print_net_send_call(const ast::FunctionCall &node) override
Print call to net_send.
Check if variable is used in given block.
Implement string manipulation functions.
-void print_net_move_call(const ast::FunctionCall &node) override
Print call to net_move.
+void print_net_move_call(const ast::FunctionCall &node) override
Print call to net_move.
std::string thread_variable_name(const ThreadVariableInfo &var_info, bool use_instance=true) const
Determine the C++ string to print for thread variables.
static constexpr char NODE_AREA_VARIABLE[]
inbuilt neuron variable for area of the compartment
-void print_nrn_state() override
Print nrn_state / state update function definition.
+void print_nrn_state() override
Print nrn_state / state update function definition.
virtual bool is_function_block() const noexcept
Check if the ast node is an instance of ast::FunctionBlock.
static constexpr char NRN_ALLOC_METHOD[]
nrn_alloc method in generated code
void print_initial_block(const ast::InitialBlock *node)
Print the initial block.
@@ -2349,8 +2365,8 @@
std::shared_ptr< StatementBlock > get_statement_block() const noexcept override
Getter for member variable BreakpointBlock::statement_block.
void print_hoc_py_wrapper_function_definitions()
std::string rev_potential_pointer_name() const
-void print_v_unused() const override
Set v_unused (voltage) for NRN_PRCELLSTATE feature.
-void print_ion_variable() override
+void print_v_unused() const override
Set v_unused (voltage) for NRN_PRCELLSTATE feature.
+void print_ion_variable() override
static constexpr char CONDUCTANCE_VARIABLE[]
range variable for conductance
ParamVector functor_params() override
The parameters of the Newton solver "functor".
Visitor for printing C++ code compatible with legacy api of CoreNEURON
@@ -2365,7 +2381,7 @@
Represent WATCH statement in NMODL.
void print_neuron_global_variable_declarations()
Print extern declarations for neuron global variables.
Represents a BREAKPOINT block in NMODL.
-void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node) override
Print the nrn_cur kernel with NMODL conductance keyword provisions.
+void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node) override
Print the nrn_cur kernel with NMODL conductance keyword provisions.
std::string int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const override
Determine the name of an int variable given its symbol.
InterpreterWrapper
Enum to switch between HOC and Python wrappers for functions and procedures defined in mechanisms.
@@ -2376,21 +2392,21 @@
std::string hoc_function_signature(const std::string &function_or_procedure_name) const
Get the signature of the hoc <func_or_proc_name> function.
void print_thread_variables_structure(bool print_initializers)
Print the data structure used to access thread variables.
std::string to_string(const T &obj)
-void print_compute_functions() override
Print all compute functions for every backend.
+void print_compute_functions() override
Print all compute functions for every backend.
static constexpr char NRN_INIT_METHOD[]
nrn_init method in generated code
const ExpressionVector & get_arguments() const noexcept
Getter for member variable FunctionCall::arguments.
void print_thread_memory_callbacks()
Print thread variable (de-)initialization functions.
static void rename_net_receive_arguments(const ast::NetReceiveBlock &net_receive_node, const ast::Node &node)
Rename arguments to NET_RECEIVE block with corresponding pointer variable.
-void print_nrn_cur_kernel(const ast::BreakpointBlock &node) override
Print main body of nrn_cur function.
+void print_nrn_cur_kernel(const ast::BreakpointBlock &node) override
Print main body of nrn_cur function.
Blindly rename given variable to new name
static constexpr char NRN_CUR_METHOD[]
nrn_cur method in generated code
void print_mechanism_register() override
Print the mechanism registration function.
Implement utility functions for codegen visitors.
static constexpr char TQITEM_VARIABLE[]
inbuilt neuron variable for tqitem process
-void print_nrn_jacob()
Print nrn_jacob function definition.
+void print_nrn_jacob()
Print nrn_jacob function definition.
-void print_fast_imem_calculation() override
Print fast membrane current calculation code.
-void print_data_structures(bool print_initializers) override
Print all classes.
+void print_fast_imem_calculation() override
Print fast membrane current calculation code.
+void print_data_structures(bool print_initializers) override
Print all classes.
void print_sdlists_init(bool print_initializers) override
const std::string external_method_arguments() noexcept override
Arguments for external functions called from generated code.
std::string py_function_name(const std::string &function_or_procedure_name) const
In non POINT_PROCESS mechanisms all functions and procedures need a py <func_or_proc_name> to be avai...
@@ -2404,17 +2420,17 @@
void print_setdata_functions()
Print NEURON functions related to setting global variables of the mechanism.
std::string get_name(const std::shared_ptr< symtab::Symbol > &sym)
Represents ion write statement during code generation.
-void print_mechanism_variables_macros()
Print mechanism variables' related macros.
-void print_nrn_constructor() override
Print nrn_constructor function definition.
+void print_mechanism_variables_macros()
Print mechanism variables' related macros.
+void print_nrn_constructor() override
Print nrn_constructor function definition.
void print_check_table_function_prototypes()
Print all check_* function declarations.
BlockType
Helper to represent various block types.
-void print_headers_include() override
Print all includes.
+void print_headers_include() override
Print all includes.
const ParamVector external_method_parameters(bool table=false) noexcept override
Parameters for functions in generated code that are called back from external code.
void print_function_or_procedure(const ast::Block &node, const std::string &name, const std::unordered_set< CppObjectSpecifier > &specifiers={ CppObjectSpecifier::Inline}) override
Print nmodl function or procedure (common code)
static constexpr char NRN_STATE_METHOD[]
nrn_state method in generated code
const std::shared_ptr< symtab::Symbol > symbol
Version information and units file path.
-void print_nrn_current(const ast::BreakpointBlock &node) override
Print the nrn_current kernel.
+void print_nrn_current(const ast::BreakpointBlock &node) override
Print the nrn_current kernel.
int position_of_float_var(const std::string &name) const override
Determine the position in the data array for a given float variable.
std::string get_variable_name(const std::string &name, bool use_instance=true) const override
Determine variable name in the structure of mechanism properties.
static constexpr char AREA_VARIABLE[]
similar to node_area but user can explicitly declare it as area
@@ -2434,7 +2450,7 @@
static bool ends_with(const std::string &haystack, const std::string &needle)
Check if haystack ends with needle.
static constexpr char CONDUCTANCE_UNUSED_VARIABLE[]
range variable when conductance is not used (for vectorized model)
-void print_codegen_routines() override
Print entry point to code generation.
+void print_codegen_routines() override
Print entry point to code generation.
void append_conc_write_statements(std::vector< ShadowUseStatement > &statements, const Ion &ion, const std::string &concentration) override
Generate Function call statement for nrn_wrote_conc.
static constexpr char NRN_POINTERINDEX[]
hoc_nrnpointerindex name
@@ -2442,11 +2458,11 @@
int get_index_from_name(const std::vector< T > &variables, const std::string &name)
virtual std::string get_node_name() const
Return name of of the node.
Auto generated AST classes declaration.
-void print_net_receive()
Print net_receive call-back.
+void print_net_receive()
Print net_receive call-back.
void print_function_prototypes() override
Print function and procedures prototype declaration.
void print_mechanism_global_var_structure(bool print_initializers) override
Print the structure that wraps all global variables used in the NMODL.
std::string namespace_name() override
Name of "our" namespace.
-void print_global_macros()
Print NEURON global variable macros.
+void print_global_macros()
Print NEURON global variable macros.
std::string intra_conc_pointer_name() const
std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
A vector of parameters represented by a 4-tuple of strings:
static constexpr char ION_VARNAME_PREFIX[]
prefix for ion variable
diff --git a/notebooks/nmodl-kinetic-schemes.ipynb b/notebooks/nmodl-kinetic-schemes.ipynb
index f5be06122..ac05f9cf3 100644
--- a/notebooks/nmodl-kinetic-schemes.ipynb
+++ b/notebooks/nmodl-kinetic-schemes.ipynb
@@ -152,10 +152,10 @@
"execution_count": 1,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:33.742696Z",
- "iopub.status.busy": "2024-08-09T11:23:33.742467Z",
- "iopub.status.idle": "2024-08-09T11:23:35.015466Z",
- "shell.execute_reply": "2024-08-09T11:23:35.014691Z"
+ "iopub.execute_input": "2024-08-09T12:31:26.244012Z",
+ "iopub.status.busy": "2024-08-09T12:31:26.243460Z",
+ "iopub.status.idle": "2024-08-09T12:31:27.046034Z",
+ "shell.execute_reply": "2024-08-09T12:31:27.045177Z"
}
},
"outputs": [],
@@ -169,10 +169,10 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:35.018581Z",
- "iopub.status.busy": "2024-08-09T11:23:35.018362Z",
- "iopub.status.idle": "2024-08-09T11:23:35.048162Z",
- "shell.execute_reply": "2024-08-09T11:23:35.047489Z"
+ "iopub.execute_input": "2024-08-09T12:31:27.049064Z",
+ "iopub.status.busy": "2024-08-09T12:31:27.048854Z",
+ "iopub.status.idle": "2024-08-09T12:31:27.079695Z",
+ "shell.execute_reply": "2024-08-09T12:31:27.078887Z"
}
},
"outputs": [],
@@ -277,10 +277,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:35.051409Z",
- "iopub.status.busy": "2024-08-09T11:23:35.050982Z",
- "iopub.status.idle": "2024-08-09T11:23:35.055706Z",
- "shell.execute_reply": "2024-08-09T11:23:35.055029Z"
+ "iopub.execute_input": "2024-08-09T12:31:27.083055Z",
+ "iopub.status.busy": "2024-08-09T12:31:27.082694Z",
+ "iopub.status.idle": "2024-08-09T12:31:27.087562Z",
+ "shell.execute_reply": "2024-08-09T12:31:27.086913Z"
}
},
"outputs": [
@@ -323,10 +323,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:35.087608Z",
- "iopub.status.busy": "2024-08-09T11:23:35.087126Z",
- "iopub.status.idle": "2024-08-09T11:23:35.091110Z",
- "shell.execute_reply": "2024-08-09T11:23:35.090441Z"
+ "iopub.execute_input": "2024-08-09T12:31:27.118850Z",
+ "iopub.status.busy": "2024-08-09T12:31:27.118384Z",
+ "iopub.status.idle": "2024-08-09T12:31:27.122871Z",
+ "shell.execute_reply": "2024-08-09T12:31:27.122158Z"
}
},
"outputs": [
@@ -367,10 +367,10 @@
"execution_count": 5,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:35.093707Z",
- "iopub.status.busy": "2024-08-09T11:23:35.093243Z",
- "iopub.status.idle": "2024-08-09T11:23:35.097066Z",
- "shell.execute_reply": "2024-08-09T11:23:35.096410Z"
+ "iopub.execute_input": "2024-08-09T12:31:27.125418Z",
+ "iopub.status.busy": "2024-08-09T12:31:27.124899Z",
+ "iopub.status.idle": "2024-08-09T12:31:27.128755Z",
+ "shell.execute_reply": "2024-08-09T12:31:27.128199Z"
},
"scrolled": true
},
@@ -412,10 +412,10 @@
"execution_count": 6,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:35.099892Z",
- "iopub.status.busy": "2024-08-09T11:23:35.099525Z",
- "iopub.status.idle": "2024-08-09T11:23:35.103278Z",
- "shell.execute_reply": "2024-08-09T11:23:35.102638Z"
+ "iopub.execute_input": "2024-08-09T12:31:27.131215Z",
+ "iopub.status.busy": "2024-08-09T12:31:27.130867Z",
+ "iopub.status.idle": "2024-08-09T12:31:27.134784Z",
+ "shell.execute_reply": "2024-08-09T12:31:27.134102Z"
},
"scrolled": true
},
@@ -459,10 +459,10 @@
"execution_count": 7,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:35.105742Z",
- "iopub.status.busy": "2024-08-09T11:23:35.105382Z",
- "iopub.status.idle": "2024-08-09T11:23:35.109694Z",
- "shell.execute_reply": "2024-08-09T11:23:35.109049Z"
+ "iopub.execute_input": "2024-08-09T12:31:27.136990Z",
+ "iopub.status.busy": "2024-08-09T12:31:27.136799Z",
+ "iopub.status.idle": "2024-08-09T12:31:27.141212Z",
+ "shell.execute_reply": "2024-08-09T12:31:27.140552Z"
}
},
"outputs": [
diff --git a/notebooks/nmodl-python-tutorial.ipynb b/notebooks/nmodl-python-tutorial.ipynb
index 0810f196c..108eaddd0 100644
--- a/notebooks/nmodl-python-tutorial.ipynb
+++ b/notebooks/nmodl-python-tutorial.ipynb
@@ -30,10 +30,10 @@
"execution_count": 1,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:43.684245Z",
- "iopub.status.busy": "2024-08-09T11:23:43.684036Z",
- "iopub.status.idle": "2024-08-09T11:23:44.957833Z",
- "shell.execute_reply": "2024-08-09T11:23:44.957043Z"
+ "iopub.execute_input": "2024-08-09T12:31:38.781523Z",
+ "iopub.status.busy": "2024-08-09T12:31:38.781319Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.579751Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.578985Z"
}
},
"outputs": [],
@@ -63,10 +63,10 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:44.961286Z",
- "iopub.status.busy": "2024-08-09T11:23:44.960772Z",
- "iopub.status.idle": "2024-08-09T11:23:44.990112Z",
- "shell.execute_reply": "2024-08-09T11:23:44.989419Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.583094Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.582627Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.610578Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.609903Z"
}
},
"outputs": [],
@@ -86,10 +86,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:44.993193Z",
- "iopub.status.busy": "2024-08-09T11:23:44.992903Z",
- "iopub.status.idle": "2024-08-09T11:23:44.996748Z",
- "shell.execute_reply": "2024-08-09T11:23:44.996178Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.613667Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.613261Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.617092Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.616423Z"
}
},
"outputs": [],
@@ -152,10 +152,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:44.999514Z",
- "iopub.status.busy": "2024-08-09T11:23:44.998988Z",
- "iopub.status.idle": "2024-08-09T11:23:45.003038Z",
- "shell.execute_reply": "2024-08-09T11:23:45.002486Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.619577Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.619225Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.623100Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.622434Z"
}
},
"outputs": [],
@@ -183,10 +183,10 @@
"execution_count": 5,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:45.005749Z",
- "iopub.status.busy": "2024-08-09T11:23:45.005302Z",
- "iopub.status.idle": "2024-08-09T11:23:45.008929Z",
- "shell.execute_reply": "2024-08-09T11:23:45.008294Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.625836Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.625420Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.629020Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.628374Z"
}
},
"outputs": [
@@ -235,10 +235,10 @@
"execution_count": 6,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:45.011217Z",
- "iopub.status.busy": "2024-08-09T11:23:45.011021Z",
- "iopub.status.idle": "2024-08-09T11:23:45.015096Z",
- "shell.execute_reply": "2024-08-09T11:23:45.014595Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.631903Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.631425Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.635446Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.634812Z"
}
},
"outputs": [],
@@ -260,10 +260,10 @@
"execution_count": 7,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:45.017449Z",
- "iopub.status.busy": "2024-08-09T11:23:45.017252Z",
- "iopub.status.idle": "2024-08-09T11:23:45.020904Z",
- "shell.execute_reply": "2024-08-09T11:23:45.020216Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.638235Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.637742Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.641404Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.640743Z"
}
},
"outputs": [
@@ -297,10 +297,10 @@
"execution_count": 8,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:45.023191Z",
- "iopub.status.busy": "2024-08-09T11:23:45.022996Z",
- "iopub.status.idle": "2024-08-09T11:23:45.030592Z",
- "shell.execute_reply": "2024-08-09T11:23:45.029970Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.644066Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.643607Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.650821Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.650134Z"
}
},
"outputs": [
@@ -365,10 +365,10 @@
"execution_count": 9,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:45.033131Z",
- "iopub.status.busy": "2024-08-09T11:23:45.032670Z",
- "iopub.status.idle": "2024-08-09T11:23:45.036994Z",
- "shell.execute_reply": "2024-08-09T11:23:45.036350Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.653487Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.653037Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.657215Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.656545Z"
}
},
"outputs": [
@@ -416,10 +416,10 @@
"execution_count": 10,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:45.039561Z",
- "iopub.status.busy": "2024-08-09T11:23:45.039081Z",
- "iopub.status.idle": "2024-08-09T11:23:45.042487Z",
- "shell.execute_reply": "2024-08-09T11:23:45.041864Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.659937Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.659479Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.662846Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.662288Z"
}
},
"outputs": [],
@@ -441,10 +441,10 @@
"execution_count": 11,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:45.045022Z",
- "iopub.status.busy": "2024-08-09T11:23:45.044645Z",
- "iopub.status.idle": "2024-08-09T11:23:45.048705Z",
- "shell.execute_reply": "2024-08-09T11:23:45.048015Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.665352Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.664905Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.668605Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.667949Z"
}
},
"outputs": [
@@ -510,10 +510,10 @@
"execution_count": 12,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:45.051198Z",
- "iopub.status.busy": "2024-08-09T11:23:45.050826Z",
- "iopub.status.idle": "2024-08-09T11:23:45.054478Z",
- "shell.execute_reply": "2024-08-09T11:23:45.053842Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.671158Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.670652Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.674145Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.673587Z"
}
},
"outputs": [
@@ -548,10 +548,10 @@
"execution_count": 13,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:45.056923Z",
- "iopub.status.busy": "2024-08-09T11:23:45.056544Z",
- "iopub.status.idle": "2024-08-09T11:23:45.060415Z",
- "shell.execute_reply": "2024-08-09T11:23:45.059740Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.676535Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.676334Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.679793Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.679129Z"
}
},
"outputs": [
@@ -584,10 +584,10 @@
"execution_count": 14,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:45.062856Z",
- "iopub.status.busy": "2024-08-09T11:23:45.062672Z",
- "iopub.status.idle": "2024-08-09T11:23:45.066645Z",
- "shell.execute_reply": "2024-08-09T11:23:45.066001Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.682195Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.681980Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.685693Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.685030Z"
}
},
"outputs": [
@@ -622,10 +622,10 @@
"execution_count": 15,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:45.069079Z",
- "iopub.status.busy": "2024-08-09T11:23:45.068715Z",
- "iopub.status.idle": "2024-08-09T11:23:45.072872Z",
- "shell.execute_reply": "2024-08-09T11:23:45.072222Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.688288Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.687888Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.692103Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.691442Z"
}
},
"outputs": [
@@ -669,10 +669,10 @@
"execution_count": 16,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:45.075352Z",
- "iopub.status.busy": "2024-08-09T11:23:45.074954Z",
- "iopub.status.idle": "2024-08-09T11:23:45.080172Z",
- "shell.execute_reply": "2024-08-09T11:23:45.079489Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.694856Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.694371Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.699960Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.699297Z"
}
},
"outputs": [
@@ -733,10 +733,10 @@
"execution_count": 17,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:45.082637Z",
- "iopub.status.busy": "2024-08-09T11:23:45.082336Z",
- "iopub.status.idle": "2024-08-09T11:23:45.085902Z",
- "shell.execute_reply": "2024-08-09T11:23:45.085309Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.702278Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.702029Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.705641Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.705082Z"
}
},
"outputs": [],
@@ -761,10 +761,10 @@
"execution_count": 18,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:45.088431Z",
- "iopub.status.busy": "2024-08-09T11:23:45.088048Z",
- "iopub.status.idle": "2024-08-09T11:23:45.097876Z",
- "shell.execute_reply": "2024-08-09T11:23:45.097342Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.708051Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.707671Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.717818Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.717261Z"
}
},
"outputs": [],
@@ -857,10 +857,10 @@
"execution_count": 19,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:45.100249Z",
- "iopub.status.busy": "2024-08-09T11:23:45.099871Z",
- "iopub.status.idle": "2024-08-09T11:23:45.103759Z",
- "shell.execute_reply": "2024-08-09T11:23:45.103058Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.720164Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.719802Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.723416Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.722771Z"
}
},
"outputs": [
@@ -897,10 +897,10 @@
"execution_count": 20,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:45.106206Z",
- "iopub.status.busy": "2024-08-09T11:23:45.105827Z",
- "iopub.status.idle": "2024-08-09T11:23:45.111545Z",
- "shell.execute_reply": "2024-08-09T11:23:45.110843Z"
+ "iopub.execute_input": "2024-08-09T12:31:39.725920Z",
+ "iopub.status.busy": "2024-08-09T12:31:39.725526Z",
+ "iopub.status.idle": "2024-08-09T12:31:39.731259Z",
+ "shell.execute_reply": "2024-08-09T12:31:39.730584Z"
}
},
"outputs": [
diff --git a/notebooks/nmodl-sympy-conductance.ipynb b/notebooks/nmodl-sympy-conductance.ipynb
index 50be79ac1..6b9b9e5b8 100644
--- a/notebooks/nmodl-sympy-conductance.ipynb
+++ b/notebooks/nmodl-sympy-conductance.ipynb
@@ -86,10 +86,10 @@
"execution_count": 1,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:47.540242Z",
- "iopub.status.busy": "2024-08-09T11:23:47.539645Z",
- "iopub.status.idle": "2024-08-09T11:23:48.418980Z",
- "shell.execute_reply": "2024-08-09T11:23:48.418111Z"
+ "iopub.execute_input": "2024-08-09T12:31:42.220982Z",
+ "iopub.status.busy": "2024-08-09T12:31:42.220430Z",
+ "iopub.status.idle": "2024-08-09T12:31:43.016691Z",
+ "shell.execute_reply": "2024-08-09T12:31:43.015956Z"
}
},
"outputs": [],
@@ -103,10 +103,10 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:48.422275Z",
- "iopub.status.busy": "2024-08-09T11:23:48.422002Z",
- "iopub.status.idle": "2024-08-09T11:23:48.452969Z",
- "shell.execute_reply": "2024-08-09T11:23:48.452170Z"
+ "iopub.execute_input": "2024-08-09T12:31:43.019986Z",
+ "iopub.status.busy": "2024-08-09T12:31:43.019460Z",
+ "iopub.status.idle": "2024-08-09T12:31:43.050098Z",
+ "shell.execute_reply": "2024-08-09T12:31:43.049426Z"
}
},
"outputs": [],
@@ -149,10 +149,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:48.456301Z",
- "iopub.status.busy": "2024-08-09T11:23:48.455885Z",
- "iopub.status.idle": "2024-08-09T11:23:48.729427Z",
- "shell.execute_reply": "2024-08-09T11:23:48.728684Z"
+ "iopub.execute_input": "2024-08-09T12:31:43.053184Z",
+ "iopub.status.busy": "2024-08-09T12:31:43.052915Z",
+ "iopub.status.idle": "2024-08-09T12:31:43.343134Z",
+ "shell.execute_reply": "2024-08-09T12:31:43.342406Z"
}
},
"outputs": [
@@ -196,10 +196,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:48.732117Z",
- "iopub.status.busy": "2024-08-09T11:23:48.731866Z",
- "iopub.status.idle": "2024-08-09T11:23:48.863336Z",
- "shell.execute_reply": "2024-08-09T11:23:48.862592Z"
+ "iopub.execute_input": "2024-08-09T12:31:43.346332Z",
+ "iopub.status.busy": "2024-08-09T12:31:43.345711Z",
+ "iopub.status.idle": "2024-08-09T12:31:43.484387Z",
+ "shell.execute_reply": "2024-08-09T12:31:43.483717Z"
}
},
"outputs": [
@@ -243,10 +243,10 @@
"execution_count": 5,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:48.866223Z",
- "iopub.status.busy": "2024-08-09T11:23:48.865832Z",
- "iopub.status.idle": "2024-08-09T11:23:48.874191Z",
- "shell.execute_reply": "2024-08-09T11:23:48.873588Z"
+ "iopub.execute_input": "2024-08-09T12:31:43.487225Z",
+ "iopub.status.busy": "2024-08-09T12:31:43.486823Z",
+ "iopub.status.idle": "2024-08-09T12:31:43.495171Z",
+ "shell.execute_reply": "2024-08-09T12:31:43.494582Z"
}
},
"outputs": [
@@ -290,10 +290,10 @@
"execution_count": 6,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:48.876847Z",
- "iopub.status.busy": "2024-08-09T11:23:48.876466Z",
- "iopub.status.idle": "2024-08-09T11:23:48.894300Z",
- "shell.execute_reply": "2024-08-09T11:23:48.893703Z"
+ "iopub.execute_input": "2024-08-09T12:31:43.497717Z",
+ "iopub.status.busy": "2024-08-09T12:31:43.497372Z",
+ "iopub.status.idle": "2024-08-09T12:31:43.515585Z",
+ "shell.execute_reply": "2024-08-09T12:31:43.514981Z"
}
},
"outputs": [
@@ -337,10 +337,10 @@
"execution_count": 7,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:48.896978Z",
- "iopub.status.busy": "2024-08-09T11:23:48.896581Z",
- "iopub.status.idle": "2024-08-09T11:23:49.016171Z",
- "shell.execute_reply": "2024-08-09T11:23:49.015505Z"
+ "iopub.execute_input": "2024-08-09T12:31:43.518076Z",
+ "iopub.status.busy": "2024-08-09T12:31:43.517708Z",
+ "iopub.status.idle": "2024-08-09T12:31:43.635154Z",
+ "shell.execute_reply": "2024-08-09T12:31:43.634574Z"
}
},
"outputs": [
@@ -400,10 +400,10 @@
"execution_count": 8,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:49.018829Z",
- "iopub.status.busy": "2024-08-09T11:23:49.018416Z",
- "iopub.status.idle": "2024-08-09T11:23:49.113628Z",
- "shell.execute_reply": "2024-08-09T11:23:49.112871Z"
+ "iopub.execute_input": "2024-08-09T12:31:43.637850Z",
+ "iopub.status.busy": "2024-08-09T12:31:43.637350Z",
+ "iopub.status.idle": "2024-08-09T12:31:43.731059Z",
+ "shell.execute_reply": "2024-08-09T12:31:43.730368Z"
}
},
"outputs": [
@@ -456,10 +456,10 @@
"execution_count": 9,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:49.116257Z",
- "iopub.status.busy": "2024-08-09T11:23:49.116048Z",
- "iopub.status.idle": "2024-08-09T11:23:49.190868Z",
- "shell.execute_reply": "2024-08-09T11:23:49.190213Z"
+ "iopub.execute_input": "2024-08-09T12:31:43.733740Z",
+ "iopub.status.busy": "2024-08-09T12:31:43.733309Z",
+ "iopub.status.idle": "2024-08-09T12:31:43.806797Z",
+ "shell.execute_reply": "2024-08-09T12:31:43.806212Z"
}
},
"outputs": [
diff --git a/notebooks/nmodl-sympy-solver-cnexp.ipynb b/notebooks/nmodl-sympy-solver-cnexp.ipynb
index b7eff7b65..de7ee92d0 100644
--- a/notebooks/nmodl-sympy-solver-cnexp.ipynb
+++ b/notebooks/nmodl-sympy-solver-cnexp.ipynb
@@ -62,10 +62,10 @@
"execution_count": 1,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:50.927147Z",
- "iopub.status.busy": "2024-08-09T11:23:50.926942Z",
- "iopub.status.idle": "2024-08-09T11:23:51.733585Z",
- "shell.execute_reply": "2024-08-09T11:23:51.732674Z"
+ "iopub.execute_input": "2024-08-09T12:31:45.532407Z",
+ "iopub.status.busy": "2024-08-09T12:31:45.532215Z",
+ "iopub.status.idle": "2024-08-09T12:31:46.327723Z",
+ "shell.execute_reply": "2024-08-09T12:31:46.326863Z"
}
},
"outputs": [],
@@ -79,10 +79,10 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:51.736977Z",
- "iopub.status.busy": "2024-08-09T11:23:51.736572Z",
- "iopub.status.idle": "2024-08-09T11:23:51.767441Z",
- "shell.execute_reply": "2024-08-09T11:23:51.766756Z"
+ "iopub.execute_input": "2024-08-09T12:31:46.331022Z",
+ "iopub.status.busy": "2024-08-09T12:31:46.330605Z",
+ "iopub.status.idle": "2024-08-09T12:31:46.359881Z",
+ "shell.execute_reply": "2024-08-09T12:31:46.359259Z"
}
},
"outputs": [],
@@ -123,10 +123,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:51.770340Z",
- "iopub.status.busy": "2024-08-09T11:23:51.770128Z",
- "iopub.status.idle": "2024-08-09T11:23:52.190337Z",
- "shell.execute_reply": "2024-08-09T11:23:52.189586Z"
+ "iopub.execute_input": "2024-08-09T12:31:46.362676Z",
+ "iopub.status.busy": "2024-08-09T12:31:46.362269Z",
+ "iopub.status.idle": "2024-08-09T12:31:46.783788Z",
+ "shell.execute_reply": "2024-08-09T12:31:46.783009Z"
}
},
"outputs": [
@@ -165,10 +165,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:52.192870Z",
- "iopub.status.busy": "2024-08-09T11:23:52.192627Z",
- "iopub.status.idle": "2024-08-09T11:23:52.304325Z",
- "shell.execute_reply": "2024-08-09T11:23:52.303508Z"
+ "iopub.execute_input": "2024-08-09T12:31:46.786650Z",
+ "iopub.status.busy": "2024-08-09T12:31:46.786244Z",
+ "iopub.status.idle": "2024-08-09T12:31:46.899517Z",
+ "shell.execute_reply": "2024-08-09T12:31:46.898806Z"
}
},
"outputs": [
@@ -207,10 +207,10 @@
"execution_count": 5,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:52.307155Z",
- "iopub.status.busy": "2024-08-09T11:23:52.306924Z",
- "iopub.status.idle": "2024-08-09T11:23:52.509128Z",
- "shell.execute_reply": "2024-08-09T11:23:52.508370Z"
+ "iopub.execute_input": "2024-08-09T12:31:46.902372Z",
+ "iopub.status.busy": "2024-08-09T12:31:46.901806Z",
+ "iopub.status.idle": "2024-08-09T12:31:47.103789Z",
+ "shell.execute_reply": "2024-08-09T12:31:47.103058Z"
}
},
"outputs": [
@@ -255,10 +255,10 @@
"execution_count": 6,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:52.511877Z",
- "iopub.status.busy": "2024-08-09T11:23:52.511466Z",
- "iopub.status.idle": "2024-08-09T11:23:52.670148Z",
- "shell.execute_reply": "2024-08-09T11:23:52.669451Z"
+ "iopub.execute_input": "2024-08-09T12:31:47.106566Z",
+ "iopub.status.busy": "2024-08-09T12:31:47.106136Z",
+ "iopub.status.idle": "2024-08-09T12:31:47.265610Z",
+ "shell.execute_reply": "2024-08-09T12:31:47.264899Z"
}
},
"outputs": [
@@ -303,10 +303,10 @@
"execution_count": 7,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:52.672993Z",
- "iopub.status.busy": "2024-08-09T11:23:52.672590Z",
- "iopub.status.idle": "2024-08-09T11:23:54.432006Z",
- "shell.execute_reply": "2024-08-09T11:23:54.431320Z"
+ "iopub.execute_input": "2024-08-09T12:31:47.268397Z",
+ "iopub.status.busy": "2024-08-09T12:31:47.267893Z",
+ "iopub.status.idle": "2024-08-09T12:31:49.040383Z",
+ "shell.execute_reply": "2024-08-09T12:31:49.039638Z"
}
},
"outputs": [
@@ -351,10 +351,10 @@
"execution_count": 8,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:54.434800Z",
- "iopub.status.busy": "2024-08-09T11:23:54.434352Z",
- "iopub.status.idle": "2024-08-09T11:23:56.654894Z",
- "shell.execute_reply": "2024-08-09T11:23:56.654219Z"
+ "iopub.execute_input": "2024-08-09T12:31:49.043257Z",
+ "iopub.status.busy": "2024-08-09T12:31:49.043016Z",
+ "iopub.status.idle": "2024-08-09T12:31:51.268104Z",
+ "shell.execute_reply": "2024-08-09T12:31:51.267391Z"
}
},
"outputs": [
diff --git a/notebooks/nmodl-sympy-solver-derivimplicit.ipynb b/notebooks/nmodl-sympy-solver-derivimplicit.ipynb
index 792410aa9..f1d143e1b 100644
--- a/notebooks/nmodl-sympy-solver-derivimplicit.ipynb
+++ b/notebooks/nmodl-sympy-solver-derivimplicit.ipynb
@@ -39,10 +39,10 @@
"execution_count": 1,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:58.374313Z",
- "iopub.status.busy": "2024-08-09T11:23:58.374010Z",
- "iopub.status.idle": "2024-08-09T11:23:59.180353Z",
- "shell.execute_reply": "2024-08-09T11:23:59.179574Z"
+ "iopub.execute_input": "2024-08-09T12:31:52.939668Z",
+ "iopub.status.busy": "2024-08-09T12:31:52.939098Z",
+ "iopub.status.idle": "2024-08-09T12:31:53.733476Z",
+ "shell.execute_reply": "2024-08-09T12:31:53.732658Z"
}
},
"outputs": [],
@@ -56,10 +56,10 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:59.183659Z",
- "iopub.status.busy": "2024-08-09T11:23:59.183226Z",
- "iopub.status.idle": "2024-08-09T11:23:59.213418Z",
- "shell.execute_reply": "2024-08-09T11:23:59.212747Z"
+ "iopub.execute_input": "2024-08-09T12:31:53.736662Z",
+ "iopub.status.busy": "2024-08-09T12:31:53.736267Z",
+ "iopub.status.idle": "2024-08-09T12:31:53.765817Z",
+ "shell.execute_reply": "2024-08-09T12:31:53.765041Z"
}
},
"outputs": [],
@@ -100,10 +100,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:59.216562Z",
- "iopub.status.busy": "2024-08-09T11:23:59.216153Z",
- "iopub.status.idle": "2024-08-09T11:23:59.684614Z",
- "shell.execute_reply": "2024-08-09T11:23:59.683850Z"
+ "iopub.execute_input": "2024-08-09T12:31:53.768721Z",
+ "iopub.status.busy": "2024-08-09T12:31:53.768462Z",
+ "iopub.status.idle": "2024-08-09T12:31:54.239555Z",
+ "shell.execute_reply": "2024-08-09T12:31:54.238855Z"
}
},
"outputs": [
@@ -165,10 +165,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:23:59.687474Z",
- "iopub.status.busy": "2024-08-09T11:23:59.687079Z",
- "iopub.status.idle": "2024-08-09T11:23:59.904874Z",
- "shell.execute_reply": "2024-08-09T11:23:59.904140Z"
+ "iopub.execute_input": "2024-08-09T12:31:54.242370Z",
+ "iopub.status.busy": "2024-08-09T12:31:54.241799Z",
+ "iopub.status.idle": "2024-08-09T12:31:54.457353Z",
+ "shell.execute_reply": "2024-08-09T12:31:54.456631Z"
}
},
"outputs": [
diff --git a/notebooks/nmodl-sympy-solver-sparse.ipynb b/notebooks/nmodl-sympy-solver-sparse.ipynb
index 53618837a..6fd300081 100644
--- a/notebooks/nmodl-sympy-solver-sparse.ipynb
+++ b/notebooks/nmodl-sympy-solver-sparse.ipynb
@@ -39,10 +39,10 @@
"execution_count": 1,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:24:01.201543Z",
- "iopub.status.busy": "2024-08-09T11:24:01.201337Z",
- "iopub.status.idle": "2024-08-09T11:24:02.004904Z",
- "shell.execute_reply": "2024-08-09T11:24:02.004141Z"
+ "iopub.execute_input": "2024-08-09T12:31:55.811969Z",
+ "iopub.status.busy": "2024-08-09T12:31:55.811770Z",
+ "iopub.status.idle": "2024-08-09T12:31:56.634640Z",
+ "shell.execute_reply": "2024-08-09T12:31:56.633750Z"
}
},
"outputs": [],
@@ -56,10 +56,10 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:24:02.008365Z",
- "iopub.status.busy": "2024-08-09T11:24:02.007824Z",
- "iopub.status.idle": "2024-08-09T11:24:02.037705Z",
- "shell.execute_reply": "2024-08-09T11:24:02.036942Z"
+ "iopub.execute_input": "2024-08-09T12:31:56.637855Z",
+ "iopub.status.busy": "2024-08-09T12:31:56.637612Z",
+ "iopub.status.idle": "2024-08-09T12:31:56.667938Z",
+ "shell.execute_reply": "2024-08-09T12:31:56.667138Z"
}
},
"outputs": [],
@@ -100,10 +100,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:24:02.040875Z",
- "iopub.status.busy": "2024-08-09T11:24:02.040610Z",
- "iopub.status.idle": "2024-08-09T11:24:02.503130Z",
- "shell.execute_reply": "2024-08-09T11:24:02.502406Z"
+ "iopub.execute_input": "2024-08-09T12:31:56.671222Z",
+ "iopub.status.busy": "2024-08-09T12:31:56.670928Z",
+ "iopub.status.idle": "2024-08-09T12:31:57.141309Z",
+ "shell.execute_reply": "2024-08-09T12:31:57.140567Z"
}
},
"outputs": [
@@ -165,10 +165,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-08-09T11:24:02.506047Z",
- "iopub.status.busy": "2024-08-09T11:24:02.505488Z",
- "iopub.status.idle": "2024-08-09T11:24:02.717641Z",
- "shell.execute_reply": "2024-08-09T11:24:02.716928Z"
+ "iopub.execute_input": "2024-08-09T12:31:57.144091Z",
+ "iopub.status.busy": "2024-08-09T12:31:57.143709Z",
+ "iopub.status.idle": "2024-08-09T12:31:57.356857Z",
+ "shell.execute_reply": "2024-08-09T12:31:57.356162Z"
}
},
"outputs": [