Dear all,
I would like to know the size of the tridiagonal matrix and other information from CrankNicolson solver (file crank.c in "src/scopmath").
I know that in general it is possible to specify in a mod file the method to use in order to solve a system of equations:
i.e. for using euler method, it is possible specify in a mod file:
BREAKPOINT {
SOLVE state METHOD euler
}
I tried to use cnexp, thinking that CNexp stands for CrankNicolson Exponential method, but in this way the crank.c file it is not used.
I know that it is need to set the variable "secondorder" =2, but also setting this value, the method it is not invoked.
Can anyone give me information about it?
If it is possible to post a practical example in a .hoc file that uses the CrankNicolson solver?
Use of crank.c file

 Site Admin
 Posts: 5416
 Joined: Wed May 18, 2005 4:50 pm
 Location: Yale University School of Medicine
 Contact:
Re: Use of crank.c file
If you want to learn about using NMODL to add new features to NEURON, read either chaper 9 of The NEURON Book or this article:
Hines, M.L. and Carnevale, N.T.
Expanding NEURON's repertoire of mechanisms with NMODL.
Neural Computation 12:9951007, 2000
which is available from a link at http://www.neuron.yale.edu/neuron/nrnpubs
Integration methods for SOLVE statements
http://www.neuron.yale.edu/phpBB/viewto ... f=28&t=592
in the Hot tips area
http://www.neuron.yale.edu/phpBB/viewforum.php?f=28
of the NEURON Forum
Hines, M.L. and Carnevale, N.T.
Expanding NEURON's repertoire of mechanisms with NMODL.
Neural Computation 12:9951007, 2000
which is available from a link at http://www.neuron.yale.edu/neuron/nrnpubs
Depends on the particular model that one has set up with hoc and/or Python statements. You don't need this information in order to build or use models, or to add new mechanisms with NMODL.jackfolla wrote:I would like to know the size of the tridiagonal matrix
Discussed in this postI know that in general it is possible to specify in a mod file the method to use
Integration methods for SOLVE statements
http://www.neuron.yale.edu/phpBB/viewto ... f=28&t=592
in the Hot tips area
http://www.neuron.yale.edu/phpBB/viewforum.php?f=28
of the NEURON Forum
Never use euler. Never.for using euler method
The METHOD specification in any NMODL file pertains only to the state variables in the equations that are generated from the statements in that NMODL file. secondorder and the CVode class are used to control how all other states are integrated.I tried to use cnexp, thinking that CNexp stands for CrankNicolson Exponential method, but in this way the crank.c file it is not used.
I know that it is need to set the variable "secondorder" =2, but also setting this value, the method it is not invoked.
Re: Use of crank.c file
Dear Ted,
thanks for your reply.
I'm interested to know how the CrankNicolson method (implemented in src/scopmath/crank.c) works in a NEURON model.
Can someone post me a model that certainly uses cranknicolson (crank.c)?
Thanks.
thanks for your reply.
I'm interested to know how the CrankNicolson method (implemented in src/scopmath/crank.c) works in a NEURON model.
Can someone post me a model that certainly uses cranknicolson (crank.c)?
Thanks.

 Site Admin
 Posts: 5416
 Joined: Wed May 18, 2005 4:50 pm
 Location: Yale University School of Medicine
 Contact:
Re: Use of crank.c file
Suggest you search ModelDB for instances of "secondorder"