1: // 2: // Heccer : a compartmental solver that implements efficient Crank-Nicolson 3: // integration for neuronal models. 4: // 5: 6: ////////////////////////////////////////////////////////////////////////////// 7: //' 8: //' Heccer : testbed C implementation 9: //' 10: //' Copyright (C) 2006-2008 Hugo Cornelis 11: //' 12: //' functional ideas .. Hugo Cornelis, hugo.cornelis@gmail.com 13: //' 14: //' coding ............ Hugo Cornelis, hugo.cornelis@gmail.com 15: //' 16: ////////////////////////////////////////////////////////////////////////////// 17: 18: 19: #include "../../heccer/compartment.h" 20: #include "../../heccer/heccer.h" 21: 22: 23: struct Compartment comp[] = 24: { 25: { 26: //m administrative overhead 27: 28: { 29: //m type of structure 30: 31: MATH_TYPE_Compartment, 32: }, 33: 34: //m index of parent compartment, -1 for none 35: 36: -1, 37: 38: /* //m first mechanism */ 39: 40: /* NULL, */ 41: 42: /* //m number of mechanisms */ 43: 44: /* 0, */ 45: 46: //m descriptive values, alphabetical order 47: 48: /* double dCm; */ 49: 50: 4.57537e-11, // unscaled 0.0164, 51: 52: /* double dEm; */ 53: 54: -0.08, 55: 56: /* double dInitVm; */ 57: 58: -0.068, 59: 60: /* double dInject; */ 61: 62: 0, 63: 64: /* double dRa; */ 65: 66: 360502, // unscaled 2.5, 67: 68: /* double dRm; */ 69: 70: 3.58441e+08, // unscaled 1 71: }, 72: 73: { 74: //m administrative overhead 75: 76: { 77: //m type of structure 78: 79: MATH_TYPE_Compartment, 80: }, 81: 82: //m index of parent compartment, -1 for none 83: 84: 0, 85: 86: /* //m first mechanism */ 87: 88: /* NULL, */ 89: 90: /* //m number of mechanisms */ 91: 92: /* 0, */ 93: 94: //m descriptive values, alphabetical order 95: 96: /* double dCm; */ 97: 98: 4.57537e-11, // unscaled 0.0164, 99: 100: /* double dEm; */ 101: 102: -0.08, 103: 104: /* double dInitVm; */ 105: 106: -0.068, 107: 108: /* double dInject; */ 109: 110: 0, 111: 112: /* double dRa; */ 113: 114: 360502, // unscaled 2.5, 115: 116: /* double dRm; */ 117: 118: 3.58441e+08, // unscaled 1 119: }, 120: 121: { 122: //m administrative overhead 123: 124: { 125: //m type of structure 126: 127: MATH_TYPE_Compartment, 128: }, 129: 130: //m index of parent compartment, -1 for none 131: 132: 0, 133: 134: /* //m first mechanism */ 135: 136: /* NULL, */ 137: 138: /* //m number of mechanisms */ 139: 140: /* 0, */ 141: 142: //m descriptive values, alphabetical order 143: 144: /* double dCm; */ 145: 146: 4.57537e-11, // unscaled 0.0164, 147: 148: /* double dEm; */ 149: 150: -0.08, 151: 152: /* double dInitVm; */ 153: 154: -0.068, 155: 156: /* double dInject; */ 157: 158: 0, 159: 160: /* double dRa; */ 161: 162: 360502, // unscaled 2.5, 163: 164: /* double dRm; */ 165: 166: 3.58441e+08, // unscaled 1 167: }, 168: }; 169: 170: 171: int piC2m[] = 172: { 173: 0, 174: 0, 175: 0, 176: -1, 177: }; 178: 179: 180: struct Intermediary inter = 181: { 182: //m compartment array 183: 184: 3, 185: 186: comp, 187: 188: //m all other mathematical components 189: 190: NULL, 191: 192: //m compartment 2 first mechanism number 193: 194: piC2m, 195: }; 196: 197: 198: #include "main.c" 199: 200: 201: