]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Adjust tests.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 31 Mar 2021 03:30:38 +0000 (21:30 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 5 Apr 2021 16:20:22 +0000 (10:20 -0600)
tests/fe/fe_q_dg0.cc
tests/mpi/constraint_matrix_condense_01.cc
tests/mpi/extract_boundary_dofs.cc
tests/simplex/extract_boundary_dofs.cc

index 8b98c87b8e3a4869b8d0c0ddba730807f444b46e..466ae87fe9e51ed985b1f67c5c5e504e8d93bebe 100644 (file)
@@ -431,7 +431,7 @@ namespace Step22
 
       /*std::vector<bool> boundary_dofs (dof_handler.n_dofs(), false);
 
-      std::vector<bool>boundary_mask (dim+1, false);
+      std::vector<bool> boundary_mask (dim+1, false);
       boundary_mask[dim]=true;
 
       DoFTools::extract_boundary_dofs (dof_handler,boundary_mask,boundary_dofs);
index 9c64aeb6e32f46fc66debd96023eadeab63f07e3..46d0612f36a836748931a7d0f7f1a1d2e7efa8a9 100644 (file)
@@ -59,10 +59,8 @@ test()
   AffineConstraints<PetscScalar> constraints(locally_relevant_dofs);
   constraints.clear();
   {
-    IndexSet boundary_dofs(dof_handler.n_dofs());
-    DoFTools::extract_boundary_dofs(dof_handler,
-                                    std::vector<bool>(1, true),
-                                    boundary_dofs);
+    const IndexSet boundary_dofs =
+      DoFTools::extract_boundary_dofs(dof_handler, std::vector<bool>(1, true));
 
     unsigned int first_nboundary_dof = 0;
     while (boundary_dofs.is_element(first_nboundary_dof))
index 06f9168e70fccf6cec2c1a2d39ec3a4df274ed35..64d96e4c00dc60ccb8e09d230ad509abc9d6fb14 100644 (file)
@@ -43,15 +43,14 @@ test()
   DoFHandler<dim> dofh(tr);
   dofh.distribute_dofs(fe);
 
-  IndexSet relevant_set, boundary_dofs;
-  DoFTools::extract_boundary_dofs(dofh,
-                                  std::vector<bool>(1, true),
-                                  boundary_dofs);
+  const IndexSet boundary_dofs =
+    DoFTools::extract_boundary_dofs(dofh, std::vector<bool>(1, true));
   if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
     boundary_dofs.write(deallog.get_file_stream());
 
   // the result of extract_boundary_dofs is supposed to be a subset of the
   // locally relevant dofs, so test this
+  IndexSet relevant_set;
   DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
   boundary_dofs.subtract_set(relevant_set);
   AssertThrow(boundary_dofs.n_elements() == 0, ExcInternalError());
index 2de79fa1b0162e137e26bbf269a9a441d6d41b6d..2db61b378a9376b5e98056dcce6644cee274f4fb 100644 (file)
@@ -49,15 +49,14 @@ test()
   DoFHandler<dim>        dofh(tr);
   dofh.distribute_dofs(fe);
 
-  IndexSet relevant_set, boundary_dofs;
-  DoFTools::extract_boundary_dofs(dofh,
-                                  std::vector<bool>(1, true),
-                                  boundary_dofs);
+  IndexSet boundary_dofs =
+    DoFTools::extract_boundary_dofs(dofh, std::vector<bool>(1, true));
   if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
     boundary_dofs.write(deallog.get_file_stream());
 
   // the result of extract_boundary_dofs is supposed to be a subset of the
   // locally relevant dofs, so test this
+  IndexSet relevant_set;
   DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
   boundary_dofs.subtract_set(relevant_set);
   AssertThrow(boundary_dofs.n_elements() == 0, ExcInternalError());

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.