]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix initialization of partitioners in two performance tests 17853/head
authorMartin Kronbichler <martin.kronbichler@rub.de>
Fri, 8 Nov 2024 11:57:06 +0000 (12:57 +0100)
committerMartin Kronbichler <martin.kronbichler@rub.de>
Fri, 8 Nov 2024 11:57:06 +0000 (12:57 +0100)
tests/performance/timing_step_37.cc
tests/performance/timing_step_37_gc.cc

index 40fd9ec22685675c61a56f542b819682c2b8c8e8..445fdd96a6a2cb2a3359d95fa56d5628099e6005 100644 (file)
@@ -501,11 +501,9 @@ LaplaceProblem<dim>::setup_transfer()
   std::vector<std::shared_ptr<const Utilities::MPI::Partitioner>> partitioners(
     dof_handler.get_triangulation().n_global_levels());
   for (unsigned int level = 0; level < partitioners.size(); ++level)
-    {
-      LinearAlgebra::distributed::Vector<float> vec;
-      mg_matrices[level].initialize_dof_vector(vec);
-      partitioners[level] = vec.get_partitioner();
-    }
+    partitioners[level] =
+      mg_matrices[level].get_matrix_free()->get_dof_info().vector_partitioner;
+
   mg_transfer.build(dof_handler, partitioners);
 }
 
index 0e1ae3335168fac4bc374703378085100356331f..b160ee96ef98734a9307089d11722fa64a6ec1c5 100644 (file)
@@ -501,11 +501,9 @@ LaplaceProblem<dim>::setup_transfer()
   std::vector<std::shared_ptr<const Utilities::MPI::Partitioner>> partitioners(
     dof_handler.get_triangulation().n_global_levels());
   for (unsigned int level = 0; level < partitioners.size(); ++level)
-    {
-      LinearAlgebra::distributed::Vector<float> vec;
-      mg_matrices[level].initialize_dof_vector(vec);
-      partitioners[level] = vec.get_partitioner();
-    }
+    partitioners[level] =
+      mg_matrices[level].get_matrix_free()->get_dof_info().vector_partitioner;
+
   mg_transfer.build(dof_handler, partitioners);
 }
 

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.