From 32921b2836bd7a50734a3bc5dabab44f615cdee9 Mon Sep 17 00:00:00 2001 From: Michael Hines Date: Wed, 8 Jan 2025 09:50:07 -0500 Subject: [PATCH] accept review suggestion about icell --- src/nrncvode/netcvode.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nrncvode/netcvode.cpp b/src/nrncvode/netcvode.cpp index b3a88385b6..6e4522c852 100644 --- a/src/nrncvode/netcvode.cpp +++ b/src/nrncvode/netcvode.cpp @@ -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 @@ -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) {