### Use of crank.c file

Posted:

**Fri Apr 27, 2012 4:28 am**Dear all,

I would like to know the size of the tridiagonal matrix and other information from Crank-Nicolson 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 Crank-Nicolson 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 Crank-Nicolson solver?

I would like to know the size of the tridiagonal matrix and other information from Crank-Nicolson 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 Crank-Nicolson 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 Crank-Nicolson solver?