rsachetto / MonoAlg3D_C

Extensible Monodomain simulator
MIT License
16 stars 13 forks source link

Updating Purkinje-library - Package 8 + Bug Fix #20

Closed bergolho closed 3 years ago

bergolho commented 3 years ago

Hello Sachetto,

In this pull request, a multiple include error that was happening in the "grid.c" was fixed. This issue was happening when you recompile the whole project from scratch or when you try to compile for the first time. The 'print_purkinje_propagation_velocity' is now a 'save_mesh_helper' function and the user can decide to turn this calculus on/off in the configuration file, just like the LAT and APD maps. The 'print_pmj_delay' can also be moved to the same destination, but I will need to include the 'struct terminal' in the 'struct grid_purkinje' and change several functions, so, for now I will leave it in the 'monodomain_solver.c'.

In addition, I added some simulations in order to get the steady-state vector of any given cellular model and a script that can plot all the state variables. Using these new features I was able to update the initial conditions with the steady-state vector for the ToRORd and Trovato models. There is also a new function that can calculate the propagation velocity across a cable Purkinje fiber. I still need to improve this function to work on any given Purkinje network, but for that, I will need to implement a queue data structure, so it can be used on the Dijkstra algorithm.

The next steps are to allow the Purkinje-coupling examples to be executed using batch simulations and implement the Dijkstra algorithm to calculate the propagation velocity.