001: //
002: // Heccer : a compartmental solver that implements efficient Crank-Nicolson
003: // integration for neuronal models.
004: //
005: 
006: //////////////////////////////////////////////////////////////////////////////
007: //'
008: //' Heccer : testbed C implementation
009: //'
010: //' Copyright (C) 2006-2008 Hugo Cornelis
011: //'
012: //' functional ideas ..   Hugo Cornelis, hugo.cornelis@gmail.com
013: //'
014: //' coding ............   Hugo Cornelis, hugo.cornelis@gmail.com
015: //'
016: //////////////////////////////////////////////////////////////////////////////
017: 
018: 
019: #include "../../heccer/addressing.h"
020: #include "../../heccer/compartment.h"
021: #include "../../heccer/heccer.h"
022: 
023: 
024: /* #define HECCER_TEST_REPORTING_GRANULARITY 100000 */
025: /* #define HECCER_TEST_STEPS 1000 */
026: 
027: 
028: struct Compartment compSoma =
029: {
030:     //m administrative overhead
031: 
032:     {
033:         //m type of structure
034: 
035:         MATH_TYPE_Compartment,
036: 
037: #ifdef HECCER_SOURCE_NEUROSPACES
038: 
039:         /// identification
040: 
041:         ADDRESSING_NEUROSPACES_2_HECCER(3),
042: 
043: #endif
044: 
045: #ifdef HECCER_SOURCE_TYPING
046: 
047:         /// model source type number
048: 
049:         /// \note source typing is used to compute aggregate currents ao
050:         /// \note things.
051: 
052:         -1,
053: 
054: #endif
055: 
056: #ifdef HECCER_SIZED_MATH_STRUCTURES
057: 
058:         /// size of this structure
059: 
060:         sizeof(struct Compartment),
061: 
062: #endif
063: 
064:     },
065: 
066:     //m index of parent compartment, -1 for none
067: 
068:     -1,
069: 
070: /*     //m first mechanism */
071: 
072: /*     NULL, */
073: 
074: /*     //m number of mechanisms */
075: 
076: /*     0, */
077: 
078:     //m descriptive values, alphabetical order
079: 
080: /*     double dCm; */
081: 
082:     4.57537e-11, // unscaled 0.0164,
083: 
084: /*     double dEm; */
085: 
086:     -0.08,
087: 
088: /*     double dInitVm; */
089: 
090:     -0.068,
091: 
092: /*     double dInject;		 */
093: 
094:     0,
095: 
096: /*     double dRa; */
097: 
098:     360502, // unscaled 2.5,
099: 
100: /*     double dRm; */
101: 
102:     3.58441e+08, // unscaled 1
103: };
104: 
105: 
106: int piC2m[] =
107: {
108:     0,
109:     -1,
110: };
111: 
112: 
113: struct Intermediary inter =
114: {
115:     //m compartment array
116: 
117:     1,
118: 
119:     &compSoma,
120: 
121:     //m all other mathematical components
122: 
123:     NULL,
124: 
125:     //m compartment 2 first mechanism number
126: 
127:     piC2m,
128: };
129: 
130: 
131: #include "main.c"
132: 
133: