rsachetto / MonoAlg3D_C

Extensible Monodomain simulator
MIT License
16 stars 12 forks source link

Batch system can now plot ECGs #64

Closed bergolho closed 5 months ago

bergolho commented 5 months ago

Dear Sachetto,

In this pull request, I made a few changes to the writing of the ECG data to a file. This is because when using the MPI batch system, the previous configuration using only the "filename" variable was not working when the batch structure creates the different combinations for the variables.

To fix this problem, my solution was to include the "_outputdir" variable as an additional parameter to the "_init_pseudo_bidomaincpu" function. Next, I concatenate the strings with the "_outputdir" path and "/ecg.txt" using a simple "sprintf" statement. Because of that, there are minor changes to the "_monodomainsolver.c", "ecg.c" and "_ecgconfig.h" files.

Furthermore, there is a new "_main_clipmesh.c" program that can clip a section of the mesh, retrieve the extra data inside the volumes and write this into a new ".alg" file.

The matrix assembly function from Albert was moved to a custom function.

Finally, there is a new script to calculate the equivalent conductivity if the intracellular and extracellular conductivities are given.

Best regards, Lucas