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 <stdio.h>
020: #include <stdlib.h>
021: 
022: #include "../../heccer/compartment.h"
023: #include "../../heccer/heccer.h"
024: 
025: 
026: #define HECCER_TEST_TESTED_THINGS ( HECCER_DUMP_VM_COMPARTMENT_MATRIX \
027:                                     | HECCER_DUMP_VM_COMPARTMENT_OPERATIONS \
028:                                     | HECCER_DUMP_VM_MECHANISM_DATA \
029:                                     | HECCER_DUMP_VM_MECHANISM_OPERATIONS \
030:                                     | HECCER_DUMP_VM_SUMMARY \
031:                                     | HECCER_DUMP_VM_AGGREGATORS \
032:         )
033: /* 				    | HECCER_DUMP_INDEXERS_SUMMARY \ */
034: /* 				    | HECCER_DUMP_INTERMEDIARY_SUMMARY \ */
035: 
036: 
037: struct Compartment comp[] =
038: {
039:     {
040:         //m administrative overhead
041: 
042:         {
043:             //m type of structure
044: 
045:             MATH_TYPE_Compartment,
046:         },
047: 
048:         //m index of parent compartment, -1 for none
049: 
050:         -1,
051: 
052: /* 	//m first mechanism */
053: 
054: /* 	NULL, */
055: 
056: /* 	//m number of mechanisms */
057: 
058: /* 	0, */
059: 
060:         //m descriptive values, alphabetical order
061: 
062: /*     double dCm; */
063: 
064:         4.57537e-11, // unscaled 0.0164,
065: 
066: /*     double dEm; */
067: 
068:         -0.08,
069: 
070: /*     double dInitVm; */
071: 
072:         -0.068,
073: 
074: /*     double dInject;		 */
075: 
076:         0,
077: 
078: /*     double dRa; */
079: 
080:         360502, // unscaled 2.5,
081: 
082: /*     double dRm; */
083: 
084:         3.58441e+08, // unscaled 1
085:     },
086: 
087:     {
088:         //m administrative overhead
089: 
090:         {
091:             //m type of structure
092: 
093:             MATH_TYPE_Compartment,
094:         },
095: 
096:         //m index of parent compartment, -1 for none
097: 
098:         0,
099: 
100: /* 	//m first mechanism */
101: 
102: /* 	NULL, */
103: 
104: /* 	//m number of mechanisms */
105: 
106: /* 	0, */
107: 
108:         //m descriptive values, alphabetical order
109: 
110: /*     double dCm; */
111: 
112:         4.57537e-11, // unscaled 0.0164,
113: 
114: /*     double dEm; */
115: 
116:         -0.08,
117: 
118: /*     double dInitVm; */
119: 
120:         -0.068,
121: 
122: /*     double dInject;		 */
123: 
124:         0,
125: 
126: /*     double dRa; */
127: 
128:         360502, // unscaled 2.5,
129: 
130: /*     double dRm; */
131: 
132:         3.58441e+08, // unscaled 1
133:     },
134: 
135:     {
136:         //m administrative overhead
137: 
138:         {
139:             //m type of structure
140: 
141:             MATH_TYPE_Compartment,
142:         },
143: 
144:         //m index of parent compartment, -1 for none
145: 
146:         1,
147: 
148: /* 	//m first mechanism */
149: 
150: /* 	NULL, */
151: 
152: /* 	//m number of mechanisms */
153: 
154: /* 	0, */
155: 
156:         //m descriptive values, alphabetical order
157: 
158: /*     double dCm; */
159: 
160:         4.57537e-11, // unscaled 0.0164,
161: 
162: /*     double dEm; */
163: 
164:         -0.08,
165: 
166: /*     double dInitVm; */
167: 
168:         -0.068,
169: 
170: /*     double dInject;		 */
171: 
172:         0,
173: 
174: /*     double dRa; */
175: 
176:         360502, // unscaled 2.5,
177: 
178: /*     double dRm; */
179: 
180:         3.58441e+08, // unscaled 1
181:     },
182: };
183: 
184: 
185: int piC2m[] =
186: {
187:     0,
188:     0,
189:     0,
190:     -1,
191: };
192: 
193: 
194: struct Intermediary inter =
195: {
196:     //m compartment array
197: 
198:     3,
199: 
200:     comp,
201: 
202:     //m all other mathematical components
203: 
204:     NULL,
205: 
206:     //m compartment 2 first mechanism number
207: 
208:     piC2m,
209: };
210: 
211: 
212: #include "main-serializer.h"
213: 
214: #include "main-serializer.c"
215: 
216: