rsachetto / MonoAlg3D_C

Extensible Monodomain simulator
MIT License
16 stars 12 forks source link

Minor fix when loading a Purkinje using the Ensight format #57

Closed bergolho closed 1 year ago

bergolho commented 1 year ago

Hello Sachetto,

This pull request fixes a minor error that occurs in some Purkinje simulations that use the Ensight format. Depending on the Purkinje mesh there is a mismatch in the number of points of the Ensight file. If you try to load this file in Paraview the program will crash.

The main issue was related to the type of certain variables in the "ensight_grid.c" file. It appears that when we copy the center position of a Purkinje cell as a 'float' type to the 'struct point_3d' not all points of the Purkinje network are inserted into the hash table data structure in the 'hmget()' function call in line 548. By changing the variable type to 'real_cpu' the mismatch of points does not occur anymore.

Best regards, Lucas

rsachetto commented 1 year ago

Thanks a lot Lucas. That was a very hard bug the spot.