]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Merge pull request #16374 from bangerth/dev-1
authorDaniel Arndt <arndtd@ornl.gov>
Mon, 1 Jan 2024 21:04:00 +0000 (16:04 -0500)
committerGitHub <noreply@github.com>
Mon, 1 Jan 2024 21:04:00 +0000 (16:04 -0500)
Convert CreateDescriptionFromTriangulationHelper into a function.

1  2 
source/grid/tria_description.cc

index dd55686641b6e5d308c64c6722594b92ed06c33b,45fe8b95ce627fb2f3ed550c5b5cc73ae840550e..7f94c64d596c042089762d50c717f9834b6e7cbc
@@@ -1079,22 -1031,14 +1054,15 @@@ namespace TriangulationDescriptio
        };
  
        const auto level_subdomain_id_function =
 -        [&construct_multigrid, &partitions_mg](const auto &cell) {
 -          if (construct_multigrid && (cell->is_artificial_on_level() == false))
 -            return static_cast<unsigned int>(
 -              partitions_mg[cell->level()][cell->global_level_cell_index()]);
 -          else
 -            return numbers::artificial_subdomain_id;
 -        };
 +        [&construct_multigrid,
 +         &partitions_mg](const auto &cell) -> types::subdomain_id {
 +        if (construct_multigrid && (cell->is_artificial_on_level() == false))
 +          return static_cast<types::subdomain_id>(
 +            partitions_mg[cell->level()][cell->global_level_cell_index()]);
 +        else
 +          return numbers::artificial_subdomain_id;
 +      };
  
-       CreateDescriptionFromTriangulationHelper<dim, spacedim> helper(
-         tria,
-         subdomain_id_function,
-         level_subdomain_id_function,
-         tria.get_communicator(),
-         settings);
        // create a description (locally owned cell and a layer of ghost cells
        // and all their parents)
        std::vector<DescriptionTemp<dim, spacedim>> descriptions_per_rank;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.