@@ -138,7 +138,7 @@ def time_inverse_distance_weighted_remapping(self):
138138
139139class HoleEdgeIndices (DatasetBenchmark ):
140140 def time_construct_hole_edge_indices (self , resolution ):
141- ux .grid .geometry ._construct_hole_edge_indices (self .uxds .uxgrid .edge_face_connectivity )
141+ ux .grid .geometry ._construct_boundary_edge_indices (self .uxds .uxgrid .edge_face_connectivity )
142142
143143
144144class DualMesh (DatasetBenchmark ):
@@ -167,10 +167,19 @@ def time_check_norm(self, resolution):
167167 from uxarray .grid .validation import _check_normalization
168168 _check_normalization (self .uxgrid )
169169
170+ class CrossSection :
171+ param_names = DatasetBenchmark .param_names + ['lat_step' ]
172+ params = DatasetBenchmark .params + [[1 , 2 , 4 ]]
170173
171- class CrossSections (DatasetBenchmark ):
172- param_names = DatasetBenchmark .param_names + ['n_lat' ]
173- params = DatasetBenchmark .params + [[1 , 2 , 4 , 8 ]]
174- def time_constant_lat_fast (self , resolution , n_lat ):
175- for lat in np .linspace (- 89 , 89 , n_lat ):
176- self .uxds .uxgrid .constant_latitude_cross_section (lat , method = 'fast' )
174+ def setup (self , resolution , lat_step ):
175+ self .uxgrid = ux .open_grid (file_path_dict [resolution ][0 ])
176+ self .uxgrid .normalize_cartesian_coordinates ()
177+ self .lats = np .arange (- 45 , 45 , lat_step )
178+ _ = self .uxgrid .bounds
179+
180+ def teardown (self , resolution , lat_step ):
181+ del self .uxgrid
182+
183+ def time_const_lat (self , resolution , lat_step ):
184+ for lat in self .lats :
185+ self .uxgrid .cross_section .constant_latitude (lat )
0 commit comments