Skip to content

Commit

Permalink
cv3 version of json file for test_netcvode.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nrnhines committed Oct 4, 2024
1 parent f26fc9d commit 8368752
Show file tree
Hide file tree
Showing 3 changed files with 554 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/nrncvode/cvodeobj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ void Cvode::matmeth() {

/* attach the matrix and linear solver to CVode */
int flag = CVDlsSetLinearSolver(mem_, LS, A);
assert(flag);
assert(flag == CVDLS_SUCCESS);

/* Set jacobian and allocate memory */
/* (TODO Michael Hines: is there a jacobian for dense matrix
Expand Down
12 changes: 9 additions & 3 deletions test/cover/test_netcvode.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@
from neuron.expect_hocerr import expect_err
from neuron.tests.utils.checkresult import Chk

cv = h.CVode()
pc = h.ParallelContext()

import io, math, os, re, sys

try:
jsonfile = "test_netcvode_cv%s.json" % (cv.version().split(".")[0],)
except:
jsonfile = "test_netcvode.json"

dir_path = os.path.dirname(os.path.realpath(__file__))
chk = Chk(os.path.join(dir_path, "test_netcvode.json"))
chk = Chk(os.path.join(dir_path, jsonfile))
if hasattr(h, "usetable_hh"):
h.usetable_hh = 0 # So same whether compiled with CoreNEURON or not.

cv = h.CVode()
pc = h.ParallelContext()

# remove address info from cv.debug_event output
def debug_event_filter(s):
Expand Down
Loading

0 comments on commit 8368752

Please sign in to comment.