]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix tests 15401/head
authorDaniel Arndt <arndtd@ornl.gov>
Wed, 21 Jun 2023 17:22:41 +0000 (13:22 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Mon, 3 Jul 2023 21:50:13 +0000 (17:50 -0400)
24 files changed:
tests/bits/anna_4.cc
tests/bits/anna_6.cc
tests/bits/error_estimator_01.cc
tests/bits/error_estimator_02.cc
tests/bits/periodicity_04.cc
tests/bits/step-11.cc
tests/codim_one/error_estimator_01.cc
tests/dofs/extract_dofs_by_component_04.cc
tests/dofs/interpolate_boundary_values_01.cc
tests/fe/fe_q_dg0.cc
tests/hp/step-11.cc
tests/mpi/constraint_matrix_condense_01.cc
tests/mpi/constraint_matrix_trilinos_bug.cc
tests/mpi/extract_boundary_dofs.cc
tests/mpi/extract_constant_modes_01.cc
tests/mpi/extract_constant_modes_02.cc
tests/mpi/extract_constant_modes_03.cc
tests/mpi/p4est_2d_constraintmatrix_03.cc
tests/numerics/project_boundary_01.cc
tests/simplex/extract_boundary_dofs.cc
tests/trilinos/precondition_amg_dgp_01.cc
tests/vector_tools/boundaries.cc
tests/vector_tools/boundaries_complex.cc
tests/vector_tools/boundaries_complex_hp.cc

index 78ec8bc811f69c777c2a1c70b6b251289eb74f9a..bd7832a1ade7de270a392e23ee2fd2cf2cf71ad9 100644 (file)
@@ -167,13 +167,13 @@ FindBug<dim>::dirichlet_conditions()
   // on which components of the
   // FESystem we want to impose
   // Dirichlet BC.
-  std::vector<bool> component_mask(2);
+  ComponentMask component_mask(2, false);
   // Dirichlet-BC for the
   // Q1-Component
-  component_mask[0] = true;
+  component_mask.set(0, true);
   // no Dirichlet-BC for the
   // DG-component
-  component_mask[1] = false;
+  component_mask.set(1, false);
 
   // This is just for the final
   // output-test
index e6ba0617ecce3f4141f8420ffc904ac225e63c65..5bf44d638a22fd7c2df5c545a5143db0a2ca6c57 100644 (file)
@@ -172,13 +172,13 @@ void
 ImposeBC<dim>::test_extract_boundary_DoFs()
 {
   std::map<types::global_dof_index, double> boundary_values;
-  std::vector<bool>                         bc_component_select(dim + 1);
+  ComponentMask                             bc_component_select(dim + 1, false);
 
   // extract boundary DoFs for the Nedelec-component
   // and impose zero boundary condition
-  bc_component_select[0] = true;
-  bc_component_select[1] = true;
-  bc_component_select[2] = false;
+  bc_component_select.set(0, true);
+  bc_component_select.set(1, true);
+  bc_component_select.set(2, false);
 
   const std::set<types::boundary_id> boundary_ids = {0};
   const IndexSet                     ned_boundary_dofs =
@@ -199,12 +199,12 @@ void
 ImposeBC<dim>::test_interpolate_BC()
 {
   std::map<types::global_dof_index, double> boundary_values;
-  std::vector<bool>                         bc_component_select(dim + 1, false);
+  ComponentMask                             bc_component_select(dim + 1, false);
 
 
   // impose inhomogeneous boundary condition
   // on the scalar variable
-  bc_component_select.back() = true;
+  bc_component_select.set(dim, true);
 
   VectorTools::interpolate_boundary_values(dof_handler,
                                            0,
index 7a183bac46a3c9a076ebc1af452967914793c8ca..6e784821881f0c719e677f686977a0df3907c75a 100644 (file)
@@ -168,7 +168,7 @@ check()
                                          neumann_bc,
                                          v,
                                          this_error,
-                                         std::vector<bool>(),
+                                         ComponentMask(),
                                          nullptr,
                                          MultithreadInfo::n_threads(),
                                          subdomain);
index 12ee6bb496b1af720a03a694f042316d1ed1c071..2fb42abfc5d54a37cedafa95c4aad5ccb6c3583f 100644 (file)
@@ -168,7 +168,7 @@ check()
                                          neumann_bc,
                                          v,
                                          this_error,
-                                         std::vector<bool>(),
+                                         ComponentMask(),
                                          nullptr,
                                          MultithreadInfo::n_threads(),
                                          numbers::invalid_unsigned_int,
index 04b44fb9c767cec70fd31b69d97df596473772f6..bbfa67299b5ff2dffce7c5bdfad54c52d793c408 100644 (file)
@@ -65,8 +65,8 @@ test()
   dof_handler.distribute_dofs(fe);
   DoFRenumbering::component_wise(dof_handler);
 
-  std::vector<bool> mask(2, true);
-  mask[1] = false;
+  ComponentMask mask(2, true);
+  mask.set(1, false);
   AffineConstraints<double> cm;
   DoFTools::make_periodicity_constraints(
     dof_handler.begin(0)->face(0),
index 452cb69e01d95f7e7dbd5f9f4194640362009217..dc47e5d303b9a84a79a6c4ef2626f16b095fce3d 100644 (file)
@@ -105,7 +105,7 @@ LaplaceProblem<dim>::setup_system()
   system_rhs.reinit(dof_handler.n_dofs());
 
   const IndexSet boundary_dofs =
-    DoFTools::extract_boundary_dofs(dof_handler, std::vector<bool>(1, true));
+    DoFTools::extract_boundary_dofs(dof_handler, ComponentMask(1, true));
 
   const unsigned int first_boundary_dof = *boundary_dofs.begin();
 
index 41fb78154299a018818436f4f61655b906d72042..ffe7820f137952817696009e2d162fb5fada6138 100644 (file)
@@ -168,7 +168,7 @@ check()
                                                    neumann_bc,
                                                    v,
                                                    this_error,
-                                                   std::vector<bool>(),
+                                                   ComponentMask(),
                                                    nullptr,
                                                    MultithreadInfo::n_threads(),
                                                    subdomain);
index 54b2620a0f46dbfc97f5058cc4170f771865310c..7f72fad184f9d2745d4ae097afac627ff889804d 100644 (file)
@@ -64,9 +64,9 @@ check()
   for (unsigned int int_mask = 0; int_mask < (1U << element.n_components());
        ++int_mask)
     {
-      std::vector<bool> component_mask(element.n_components());
+      ComponentMask component_mask(element.n_components(), false);
       for (unsigned int c = 0; c < element.n_components(); ++c)
-        component_mask[c] = (int_mask & (1 << c));
+        component_mask.set(c, (int_mask & (1 << c)));
 
       std::vector<std::vector<bool>> constant_modes;
       DoFTools::extract_constant_modes(dof, component_mask, constant_modes);
index 787e76f51f8091b69998482215a36c853a6b33fd..5f1df80f1fd90edf981b5883a438c3613c58029f 100644 (file)
@@ -134,8 +134,8 @@ void
 FindBug<dim>::dirichlet_conditions()
 {
   std::map<types::global_dof_index, double> dirichlet_dofs;
-  std::vector<bool>                         component_mask(dim + 1, false);
-  component_mask[dim] = true;
+  ComponentMask                             component_mask(dim + 1, false);
+  component_mask.set(dim, true);
 
   // This is just for the final
   // output-test
index 7f882e50839ff05b350c901084bab820da99c757..64acc0479a3bdb9071d9e4c954a2f1c1267c0c33 100644 (file)
@@ -421,8 +421,8 @@ namespace Step22
 
     {
       constraints.clear();
-      std::vector<bool> component_mask(dim + 1, true);
-      component_mask[dim] = false;
+      ComponentMask component_mask(dim + 1, true);
+      component_mask.set(dim, false);
 
       DoFTools::make_hanging_node_constraints(dof_handler, constraints);
 
index 849939f3f7e2750f3d3daa08b522e8434c1f854d..34c4a41181bb2ffea1bf8a60b0baa74071c768df 100644 (file)
@@ -108,7 +108,7 @@ LaplaceProblem<dim>::setup_system()
   system_rhs.reinit(dof_handler.n_dofs());
 
   const IndexSet boundary_dofs =
-    DoFTools::extract_boundary_dofs(dof_handler, std::vector<bool>(1, true));
+    DoFTools::extract_boundary_dofs(dof_handler, ComponentMask(1, true));
 
   const unsigned int first_boundary_dof = *boundary_dofs.begin();
 
index c19682762371114be9181eacd0784105005a5946..6d9019d5a09e1c692d05bfcc83501a4645376e41 100644 (file)
@@ -60,7 +60,7 @@ test()
   constraints.clear();
   {
     const IndexSet boundary_dofs =
-      DoFTools::extract_boundary_dofs(dof_handler, std::vector<bool>(1, true));
+      DoFTools::extract_boundary_dofs(dof_handler, ComponentMask(1, true));
 
     unsigned int first_nboundary_dof = 0;
     while (boundary_dofs.is_element(first_nboundary_dof))
index e74c83c379a9510d3c3c2c06471daf99ee01798c..33e1a8b2366b549caaa6b317bb650b30c2c00cff 100644 (file)
@@ -94,9 +94,9 @@ test()
 
   AffineConstraints<double> cm(relevant_set);
   DoFTools::make_hanging_node_constraints(dofh, cm);
-  std::vector<bool> velocity_mask(dim + 1, true);
+  ComponentMask velocity_mask(dim + 1, true);
 
-  velocity_mask[dim] = false;
+  velocity_mask.set(dim, false);
 
   VectorTools::interpolate_boundary_values(
     dofh, 0, Functions::ZeroFunction<dim>(dim + 1), cm, velocity_mask);
index 7b428257dae1e2f5a21e528cf97676cb6694f9e3..a41da1323b69b0910e760ecf15d90aaf2dfce5fd 100644 (file)
@@ -44,7 +44,7 @@ test()
   dofh.distribute_dofs(fe);
 
   IndexSet boundary_dofs =
-    DoFTools::extract_boundary_dofs(dofh, std::vector<bool>(1, true));
+    DoFTools::extract_boundary_dofs(dofh, ComponentMask(1, true));
   if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
     boundary_dofs.write(deallog.get_file_stream());
 
index 4fd2f3f3af3b6c8883c3570e79f7d0938aa462b1..3cd58ced11a61f473a1db3539fbdd21a82ec013b 100644 (file)
@@ -64,8 +64,8 @@ test()
   if (myid == 0)
     for (unsigned int c = 0; c < fe.n_components(); ++c)
       {
-        std::vector<bool> mask(fe.n_components(), false);
-        mask[c] = true;
+        ComponentMask mask(fe.n_components(), false);
+        mask.set(c, true);
 
         std::vector<std::vector<bool>> constant_modes;
         DoFTools::extract_constant_modes(dofh, mask, constant_modes);
@@ -83,8 +83,8 @@ test()
   if (myid == 0)
     for (unsigned int c = 0; c < fe.n_components(); ++c)
       {
-        std::vector<bool> mask(fe.n_components(), false);
-        mask[c] = true;
+        ComponentMask mask(fe.n_components(), false);
+        mask.set(c, true);
 
         std::vector<std::vector<bool>> constant_modes;
         DoFTools::extract_constant_modes(dofh, mask, constant_modes);
index b74da02b6407dc670e0d0d08f84001c36352d74a..1698ed8138b7ee46d0b879eb20327219d61374af 100644 (file)
@@ -61,7 +61,7 @@ test()
   // extract constant modes and print
   if (myid == 0)
     {
-      std::vector<bool> mask(fe.n_components(), true);
+      ComponentMask mask(fe.n_components(), true);
 
       std::vector<std::vector<bool>> constant_modes;
       DoFTools::extract_constant_modes(dofh, mask, constant_modes);
index c66ef4892213fc002b187e647cad2122945928ca..4321aec8e2a1aedf505c59930616f0125021c1b8 100644 (file)
@@ -79,7 +79,7 @@ test(unsigned int fe_nothing_index)
 
   if (myid == 0)
     {
-      std::vector<bool> mask(1, true);
+      ComponentMask mask(1, true);
 
       std::vector<std::vector<bool>> constant_modes;
       DoFTools::extract_constant_modes(dofh, mask, constant_modes);
index cd673308f9f1078998d6a68b18ccda7e429adbb6..d500cc1d4e8f8625caee52dc37c75e9cfed4e54c 100644 (file)
@@ -106,9 +106,9 @@ test()
 
   AffineConstraints<double> cm(relevant_set);
   DoFTools::make_hanging_node_constraints(dofh, cm);
-  std::vector<bool> velocity_mask(dim + 1, true);
+  ComponentMask velocity_mask(dim + 1, true);
 
-  velocity_mask[dim] = false;
+  velocity_mask.set(dim, false);
 
   VectorTools::interpolate_boundary_values(
     dofh, 0, Functions::ZeroFunction<dim>(dim + 1), cm, velocity_mask);
index 9008eddfe050a833725bffd4f6d9c13a6b5023c6..f0fd6e1f4eb493ae07f868c57281606d6086c1d8 100644 (file)
@@ -170,7 +170,7 @@ check()
           deallog << "Interpolated boundary values" << std::endl;
           std::map<types::global_dof_index, double> interpolated_bv;
           VectorTools::interpolate_boundary_values(
-            mapping, dof, function_map, interpolated_bv, std::vector<bool>());
+            mapping, dof, function_map, interpolated_bv, ComponentMask());
           write_map(interpolated_bv);
 
           deallog << "Projected boundary values" << std::endl;
index aff5bc8e1567ad744e8afbf23f4fb867a9c4c10d..31e51b6b41050ede817831c983fa93f9f9160407 100644 (file)
@@ -50,7 +50,7 @@ test()
   dofh.distribute_dofs(fe);
 
   IndexSet boundary_dofs =
-    DoFTools::extract_boundary_dofs(dofh, std::vector<bool>(1, true));
+    DoFTools::extract_boundary_dofs(dofh, ComponentMask(1, true));
   if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
     boundary_dofs.write(deallog.get_file_stream());
 
index fb7d7872f8790ddfc08b6c3bad6fc0e6d55a7095..ddfee1d8f17337f0402d3fe1e4ab7d2b621243ba 100644 (file)
@@ -199,7 +199,7 @@ Step4<dim>::solve()
   TrilinosWrappers::PreconditionAMG                 preconditioner;
   TrilinosWrappers::PreconditionAMG::AdditionalData data;
   DoFTools::extract_constant_modes(dof_handler,
-                                   std::vector<bool>(1, true),
+                                   ComponentMask(1, true),
                                    data.constant_modes);
   data.smoother_sweeps = 2;
   {
index 906f69cb13c00badf6f40082bf5482e394cfc71f..401525b258e55792d3e85d2f90db9642a31f4084 100644 (file)
@@ -149,7 +149,7 @@ check()
       deallog << "Interpolated boundary values" << std::endl;
       std::map<types::global_dof_index, double> interpolated_bv;
       VectorTools::interpolate_boundary_values(
-        mapping, dof, function_map, interpolated_bv, std::vector<bool>());
+        mapping, dof, function_map, interpolated_bv, ComponentMask());
       write_map(interpolated_bv);
 
       // project boundary values
index d806160037022642e6717fb259966ad3614af8d9..ee10eba214ed4ee8280f8abf133fda52a254e848 100644 (file)
@@ -157,7 +157,7 @@ check()
       deallog << "Interpolated boundary values" << std::endl;
       std::map<types::global_dof_index, std::complex<double>> interpolated_bv;
       VectorTools::interpolate_boundary_values(
-        mapping, dof, function_map, interpolated_bv, std::vector<bool>());
+        mapping, dof, function_map, interpolated_bv, ComponentMask());
       write_map(interpolated_bv);
 
       // project boundary values
index febc677a68dcae5fb4751461fd3beb17daab3ac5..5912e3ae72eb0b18c7a56f3e628f58f782938dac 100644 (file)
@@ -158,7 +158,7 @@ check()
       deallog << "Interpolated boundary values" << std::endl;
       std::map<types::global_dof_index, std::complex<double>> interpolated_bv;
       VectorTools::interpolate_boundary_values(
-        mappings, dof, function_map, interpolated_bv, std::vector<bool>());
+        mappings, dof, function_map, interpolated_bv, ComponentMask());
       write_map(interpolated_bv);
     }
 

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.