@@ -111,7 +111,6 @@ def __init__(
111111
112112
113113 """
114- # print('tet')
115114 if logfile :
116115 self .logfile = logfile
117116 log_to_file (logfile , level = loglevel )
@@ -1800,18 +1799,18 @@ def get_stratigraphic_surfaces(self, units: List[str] = [], bottoms: bool = True
18001799
18011800 return surfaces
18021801
1803- def get_block_model (self ):
1804- grid = self .bounding_box .vtk ( )
1802+ def get_block_model (self , name = 'block model' ):
1803+ grid = self .bounding_box .structured_grid ( name = name )
18051804
1806- grid .cell_data ['stratigraphy' ] = self .evaluate_model (
1805+ grid .properties_cell ['stratigraphy' ] = self .evaluate_model (
18071806 self .bounding_box .cell_centers (), scale = False
18081807 )
18091808 return grid , self .stratigraphic_ids ()
18101809
18111810 def save (
18121811 self ,
18131812 filename : str ,
1814- block_model : bool = False ,
1813+ block_model : bool = True ,
18151814 stratigraphic_surfaces = True ,
18161815 fault_surfaces = True ,
18171816 stratigraphic_data = True ,
@@ -1844,14 +1843,16 @@ def save(
18441843 for group in self .stratigraphic_column .keys ():
18451844 if group == "faults" :
18461845 continue
1847- for series in self .stratigraphic_column [group ].keys ():
1846+
1847+ for d in self .__getitem__ (group ).get_data ():
18481848 if extension == ".geoh5" :
1849- self . __getitem__ ( series ) .save (filename )
1849+ d .save (filename )
18501850 else :
1851- self . __getitem__ ( series ). save (f'{ name } _{ series } .{ extension } ' )
1851+ d . save (f'{ name } _{ group } .{ extension } ' )
18521852 if fault_data :
18531853 for f in self .fault_names ():
1854- if extension == ".geoh5" :
1855- self .__getitem__ (f ).save (filename )
1856- else :
1857- self .__getitem__ (f ).save (f'{ name } _{ f } .{ extension } ' )
1854+ for d in self .__getitem__ (f ).get_data ():
1855+ if extension == ".geoh5" :
1856+ d .save (filename )
1857+ else :
1858+ d .save (f'{ name } _{ group } .{ extension } ' )
0 commit comments