@@ -369,10 +369,12 @@ function aggregate(bgtrian,cell_to_is_active,cell_to_is_cut,in_or_out)
369369 facet_to_inoutcut = fill (in_or_out,num_faces (model,D- 1 ))
370370
371371 threshold = 1.0
372- lid_to_gid = 1 : num_cells (bgtrian )
373- _aggregate_by_threshold_barrier (
372+ lid_to_gid = 1 : num_cells (model )
373+ cell_to_cellin,_,_,all_aggregated = _aggregate_by_threshold_barrier (
374374 threshold,cell_to_unit_cut_meas,facet_to_inoutcut,cell_to_inoutcut,
375375 in_or_out,cell_to_coords,cell_to_faces,face_to_cells,lid_to_gid)
376+ @assert all_aggregated " Not all cells were aggregated"
377+ cell_to_cellin
376378end
377379
378380function aggregate_narrow_band (bgtrian,cell_to_is_in_narrow,cell_to_is_active,cell_to_is_cut,in_or_out)
@@ -398,8 +400,10 @@ function aggregate_narrow_band(bgtrian,cell_to_is_in_narrow,cell_to_is_active,ce
398400 facet_to_inoutcut = fill (in_or_out,num_faces (model,D- 1 ))
399401
400402 threshold = 1.0
401- lid_to_gid = 1 : num_cells (bgtrian )
402- _aggregate_by_threshold_barrier (
403+ lid_to_gid = 1 : num_cells (model )
404+ cell_to_cellin,_,_,all_aggregated = _aggregate_by_threshold_barrier (
403405 threshold,cell_to_unit_cut_meas,facet_to_inoutcut,cell_to_inoutcut,
404406 in_or_out,cell_to_coords,cell_to_faces,face_to_cells,lid_to_gid)
407+ @assert all_aggregated " Not all cells were aggregated"
408+ cell_to_cellin
405409end
0 commit comments