I am encountering an issue when using the event delivery system while cvode_active() == 0.
Basically, the following code
Code: Select all
from neuron import h
h.load_file('stdrun.hoc')
sec = h.Section()
sec.insert('hh')
def hi():
print 'hi'
h.dt = 0.025
h.tstop = 5.0
h.finitialize()
h.cvode.event(2.5, hi)
h.run()
print h.t
Code: Select all
NEURON -- VERSION 7.5 master (c693a84) 2017-12-07
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2016
See http://neuron.yale.edu/neuron/credits
5.0
Instead, if I use the variable time step method, by modifying the previous code as follows
Code: Select all
from neuron import h
h.load_file('stdrun.hoc')
sec = h.Section()
sec.insert('hh')
def hi():
print 'hi'
h.dt = 0.025
h.tstop = 5.0
h.cvode_active(1)
h.finitialize()
h.cvode.event(2.5, hi)
h.cvode.solve(h.tstop)
print h.t
Code: Select all
NEURON -- VERSION 7.5 master (c693a84) 2017-12-07
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2016
See http://neuron.yale.edu/neuron/credits
hi
5.0
Finally, if I keep cvode_active()==0 but still try to use h.cvode.solve(h.tstop) instead of h.run(), as in
Code: Select all
from neuron import h
h.load_file('stdrun.hoc')
sec = h.Section()
sec.insert('hh')
def hi():
print 'hi'
h.dt = 0.025
h.tstop = 5.0
h.finitialize()
h.cvode.event(2.5, hi)
h.cvode.solve(h.tstop)
print h.t
Code: Select all
NEURON -- VERSION 7.5 master (c693a84) 2017-12-07
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2016
See http://neuron.yale.edu/neuron/credits
hi
1000000000.0
Would you be able to help me understand these outcomes ?
Thank you very much in advance,
Nathan