Skip to content

Commit

Permalink
accept review suggestion about icell
Browse files Browse the repository at this point in the history
  • Loading branch information
nrnhines committed Jan 8, 2025
1 parent 8e1e0e5 commit 32921b2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/nrncvode/netcvode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@ bool NetCvode::init_global() {

int inode = ml->nodelist[j]->v_node_index;
int icell = cellnum[inode];
Cvode& cv = d.lcv_[cellnum[inode]];
Cvode& cv = d.lcv_[icell];
CvodeThreadData& z = cv.ctd_[0];

// Circumstances for creating a new CvMembList
Expand All @@ -1655,18 +1655,18 @@ bool NetCvode::init_global() {
cml = new CvMembList{i};
z.cv_memb_list_ = cml;
cml->next = nullptr;
last[cellnum[inode]] = cml;
last[icell] = cml;
assert(cml->ml.size() == 1);
assert(cml->ml[0].nodecount == 0);
} else if (last[cellnum[inode]]->index != i) { // initialize next
} else if (last[icell]->index != i) { // initialize next
cml = new CvMembList{i};
last[cellnum[inode]]->next = cml;
last[icell]->next = cml;
cml->next = nullptr;
last[cellnum[inode]] = cml;
last[icell] = cml;
assert(cml->ml.size() == 1);
assert(cml->ml[0].nodecount == 0);
} else { // if non-contiguous, append Memb_list
cml = last[cellnum[inode]];
cml = last[icell];
auto& cvml = cml->ml.back();
auto cvml_offset = cvml.get_storage_offset() + cvml.nodecount;
if (cvml_offset != offset) {
Expand Down

0 comments on commit 32921b2

Please sign in to comment.