Skip to content

[Question] cvode slows down model significantly #1799

Answered by nrnhines
xanderladd asked this question in Q&A
Discussion options

You must be logged in to vote

With

$ git diff main.py
diff --git a/main.py b/main.py
index eea91f7..4fda438 100644
--- a/main.py
+++ b/main.py
@@ -1,3 +1,4 @@
+import discons
 import os
 os.chdir("neuron_files/")
 from neuron import h
@@ -23,8 +24,11 @@ def run_model(param_set,dt,cell):
     if abs(dt*h.nstep_steprun*h.steps_per_ms - 1)  != 0:
             h.steps_per_ms = 1/(dt * h.nstep_steprun)
     # load stim and record variables
-    v = h.Vector(curr_stim)
-    v.play(cell.ic._ref_amp, dt)
+    v, tv = discons.discon(curr_stim, dt)
+    print(v, tv)
+    v = h.Vector(v)
+    tv = h.Vector(tv)
+    v.play(cell.ic._ref_amp, tv)
     recording_vars = {k: h.Vector().record(v) \
                for k,v in zip(['t', …

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by xanderladd
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #1798 on April 29, 2022 00:40.