You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the mesh generation routine utilizes Matlab-style scripts, which are simply inserted in the middle of other code when it is being compiled, making it difficult to follow where different variables come from. As an example, we might take a look at the lines 5–31 in zef_create_fem_mesh:
Here the problem is that pml_ind_aux is not defined anywhere in this file, and is instead generated in the script zef_segmentation_counter_step, the code of which is inserted place of its invocation on line 9, when the function is being compiled. This is all completely hidden from the user, unless they realize that they should look into the mentioned script.
Expected behavior
It would be much more readable, if scripts were turned into functions, with clear input and output values. This might also make the code more optimizable for the Matlab compiler. Any other scripts than the one mentioned here should also get the same treatment.
As an additional note, this also facilitates the extraction of one of the core Zeffiro Interface components, the mesh generation routine, into its own module.
Description
Currently, the mesh generation routine utilizes Matlab-style scripts, which are simply inserted in the middle of other code when it is being compiled, making it difficult to follow where different variables come from. As an example, we might take a look at the lines 5–31 in
zef_create_fem_mesh
:zeffiro_interface/m/zef_create_fem_mesh.m
Lines 5 to 31 in 3b1b2ff
Here the problem is that
pml_ind_aux
is not defined anywhere in this file, and is instead generated in the scriptzef_segmentation_counter_step
, the code of which is inserted place of its invocation on line 9, when the function is being compiled. This is all completely hidden from the user, unless they realize that they should look into the mentioned script.Expected behavior
It would be much more readable, if scripts were turned into functions, with clear input and output values. This might also make the code more optimizable for the Matlab compiler. Any other scripts than the one mentioned here should also get the same treatment.
Context
The text was updated successfully, but these errors were encountered: