@@ -55,7 +55,7 @@ def set_meshes_with_marching_cubes(model: GeoModel) -> None:
5555    # TODO: Attribute of element.scalar_field was None, changed it to scalar field value of that element 
5656    #  This should probably be done somewhere else and maybe renamed to scalar_field_value? 
5757    #  This is just the most basic solution to be clear what I did 
58-     _set_scalar_field_to_element (model , output_lvl0 , structural_groups )
58+     #  _set_scalar_field_to_element(model, output_lvl0, structural_groups)
5959
6060    # Trying to use the exiting gempy masks 
6161    # masks = [] 
@@ -96,13 +96,14 @@ def set_meshes_with_marching_cubes(model: GeoModel) -> None:
9696
9797# TODO: This should be set somewhere else 
9898def  _set_scalar_field_to_element (model , output_lvl0 , structural_groups ):
99+     element : StructuralElement 
99100    counter  =  0 
100101    for  e , structural_group  in  enumerate (structural_groups ):
101102        if  e  >=  len (output_lvl0 ):
102103            continue 
103104
104105        for  element  in  structural_group .elements :
105-             element .scalar_field  =  model .solutions .scalar_field_at_surface_points [counter ]
106+             element .scalar_field_at_interface  =  model .solutions .scalar_field_at_surface_points [counter ]
106107            counter  +=  1 
107108
108109
@@ -139,7 +140,7 @@ def extract_mesh_for_element(structural_element: StructuralElement,
139140    # Extract mesh using marching cubes 
140141    verts , faces , _ , _  =  measure .marching_cubes (
141142        volume = scalar_field ,
142-         level = structural_element .scalar_field ,
143+         level = structural_element .scalar_field_at_interface ,
143144        spacing = (regular_grid .dx , regular_grid .dy , regular_grid .dz ),
144145        mask = mask 
145146    )
0 commit comments