@@ -395,7 +395,8 @@ std::vector<Halo> compute_halos(diy::mpi::communicator& world,
395395 diy::DiscreteBounds diy_domain,
396396 Real absolute_rho,
397397 bool negate,
398- Real min_halo_n_cells)
398+ Real min_halo_n_cells,
399+ Real halo_extrema_threshold)
399400{
400401 bool debug = false ; // world.rank() == 0;
401402 std::string prefix = " ./DIY.XXXXXX" ;
@@ -467,9 +468,9 @@ std::vector<Halo> compute_halos(diy::mpi::communicator& world,
467468
468469 }
469470
470- master.foreach ([](Block* b, const diy::Master::ProxyWithLink& cp) {
471+ master.foreach ([halo_extrema_threshold ](Block* b, const diy::Master::ProxyWithLink& cp) {
471472 b->compute_final_connected_components ();
472- b->compute_local_integral ();
473+ b->compute_local_integral (halo_extrema_threshold );
473474 });
474475
475476 // if (debug) fmt::print(std::cerr, "Local integrals computed");
@@ -598,9 +599,7 @@ void Nyx::runReeberAnalysis(Vector<MultiFab*>& new_state,
598599
599600 diy::DiscreteBounds diy_domain (3 );
600601
601- // TODO: take rho, min_halo_n_cells as parameters
602- Real min_halo_n_cells = 10 ;
603- Real rho = 81.66 ;
602+ Real rho = halo_component_threshold;
604603
605604 Real absolute_rho = (Nyx::average_dm_density + Nyx::average_gas_density) * rho;
606605 bool negate = true ; // sweep superlevel sets, highest density = root
@@ -619,7 +618,7 @@ void Nyx::runReeberAnalysis(Vector<MultiFab*>& new_state,
619618
620619 BL_PROFILE_VAR (" Nyx::runReeberAnalysis()::compute_halos" ,compute_halos_var);
621620
622- reeber_halos = compute_halos (world, master_reader, geom_in, threads, diy_domain, absolute_rho, negate, min_halo_n_cells);
621+ reeber_halos = compute_halos (world, master_reader, geom_in, threads, diy_domain, absolute_rho, negate, min_halo_n_cells, halo_extrema_threshold );
623622 if (verbose and world.rank () == 0 ) fmt::print (std::cerr, " compute_halos finished, result.size = {}\n " , reeber_halos.size ());
624623
625624 BL_PROFILE_VAR_STOP (compute_halos_var);
0 commit comments