]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Hotfix: dealii::Vector does not accept integral types. 11857/head
authorMarc Fehling <mafehling.git@gmail.com>
Wed, 10 Mar 2021 02:11:45 +0000 (19:11 -0700)
committerMarc Fehling <mafehling.git@gmail.com>
Wed, 10 Mar 2021 02:12:14 +0000 (19:12 -0700)
source/dofs/dof_handler.cc

index e16d10eb70b538dc55bdc06ae3f49fb4563c8fb7..2e36ac73e2a3617f4a065c02ab5f0636f9992c7b 100644 (file)
@@ -2701,7 +2701,8 @@ DoFHandler<dim, spacedim>::prepare_coarsening_and_refinement(
   using level_type                      = active_fe_index_type;
   static const level_type invalid_level = invalid_active_fe_index;
 
-  LinearAlgebra::distributed::Vector<level_type> future_levels;
+  // HOTFIX: dealii::Vector does not accept integral types
+  LinearAlgebra::distributed::Vector<float> future_levels;
   if (const auto parallel_tria =
         dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
           &(*tria)))
@@ -2751,8 +2752,8 @@ DoFHandler<dim, spacedim>::prepare_coarsening_and_refinement(
       for (const auto &cell : active_cell_iterators())
         if (!cell->is_artificial())
           {
-            const level_type cell_level =
-              future_levels[cell->global_active_cell_index()];
+            const level_type cell_level = static_cast<level_type>(
+              future_levels[cell->global_active_cell_index()]);
 
             // ignore cells that are not part of the hierarchy
             if (cell_level == invalid_level)
@@ -2773,8 +2774,8 @@ DoFHandler<dim, spacedim>::prepare_coarsening_and_refinement(
                   // owning process and communicated at the next loop iteration.
                   if (neighbor->is_locally_owned())
                     {
-                      const level_type neighbor_level =
-                        future_levels[neighbor->global_active_cell_index()];
+                      const level_type neighbor_level = static_cast<level_type>(
+                        future_levels[neighbor->global_active_cell_index()]);
 
                       // ignore neighbors that are not part of the hierarchy
                       if (neighbor_level == invalid_level)
@@ -2803,8 +2804,8 @@ DoFHandler<dim, spacedim>::prepare_coarsening_and_refinement(
   for (const auto &cell : active_cell_iterators())
     if (cell->is_locally_owned())
       {
-        const level_type cell_level =
-          future_levels[cell->global_active_cell_index()];
+        const level_type cell_level = static_cast<level_type>(
+          future_levels[cell->global_active_cell_index()]);
 
         if (cell_level != invalid_level)
           {

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.