sampsapursiainen / zeffiro_interface

Interface for using finite elements in inverse problems with complex domains
GNU General Public License v3.0
24 stars 15 forks source link

zef_meshing_example does not define zef.downsample_surfaces #149

Closed SeSodesa closed 1 year ago

SeSodesa commented 1 year ago

Trying to run the example script zef_meshing_example with a freshly restarted Matlab results in the error

>> addpath(genpath("."))
>> zef_meshing_example
Unrecognized field name "downsample_surfaces".

Error in zef_create_finite_element_mesh (line 7)
if zef.downsample_surfaces == 1

Error in zef_meshing_example (line 16)
project_struct = zef_create_finite_element_mesh(project_struct);

As these are supposed to be standalone examples, the example function should set a valid value for the struct field with

project_struct.downsample_surfaces = true <or> false;

Which is more appropriate from the example's point of view, true or false, I am not sure.

SeSodesa commented 1 year ago

Ah, it turns out that the project struct is not initialized with zeffiro_interface in the first place. Will try and see if doing that helps.

SeSodesa commented 1 year ago

Yeah, initializing the project_struct seems to have fixed all of the issues (including a missing zef.compartment_tags). Will make a pull request in a sec.

SeSodesa commented 1 year ago

Except pull request #150 was branched off of master instead of main_development_branch... I'll create another branch and the cherry pick the changes off of 149-zef_meshing_example-does-not-define-zefdownsample_surfaces, onto main_development_branch. Then I'll do another merge.

SeSodesa commented 1 year ago

Closed by #151.