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

Nmodl 1247 #20

Closed
wants to merge 11 commits into from
6 changes: 1 addition & 5 deletions cnexp_array/neuron/leonhard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,8 @@ namespace neuron {
auto* const _ml = &_lmr;
auto* _thread = _ml_arg->_thread;
for (int id = 0; id < nodecount; id++) {

int node_id = node_data.nodeindices[id];
auto* _ppvar = _ml_arg->pdata[id];
int node_id = node_data.nodeindices[id];
auto v = node_data.node_voltages[node_id];
inst.v_unused[id] = v;
inst.x[id] = 42.0;
Expand All @@ -213,7 +212,6 @@ namespace neuron {
auto* const _ml = &_lmr;
auto* _thread = _ml_arg->_thread;
for (int id = 0; id < nodecount; id++) {

int node_id = node_data.nodeindices[id];
auto* _ppvar = _ml_arg->pdata[id];
auto v = node_data.node_voltages[node_id];
Expand All @@ -222,14 +220,12 @@ namespace neuron {
}


/** nrn_jacob function */
static void nrn_jacob_leonhard(_nrn_model_sorted_token const& _sorted_token, NrnThread* _nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmr{_sorted_token, *_nt, *_ml_arg, _type};
auto inst = make_instance_leonhard(_lmr);
auto node_data = make_node_data_leonhard(*_nt, *_ml_arg);
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
// set conductances properly
int node_id = node_data.nodeindices[id];
node_data.node_diagonal[node_id] += inst.g_unused[id];
}
Expand Down
6 changes: 1 addition & 5 deletions cnexp_scalar/neuron/leonhard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,8 @@ namespace neuron {
auto* const _ml = &_lmr;
auto* _thread = _ml_arg->_thread;
for (int id = 0; id < nodecount; id++) {

int node_id = node_data.nodeindices[id];
auto* _ppvar = _ml_arg->pdata[id];
int node_id = node_data.nodeindices[id];
auto v = node_data.node_voltages[node_id];
inst.v_unused[id] = v;
inst.x[id] = 42.0;
Expand All @@ -199,7 +198,6 @@ namespace neuron {
auto* const _ml = &_lmr;
auto* _thread = _ml_arg->_thread;
for (int id = 0; id < nodecount; id++) {

int node_id = node_data.nodeindices[id];
auto* _ppvar = _ml_arg->pdata[id];
auto v = node_data.node_voltages[node_id];
Expand All @@ -208,14 +206,12 @@ namespace neuron {
}


/** nrn_jacob function */
static void nrn_jacob_leonhard(_nrn_model_sorted_token const& _sorted_token, NrnThread* _nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmr{_sorted_token, *_nt, *_ml_arg, _type};
auto inst = make_instance_leonhard(_lmr);
auto node_data = make_node_data_leonhard(*_nt, *_ml_arg);
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
// set conductances properly
int node_id = node_data.nodeindices[id];
node_data.node_diagonal[node_id] += inst.g_unused[id];
}
Expand Down
7 changes: 1 addition & 6 deletions func_in_breakpoint/neuron/func_in_breakpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,8 @@ namespace neuron {
auto* const _ml = &_lmr;
auto* _thread = _ml_arg->_thread;
for (int id = 0; id < nodecount; id++) {

int node_id = node_data.nodeindices[id];
auto* _ppvar = _ml_arg->pdata[id];
int node_id = node_data.nodeindices[id];
auto v = node_data.node_voltages[node_id];
inst.v_unused[id] = v;
}
Expand Down Expand Up @@ -349,7 +348,6 @@ namespace neuron {
double rhs = I0;
double g = (I1-I0)/0.001;
node_data.node_rhs[node_id] -= rhs;
// remember the conductances so we can set them later
inst.g_unused[id] = g;
}
}
Expand All @@ -363,22 +361,19 @@ namespace neuron {
auto* const _ml = &_lmr;
auto* _thread = _ml_arg->_thread;
for (int id = 0; id < nodecount; id++) {

int node_id = node_data.nodeindices[id];
auto* _ppvar = _ml_arg->pdata[id];
auto v = node_data.node_voltages[node_id];
}
}


/** nrn_jacob function */
static void nrn_jacob_func_in_breakpoint(_nrn_model_sorted_token const& _sorted_token, NrnThread* _nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmr{_sorted_token, *_nt, *_ml_arg, _type};
auto inst = make_instance_func_in_breakpoint(_lmr);
auto node_data = make_node_data_func_in_breakpoint(*_nt, *_ml_arg);
auto nodecount = _ml_arg->nodecount;
for (int id = 0; id < nodecount; id++) {
// set conductances properly
int node_id = node_data.nodeindices[id];
node_data.node_diagonal[node_id] += inst.g_unused[id];
}
Expand Down
4 changes: 1 addition & 3 deletions func_proc/neuron/func_proc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,17 +603,15 @@ namespace neuron {
auto* const _ml = &_lmr;
auto* _thread = _ml_arg->_thread;
for (int id = 0; id < nodecount; id++) {

int node_id = node_data.nodeindices[id];
auto* _ppvar = _ml_arg->pdata[id];
int node_id = node_data.nodeindices[id];
auto v = node_data.node_voltages[node_id];
inst.v_unused[id] = v;
set_a_x_test_func_proc(_ml, inst, id, _ppvar, _thread, _nt);
}
}


/** nrn_jacob function */
static void nrn_jacob_test_func_proc(_nrn_model_sorted_token const& _sorted_token, NrnThread* _nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmr{_sorted_token, *_nt, *_ml_arg, _type};
auto inst = make_instance_test_func_proc(_lmr);
Expand Down
4 changes: 1 addition & 3 deletions func_proc_pnt/neuron/func_proc_pnt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,16 +295,14 @@ namespace neuron {
auto* const _ml = &_lmr;
auto* _thread = _ml_arg->_thread;
for (int id = 0; id < nodecount; id++) {

int node_id = node_data.nodeindices[id];
auto* _ppvar = _ml_arg->pdata[id];
int node_id = node_data.nodeindices[id];
auto v = node_data.node_voltages[node_id];
inst.v_unused[id] = v;
}
}


/** nrn_jacob function */
static void nrn_jacob_test_func_proc_pnt(_nrn_model_sorted_token const& _sorted_token, NrnThread* _nt, Memb_list* _ml_arg, int _type) {
_nrn_mechanism_cache_range _lmr{_sorted_token, *_nt, *_ml_arg, _type};
auto inst = make_instance_test_func_proc_pnt(_lmr);
Expand Down
Loading