Skip to content

Commit

Permalink
Order of the state-vector from the 'ToRORd_GKsGKrtjca' model is now t…
Browse files Browse the repository at this point in the history
…he same as the Matlab code/Minor adjustments to the model for the T-wave
  • Loading branch information
bergolho committed Jun 15, 2024
1 parent d9840a1 commit 0ff6301
Show file tree
Hide file tree
Showing 6 changed files with 681 additions and 682 deletions.
268 changes: 134 additions & 134 deletions src/extra_data_library/helper_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -1057,140 +1057,140 @@ struct extra_data_for_torord_gksgkrtjca_twave * set_common_torord_gksgkrtjca_twa
extra_data->initial_ss_epi = MALLOC_ARRAY_OF_TYPE(real, neq);
extra_data->initial_ss_mid = MALLOC_ARRAY_OF_TYPE(real, neq);

// Set the initial conditions (celltype = ENDO)
extra_data->initial_ss_endo[0] = -8.890585e+01;
extra_data->initial_ss_endo[1] = 1.107642e-02;
extra_data->initial_ss_endo[2] = 6.504164e-05;
extra_data->initial_ss_endo[3] = 1.210818e+01;
extra_data->initial_ss_endo[4] = 1.210851e+01;
extra_data->initial_ss_endo[5] = 1.426206e+02;
extra_data->initial_ss_endo[6] = 1.426205e+02;
extra_data->initial_ss_endo[7] = 1.530373e+00;
extra_data->initial_ss_endo[8] = 1.528032e+00;
extra_data->initial_ss_endo[9] = 7.455488e-05;
extra_data->initial_ss_endo[10] = 7.814592e-04;
extra_data->initial_ss_endo[11] = 8.313839e-01;
extra_data->initial_ss_endo[12] = 8.311938e-01;
extra_data->initial_ss_endo[13] = 6.752873e-01;
extra_data->initial_ss_endo[14] = 8.308255e-01;
extra_data->initial_ss_endo[15] = 1.585610e-04;
extra_data->initial_ss_endo[16] = 5.294475e-01;
extra_data->initial_ss_endo[17] = 2.896996e-01;
extra_data->initial_ss_endo[18] = 9.419166e-04;
extra_data->initial_ss_endo[19] = 9.996194e-01;
extra_data->initial_ss_endo[20] = 5.938602e-01;
extra_data->initial_ss_endo[21] = 4.799180e-04;
extra_data->initial_ss_endo[22] = 9.996194e-01;
extra_data->initial_ss_endo[23] = 6.543754e-01;
extra_data->initial_ss_endo[24] = -2.898677e-33;
extra_data->initial_ss_endo[25] = 1.000000e+00;
extra_data->initial_ss_endo[26] = 9.389659e-01;
extra_data->initial_ss_endo[27] = 1.000000e+00;
extra_data->initial_ss_endo[28] = 9.999003e-01;
extra_data->initial_ss_endo[29] = 9.999773e-01;
extra_data->initial_ss_endo[30] = 1.000000e+00;
extra_data->initial_ss_endo[31] = 1.000000e+00;
extra_data->initial_ss_endo[32] = 4.920606e-04;
extra_data->initial_ss_endo[33] = 8.337021e-04;
extra_data->initial_ss_endo[34] = 6.962775e-04;
extra_data->initial_ss_endo[35] = 8.425453e-04;
extra_data->initial_ss_endo[36] = 9.980807e-01;
extra_data->initial_ss_endo[37] = 1.289824e-05;
extra_data->initial_ss_endo[38] = 3.675442e-04;
extra_data->initial_ss_endo[39] = 2.471690e-01;
extra_data->initial_ss_endo[40] = 1.742987e-04;
extra_data->initial_ss_endo[41] = 5.421027e-24;
extra_data->initial_ss_endo[42] = 6.407933e-23;

// Set the initial conditions (celltype = EPI)
extra_data->initial_ss_epi[0] = -8.917755e+01;
extra_data->initial_ss_epi[1] = 1.288116e-02;
extra_data->initial_ss_epi[2] = 5.767956e-05;
extra_data->initial_ss_epi[3] = 1.284260e+01;
extra_data->initial_ss_epi[4] = 1.284291e+01;
extra_data->initial_ss_epi[5] = 1.429114e+02;
extra_data->initial_ss_epi[6] = 1.429113e+02;
extra_data->initial_ss_epi[7] = 1.812268e+00;
extra_data->initial_ss_epi[8] = 1.810520e+00;
extra_data->initial_ss_epi[9] = 6.631866e-05;
extra_data->initial_ss_epi[10] = 7.370422e-04;
extra_data->initial_ss_epi[11] = 8.366816e-01;
extra_data->initial_ss_epi[12] = 8.366012e-01;
extra_data->initial_ss_epi[13] = 6.840260e-01;
extra_data->initial_ss_epi[14] = 8.363958e-01;
extra_data->initial_ss_epi[15] = 1.505860e-04;
extra_data->initial_ss_epi[16] = 5.412669e-01;
extra_data->initial_ss_epi[17] = 3.043382e-01;
extra_data->initial_ss_epi[18] = 9.248184e-04;
extra_data->initial_ss_epi[19] = 9.996371e-01;
extra_data->initial_ss_epi[20] = 9.996342e-01;
extra_data->initial_ss_epi[21] = 4.712023e-04;
extra_data->initial_ss_epi[22] = 9.996371e-01;
extra_data->initial_ss_epi[23] = 9.996366e-01;
extra_data->initial_ss_epi[24] = 4.333129e-43;
extra_data->initial_ss_epi[25] = 1.000000e+00;
extra_data->initial_ss_epi[26] = 9.485160e-01;
extra_data->initial_ss_epi[27] = 1.000000e+00;
extra_data->initial_ss_epi[28] = 9.999339e-01;
extra_data->initial_ss_epi[29] = 9.999822e-01;
extra_data->initial_ss_epi[30] = 1.000000e+00;
extra_data->initial_ss_epi[31] = 1.000000e+00;
extra_data->initial_ss_epi[32] = 3.086885e-04;
extra_data->initial_ss_epi[33] = 5.303737e-04;
extra_data->initial_ss_epi[34] = 6.775197e-04;
extra_data->initial_ss_epi[35] = 8.264829e-04;
extra_data->initial_ss_epi[36] = 9.982135e-01;
extra_data->initial_ss_epi[37] = 9.433146e-06;
extra_data->initial_ss_epi[38] = 2.730221e-04;
extra_data->initial_ss_epi[39] = 2.308784e-01;
extra_data->initial_ss_epi[40] = 1.690386e-04;
extra_data->initial_ss_epi[41] = -1.103286e-23;
extra_data->initial_ss_epi[42] = -6.177055e-22;

// Set the initial conditions (celltype = MCELL)
extra_data->initial_ss_mid[0] = -8.924177e+01;
extra_data->initial_ss_mid[1] = 1.922391e-02;
extra_data->initial_ss_mid[2] = 6.585066e-05;
extra_data->initial_ss_mid[3] = 1.503347e+01;
extra_data->initial_ss_mid[4] = 1.503401e+01;
extra_data->initial_ss_mid[5] = 1.434407e+02;
extra_data->initial_ss_mid[6] = 1.434406e+02;
extra_data->initial_ss_mid[7] = 1.959747e+00;
extra_data->initial_ss_mid[8] = 1.963459e+00;
extra_data->initial_ss_mid[9] = 8.177438e-05;
extra_data->initial_ss_mid[10] = 7.269124e-04;
extra_data->initial_ss_mid[11] = 8.379059e-01;
extra_data->initial_ss_mid[12] = 8.377164e-01;
extra_data->initial_ss_mid[13] = 6.860578e-01;
extra_data->initial_ss_mid[14] = 8.372100e-01;
extra_data->initial_ss_mid[15] = 1.487602e-04;
extra_data->initial_ss_mid[16] = 5.350003e-01;
extra_data->initial_ss_mid[17] = 2.851164e-01;
extra_data->initial_ss_mid[18] = 9.208259e-04;
extra_data->initial_ss_mid[19] = 9.996411e-01;
extra_data->initial_ss_mid[20] = 5.673539e-01;
extra_data->initial_ss_mid[21] = 4.691672e-04;
extra_data->initial_ss_mid[22] = 9.996412e-01;
extra_data->initial_ss_mid[23] = 6.265825e-01;
extra_data->initial_ss_mid[24] = -4.922960e-40;
extra_data->initial_ss_mid[25] = 1.000000e+00;
extra_data->initial_ss_mid[26] = 9.200354e-01;
extra_data->initial_ss_mid[27] = 1.000000e+00;
extra_data->initial_ss_mid[28] = 9.997888e-01;
extra_data->initial_ss_mid[29] = 9.999665e-01;
extra_data->initial_ss_mid[30] = 1.000000e+00;
extra_data->initial_ss_mid[31] = 1.000000e+00;
extra_data->initial_ss_mid[32] = 5.161178e-04;
extra_data->initial_ss_mid[33] = 1.189422e-03;
extra_data->initial_ss_mid[34] = 6.917041e-04;
extra_data->initial_ss_mid[35] = 8.225453e-04;
extra_data->initial_ss_mid[36] = 9.979358e-01;
extra_data->initial_ss_mid[37] = 1.835276e-05;
extra_data->initial_ss_mid[38] = 5.316232e-04;
extra_data->initial_ss_mid[39] = 2.650323e-01;
extra_data->initial_ss_mid[40] = 1.678628e-04;
extra_data->initial_ss_mid[41] = 2.091039e-25;
extra_data->initial_ss_mid[42] = 2.438403e-23;
// Set the default initial conditions from Matlab (celltype = ENDO)
extra_data->initial_ss_endo[0] = -88.6369922306458;
extra_data->initial_ss_endo[1] = 11.8973412949238;
extra_data->initial_ss_endo[2] = 11.897661047085;
extra_data->initial_ss_endo[3] = 141.234464714982;
extra_data->initial_ss_endo[4] = 141.234423402713;
extra_data->initial_ss_endo[5] = 7.26747296460659e-05;
extra_data->initial_ss_endo[6] = 6.33786975780735e-05;
extra_data->initial_ss_endo[7] = 1.5326530637197;
extra_data->initial_ss_endo[8] = 1.53394579180493;
extra_data->initial_ss_endo[9] = 0.000828007761976018;
extra_data->initial_ss_endo[10] = 0.666527193684116;
extra_data->initial_ss_endo[11] = 0.826020806005678;
extra_data->initial_ss_endo[12] = 0.826055985895856;
extra_data->initial_ss_endo[13] = 0.825850881115628;
extra_data->initial_ss_endo[14] = 0.000166868626513013;
extra_data->initial_ss_endo[15] = 0.522830604669169;
extra_data->initial_ss_endo[16] = 0.285969584294187;
extra_data->initial_ss_endo[17] = 0.000959137028030184;
extra_data->initial_ss_endo[18] = 0.999601150012565;
extra_data->initial_ss_endo[19] = 0.5934016398361;
extra_data->initial_ss_endo[20] = 0.000488696137242056;
extra_data->initial_ss_endo[21] = 0.999601147267179;
extra_data->initial_ss_endo[22] = 0.654668660159696;
extra_data->initial_ss_endo[23] = 9.50007519781516e-32;
extra_data->initial_ss_endo[24] = 0.999999992317577;
extra_data->initial_ss_endo[25] = 0.939258048397962;
extra_data->initial_ss_endo[26] = 0.999999992317557;
extra_data->initial_ss_endo[27] = 0.999898379647465;
extra_data->initial_ss_endo[28] = 0.99997825156004;
extra_data->initial_ss_endo[29] = 0.000444816183420527;
extra_data->initial_ss_endo[30] = 0.000755072490632667;
extra_data->initial_ss_endo[31] = 0.999999992318446;
extra_data->initial_ss_endo[32] = 0.999999992318445;
extra_data->initial_ss_endo[33] = 0.24240468344952;
extra_data->initial_ss_endo[34] = 0.000179537726989804;
extra_data->initial_ss_endo[35] = -6.88308558109975e-25;
extra_data->initial_ss_endo[36] = 0.0111749845355653;
extra_data->initial_ss_endo[37] = 0.998036620213316;
extra_data->initial_ss_endo[38] = 0.000858801779013532;
extra_data->initial_ss_endo[39] = 0.000709744678350176;
extra_data->initial_ss_endo[40] = 0.000381261722195702;
extra_data->initial_ss_endo[41] = 1.35711566929992e-05;
extra_data->initial_ss_endo[42] = 2.30252452954649e-23;

// Set the default initial conditions from Matlab (celltype = EPI)
extra_data->initial_ss_epi[0] = -89.0462806262884;
extra_data->initial_ss_epi[1] = 12.7218980311997;
extra_data->initial_ss_epi[2] = 12.7222039977392;
extra_data->initial_ss_epi[3] = 142.248960281735;
extra_data->initial_ss_epi[4] = 142.248911688304;
extra_data->initial_ss_epi[5] = 6.54105789316085e-05;
extra_data->initial_ss_epi[6] = 5.68443136844764e-05;
extra_data->initial_ss_epi[7] = 1.80911728399381;
extra_data->initial_ss_epi[8] = 1.80970235621251;
extra_data->initial_ss_epi[9] = 0.000758182108180449;
extra_data->initial_ss_epi[10] = 0.679839847935577;
extra_data->initial_ss_epi[11] = 0.834150231581688;
extra_data->initial_ss_epi[12] = 0.834188252920967;
extra_data->initial_ss_epi[13] = 0.834081731522592;
extra_data->initial_ss_epi[14] = 0.000154387698861246;
extra_data->initial_ss_epi[15] = 0.538295069820379;
extra_data->initial_ss_epi[16] = 0.302769394159465;
extra_data->initial_ss_epi[17] = 0.000933035060391086;
extra_data->initial_ss_epi[18] = 0.999628705730844;
extra_data->initial_ss_epi[19] = 0.999626204093615;
extra_data->initial_ss_epi[20] = 0.00047539066209218;
extra_data->initial_ss_epi[21] = 0.999628705544664;
extra_data->initial_ss_epi[22] = 0.999628513430851;
extra_data->initial_ss_epi[23] = 1.74213411952898e-37;
extra_data->initial_ss_epi[24] = 0.999999993122906;
extra_data->initial_ss_epi[25] = 0.947952168523141;
extra_data->initial_ss_epi[26] = 0.999999993122889;
extra_data->initial_ss_epi[27] = 0.999932686646139;
extra_data->initial_ss_epi[28] = 0.999982915381882;
extra_data->initial_ss_epi[29] = 0.000291544679470133;
extra_data->initial_ss_epi[30] = 0.000502604507932921;
extra_data->initial_ss_epi[31] = 0.999999993124187;
extra_data->initial_ss_epi[32] = 0.999999993123756;
extra_data->initial_ss_epi[33] = 0.22881550094027;
extra_data->initial_ss_epi[34] = 0.000171497784228012;
extra_data->initial_ss_epi[35] = -1.13118992668881e-26;
extra_data->initial_ss_epi[36] = 0.0129505221481656;
extra_data->initial_ss_epi[37] = 0.998194356754674;
extra_data->initial_ss_epi[38] = 0.000834232097912889;
extra_data->initial_ss_epi[39] = 0.000683865770895308;
extra_data->initial_ss_epi[40] = 0.00027787850109644;
extra_data->initial_ss_epi[41] = 9.66775862738005e-06;
extra_data->initial_ss_epi[42] = 8.16930403133409e-24;

// Set the default initial conditions from Matlab (celltype = MCELL)
extra_data->initial_ss_mid[0] = -89.5379994049964;
extra_data->initial_ss_mid[1] = 14.9292004720038;
extra_data->initial_ss_mid[2] = 14.9296673679334;
extra_data->initial_ss_mid[3] = 144.84471868881;
extra_data->initial_ss_mid[4] = 144.844658476157;
extra_data->initial_ss_mid[5] = 7.50228807455408e-05;
extra_data->initial_ss_mid[6] = 6.10763598140135e-05;
extra_data->initial_ss_mid[7] = 1.79043480744558;
extra_data->initial_ss_mid[8] = 1.79484249993962;
extra_data->initial_ss_mid[9] = 0.000681936485046493;
extra_data->initial_ss_mid[10] = 0.695380653101535;
extra_data->initial_ss_mid[11] = 0.843488797335149;
extra_data->initial_ss_mid[12] = 0.843520761455969;
extra_data->initial_ss_mid[13] = 0.843226224403045;
extra_data->initial_ss_mid[14] = 0.000140621109700401;
extra_data->initial_ss_mid[15] = 0.545314876174586;
extra_data->initial_ss_mid[16] = 0.292496735833565;
extra_data->initial_ss_mid[17] = 0.000902612655601118;
extra_data->initial_ss_mid[18] = 0.999659345906191;
extra_data->initial_ss_mid[19] = 0.56311967936689;
extra_data->initial_ss_mid[20] = 0.000459883274920751;
extra_data->initial_ss_mid[21] = 0.999659343029625;
extra_data->initial_ss_mid[22] = 0.623696443871387;
extra_data->initial_ss_mid[23] = -1.31418873360667e-33;
extra_data->initial_ss_mid[24] = 0.999999993979673;
extra_data->initial_ss_mid[25] = 0.920408593154793;
extra_data->initial_ss_mid[26] = 0.999999993979652;
extra_data->initial_ss_mid[27] = 0.999761950174748;
extra_data->initial_ss_mid[28] = 0.999962530196306;
extra_data->initial_ss_mid[29] = 0.0003853594696671;
extra_data->initial_ss_mid[30] = 0.000853529194511867;
extra_data->initial_ss_mid[31] = 0.999999993978835;
extra_data->initial_ss_mid[32] = 0.999999993980401;
extra_data->initial_ss_mid[33] = 0.266415111925392;
extra_data->initial_ss_mid[34] = 0.000162310655612839;
extra_data->initial_ss_mid[35] = 1.20976169203982e-24;
extra_data->initial_ss_mid[36] = 0.0178243652102213;
extra_data->initial_ss_mid[37] = 0.997971986641796;
extra_data->initial_ss_mid[38] = 0.000805399061926759;
extra_data->initial_ss_mid[39] = 0.000678179976274546;
extra_data->initial_ss_mid[40] = 0.00052653630893167;
extra_data->initial_ss_mid[41] = 1.78956481798154e-05;
extra_data->initial_ss_mid[42] = 7.0591623795627e-23;

extra_data->transmurality = MALLOC_ARRAY_OF_TYPE(real, num_cells);
extra_data->sf_IKs = MALLOC_ARRAY_OF_TYPE(real, num_cells);
Expand Down
Loading

0 comments on commit 0ff6301

Please sign in to comment.