Computes the reaction terms $f(u,v)$ and $g(u,v)$.
56 for (
unsigned int i = 0; i <
m_nq; ++i)
60 NekDouble var_chaste_interface__membrane__V = inarray[0][i];
62 NekDouble var_chaste_interface__fast_sodium_current_m_gate__m = inarray[1][i];
64 NekDouble var_chaste_interface__fast_sodium_current_h_gate__h = inarray[2][i];
66 NekDouble var_chaste_interface__fast_sodium_current_j_gate__j = inarray[3][i];
68 NekDouble var_chaste_interface__slow_inward_current_d_gate__d = inarray[4][i];
70 NekDouble var_chaste_interface__slow_inward_current_f_gate__f = inarray[5][i];
72 NekDouble var_chaste_interface__time_dependent_potassium_current_X_gate__X = inarray[6][i];
74 NekDouble var_chaste_interface__intracellular_calcium_concentration__Cai = inarray[7][i];
79 NekDouble d_dt_chaste_interface__membrane__V;
80 const NekDouble var_fast_sodium_current__j = var_chaste_interface__fast_sodium_current_j_gate__j;
81 const NekDouble var_fast_sodium_current__h = var_chaste_interface__fast_sodium_current_h_gate__h;
82 const NekDouble var_fast_sodium_current__m = var_chaste_interface__fast_sodium_current_m_gate__m;
83 const NekDouble var_fast_sodium_current__V = var_chaste_interface__membrane__V;
84 const NekDouble var_slow_inward_current__d = var_chaste_interface__slow_inward_current_d_gate__d;
85 const NekDouble var_slow_inward_current__f = var_chaste_interface__slow_inward_current_f_gate__f;
86 const NekDouble var_slow_inward_current__V = var_chaste_interface__membrane__V;
87 const NekDouble var_slow_inward_current__Cai = var_chaste_interface__intracellular_calcium_concentration__Cai;
88 const NekDouble var_slow_inward_current__E_si = 7.7 - (13.0287 * log(var_slow_inward_current__Cai / 1.0));
89 const NekDouble var_slow_inward_current__i_si = 0.09 * var_slow_inward_current__d * var_slow_inward_current__f * (var_slow_inward_current__V - var_slow_inward_current__E_si);
90 const NekDouble var_time_dependent_potassium_current__V = var_chaste_interface__membrane__V;
91 const NekDouble var_time_dependent_potassium_current__X = var_chaste_interface__time_dependent_potassium_current_X_gate__X;
93 const NekDouble var_fast_sodium_current_m_gate__m = var_fast_sodium_current__m;
95 const NekDouble var_fast_sodium_current_m_gate__V = var_fast_sodium_current__V;
96 const NekDouble var_fast_sodium_current_m_gate__alpha_m = (0.32 * (var_fast_sodium_current_m_gate__V + 47.13)) / (1.0 - exp((-0.1) * (var_fast_sodium_current_m_gate__V + 47.13)));
97 const NekDouble var_fast_sodium_current_m_gate__beta_m = 0.08 * exp((-var_fast_sodium_current_m_gate__V) / 11.0);
99 const NekDouble var_fast_sodium_current_m_gate__d_m_d_environment__time = (var_fast_sodium_current_m_gate__alpha_m * (1.0 - var_fast_sodium_current_m_gate__m)) - (var_fast_sodium_current_m_gate__beta_m * var_fast_sodium_current_m_gate__m);
100 const NekDouble var_fast_sodium_current__fast_sodium_current_m_gate__d_m_d_environment__time = var_fast_sodium_current_m_gate__d_m_d_environment__time;
102 const NekDouble var_fast_sodium_current_h_gate__V = var_fast_sodium_current__V;
103 const NekDouble var_fast_sodium_current_h_gate__beta_h = (var_fast_sodium_current_h_gate__V < (-40.0)) ? ((3.56 * exp(0.079 * var_fast_sodium_current_h_gate__V)) + (310000.0 * exp(0.35 * var_fast_sodium_current_h_gate__V))) : (1.0 / (0.13 * (1.0 + exp((var_fast_sodium_current_h_gate__V + 10.66) / (-11.1)))));
104 const NekDouble var_fast_sodium_current_h_gate__alpha_h = (var_fast_sodium_current_h_gate__V < (-40.0)) ? (0.135 * exp((80.0 + var_fast_sodium_current_h_gate__V) / (-6.8))) : 0.0;
106 const NekDouble var_fast_sodium_current_h_gate__h = var_fast_sodium_current__h;
107 const NekDouble var_fast_sodium_current_h_gate__d_h_d_environment__time = (var_fast_sodium_current_h_gate__alpha_h * (1.0 - var_fast_sodium_current_h_gate__h)) - (var_fast_sodium_current_h_gate__beta_h * var_fast_sodium_current_h_gate__h);
108 const NekDouble var_fast_sodium_current__fast_sodium_current_h_gate__d_h_d_environment__time = var_fast_sodium_current_h_gate__d_h_d_environment__time;
110 const NekDouble var_fast_sodium_current_j_gate__V = var_fast_sodium_current__V;
111 const NekDouble var_fast_sodium_current_j_gate__alpha_j = (var_fast_sodium_current_j_gate__V < (-40.0)) ? (((((-127140.0) * exp(0.2444 * var_fast_sodium_current_j_gate__V)) - (3.474e-05 * exp((-0.04391) * var_fast_sodium_current_j_gate__V))) * (var_fast_sodium_current_j_gate__V + 37.78)) / (1.0 + exp(0.311 * (var_fast_sodium_current_j_gate__V + 79.23)))) : 0.0;
112 const NekDouble var_fast_sodium_current_j_gate__beta_j = (var_fast_sodium_current_j_gate__V < (-40.0)) ? ((0.1212 * exp((-0.01052) * var_fast_sodium_current_j_gate__V)) / (1.0 + exp((-0.1378) * (var_fast_sodium_current_j_gate__V + 40.14)))) : ((0.3 * exp((-2.535e-07) * var_fast_sodium_current_j_gate__V)) / (1.0 + exp((-0.1) * (var_fast_sodium_current_j_gate__V + 32.0))));
114 const NekDouble var_fast_sodium_current_j_gate__j = var_fast_sodium_current__j;
115 const NekDouble var_fast_sodium_current_j_gate__d_j_d_environment__time = (var_fast_sodium_current_j_gate__alpha_j * (1.0 - var_fast_sodium_current_j_gate__j)) - (var_fast_sodium_current_j_gate__beta_j * var_fast_sodium_current_j_gate__j);
116 const NekDouble var_fast_sodium_current__fast_sodium_current_j_gate__d_j_d_environment__time = var_fast_sodium_current_j_gate__d_j_d_environment__time;
118 const NekDouble var_slow_inward_current_d_gate__V = var_slow_inward_current__V;
119 const NekDouble var_slow_inward_current_d_gate__alpha_d = (0.095 * exp((-0.01) * (var_slow_inward_current_d_gate__V - 5.0))) / (1.0 + exp((-0.072) * (var_slow_inward_current_d_gate__V - 5.0)));
121 const NekDouble var_slow_inward_current_d_gate__d = var_slow_inward_current__d;
123 const NekDouble var_slow_inward_current_d_gate__beta_d = (0.07 * exp((-0.017) * (var_slow_inward_current_d_gate__V + 44.0))) / (1.0 + exp(0.05 * (var_slow_inward_current_d_gate__V + 44.0)));
125 const NekDouble var_slow_inward_current_d_gate__d_d_d_environment__time = (var_slow_inward_current_d_gate__alpha_d * (1.0 - var_slow_inward_current_d_gate__d)) - (var_slow_inward_current_d_gate__beta_d * var_slow_inward_current_d_gate__d);
126 const NekDouble var_slow_inward_current__slow_inward_current_d_gate__d_d_d_environment__time = var_slow_inward_current_d_gate__d_d_d_environment__time;
127 const NekDouble var_slow_inward_current_f_gate__f = var_slow_inward_current__f;
129 const NekDouble var_slow_inward_current_f_gate__V = var_slow_inward_current__V;
130 const NekDouble var_slow_inward_current_f_gate__alpha_f = (0.012 * exp((-0.008) * (var_slow_inward_current_f_gate__V + 28.0))) / (1.0 + exp(0.15 * (var_slow_inward_current_f_gate__V + 28.0)));
131 const NekDouble var_slow_inward_current_f_gate__beta_f = (0.0065 * exp((-0.02) * (var_slow_inward_current_f_gate__V + 30.0))) / (1.0 + exp((-0.2) * (var_slow_inward_current_f_gate__V + 30.0)));
133 const NekDouble var_slow_inward_current_f_gate__d_f_d_environment__time = (var_slow_inward_current_f_gate__alpha_f * (1.0 - var_slow_inward_current_f_gate__f)) - (var_slow_inward_current_f_gate__beta_f * var_slow_inward_current_f_gate__f);
134 const NekDouble var_slow_inward_current__slow_inward_current_f_gate__d_f_d_environment__time = var_slow_inward_current_f_gate__d_f_d_environment__time;
135 const NekDouble var_time_dependent_potassium_current_X_gate__X = var_time_dependent_potassium_current__X;
137 const NekDouble var_time_dependent_potassium_current_X_gate__V = var_time_dependent_potassium_current__V;
138 const NekDouble var_time_dependent_potassium_current_X_gate__beta_X = (0.0013 * exp((-0.06) * (var_time_dependent_potassium_current_X_gate__V + 20.0))) / (1.0 + exp((-0.04) * (var_time_dependent_potassium_current_X_gate__V + 20.0)));
139 const NekDouble var_time_dependent_potassium_current_X_gate__alpha_X = (0.0005 * exp(0.083 * (var_time_dependent_potassium_current_X_gate__V + 50.0))) / (1.0 + exp(0.057 * (var_time_dependent_potassium_current_X_gate__V + 50.0)));
141 const NekDouble var_time_dependent_potassium_current_X_gate__d_X_d_environment__time = (var_time_dependent_potassium_current_X_gate__alpha_X * (1.0 - var_time_dependent_potassium_current_X_gate__X)) - (var_time_dependent_potassium_current_X_gate__beta_X * var_time_dependent_potassium_current_X_gate__X);
142 const NekDouble var_time_dependent_potassium_current__time_dependent_potassium_current_X_gate__d_X_d_environment__time = var_time_dependent_potassium_current_X_gate__d_X_d_environment__time;
144 const NekDouble var_intracellular_calcium_concentration__Cai = var_chaste_interface__intracellular_calcium_concentration__Cai;
145 const NekDouble var_intracellular_calcium_concentration__i_si = var_slow_inward_current__i_si;
146 const NekDouble var_intracellular_calcium_concentration__d_Cai_d_environment__time = (((-0.0001) / 1.0) * var_intracellular_calcium_concentration__i_si) + (0.07 * (0.0001 - var_intracellular_calcium_concentration__Cai));
148 const NekDouble var_chaste_interface__fast_sodium_current_m_gate__d_m_d_environment__time = var_fast_sodium_current__fast_sodium_current_m_gate__d_m_d_environment__time;
149 const NekDouble var_chaste_interface__fast_sodium_current_h_gate__d_h_d_environment__time = var_fast_sodium_current__fast_sodium_current_h_gate__d_h_d_environment__time;
150 const NekDouble var_chaste_interface__fast_sodium_current_j_gate__d_j_d_environment__time = var_fast_sodium_current__fast_sodium_current_j_gate__d_j_d_environment__time;
151 const NekDouble var_chaste_interface__slow_inward_current_d_gate__d_d_d_environment__time = var_slow_inward_current__slow_inward_current_d_gate__d_d_d_environment__time;
152 const NekDouble var_chaste_interface__slow_inward_current_f_gate__d_f_d_environment__time = var_slow_inward_current__slow_inward_current_f_gate__d_f_d_environment__time;
153 const NekDouble var_chaste_interface__time_dependent_potassium_current_X_gate__d_X_d_environment__time = var_time_dependent_potassium_current__time_dependent_potassium_current_X_gate__d_X_d_environment__time;
155 const NekDouble var_chaste_interface__intracellular_calcium_concentration__d_Cai_d_environment__time = var_intracellular_calcium_concentration__d_Cai_d_environment__time;
157 const NekDouble d_dt_chaste_interface__fast_sodium_current_m_gate__m = var_chaste_interface__fast_sodium_current_m_gate__d_m_d_environment__time;
158 const NekDouble d_dt_chaste_interface__fast_sodium_current_h_gate__h = var_chaste_interface__fast_sodium_current_h_gate__d_h_d_environment__time;
159 const NekDouble d_dt_chaste_interface__fast_sodium_current_j_gate__j = var_chaste_interface__fast_sodium_current_j_gate__d_j_d_environment__time;
160 const NekDouble d_dt_chaste_interface__slow_inward_current_d_gate__d = var_chaste_interface__slow_inward_current_d_gate__d_d_d_environment__time;
161 const NekDouble d_dt_chaste_interface__slow_inward_current_f_gate__f = var_chaste_interface__slow_inward_current_f_gate__d_f_d_environment__time;
162 const NekDouble d_dt_chaste_interface__time_dependent_potassium_current_X_gate__X = var_chaste_interface__time_dependent_potassium_current_X_gate__d_X_d_environment__time;
164 const NekDouble d_dt_chaste_interface__intracellular_calcium_concentration__Cai = var_chaste_interface__intracellular_calcium_concentration__d_Cai_d_environment__time;
166 const NekDouble var_membrane__R = 8314.0;
168 const NekDouble var_membrane__F = 96484.6;
170 const NekDouble var_chaste_interface__membrane__I_stim = 0.0;
171 const NekDouble var_membrane__I_stim = var_chaste_interface__membrane__I_stim;
172 const NekDouble var_fast_sodium_current__g_Na = 23.0;
173 const NekDouble var_fast_sodium_current__R = var_membrane__R;
174 const NekDouble var_fast_sodium_current__F = var_membrane__F;
175 const NekDouble var_ionic_concentrations__Nao = 140.0;
176 const NekDouble var_fast_sodium_current__Nao = var_ionic_concentrations__Nao;
177 const NekDouble var_ionic_concentrations__Nai = 18.0;
178 const NekDouble var_fast_sodium_current__Nai = var_ionic_concentrations__Nai;
179 const NekDouble var_fast_sodium_current__T = var_membrane__T;
180 const NekDouble var_fast_sodium_current__E_Na = ((var_fast_sodium_current__R * var_fast_sodium_current__T) / var_fast_sodium_current__F) * log(var_fast_sodium_current__Nao / var_fast_sodium_current__Nai);
181 const NekDouble var_fast_sodium_current__i_Na = var_fast_sodium_current__g_Na * pow(var_fast_sodium_current__m, 3.0) * var_fast_sodium_current__h * var_fast_sodium_current__j * (var_fast_sodium_current__V - var_fast_sodium_current__E_Na);
182 const NekDouble var_membrane__i_Na = var_fast_sodium_current__i_Na;
183 const NekDouble var_membrane__i_si = var_slow_inward_current__i_si;
184 const NekDouble var_time_dependent_potassium_current_Xi_gate__V = var_time_dependent_potassium_current__V;
185 const NekDouble var_time_dependent_potassium_current_Xi_gate__Xi = (var_time_dependent_potassium_current_Xi_gate__V > (-100.0)) ? ((2.837 * (exp(0.04 * (var_time_dependent_potassium_current_Xi_gate__V + 77.0)) - 1.0)) / ((var_time_dependent_potassium_current_Xi_gate__V + 77.0) * exp(0.04 * (var_time_dependent_potassium_current_Xi_gate__V + 35.0)))) : 1.0;
186 const NekDouble var_time_dependent_potassium_current__Xi = var_time_dependent_potassium_current_Xi_gate__Xi;
187 const NekDouble var_ionic_concentrations__Ko = 5.4;
188 const NekDouble var_time_dependent_potassium_current__Ko = var_ionic_concentrations__Ko;
189 const NekDouble var_time_dependent_potassium_current__g_K = 0.282 * sqrt(var_time_dependent_potassium_current__Ko / 5.4);
190 const NekDouble var_time_dependent_potassium_current__PR_NaK = 0.01833;
191 const NekDouble var_time_dependent_potassium_current__F = var_membrane__F;
192 const NekDouble var_time_dependent_potassium_current__Nao = var_ionic_concentrations__Nao;
193 const NekDouble var_ionic_concentrations__Ki = 145.0;
194 const NekDouble var_time_dependent_potassium_current__Ki = var_ionic_concentrations__Ki;
195 const NekDouble var_time_dependent_potassium_current__Nai = var_ionic_concentrations__Nai;
196 const NekDouble var_time_dependent_potassium_current__T = var_membrane__T;
197 const NekDouble var_time_dependent_potassium_current__R = var_membrane__R;
198 const NekDouble var_time_dependent_potassium_current__E_K = ((var_time_dependent_potassium_current__R * var_time_dependent_potassium_current__T) / var_time_dependent_potassium_current__F) * log((var_time_dependent_potassium_current__Ko + (var_time_dependent_potassium_current__PR_NaK * var_time_dependent_potassium_current__Nao)) / (var_time_dependent_potassium_current__Ki + (var_time_dependent_potassium_current__PR_NaK * var_time_dependent_potassium_current__Nai)));
199 const NekDouble var_time_dependent_potassium_current__i_K = var_time_dependent_potassium_current__g_K * var_time_dependent_potassium_current__X * var_time_dependent_potassium_current__Xi * (var_time_dependent_potassium_current__V - var_time_dependent_potassium_current__E_K);
200 const NekDouble var_membrane__i_K = var_time_dependent_potassium_current__i_K;
201 const NekDouble var_time_independent_potassium_current__V = var_chaste_interface__membrane__V;
202 const NekDouble var_time_independent_potassium_current_K1_gate__V = var_time_independent_potassium_current__V;
203 const NekDouble var_time_independent_potassium_current__Ki = var_ionic_concentrations__Ki;
204 const NekDouble var_time_independent_potassium_current__R = var_membrane__R;
205 const NekDouble var_time_independent_potassium_current__F = var_membrane__F;
206 const NekDouble var_time_independent_potassium_current__Ko = var_ionic_concentrations__Ko;
207 const NekDouble var_time_independent_potassium_current__T = var_membrane__T;
208 const NekDouble var_time_independent_potassium_current__E_K1 = ((var_time_independent_potassium_current__R * var_time_independent_potassium_current__T) / var_time_independent_potassium_current__F) * log(var_time_independent_potassium_current__Ko / var_time_independent_potassium_current__Ki);
209 const NekDouble var_time_independent_potassium_current_K1_gate__E_K1 = var_time_independent_potassium_current__E_K1;
210 const NekDouble var_time_independent_potassium_current_K1_gate__beta_K1 = ((0.49124 * exp(0.08032 * ((var_time_independent_potassium_current_K1_gate__V + 5.476) - var_time_independent_potassium_current_K1_gate__E_K1))) + (1.0 * exp(0.06175 * (var_time_independent_potassium_current_K1_gate__V - (var_time_independent_potassium_current_K1_gate__E_K1 + 594.31))))) / (1.0 + exp((-0.5143) * ((var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K1) + 4.753)));
211 const NekDouble var_time_independent_potassium_current_K1_gate__alpha_K1 = 1.02 / (1.0 + exp(0.2385 * ((var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K1) - 59.215)));
212 const NekDouble var_time_independent_potassium_current_K1_gate__K1_infinity = var_time_independent_potassium_current_K1_gate__alpha_K1 / (var_time_independent_potassium_current_K1_gate__alpha_K1 + var_time_independent_potassium_current_K1_gate__beta_K1);
213 const NekDouble var_time_independent_potassium_current__K1_infinity = var_time_independent_potassium_current_K1_gate__K1_infinity;
214 const NekDouble var_time_independent_potassium_current__g_K1 = 0.6047 * sqrt(var_time_independent_potassium_current__Ko / 5.4);
215 const NekDouble var_time_independent_potassium_current__i_K1 = var_time_independent_potassium_current__g_K1 * var_time_independent_potassium_current__K1_infinity * (var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K1);
216 const NekDouble var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
217 const NekDouble var_plateau_potassium_current__g_Kp = 0.0183;
218 const NekDouble var_plateau_potassium_current__V = var_chaste_interface__membrane__V;
219 const NekDouble var_plateau_potassium_current__Kp = 1.0 / (1.0 + exp((7.488 - var_plateau_potassium_current__V) / 5.98));
220 const NekDouble var_plateau_potassium_current__E_K1 = var_time_independent_potassium_current__E_K1;
221 const NekDouble var_plateau_potassium_current__E_Kp = var_plateau_potassium_current__E_K1;
222 const NekDouble var_plateau_potassium_current__i_Kp = var_plateau_potassium_current__g_Kp * var_plateau_potassium_current__Kp * (var_plateau_potassium_current__V - var_plateau_potassium_current__E_Kp);
223 const NekDouble var_membrane__i_Kp = var_plateau_potassium_current__i_Kp;
224 const NekDouble var_background_current__E_b = -59.87;
225 const NekDouble var_background_current__g_b = 0.03921;
226 const NekDouble var_background_current__V = var_chaste_interface__membrane__V;
227 const NekDouble var_background_current__i_b = var_background_current__g_b * (var_background_current__V - var_background_current__E_b);
228 const NekDouble var_membrane__i_b = var_background_current__i_b;
229 const NekDouble var_membrane__d_V_d_environment__time = ((-1.0) / var_membrane__C) * (var_membrane__I_stim + var_membrane__i_Na + var_membrane__i_si + var_membrane__i_K + var_membrane__i_K1 + var_membrane__i_Kp + var_membrane__i_b);
230 const NekDouble var_chaste_interface__membrane__d_V_d_environment__time = var_membrane__d_V_d_environment__time;
231 d_dt_chaste_interface__membrane__V = var_chaste_interface__membrane__d_V_d_environment__time;
232 const NekDouble m_inf = var_fast_sodium_current_m_gate__alpha_m/(var_fast_sodium_current_m_gate__alpha_m + var_fast_sodium_current_m_gate__beta_m);
233 const NekDouble m_tau = 1.0/(var_fast_sodium_current_m_gate__alpha_m + var_fast_sodium_current_m_gate__beta_m);
234 const NekDouble h_inf = var_fast_sodium_current_h_gate__alpha_h/(var_fast_sodium_current_h_gate__alpha_h + var_fast_sodium_current_h_gate__beta_h);
235 const NekDouble h_tau = 1.0/(var_fast_sodium_current_h_gate__alpha_h + var_fast_sodium_current_h_gate__beta_h);
236 const NekDouble j_inf = var_fast_sodium_current_j_gate__alpha_j/(var_fast_sodium_current_j_gate__alpha_j + var_fast_sodium_current_j_gate__beta_j);
237 const NekDouble j_tau = 1.0/(var_fast_sodium_current_j_gate__alpha_j + var_fast_sodium_current_j_gate__beta_j);
238 const NekDouble d_inf = var_slow_inward_current_d_gate__alpha_d/(var_slow_inward_current_d_gate__alpha_d + var_slow_inward_current_d_gate__beta_d);
239 const NekDouble d_tau = 1.0/(var_slow_inward_current_d_gate__alpha_d + var_slow_inward_current_d_gate__beta_d);
240 const NekDouble f_inf = var_slow_inward_current_f_gate__alpha_f/(var_slow_inward_current_f_gate__alpha_f + var_slow_inward_current_f_gate__beta_f);
241 const NekDouble f_tau = 1.0/(var_slow_inward_current_f_gate__alpha_f + var_slow_inward_current_f_gate__beta_f);
242 const NekDouble X_inf = var_time_dependent_potassium_current_X_gate__alpha_X/(var_time_dependent_potassium_current_X_gate__alpha_X + var_time_dependent_potassium_current_X_gate__beta_X);
243 const NekDouble X_tau = 1.0/(var_time_dependent_potassium_current_X_gate__alpha_X + var_time_dependent_potassium_current_X_gate__beta_X);
245 outarray[0][i] = d_dt_chaste_interface__membrane__V;
246 outarray[1][i] = m_inf;
248 outarray[2][i] = h_inf;
250 outarray[3][i] = j_inf;
252 outarray[4][i] = d_inf;
254 outarray[5][i] = f_inf;
256 outarray[6][i] = X_inf;
258 outarray[7][i] = d_dt_chaste_interface__intracellular_calcium_concentration__Cai;
int m_nq
Number of physical points.
Array< OneD, Array< OneD, NekDouble > > m_gates_tau
Storage for gate tau values.