]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace deprecated function in tests. 14741/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 27 Jan 2023 20:15:37 +0000 (13:15 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 27 Jan 2023 20:15:37 +0000 (13:15 -0700)
tests/base/index_set_19.cc
tests/matrix_free/parallel_multigrid_adaptive_01.cc
tests/matrix_free/parallel_multigrid_adaptive_03.cc
tests/matrix_free/parallel_multigrid_adaptive_05.cc
tests/matrix_free/parallel_multigrid_adaptive_08.cc

index e9a57d3640f9e8d351b00085617afd1f4d4a5b3b..32ba183ccef64f3e6ee4e9024dcbfe2551ccf277 100644 (file)
@@ -14,7 +14,7 @@
 // ---------------------------------------------------------------------
 
 
-// test IndexSet::fill_index_vector
+// test IndexSet::get_index_vector()
 
 #include <deal.II/base/index_set.h>
 
@@ -34,8 +34,7 @@ test()
   for (unsigned int i = 0; i < 9 * is1.size() / 10; ++i)
     is1.add_index(Testing::rand() % is1.size());
 
-  std::vector<types::global_dof_index> indices;
-  is1.fill_index_vector(indices);
+  const std::vector<types::global_dof_index> indices = is1.get_index_vector();
 
   deallog << "Original index set: " << std::endl;
   is1.print(deallog);
index 1dfeaf273ffe316d61068ae256d0040d1ec2f040..85c2aa7067dddfcdaa1d69ce034b825a124e109a 100644 (file)
@@ -95,9 +95,9 @@ public:
         constraints.reinit(relevant_dofs);
         constraints.add_lines(mg_constrained_dofs.get_boundary_indices(level));
 
-        std::vector<types::global_dof_index> interface_indices;
-        mg_constrained_dofs.get_refinement_edge_indices(level)
-          .fill_index_vector(interface_indices);
+        const std::vector<types::global_dof_index> interface_indices =
+          mg_constrained_dofs.get_refinement_edge_indices(level)
+            .get_index_vector();
         edge_constrained_indices.clear();
         edge_constrained_indices.reserve(interface_indices.size());
         edge_constrained_values.resize(interface_indices.size());
index c5dc325f5dadab5467ded877078e10bf5182c9a4..370454a6b3555254e37a7331444df293caa2c401 100644 (file)
@@ -102,9 +102,9 @@ public:
         constraints.reinit(relevant_dofs);
         constraints.add_lines(mg_constrained_dofs.get_boundary_indices(level));
 
-        std::vector<types::global_dof_index> interface_indices;
-        mg_constrained_dofs.get_refinement_edge_indices(level)
-          .fill_index_vector(interface_indices);
+        const std::vector<types::global_dof_index> interface_indices =
+          mg_constrained_dofs.get_refinement_edge_indices(level)
+            .get_index_vector();
         edge_constrained_indices.clear();
         edge_constrained_indices.reserve(interface_indices.size());
         edge_constrained_values.resize(interface_indices.size());
index 6cb67244a7c7ed0c3752c3efc5ea1987730631d4..c4c4904310f7045f146e53d31a2260bac1df1e43 100644 (file)
@@ -99,9 +99,9 @@ public:
         constraints.reinit(relevant_dofs);
         constraints.add_lines(mg_constrained_dofs.get_boundary_indices(level));
 
-        std::vector<types::global_dof_index> interface_indices;
-        mg_constrained_dofs.get_refinement_edge_indices(level)
-          .fill_index_vector(interface_indices);
+        const std::vector<types::global_dof_index> interface_indices =
+          mg_constrained_dofs.get_refinement_edge_indices(level)
+            .get_index_vector();
         edge_constrained_indices.clear();
         edge_constrained_indices.reserve(interface_indices.size());
         edge_constrained_values.resize(interface_indices.size());
index 0cd84a23ff3c1780961861ab04e82b6f53ca9a9d..cddd513be2a5d3c50358aeff04baf4c222f973fb 100644 (file)
@@ -80,9 +80,8 @@ public:
                  level,
                  std::vector<unsigned int>({0}));
 
-    std::vector<types::global_dof_index> interface_indices;
-    mg_constrained_dofs.get_refinement_edge_indices(level).fill_index_vector(
-      interface_indices);
+    const std::vector<types::global_dof_index> interface_indices =
+      mg_constrained_dofs.get_refinement_edge_indices(level).get_index_vector();
     vmult_edge_constrained_indices.clear();
     vmult_edge_constrained_indices.reserve(interface_indices.size());
     vmult_edge_constrained_values.resize(interface_indices.size());

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.