@@ -350,7 +350,6 @@ cdef int _evaluate_func(void* function, c_Cell* cell) noexcept with gil:
350350 func = < object > function
351351 pycell = TreeCell()
352352 pycell._set(cell)
353- val = func(pycell)
354353 return < int > func(pycell)
355354
356355cdef class _TreeMesh:
@@ -370,7 +369,7 @@ cdef class _TreeMesh:
370369
371370 cdef object _h_gridded
372371 cdef object _cell_volumes, _face_areas, _edge_lengths
373- cdef object _average_face_x_to_cell, _average_face_y_to_cell, _average_face_z_to_cell, _average_face_to_cell, _average_face_to_cell_vector,
372+ cdef object _average_face_x_to_cell, _average_face_y_to_cell, _average_face_z_to_cell, _average_face_to_cell, _average_face_to_cell_vector
374373 cdef object _average_node_to_cell, _average_node_to_edge, _average_node_to_edge_x, _average_node_to_edge_y, _average_node_to_edge_z
375374 cdef object _average_node_to_face, _average_node_to_face_x, _average_node_to_face_y, _average_node_to_face_z
376375 cdef object _average_edge_x_to_cell, _average_edge_y_to_cell, _average_edge_z_to_cell, _average_edge_to_cell, _average_edge_to_cell_vector
@@ -4944,7 +4943,7 @@ cdef class _TreeMesh:
49444943 raise Exception (' TreeMesh has no z faces in 2D' )
49454944 cdef np.int64_t[:] I, J
49464945 cdef np.float64_t[:] V
4947- cdef np.int64_t ii, id ,
4946+ cdef np.int64_t ii, id
49484947 if self ._average_node_to_face_z is not None :
49494948 return self ._average_node_to_face_z
49504949
@@ -6617,16 +6616,15 @@ cdef class _TreeMesh:
66176616 return output
66186617 return P
66196618
6620- cdef geom.Box * box
6619+
66216620 cdef int_t last_point_ind = 7 if self ._dim== 3 else 3
66226621 for cell in self .tree.cells:
66236622 for i_d in range (self ._dim):
66246623 x1m[i_d] = min (cell.min_node().location[i_d], xF[i_d])
66256624 x1p[i_d] = max (cell.max_node().location[i_d], origin[i_d])
66266625
6627- box = new geom.Box(self ._dim, x1m, x1p)
6628- overlapping_cell_inds = meshin.tree.find_cells_geom(box[0 ])
6629- del box
6626+ box = geom.Box(self ._dim, x1m, x1p)
6627+ overlapping_cell_inds = meshin.tree.find_cells_geom(box)
66306628 n_overlap = overlapping_cell_inds.size()
66316629 weights = < double * > malloc(n_overlap* sizeof(double ))
66326630 i = 0
@@ -6763,9 +6761,8 @@ cdef class _TreeMesh:
67636761 x1m[0 ] = min (nodes_x[ix], xF[0 ])
67646762 x1p[0 ] = max (nodes_x[ix+ 1 ], origin[0 ])
67656763
6766- box = new geom.Box(self ._dim, x1m, x1p)
6767- overlapping_cell_inds = self .tree.find_cells_geom(box[0 ])
6768- del box
6764+ box = geom.Box(self ._dim, x1m, x1p)
6765+ overlapping_cell_inds = self .tree.find_cells_geom(box)
67696766
67706767 n_overlap = overlapping_cell_inds.size()
67716768 weights = < double * > malloc(n_overlap* sizeof(double ))
0 commit comments