From 731632b21c18bcf6e434d3302cad3d0364dce556 Mon Sep 17 00:00:00 2001 From: Quang Hoang Date: Sat, 9 Dec 2023 14:48:00 -0500 Subject: [PATCH] indent --- source/distributed/tria.cc | 56 +++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc index 5bed5a4fd8..9432f731ec 100644 --- a/source/distributed/tria.cc +++ b/source/distributed/tria.cc @@ -568,34 +568,35 @@ namespace void exchange_refinement_flags(Triangulation &tria) { - // Communicate refinement flags on ghost cells from the owner of the - // cell. This is necessary to get consistent refinement, as mesh - // smoothing would undo some of the requested coarsening/refinement. + // Communicate refinement flags on ghost cells from the owner of the + // cell. This is necessary to get consistent refinement, as mesh + // smoothing would undo some of the requested coarsening/refinement. + + auto pack = + []( + const typename Triangulation::active_cell_iterator &cell) + -> std::uint8_t { + if (cell->refine_flag_set()) + return 1; + if (cell->coarsen_flag_set()) + return 2; + return 0; + }; + auto unpack = + []( + const typename Triangulation::active_cell_iterator &cell, + const std::uint8_t &flag) -> void { + cell->clear_coarsen_flag(); + cell->clear_refine_flag(); + if (flag == 1) + cell->set_refine_flag(); + else if (flag == 2) + cell->set_coarsen_flag(); + }; - auto pack = - [](const typename Triangulation::active_cell_iterator - &cell) -> std::uint8_t { - if (cell->refine_flag_set()) - return 1; - if (cell->coarsen_flag_set()) - return 2; - return 0; - }; - auto unpack = - [](const typename Triangulation::active_cell_iterator - &cell, - const std::uint8_t &flag) -> void { - cell->clear_coarsen_flag(); - cell->clear_refine_flag(); - if (flag == 1) - cell->set_refine_flag(); - else if (flag == 2) - cell->set_coarsen_flag(); - }; - - GridTools::exchange_cell_data_to_ghosts>( - tria, pack, unpack); + GridTools::exchange_cell_data_to_ghosts>( + tria, pack, unpack); } # ifdef P4EST_SEARCH_LOCAL @@ -3277,7 +3278,6 @@ namespace parallel } - template DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim)) -- 2.39.5