is there any possibility to check or print the matrix which is assembled when solving a model with implicit time
integration methods (CN, BE)? I know the Matrix class, which has a print method, but I am not sure whether this datatype
is used for matrices evolving in implicit time stepping schemes.
Why do I want to check the matrix?
I tried to solve a simple model:
Cylindrical cell with 1 passive compartment, no reaction term, potential initially set to
some constant value, alpha-synapse firing after t=1ms, model time t=1ms.
To solve the model I used nseg=16384, dt=0.1ms and the Backward Euler method:
Code: Select all
secondorder = 0
create soma
nsegments=16384
soma {
nseg = nsegments
diam = 4
L = 158.113885
Ra = 200.
/*
// passive current
insert pas
g_pas = 0.0005 // [S/cm^2], conductive
e_pas = 0 // [mv], equilibrium potential
*/
cm = 2. // [uf/cm^2]
}
objectvar syn
soma syn = new AlphaSynapse(0.0)
syn.tau = 1.0
syn.onset = 1.0
syn.e = 50
syn.gmax = 10
dt = 0.0005
tstop = 10
finitialize(0.00362067)
proc integrate() {
print soma.nseg
while(t < tstop) {
fadvance()
printf("%g %.14g\n", t, soma.v(1.0))
}
}
Code: Select all
1
16384
0 0.00362067
0.1 0.00362067
0.2 0.00362067
0.3 0.00362067
0.4 0.00362067
0.5 0.00362067
0.6 0.00362067
0.7 0.00362067
0.8 0.00362067
0.9 0.00362067
1 0.00362067
1.1 3.8569371857645
1.2 10.221250121198
1.3 16.991046904552
1.4 23.102472056881
1.5 28.258439789191
1.6 32.486941084025
...up to 10 ms
the potential is not changed. If the system is solved numerically, I should at least see some
round-off errors induced by numerics -- or isn't the system solved at all, that is,
is Neuron able to detect the cell to be inactive? As far as I understand the code,
'#define ELIMINATE_T_ROUNDOFF 0' says that round-off errors are not eliminated.
That is why I wanted to check the system matrix for its entries, to understand the numerics.
Hopefully my questions makes sense as I do not now how Neuron solves the system internally.
Many thanks for your help!
Dan