Turning adaptive integration ("CVODE") on and off
Posted: Thu Apr 21, 2016 9:50 am
Instead of using cvode.active() with an argument of 1 or 0 to turn adaptive integration on or off, it is better to call cvode_active() with the appropriate argument, or to use the VariableStepControl GUI tool.
Explanation: cvode_active() is part of NEURON's run control system. In addition to turning adaptive integration on or off, it also does many other things that influence the course of simulation execution. One thing cvode_active() does is set the variable using_cvode_, which most noticeably affects updating of "current axis" and "state axis" graphs (graphs brought up by NEURONMainMenu/Graph/Current axis and NEURONMainMenu/Graph/State axis). Specfically, cvode_active(1) (use adaptive integration) makes results in current axis and state axis graphs be plotted at times t, the same times at which voltage axis graphs are updated. Using cvode.active(1) to enable adaptive integration does not affect the times at which graphs are updated, so current axis and state axis graphs would plot results at times t-dt/2 and t+dt/2 respectively (the times at which currents and ionic conductances, respectively, are second order accurate when Crank-Nicholson integration is used i.e. fixed time step integration with secondorder set to 2).
Explanation: cvode_active() is part of NEURON's run control system. In addition to turning adaptive integration on or off, it also does many other things that influence the course of simulation execution. One thing cvode_active() does is set the variable using_cvode_, which most noticeably affects updating of "current axis" and "state axis" graphs (graphs brought up by NEURONMainMenu/Graph/Current axis and NEURONMainMenu/Graph/State axis). Specfically, cvode_active(1) (use adaptive integration) makes results in current axis and state axis graphs be plotted at times t, the same times at which voltage axis graphs are updated. Using cvode.active(1) to enable adaptive integration does not affect the times at which graphs are updated, so current axis and state axis graphs would plot results at times t-dt/2 and t+dt/2 respectively (the times at which currents and ionic conductances, respectively, are second order accurate when Crank-Nicholson integration is used i.e. fixed time step integration with secondorder set to 2).