Turning adaptive integration ("CVODE") on and off

A collection of noteworthy items selected by our moderators from discussions about making and using models with NEURON.

Moderators: ted, wwlytton, tom_morse

Post Reply
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Turning adaptive integration ("CVODE") on and off

Post by ted »

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).
RBJ
Posts: 62
Joined: Sun Aug 02, 2015 4:28 am
Location: UK
Contact:

Re: Turning adaptive integration ("CVODE") on and off

Post by RBJ »

Sorry Ted, I am doubtless being really slow here; but I keep reading the first line of this post over and over and don’t follow. If one should not use cvode.active(1) etc., please can you give an explicit example of the “appropriate argument” one would use? Thanks, sorry... just want to be sure I am g thing the full potential of this package!
Regards
Richard
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Turning adaptive integration ("CVODE") on and off

Post by ted »

cvode_active() follows the longstanding convention that 1 means True or On, 0 means False or Off
RBJ
Posts: 62
Joined: Sun Aug 02, 2015 4:28 am
Location: UK
Contact:

Re: Turning adaptive integration ("CVODE") on and off

Post by RBJ »

Yes, sorry I realise this. That is the only way I know to turn it on and off. The post says "Instead of using... an argument of 1 or 0 to turn ..., it is better to call cvode_active() with the appropriate argument....". I thought I might be missing the alternative arguments to 1 and 0.
Sorry.
Kind Regards
Richard
Post Reply