Page 1 of 1

Lost In Code - Help!

Posted: Thu Jun 02, 2005 1:19 pm
by james
I'm trying to figure out Neuron's code, and have gotten totally lost.

If I look at the code for fadvance, I see that it's repeatedly calling nrn_solve, advancing the simulation through time. Within nrn_solve, there are triang and bksub routines that do the Gaussian elimination over the tree of compartments. These work on a node structure that has members _a, _b, _d, and _rhs, but I can't find any place where these are initialized or solved for.

It seems to me that there HAS to be somewhere that this is done: where the variables are set to something derived from compartment voltage differences, membrane capacitance, resistance, and so on, but where? And how? The code, and all the papers & references &'ve been able to find, seem to assume a whole body of pre-existing knowledge that I don't have, and don't know where to find. Can someone give me a clue?

Thanks,
James

Posted: Tue Jun 07, 2005 9:35 am
by ted
See
Details of fadvance()
in chapter 7 of the NEURON book (get draft here
http://www.neuron.yale.edu/ftp/ted/book ... xedref.pdf
). Note that fadvance sets up the equation matrix by calling treeset.c

Posted: Tue Jun 07, 2005 10:06 am
by james
Thanks, that's useful. The chapter title and the first couple of pages are rather misleading, though. I looked at them a couple of weeks ago, saw the picture and the word "GUI", and passed it by.