]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Do not use deprecated extract_locally_* functions in library. 15976/head
authorMarc Fehling <mafehling.git@gmail.com>
Fri, 8 Sep 2023 15:21:10 +0000 (09:21 -0600)
committerMarc Fehling <mafehling.git@gmail.com>
Sat, 9 Sep 2023 01:44:30 +0000 (19:44 -0600)
301 files changed:
examples/step-32/step-32.cc
include/deal.II/distributed/solution_transfer.h
include/deal.II/numerics/solution_transfer.h
tests/arpack/parpack_advection_diffusion_petsc.cc
tests/arpack/parpack_advection_diffusion_trilinos.cc
tests/arpack/step-36_parpack.cc
tests/arpack/step-36_parpack_mf.cc
tests/arpack/step-36_parpack_mf_02.cc
tests/arpack/step-36_parpack_mf_03.cc
tests/arpack/step-36_parpack_trilinos.cc
tests/distributed_grids/checkpointing_02.cc
tests/distributed_grids/checkpointing_03.cc
tests/distributed_grids/large_vtu_01.cc
tests/dofs/dof_tools_04a.cc
tests/dofs/dof_tools_22a.cc
tests/dofs/dof_tools_extract_dofs_with_support_contained_within_02.cc
tests/dofs/dof_tools_extract_dofs_with_support_contained_within_04.cc
tests/dofs/sparsity_pattern_06.cc
tests/dofs/sparsity_pattern_07.cc
tests/fe/fe_enriched_color_07.cc
tests/fe/fe_enriched_step-36.cc
tests/fe/fe_enriched_step-36b.cc
tests/fullydistributed_grids/solution_transfer_01.cc
tests/gla/block_mat_02.cc
tests/gla/block_mat_03.cc
tests/gla/mat_03.cc
tests/gla/mat_04.cc
tests/grid/grid_generator_marching_cube_algorithm_01.cc
tests/grid/grid_generator_marching_cube_algorithm_02.cc
tests/hp/field_transfer_04.cc
tests/hp/laplace.h
tests/lac/constraints_make_consistent_in_parallel_01.cc
tests/lac/diagonal_matrix_02.cc
tests/lac/linear_operator_12.cc
tests/lac/linear_operator_12a.cc
tests/lac/linear_operator_14.cc
tests/lac/step-40-linear_operator_01.cc
tests/lac/step-40-linear_operator_02.cc
tests/lac/step-40-linear_operator_03.cc
tests/lac/step-40-linear_operator_04.cc
tests/lac/step-40-linear_operator_05.cc
tests/lac/step-40-linear_operator_06.cc
tests/lac/utilities_02.cc
tests/mappings/mapping_fe_field_03.cc
tests/mappings/mapping_fe_field_06.cc
tests/mappings/mapping_q_cache_06.cc
tests/mappings/mapping_q_eulerian_07.cc
tests/mappings/mapping_q_eulerian_08.cc
tests/mappings/mapping_q_eulerian_09.cc
tests/mappings/mapping_q_eulerian_11.cc
tests/mappings/mapping_q_eulerian_14.cc
tests/matrix_free/cell_categorization_02.cc
tests/matrix_free/compute_diagonal_02.cc
tests/matrix_free/dof_info_01.cc
tests/matrix_free/dof_info_02.cc
tests/matrix_free/interpolate_to_mg.cc
tests/matrix_free/laplace_operator_01.cc
tests/matrix_free/laplace_operator_02.cc
tests/matrix_free/laplace_operator_03.cc
tests/matrix_free/laplace_operator_05.cc
tests/matrix_free/mass_operator_01.cc
tests/matrix_free/mass_operator_02.cc
tests/matrix_free/mass_operator_03.cc
tests/matrix_free/mass_operator_04.cc
tests/matrix_free/matrix_free_device_initialize_vector.cc
tests/matrix_free/matrix_free_device_matrix_vector_10.cc
tests/matrix_free/matrix_free_device_matrix_vector_10a.cc
tests/matrix_free/matrix_free_device_matrix_vector_19.cc
tests/matrix_free/matrix_free_device_matrix_vector_25.cc
tests/matrix_free/matrix_free_device_matrix_vector_26.cc
tests/matrix_free/matrix_free_device_precondition_chebyshev.cc
tests/matrix_free/matrix_free_device_reinit_01.cc
tests/matrix_free/matrix_vector_11.cc
tests/matrix_free/matrix_vector_12.cc
tests/matrix_free/matrix_vector_13.cc
tests/matrix_free/matrix_vector_19.cc
tests/matrix_free/matrix_vector_22.cc
tests/matrix_free/matrix_vector_23.cc
tests/matrix_free/matrix_vector_blocks.cc
tests/matrix_free/matrix_vector_large_degree_02.cc
tests/matrix_free/parallel_multigrid_02.cc
tests/matrix_free/parallel_multigrid_adaptive_01.cc
tests/matrix_free/parallel_multigrid_adaptive_02.cc
tests/matrix_free/parallel_multigrid_adaptive_03.cc
tests/matrix_free/parallel_multigrid_adaptive_04.cc
tests/matrix_free/parallel_multigrid_adaptive_05.cc
tests/matrix_free/parallel_multigrid_adaptive_06.cc
tests/matrix_free/parallel_multigrid_adaptive_06ref.cc
tests/matrix_free/parallel_multigrid_adaptive_07.cc
tests/matrix_free/parallel_multigrid_adaptive_08.cc
tests/matrix_free/parallel_multigrid_mf_02.cc
tests/matrix_free/pre_and_post_loops_02.cc
tests/matrix_free/solver_cg_interleave.cc
tests/matrix_free/step-37-inhomogeneous-1.cc
tests/matrix_free/step-48.cc
tests/matrix_free/step-48b.cc
tests/matrix_free/step-48c.cc
tests/matrix_free/stokes_computation.cc
tests/meshworker/step-50-mesh_loop.cc
tests/mpi/compute_mean_value_01.cc
tests/mpi/compute_mean_value_02.cc
tests/mpi/condense_01.cc
tests/mpi/constraint_matrix_condense_01.cc
tests/mpi/constraint_matrix_trilinos_bug.cc
tests/mpi/constraints_consistent_01.cc
tests/mpi/crash_05.cc
tests/mpi/data_out_faces_01.cc
tests/mpi/data_out_faces_02.cc
tests/mpi/derivative_approximation_01.cc
tests/mpi/derivative_approximation_02.cc
tests/mpi/distribute_flux_sparsity_pattern.cc
tests/mpi/extract_boundary_dofs.cc
tests/mpi/extract_locally_active_dofs.cc
tests/mpi/extract_locally_active_level_dofs.cc
tests/mpi/fe_field_function_01.cc
tests/mpi/fe_field_function_02.cc
tests/mpi/fe_field_function_03.cc
tests/mpi/fe_tools_extrapolate_common.h
tests/mpi/flux_edge_01.cc
tests/mpi/hp_constraints_consistent_01.cc
tests/mpi/hp_constraints_consistent_02.cc
tests/mpi/hp_constraints_consistent_03.cc
tests/mpi/hp_hanging_node_constraints_01.cc
tests/mpi/hp_hanging_node_constraints_02.cc
tests/mpi/hp_integrate_difference.cc
tests/mpi/hp_step-4.cc
tests/mpi/hp_step-40.cc
tests/mpi/hp_step-40_variable_01.cc
tests/mpi/integrate_difference.cc
tests/mpi/interpolate_04.cc
tests/mpi/interpolate_05.cc
tests/mpi/interpolate_to_different_mesh_01.cc
tests/mpi/interpolate_to_different_mesh_02.cc
tests/mpi/make_zero_boundary_values.cc
tests/mpi/map_dofs_to_support_points.cc
tests/mpi/muelu_periodicity.cc
tests/mpi/multigrid_adaptive.cc
tests/mpi/no_flux_constraints.cc
tests/mpi/no_flux_constraints_02.cc
tests/mpi/no_flux_constraints_03.cc
tests/mpi/normal_flux_constraints.cc
tests/mpi/p4est_2d_constraintmatrix_01.cc
tests/mpi/p4est_2d_constraintmatrix_02.cc
tests/mpi/p4est_2d_constraintmatrix_03.cc
tests/mpi/p4est_2d_constraintmatrix_04.cc
tests/mpi/p4est_2d_constraintmatrix_05.cc
tests/mpi/p4est_2d_dofhandler_04.cc
tests/mpi/p4est_2d_renumber_01.cc
tests/mpi/p4est_2d_renumber_02.cc
tests/mpi/p4est_3d_constraintmatrix_01.cc
tests/mpi/p4est_3d_constraintmatrix_02.cc
tests/mpi/p4est_3d_constraintmatrix_03.cc
tests/mpi/p4est_3d_constraintmatrix_04.cc
tests/mpi/p4est_save_02.cc
tests/mpi/p4est_save_03.cc
tests/mpi/p4est_save_04.cc
tests/mpi/p4est_save_06.cc
tests/mpi/parallel_block_vector_05.cc
tests/mpi/parallel_block_vector_06.cc
tests/mpi/parallel_block_vector_07.cc
tests/mpi/parallel_block_vector_08.cc
tests/mpi/parallel_block_vector_09.cc
tests/mpi/parallel_block_vector_10.cc
tests/mpi/parallel_block_vector_11.cc
tests/mpi/parallel_block_vector_12.cc
tests/mpi/parallel_vector_back_interpolate.cc
tests/mpi/parallel_vector_back_interpolate_02.cc
tests/mpi/parallel_vector_interpolate.cc
tests/mpi/periodicity_01.cc
tests/mpi/periodicity_02.cc
tests/mpi/periodicity_03.cc
tests/mpi/periodicity_04.cc
tests/mpi/periodicity_06.cc
tests/mpi/periodicity_07.cc
tests/mpi/periodicity_08.cc
tests/mpi/petsc_bug_ghost_vector_01.cc
tests/mpi/petsc_step-27.cc
tests/mpi/project_bv_div_conf.cc
tests/mpi/solution_transfer_01.cc
tests/mpi/solution_transfer_04.cc
tests/mpi/solution_transfer_05.cc
tests/mpi/solution_transfer_06.cc
tests/mpi/step-37.cc
tests/mpi/step-39-block.cc
tests/mpi/step-39.cc
tests/mpi/step-40.cc
tests/mpi/step-40_cuthill_mckee.cc
tests/mpi/step-40_cuthill_mckee_MPI-subset.cc
tests/mpi/step-40_direct_solver.cc
tests/mpi/trilinos_distribute_04.cc
tests/mpi/trilinos_step-27.cc
tests/multigrid-global-coarsening/interpolate_to_mg.cc
tests/multigrid-global-coarsening/interpolate_to_mg_01.cc
tests/multigrid-global-coarsening/mg_data_out_04.cc
tests/multigrid-global-coarsening/mg_data_out_05.cc
tests/multigrid-global-coarsening/mg_transfer_util.h
tests/multigrid-global-coarsening/multigrid_a_01.cc
tests/multigrid-global-coarsening/multigrid_a_02.cc
tests/multigrid-global-coarsening/multigrid_a_03.cc
tests/multigrid-global-coarsening/multigrid_p_01.cc
tests/multigrid-global-coarsening/multigrid_p_02.cc
tests/multigrid-global-coarsening/multigrid_p_03.cc
tests/multigrid-global-coarsening/non_nested_multigrid_01.cc
tests/multigrid-global-coarsening/non_nested_multigrid_02.cc
tests/multigrid-global-coarsening/non_nested_multigrid_03.cc
tests/multigrid-global-coarsening/non_nested_multigrid_04.cc
tests/multigrid-global-coarsening/parallel_multigrid_02.cc
tests/multigrid-global-coarsening/parallel_multigrid_adaptive_01.cc
tests/multigrid-global-coarsening/parallel_multigrid_adaptive_02.cc
tests/multigrid-global-coarsening/parallel_multigrid_adaptive_03.cc
tests/multigrid-global-coarsening/parallel_multigrid_adaptive_04.cc
tests/multigrid-global-coarsening/parallel_multigrid_adaptive_05.cc
tests/multigrid-global-coarsening/parallel_multigrid_adaptive_06.cc
tests/multigrid-global-coarsening/parallel_multigrid_adaptive_06ref.cc
tests/multigrid-global-coarsening/parallel_multigrid_adaptive_07.cc
tests/multigrid-global-coarsening/parallel_multigrid_adaptive_08.cc
tests/multigrid-global-coarsening/parallel_multigrid_mf_02.cc
tests/multigrid-global-coarsening/step-37-inhomogeneous-1.cc
tests/multigrid-global-coarsening/stokes_computation.cc
tests/multigrid-global-coarsening/transfer_matrix_free_04.cc
tests/multigrid/constrained_dofs_01.cc
tests/multigrid/constrained_dofs_02.cc
tests/multigrid/constrained_dofs_07.cc
tests/multigrid/events_01.cc
tests/multigrid/interface_matrix_entry_01.cc
tests/multigrid/interpolate_to_mg_01.cc
tests/multigrid/mg_coarse_01.cc
tests/multigrid/mg_data_out_04.cc
tests/multigrid/mg_data_out_05.cc
tests/multigrid/step-16-50-mpi-linear-operator.cc
tests/multigrid/step-16-50-mpi-smoother.cc
tests/multigrid/step-16-50-mpi.cc
tests/multigrid/step-50_01.cc
tests/multigrid/step-50_02.cc
tests/multigrid/transfer_04.cc
tests/multigrid/transfer_matrix_free_04.cc
tests/multigrid/transfer_matrix_free_13.cc
tests/multigrid/transfer_prebuilt_05.cc
tests/numerics/matrix_creator_01.cc
tests/numerics/no_flux_18.cc
tests/numerics/project_parallel_qp_common.h
tests/numerics/project_parallel_qpmf_common.h
tests/particles/interpolate_on_particle_01.cc
tests/particles/particle_interpolation_01.cc
tests/particles/particle_interpolation_02.cc
tests/particles/particle_interpolation_03.cc
tests/particles/particle_interpolation_04.cc
tests/particles/particle_interpolation_05.cc
tests/particles/step-68.cc
tests/performance/timing_mg_glob_coarsen.cc
tests/performance/timing_step_37.cc
tests/performance/timing_step_37_gc.cc
tests/performance/timing_step_68.cc
tests/petsc/bddc.cc
tests/petsc/step-77-snes.cc
tests/petsc_complex/fe_get_function_values.cc
tests/petsc_complex/parallel_sparse_matrix_01.cc
tests/physics/step-18-rotation_matrix.cc
tests/physics/step-18.cc
tests/remote_point_evaluation/data_out_resample_01.cc
tests/remote_point_evaluation/data_out_resample_02.cc
tests/remote_point_evaluation/remote_point_evaluation_01.cc
tests/remote_point_evaluation/remote_point_evaluation_02.cc
tests/remote_point_evaluation/remote_point_evaluation_03.cc
tests/remote_point_evaluation/vector_tools_evaluate_at_points_01.cc
tests/remote_point_evaluation/vector_tools_evaluate_at_points_02.cc
tests/remote_point_evaluation/vector_tools_evaluate_at_points_03.cc
tests/remote_point_evaluation/vector_tools_evaluate_at_points_04.cc
tests/remote_point_evaluation/vector_tools_evaluate_at_points_05.cc
tests/remote_point_evaluation/vector_tools_evaluate_at_points_06.cc
tests/remote_point_evaluation/vector_tools_evaluate_at_points_07.cc
tests/simplex/data_out_write_hdf5_02.cc
tests/simplex/extract_boundary_dofs.cc
tests/simplex/poisson_01.cc
tests/simplex/step-18.cc
tests/simplex/step-40.cc
tests/simplex/step-55.cc
tests/simplex/step-68.cc
tests/slepc/step-36_parallel.cc
tests/slepc/step-36_parallel_02.cc
tests/slepc/step-36_parallel_03.cc
tests/trilinos/assemble_matrix_parallel_02.cc
tests/trilinos/assemble_matrix_parallel_03.cc
tests/trilinos/assemble_matrix_parallel_04.cc
tests/trilinos/assemble_matrix_parallel_05.cc
tests/trilinos/assemble_matrix_parallel_06.cc
tests/trilinos/assemble_matrix_parallel_07.cc
tests/trilinos/direct_solver_2.cc
tests/trilinos/direct_solver_3.cc
tests/trilinos/elide_zeros.cc
tests/trilinos/n_nonzeros_02_parallel.cc
tests/trilinos/renumbering_01.cc
tests/trilinos/solver_control_06.cc
tests/trilinos/trilinos_sparsity_pattern_02.cc
tests/trilinos/trilinos_sparsity_pattern_05.cc
tests/vector_tools/add_constant_02.cc
tests/vector_tools/integrate_difference_03.cc
tests/vector_tools/integrate_difference_04.cc
tests/vector_tools/integrate_difference_04_hp.cc
tests/vector_tools/integrate_difference_04_hp_02.cc
tests/vector_tools/interpolate.cc

index 38f99434d1d48696f1354e53cd446b96691f33d1..f193a5a56cca8c036a3be67ce745cf7011d63c03 100644 (file)
@@ -3195,9 +3195,8 @@ namespace Step32
 
     joint_solution.compress(VectorOperation::insert);
 
-    IndexSet locally_relevant_joint_dofs(joint_dof_handler.n_dofs());
-    DoFTools::extract_locally_relevant_dofs(joint_dof_handler,
-                                            locally_relevant_joint_dofs);
+    const IndexSet locally_relevant_joint_dofs =
+      DoFTools::extract_locally_relevant_dofs(joint_dof_handler);
     TrilinosWrappers::MPI::Vector locally_relevant_joint_solution;
     locally_relevant_joint_solution.reinit(locally_relevant_joint_dofs,
                                            MPI_COMM_WORLD);
index 015ec0faa0130f8187f8e80f4209bd82f880a686..0096eb8a6be24bea1fab8ff9a0090ce6f5f1536a 100644 (file)
@@ -89,9 +89,9 @@ namespace parallel
      * process):
      * @code
      * // Create initial indexsets pertaining to the grid before refinement
-     * const IndexSet locally_owned_dofs    = dof_handler.locally_owned_dofs();
-     * const IndexSet locally_relevant_dofs =
-     * DoFTools::extract_locally_relevant_dofs(dof_handler);
+     * const IndexSet &locally_owned_dofs    = dof_handler.locally_owned_dofs();
+     * const IndexSet  locally_relevant_dofs =
+     *   DoFTools::extract_locally_relevant_dofs(dof_handler);
      *
      * // The solution vector only knows about locally owned DoFs
      * TrilinosWrappers::MPI::Vector solution;
index 3e6043b3c5a4c37b6b803400625859c3a0b05dd1..c62c593141513e1c053cd0e870cd9e6d2fc29ab9 100644 (file)
@@ -129,9 +129,9 @@ DEAL_II_NAMESPACE_OPEN
  * required for the interpolation process):
  * @code
  * // Create initial indexsets pertaining to the grid before refinement
- * const IndexSet locally_owned_dofs    = dof_handler.locally_owned_dofs();
- * const IndexSet locally_relevant_dofs =
- * DoFTools::extract_locally_relevant_dofs(dof_handler);
+ * const IndexSet &locally_owned_dofs    = dof_handler.locally_owned_dofs();
+ * const IndexSet  locally_relevant_dofs =
+ *   DoFTools::extract_locally_relevant_dofs(dof_handler);
  *
  * // The solution vector only knows about locally owned DoFs
  * TrilinosWrappers::MPI::Vector solution;
index dc9aed5fe8fccfaabb78a2d728553e88c5242192..1c4d06d3144ba12c75644e29929071893992f873 100644 (file)
@@ -188,9 +188,8 @@ test()
   std::vector<dealii::IndexSet> locally_owned_dofs_per_processor =
     locally_owned_dofs_per_subdomain(dof_handler);
   locally_owned_dofs = locally_owned_dofs_per_processor[this_mpi_process];
-  locally_relevant_dofs.clear();
-  dealii::DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                                  locally_relevant_dofs);
+  locally_relevant_dofs =
+    dealii::DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   constraints.clear();
   constraints.reinit(locally_relevant_dofs);
index 2d8218fe62f9de962f3007ac71542a0380a5c348..3edd5a5d87f9e74752fc5ccbd6f3d22aab6d2a6c 100644 (file)
@@ -161,9 +161,8 @@ test()
   DoFRenumbering::subdomain_wise(dof_handler);
   std::vector<IndexSet> locally_owned_dofs_per_processor =
     locally_owned_dofs_per_subdomain(dof_handler);
-  locally_owned_dofs = locally_owned_dofs_per_processor[this_mpi_process];
-  locally_relevant_dofs.clear();
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  locally_owned_dofs    = locally_owned_dofs_per_processor[this_mpi_process];
+  locally_relevant_dofs = DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   constraints.clear();
   constraints.reinit(locally_relevant_dofs);
index 5df400d51008d49e080875e02ebe300927164195..83ddd8c9dedd42883cfcb8f54dd9d21de4706ff0 100644 (file)
@@ -190,9 +190,8 @@ test()
   std::vector<dealii::IndexSet> locally_owned_dofs_per_processor =
     locally_owned_dofs_per_subdomain(dof_handler);
   locally_owned_dofs = locally_owned_dofs_per_processor[this_mpi_process];
-  locally_relevant_dofs.clear();
-  dealii::DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                                  locally_relevant_dofs);
+  locally_relevant_dofs =
+    dealii::DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   constraints.clear();
   constraints.reinit(locally_relevant_dofs);
index 4e98d1ef32ad56b35060a14d343593f8240f213a..0e72decaec3e7d2f347c6d94ea7f31913cdf872d 100644 (file)
@@ -83,8 +83,8 @@ test()
   dof_handler.distribute_dofs(fe);
 
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
   AffineConstraints<double> constraints;
   constraints.reinit(locally_relevant_dofs);
   DoFTools::make_hanging_node_constraints(dof_handler, constraints);
index d7d9415c07bd715f44b1e6570d9fa8f950e64e9b..f2a78529d1a12e89c3dfbd0492c0766a64ca46db 100644 (file)
@@ -83,8 +83,8 @@ test()
   dof_handler.distribute_dofs(fe);
 
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
   AffineConstraints<double> constraints;
   constraints.reinit(locally_relevant_dofs);
   DoFTools::make_hanging_node_constraints(dof_handler, constraints);
index 71b49134d5146f975274eb7298d0ef7b70318342..387f83d2e2654dddc84d9dd65c3ae6e2639ae29e 100644 (file)
@@ -84,8 +84,8 @@ test()
   dof_handler.distribute_dofs(fe);
 
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
   AffineConstraints<double> constraints;
   constraints.reinit(locally_relevant_dofs);
   DoFTools::make_hanging_node_constraints(dof_handler, constraints);
index 90c2c96a2df8a52337620b47dc4f279d2ff296bd..f3ac6f65333549f7cf77d14c7813dfa194943b43 100644 (file)
@@ -163,9 +163,8 @@ test()
   DoFRenumbering::subdomain_wise(dof_handler);
   std::vector<IndexSet> locally_owned_dofs_per_processor =
     locally_owned_dofs_per_subdomain(dof_handler);
-  locally_owned_dofs = locally_owned_dofs_per_processor[this_mpi_process];
-  locally_relevant_dofs.clear();
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  locally_owned_dofs    = locally_owned_dofs_per_processor[this_mpi_process];
+  locally_relevant_dofs = DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   constraints.clear();
   constraints.reinit(locally_relevant_dofs);
index 40bd84cc150b21b5df74a028ecd2b46b52ed3aa2..68a5d0cd9329938851208b0ec21db7b97b5a57f5 100644 (file)
@@ -107,8 +107,8 @@ void
 LaplaceProblem<dim>::setup_system()
 {
   dof_handler.distribute_dofs(fe);
-  locally_owned_dofs = dof_handler.locally_owned_dofs();
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  locally_owned_dofs    = dof_handler.locally_owned_dofs();
+  locally_relevant_dofs = DoFTools::extract_locally_relevant_dofs(dof_handler);
 }
 
 template <int dim>
index 29cea2a7d133aeb63425e3ec567912b1f12462aa..f0971d879de7365f47305c78557dda99a21db6af 100644 (file)
@@ -106,8 +106,8 @@ void
 LaplaceProblem<dim>::setup_system()
 {
   dof_handler.distribute_dofs(fe);
-  locally_owned_dofs = dof_handler.locally_owned_dofs();
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  locally_owned_dofs    = dof_handler.locally_owned_dofs();
+  locally_relevant_dofs = DoFTools::extract_locally_relevant_dofs(dof_handler);
 }
 
 template <int dim>
index 714f15ba1aef048b14310bd1cf1613685a2f3929..acf41e053f0ce623740f2342418d549ca716c1d1 100644 (file)
@@ -81,8 +81,8 @@ run()
   DoFHandler<dim> dof_handler(triangulation);
   dof_handler.distribute_dofs(fe);
   // Make FE vector
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   using VectorType = LinearAlgebra::distributed::Vector<double>;
   VectorType global_dof_vector;
index 4c3ef774fafb6cabee31cce8b322d678c0567887..20ebd6ed18fe0c084163b4b25c78dc666b5b2bb7 100644 (file)
@@ -50,8 +50,8 @@ check_this(const DoFHandler<dim> &dof_handler)
 {
   const types::global_dof_index n_dofs = dof_handler.n_dofs();
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   const IndexSet is_hanging_node_constrained =
     DoFTools::extract_hanging_node_dofs(dof_handler);
index 14eff7cf2b5d7fa3144aa19830ee4daeb87d827f..629e64ccdc80f076baf79af06d8b13ab5b9b787b 100644 (file)
@@ -93,8 +93,8 @@ test()
   coupling[1][1]      = DoFTools::always;
   flux_coupling[1][1] = DoFTools::always;
 
-  IndexSet relevant_partitioning(dh.n_dofs());
-  DoFTools::extract_locally_relevant_dofs(dh, relevant_partitioning);
+  const IndexSet relevant_partitioning =
+    DoFTools::extract_locally_relevant_dofs(dh);
 
   // Generate hanging node constraints
   AffineConstraints<double> constraints;
index bb8367919232383f3a7803e559c6824ad666d80a..5bbd9670087504243f775e4a2c684dc5269b19a1 100644 (file)
@@ -95,8 +95,8 @@ test(const unsigned int flag)
   FE_Q<dim> fe(2);
   dh.distribute_dofs(fe);
 
-  IndexSet locally_relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_set);
+  const IndexSet locally_relevant_set =
+    DoFTools::extract_locally_relevant_dofs(dh);
 
   AffineConstraints<double> cm;
   cm.reinit(locally_relevant_set);
index 7732236342f07e28c005c276fd49128cd2b6ace0..4ef50235e32c229cae6c301e0aefae5ec4201c5e 100644 (file)
@@ -98,8 +98,8 @@ test()
   dh.distribute_dofs(fe);
 
   const IndexSet &locally_owned_set = dh.locally_owned_dofs();
-  IndexSet        locally_relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_set);
+  const IndexSet  locally_relevant_set =
+    DoFTools::extract_locally_relevant_dofs(dh);
 
   AffineConstraints<double> cm;
   cm.reinit(locally_relevant_set);
index c0baa87fef0a1480cec566ee576eda671362f4ff..e8a1bc3498ef178349c2150dd469fef17671dc81 100644 (file)
@@ -62,12 +62,10 @@ main(int argc, char **argv)
   dof_handler_0.distribute_dofs(fe_0);
   dof_handler_1.distribute_dofs(fe_1);
 
-  IndexSet locally_relevant_dofs_0;
-  IndexSet locally_relevant_dofs_1;
-  DoFTools::extract_locally_relevant_dofs(dof_handler_0,
-                                          locally_relevant_dofs_0);
-  DoFTools::extract_locally_relevant_dofs(dof_handler_1,
-                                          locally_relevant_dofs_1);
+  const IndexSet locally_relevant_dofs_0 =
+    DoFTools::extract_locally_relevant_dofs(dof_handler_0);
+  const IndexSet locally_relevant_dofs_1 =
+    DoFTools::extract_locally_relevant_dofs(dof_handler_1);
   deallog << "locally owned dofs 0: ";
   dof_handler_0.locally_owned_dofs().print(deallog);
   deallog << std::endl;
index ebe2040c509ac654cf6328735b6ab1c63dc69ffd..d501fe5ca984ff93d405622717f0e7f80ba836b0 100644 (file)
@@ -79,12 +79,10 @@ main(int argc, char **argv)
   dof_handler_0.distribute_dofs(fe_0);
   dof_handler_1.distribute_dofs(fe_1);
 
-  IndexSet locally_relevant_dofs_0;
-  IndexSet locally_relevant_dofs_1;
-  DoFTools::extract_locally_relevant_dofs(dof_handler_0,
-                                          locally_relevant_dofs_0);
-  DoFTools::extract_locally_relevant_dofs(dof_handler_1,
-                                          locally_relevant_dofs_1);
+  const IndexSet locally_relevant_dofs_0 =
+    DoFTools::extract_locally_relevant_dofs(dof_handler_0);
+  const IndexSet locally_relevant_dofs_1 =
+    DoFTools::extract_locally_relevant_dofs(dof_handler_1);
   deallog << "locally owned dofs 0: ";
   dof_handler_0.locally_owned_dofs().print(deallog);
   deallog << std::endl;
index 9eeac709478116e34d098f357a49b98a1279bd7d..3a98fae216df93bbb90223c8f441149052b6dc1a 100644 (file)
@@ -1439,9 +1439,8 @@ LaplaceProblem<dim>::setup_system()
   DoFRenumbering::subdomain_wise(dof_handler);
   std::vector<IndexSet> locally_owned_dofs_per_proc =
     DoFTools::locally_owned_dofs_per_subdomain(dof_handler);
-  locally_owned_dofs = locally_owned_dofs_per_proc[this_mpi_process];
-  locally_relevant_dofs.clear();
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  locally_owned_dofs    = locally_owned_dofs_per_proc[this_mpi_process];
+  locally_relevant_dofs = DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   constraints.clear();
   constraints.reinit(locally_relevant_dofs);
index aa6c355cdc7c1bbe5813ec8d51105db39031c7e5..974dd8455125fdff9387d6e45d58f6bef02cf34e 100644 (file)
@@ -287,8 +287,8 @@ namespace Step36
     std::vector<IndexSet> locally_owned_dofs_per_processor =
       DoFTools::locally_owned_dofs_per_subdomain(dof_handler);
     locally_owned_dofs = locally_owned_dofs_per_processor[this_mpi_process];
-    locally_relevant_dofs.clear();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     constraints.clear();
     constraints.reinit(locally_relevant_dofs);
index 95de7d79402626ba56eb7d7a357dc973a60d1f27..3e38a6bdfc8377de8ffbc8038a185a744f9b152f 100644 (file)
@@ -297,8 +297,8 @@ namespace Step36
     std::vector<IndexSet> locally_owned_dofs_per_processor =
       DoFTools::locally_owned_dofs_per_subdomain(dof_handler);
     locally_owned_dofs = locally_owned_dofs_per_processor[this_mpi_process];
-    locally_relevant_dofs.clear();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     constraints.clear();
     constraints.reinit(locally_relevant_dofs);
index a25f7950cf56e87efa4d32fe79156325e77b7651..d7a3a4e35de8bfce33fb85dd4d80e02298587a50 100644 (file)
@@ -58,8 +58,8 @@ test(TriangulationType &triangulation)
   DoFHandler<dim> dof_handler(triangulation);
   dof_handler.distribute_dofs(FE_Q<dim>(2));
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   using VectorType = LinearAlgebra::distributed::Vector<double>;
 
index 37005fab34d8827b3f3a26ea5c0715e24c41d288..e2f8915549b9d4b89f0884375b91c8551948d454 100644 (file)
@@ -90,9 +90,8 @@ test()
   stokes_partitioning.push_back(stokes_index_set.get_view(0, n_u));
   stokes_partitioning.push_back(stokes_index_set.get_view(n_u, n_u + n_p));
 
-  IndexSet stokes_relevant_set;
-  DoFTools::extract_locally_relevant_dofs(stokes_dof_handler,
-                                          stokes_relevant_set);
+  const IndexSet stokes_relevant_set =
+    DoFTools::extract_locally_relevant_dofs(stokes_dof_handler);
   stokes_relevant_partitioning.push_back(stokes_relevant_set.get_view(0, n_u));
   stokes_relevant_partitioning.push_back(
     stokes_relevant_set.get_view(n_u, n_u + n_p));
@@ -185,9 +184,8 @@ test_LA_Trilinos()
   stokes_partitioning.push_back(stokes_index_set.get_view(0, n_u));
   stokes_partitioning.push_back(stokes_index_set.get_view(n_u, n_u + n_p));
 
-  IndexSet stokes_relevant_set;
-  DoFTools::extract_locally_relevant_dofs(stokes_dof_handler,
-                                          stokes_relevant_set);
+  const IndexSet stokes_relevant_set =
+    DoFTools::extract_locally_relevant_dofs(stokes_dof_handler);
   stokes_relevant_partitioning.push_back(stokes_relevant_set.get_view(0, n_u));
   stokes_relevant_partitioning.push_back(
     stokes_relevant_set.get_view(n_u, n_u + n_p));
index a8e2b61cd68cb1098514bef84fa2c54440721939..cde0c1c6ee29c29618fa5e489837482f52e3386b 100644 (file)
@@ -82,8 +82,8 @@ test()
   std::vector<IndexSet> locally_relevant_partitioning;
   std::vector<IndexSet> locally_owned_partitioning;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
   locally_relevant_partitioning.push_back(
     locally_relevant_dofs.get_view(0, dofs_per_block[0]));
   locally_relevant_partitioning.push_back(
@@ -187,8 +187,8 @@ test_alt()
   std::vector<IndexSet> locally_relevant_partitioning;
   std::vector<IndexSet> locally_owned_partitioning;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
   locally_relevant_partitioning.push_back(
     locally_relevant_dofs.get_view(0, dofs_per_block[0]));
   locally_relevant_partitioning.push_back(
index d9c12d35164c4a6e229c502d3b177eb445889cc0..5ec9452e3e5d5557308a20dfc01951caccc4b39d 100644 (file)
@@ -70,9 +70,9 @@ test()
   DoFHandler<dim> dof_handler(triangulation);
   dof_handler.distribute_dofs(temperature_fe);
 
-  IndexSet owned = dof_handler.locally_owned_dofs();
-  IndexSet relevant;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, relevant);
+  const IndexSet &owned = dof_handler.locally_owned_dofs();
+  const IndexSet  relevant =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   // this causes a crash in PETSc, but is ignored in Trilinos:
   // DynamicSparsityPattern sp (owned);
index 79aa316312d9294ff59499f55fa603b31d5d9235..7909773f4f8d0c5266d1f4c7d56e16a53382d981 100644 (file)
@@ -71,9 +71,9 @@ test()
   DoFHandler<dim> dof_handler(triangulation);
   dof_handler.distribute_dofs(temperature_fe);
 
-  IndexSet owned = dof_handler.locally_owned_dofs();
-  IndexSet relevant;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, relevant);
+  const IndexSet &owned = dof_handler.locally_owned_dofs();
+  const IndexSet  relevant =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   DynamicSparsityPattern         sp(relevant);
   typename LA::MPI::SparseMatrix matrix;
index 5f1eaa0887f908714656e91cac6a697cbfe60bee..1e29415215aa29fb47e3cb4e9a5bb23fb7d3f133 100644 (file)
@@ -129,9 +129,8 @@ template <int dim, int spacedim>
 std::shared_ptr<const Utilities::MPI::Partitioner>
 create_partitioner(const DoFHandler<dim, spacedim> &dof_handler)
 {
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   return std::make_shared<const Utilities::MPI::Partitioner>(
     dof_handler.locally_owned_dofs(),
index d4431c903ccdb19e007b32e6b23ad986db58daec..3aa1458c9821c766472f8680fc387070e590230b 100644 (file)
@@ -86,10 +86,9 @@ create_mca_tria(const unsigned int   n_subdivisions,
   background_dof_handler.reinit(triangulation);
   background_dof_handler.distribute_dofs(fe);
 
-  VectorType ls_vector;
-  IndexSet   locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(background_dof_handler,
-                                          locally_relevant_dofs);
+  VectorType     ls_vector;
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(background_dof_handler);
 
 
   ls_vector.reinit(background_dof_handler.locally_owned_dofs(),
index d034f6a4eef5888fc17eaefcc517a7978936d1c4..47ef6e76e94a7dd79fbc2f789048c3e1776e26ce 100644 (file)
@@ -110,7 +110,6 @@ main(int argc, char *argv[])
   AffineConstraints<double> affine_constraints;
   const double              new_value = 2.;
 
-  locally_relevant_dofs.clear();
   locally_relevant_dofs = DoFTools::extract_locally_relevant_dofs(dof_handler);
   LinearAlgebra::distributed::Vector<double> new_solution(
     dof_handler.locally_owned_dofs(), locally_relevant_dofs, MPI_COMM_WORLD);
index e31064fc0efb885cf74a5ad527e0cf6f1fab4842..ba62bae0da034de25169317062796d359a58b595 100644 (file)
@@ -255,8 +255,7 @@ Laplace<dim>::setup_system()
 
   locally_owned_dofs = dof_handler.locally_owned_dofs();
 
-  locally_relevant_dofs.clear();
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  locally_relevant_dofs = DoFTools::extract_locally_relevant_dofs(dof_handler);
   AssertThrow(locally_relevant_dofs.n_elements() == dof_handler.n_dofs(),
               ExcInternalError());
 
index bbc373bd58ead4f2474c408c5658e1921cb84a33..fc0fcc33a06b80292f5989e9a678794e8107a863 100644 (file)
@@ -111,11 +111,11 @@ main(int argc, char **argv)
     if (cell->center()[0] > 0.5 && cell->center()[1] > 0.5)
       cell->set_material_id(1);
 
-  IndexSet locally_active_dofs;
-  DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
+  const IndexSet locally_active_dofs =
+    DoFTools::extract_locally_active_dofs(dof_handler);
   test(dof_handler, locally_active_dofs);
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
   test(dof_handler, locally_relevant_dofs);
 }
index 20fc9629fdb2933b572a5d0eba4e0425998a4e9c..7e3a40a7a46343715643c6a987c9658cd116c75e 100644 (file)
@@ -67,9 +67,8 @@ test(const bool hanging_nodes = true)
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 44985907ed50a2ab8ce17d0efbd6f6766969b112..fa98e6afc8aa4eceb4da3e55c471d080faa87a47 100644 (file)
@@ -193,10 +193,9 @@ Step4<dim>::setup_system()
                                            constraints);
   constraints.close();
 
-  IndexSet locally_owned_dofs = dof_handler.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   DynamicSparsityPattern dsp(dof_handler.n_dofs());
   DoFTools::make_sparsity_pattern(dof_handler, dsp, constraints, false);
index 0fe70ed77ff072cd13d0223899da86283a6691f4..46eee505f0c121ca007e5cbb45a594e5aa0513cd 100644 (file)
@@ -194,10 +194,9 @@ Step4<dim>::setup_system()
                                            constraints);
   constraints.close();
 
-  IndexSet locally_owned_dofs = dof_handler.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   DynamicSparsityPattern dsp(dof_handler.n_dofs());
   DoFTools::make_sparsity_pattern(dof_handler, dsp, constraints, false);
index 6ac032afd2b007dc66e7c5590a5f9f0835d18896..e7715096f979d2485890bb1d762cd251998822ed 100644 (file)
@@ -105,7 +105,7 @@ build_matrix_vector(TrilinosWrappers::BlockSparseMatrix &matrix,
   locally_owned_partitioning.push_back(
     locally_owned_dofs.get_view(dofs_per_block[0],
                                 dofs_per_block[0] + dofs_per_block[1]));
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  locally_relevant_dofs = DoFTools::extract_locally_relevant_dofs(dof_handler);
   locally_relevant_partitioning.push_back(
     locally_relevant_dofs.get_view(0, dofs_per_block[0]));
   locally_relevant_partitioning.push_back(
index 3c414b70f9b8ac6c888c95e1a3e4b216ae511803..e476902b579061825a53e47ab40a7ff4b0a9f515 100644 (file)
@@ -125,7 +125,8 @@ namespace Step40
     dof_handler.distribute_dofs(fe);
 
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     locally_relevant_solution.reinit(locally_owned_dofs,
                                      locally_relevant_dofs,
index 057c219ea4fd0e98328654f8a921a5bc66e825dd..35b77bdd93b04a965cd4bf2b90a6f7f24e7ee633 100644 (file)
@@ -125,7 +125,8 @@ namespace Step40
     dof_handler.distribute_dofs(fe);
 
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     locally_relevant_solution.reinit(locally_owned_dofs,
                                      locally_relevant_dofs,
index d4c2571ea21adf861049a4fd98de61972af06c61..c4856f38bd56d62f324ce92f4aa69fa11241852d 100644 (file)
@@ -126,7 +126,8 @@ namespace Step40
     dof_handler.distribute_dofs(fe);
 
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     locally_relevant_solution.reinit(locally_owned_dofs,
                                      locally_relevant_dofs,
index fd9a24110df0322786be450cef35b02e5fcfe7ca..c7a29a3cff032a8a5139c74801a625daf59f1b97 100644 (file)
@@ -126,7 +126,8 @@ namespace Step40
     dof_handler.distribute_dofs(fe);
 
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     locally_relevant_solution.reinit(locally_owned_dofs,
                                      locally_relevant_dofs,
index 238623c87a0ffb008e2eb1a16ebe5eb5d8db7c41..1d325d1e4444e3e2b3ac9f33a278dc9b2c5e9745 100644 (file)
@@ -126,7 +126,8 @@ namespace Step40
     dof_handler.distribute_dofs(fe);
 
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     locally_relevant_solution.reinit(locally_owned_dofs,
                                      locally_relevant_dofs,
index 93d83047983c13fa8c8c10b93be74439246d00a6..252be2ff7dbf57face8c555846699b22e5a0ee06 100644 (file)
@@ -126,7 +126,8 @@ namespace Step40
     dof_handler.distribute_dofs(fe);
 
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     locally_relevant_solution.reinit(locally_owned_dofs,
                                      locally_relevant_dofs,
index 82ba843d5f077b5fa42933f497606d269b110176..2407f24012e7b6ab0639a0187d0aaa6fcf958059 100644 (file)
@@ -94,8 +94,8 @@ test()
   dof_handler.distribute_dofs(fe);
 
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
   AffineConstraints<double> constraints;
   constraints.reinit(locally_relevant_dofs);
   DoFTools::make_hanging_node_constraints(dof_handler, constraints);
index 9dffd48c076b6345070dd08525e5498d7778770b..ab17de8a18c36aa813593c456014c64a80f83c1f 100644 (file)
@@ -65,8 +65,8 @@ test()
   // Create a Mapping
   LinearAlgebra::distributed::Vector<double> map_vector;
 
-  IndexSet locally_relevant_euler;
-  DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_euler);
+  const IndexSet locally_relevant_euler =
+    DoFTools::extract_locally_relevant_dofs(dh);
   map_vector.reinit(dh.locally_owned_dofs(),
                     locally_relevant_euler,
                     MPI_COMM_WORLD);
index 6bea526fef720fa5eda36edadd5bf59fc0e73406..13e32047dff8d13813e4425f8bd96759c8cf06ee 100644 (file)
@@ -75,8 +75,8 @@ test()
                                 update_quadrature_points);
   for (unsigned int level = 0; level < tria.n_global_levels(); ++level)
     {
-      IndexSet relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dh, level, relevant_dofs);
+      const IndexSet relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dh, level);
       level_vectors[level].reinit(dh.locally_owned_mg_dofs(level),
                                   relevant_dofs,
                                   tria.get_communicator());
index 7c8d5ff98d1ebfcdb066b55cb1a7834992540c4b..565d30bac19498f1a62878e490be9a78e0ff04a6 100644 (file)
@@ -76,8 +76,8 @@ do_test(const unsigned int degree,
   dof_handler.distribute_dofs(fe);
   dof_handler.distribute_mg_dofs();
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
   LinearAlgebra::distributed::Vector<double> vector(
     dof_handler.locally_owned_dofs(),
     locally_relevant_dofs,
index d53ee1e8551b63497dc118231f4e6b8e86905dad..fa7e41ea8d8669d391e11a64ab1b8b62dc6af577 100644 (file)
@@ -106,9 +106,9 @@ test()
   DoFHandler<dim> dof_handler(triangulation);
   dof_handler.distribute_dofs(fe);
 
-  IndexSet locally_owned_dofs = dof_handler.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   PETScWrappers::MPI::Vector x(locally_owned_dofs, MPI_COMM_WORLD);
   PETScWrappers::MPI::Vector x_relevant(locally_owned_dofs,
index cb6dd8f4df41f42daba8419e6891b52d0b5bcaed..3acb35c37bc5dba2189ff94852731cede9b7fc4b 100644 (file)
@@ -158,13 +158,12 @@ test(const unsigned int n_ref = 0)
 
   const IndexSet &locally_owned_dofs_euler =
     dof_handler_euler.locally_owned_dofs();
-  IndexSet locally_relevant_dofs_euler;
-  DoFTools::extract_locally_relevant_dofs(dof_handler_euler,
-                                          locally_relevant_dofs_euler);
+  const IndexSet locally_relevant_dofs_euler =
+    DoFTools::extract_locally_relevant_dofs(dof_handler_euler);
 
   const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
-  IndexSet        locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   // constraints:
   AffineConstraints<double> constraints_euler;
@@ -211,10 +210,8 @@ test(const unsigned int n_ref = 0)
   // all relevant ghost indices is required to certain meshes.
   for (unsigned int level = min_level; level <= max_level; ++level)
     {
-      IndexSet relevant_mg_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof_handler_euler,
-                                                    level,
-                                                    relevant_mg_dofs);
+      const IndexSet relevant_mg_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof_handler_euler, level);
       displacement_level[level].reinit(dof_handler_euler.locally_owned_mg_dofs(
                                          level),
                                        relevant_mg_dofs,
@@ -294,10 +291,8 @@ test(const unsigned int n_ref = 0)
         update_quadrature_points;
 
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                    level,
-                                                    relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index e2afef3edd340fdcf07b56ef97a9f34458f60018..3d5eb7b49846645effaf80375dd3b10c0b466b22 100644 (file)
@@ -102,13 +102,12 @@ test()
   // IndexSets and constraints
   const IndexSet &locally_owned_dofs_euler =
     dof_handler_euler.locally_owned_dofs();
-  IndexSet locally_relevant_dofs_euler;
-  DoFTools::extract_locally_relevant_dofs(dof_handler_euler,
-                                          locally_relevant_dofs_euler);
+  const IndexSet locally_relevant_dofs_euler =
+    DoFTools::extract_locally_relevant_dofs(dof_handler_euler);
 
   const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
-  IndexSet        locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   // constraints:
   AffineConstraints<double> constraints_euler;
index 35ca3eac2738f9ea97f307178d006ff4af1bbfab..6cff8c310890db69184af359750661cb573f2902 100644 (file)
@@ -105,9 +105,9 @@ test()
   DoFHandler<dim> dof_handler(triangulation);
   dof_handler.distribute_dofs(fe);
 
-  IndexSet locally_owned_dofs = dof_handler.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   TrilinosWrappers::MPI::Vector x(locally_owned_dofs, MPI_COMM_WORLD);
   TrilinosWrappers::MPI::Vector x_relevant(locally_owned_dofs,
index f8d33d22e4f0817818cc0905c9276b0ab564883e..162be31bc7b190551e73ccb1489fe898a98a77ba 100644 (file)
@@ -200,13 +200,12 @@ test(const unsigned int n_ref = 0)
   // IndexSets and constraints
   const IndexSet &locally_owned_dofs_euler =
     dof_handler_euler.locally_owned_dofs();
-  IndexSet locally_relevant_dofs_euler;
-  DoFTools::extract_locally_relevant_dofs(dof_handler_euler,
-                                          locally_relevant_dofs_euler);
+  const IndexSet locally_relevant_dofs_euler =
+    DoFTools::extract_locally_relevant_dofs(dof_handler_euler);
 
   const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
-  IndexSet        locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   // constraints:
   AffineConstraints<double> constraints_euler;
@@ -253,10 +252,8 @@ test(const unsigned int n_ref = 0)
   // the bug observed.
   for (unsigned int level = min_level; level <= max_level; ++level)
     {
-      IndexSet relevant_mg_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof_handler_euler,
-                                                    level,
-                                                    relevant_mg_dofs);
+      const IndexSet relevant_mg_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof_handler_euler, level);
       displacement_level[level].reinit(dof_handler_euler.locally_owned_mg_dofs(
                                          level),
                                        relevant_mg_dofs,
@@ -335,10 +332,8 @@ test(const unsigned int n_ref = 0)
         update_quadrature_points;
 
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                    level,
-                                                    relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index 62b78bb51f182be880870bfa7f109c6a08f7e79a..6b56f8c948d58df39c4f517f4a435bc22c5fab7f 100644 (file)
@@ -146,8 +146,8 @@ test()
   for (unsigned int level = 0; level <= max_level; ++level)
     {
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index 8429658f975d5873bd8fe8bc34b8c2d475e3f566..5b218bf513df8315ba4765737568a354a16e56ec 100644 (file)
@@ -67,8 +67,8 @@ test()
   dof_handler.distribute_dofs(fe);
 
   AffineConstraints<Number> constraints;
-  IndexSet                  locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet            locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   constraints.reinit(locally_relevant_dofs);
 
index 4e00afe432fce96be0fa700d05d170ad926e848b..dcf673cc8662965a7a27f20476d110f2e6867214 100644 (file)
@@ -73,9 +73,8 @@ test(const bool adaptive_ref = true)
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 6368058387ea34b7418229488fcf149352b75d08..b2325831f739e7dbe208fac0e101bc0bca8ff26b 100644 (file)
@@ -75,9 +75,8 @@ test(const bool adaptive_ref = true)
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 1d30f8e38e2e2f32e4d010e9383567f489bbeadf..7ea0d30653abb409f3503f4210ec76d9f03187af 100644 (file)
@@ -126,9 +126,11 @@ test(const unsigned int n_glob_ref = 2, const unsigned int n_ref = 0)
   dof_handler.distribute_dofs(fe);
   dof_handler.distribute_mg_dofs();
 
-  IndexSet locally_owned_dofs, locally_relevant_dofs;
-  locally_owned_dofs = dof_handler.locally_owned_dofs();
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
+
+
 
   // constraints:
   AffineConstraints<double> constraints;
@@ -191,8 +193,8 @@ test(const unsigned int n_glob_ref = 2, const unsigned int n_ref = 0)
     level_projection(min_level, max_level);
   for (unsigned int level = min_level; level <= max_level; ++level)
     {
-      IndexSet set;
-      DoFTools::extract_locally_relevant_level_dofs(dof_handler, level, set);
+      const IndexSet set =
+        DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
       level_projection[level].reinit(dof_handler.locally_owned_mg_dofs(level),
                                      set,
                                      mpi_communicator);
index 951cd611a8809a0c9d9641f47de64e16894be362..5a9a442963e9b359067a7cac404257337b1b3758 100644 (file)
@@ -88,9 +88,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index cfa713ab628df55544712dfdf064bddfd47991f2..8d2c31fc4c98a12748688e2fe34a38574ea5c434 100644 (file)
@@ -129,9 +129,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index b17b20469be8217ebbce855b9b59d94e26dd2eb2..f0b418ea30619ead87f4024338f48a28e6c3e898 100644 (file)
@@ -83,9 +83,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 6460fc584d6962f4d270324ac88d903ae6902a56..2f0a177c1b9d5b32aa6211c9fe3297be1bc94ab9 100644 (file)
@@ -89,9 +89,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 4d2dcca3b6783a2b5a5f0b7fb7d4416876205553..6633c22a3b408b383169f048fd7bb4035c3d87ad 100644 (file)
@@ -95,9 +95,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 259f5b9167dd9def99b6667b9770bc282e9f786f..222ca38f85f4658c650f7b2880a6f84b439fe14c 100644 (file)
@@ -60,9 +60,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index af52f3bca1fb69e245d63fde727463f4e332448d..68fe5f06ab399ee0d142fd9385ed074be4d92df5 100644 (file)
@@ -61,9 +61,8 @@ test()
   DoFHandler<dim>        dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index c6dae574018c7b5a7f38f6639cc65a4d76d7a713..f3a5dd15b4bf387a9f113e1bf66c3f90a6b5aec4 100644 (file)
@@ -55,9 +55,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints_0(relevant_set),
     constraints_1(relevant_set);
index be9827e86d1813a3f2564c0b99e2baae754f1326..175bf0be1b94d6cb0bf8f78ce2a443ca558c489d 100644 (file)
@@ -74,9 +74,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   deallog << "locally owned dofs :" << std::endl;
   owned_set.print(deallog.get_file_stream());
index b3b7b040d964f702a3807ae949168d85b60da7c8..daaed8f69dd59e5641c8dd79eb9b8d0f6398de8c 100644 (file)
@@ -91,9 +91,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 9b79c0aa027870c700de700c352b6e429963d4ff..5e9bde03c50274e68744644764e6047c59074110 100644 (file)
@@ -93,9 +93,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index b96b9dc104094679b36de444ee770597511ebd3f..30e079e2dfd7886fd2bacfb377511d823c49d391 100644 (file)
@@ -87,9 +87,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 846dfd6fb96fd2f26cceb194e37c2799ecb027cb..0460aa526c97915d6bf524d4b4ebd2917a1345d6 100644 (file)
@@ -93,9 +93,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 17ce91d662805e04fdbebbd7b5607a941fcf67ff..725752adb71c30fad5c29467545e46a808be7a36 100644 (file)
@@ -99,9 +99,8 @@ test()
       }
   dof.distribute_dofs(fe_collection);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 3cefe101aeeb627216e5edaebb48ae1f23e64cc2..b49ebce4be31249f9d3350f5d3e5589e6bda2f67 100644 (file)
@@ -92,9 +92,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index cc290764a416509b333f52e26095e716e3c93813..a4b77cd73b80ac6787764b320b0f404a6b288428 100644 (file)
@@ -50,9 +50,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   deallog << "locally owned dofs :" << std::endl;
   owned_set.print(deallog.get_file_stream());
index efe6627224f3acdf326a60ea4efa8daef395de89..833f348694fd66f741f55c04e6fa4327c5698f70 100644 (file)
@@ -87,9 +87,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index e7fec6190b19c86b4864d384b6f7f0078e20e21b..22f8f890c26d07e2908c2e643be35bca263b88a6 100644 (file)
@@ -152,9 +152,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index d152f465323adba3ed26787c79f07ee1b6757ef3..16ac71a430be90b7be9490b4490b49c7e177adb8 100644 (file)
@@ -150,9 +150,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 3e97adc2484f5ca07f5977f6478657823b2a3add..b511af5ba8cf6f58616ffe09807ad403b111097b 100644 (file)
@@ -88,9 +88,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 014cb0229ee5f7a717077e1c91c67ebd5ad094e3..4a3a00795785bbb0d7fb1e143ac97f756ebbb464 100644 (file)
@@ -153,9 +153,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 1b8adef0e30c6c36f388143159bdf01140c731a2..5a4cadd5f494821e9e967eea32d08d6d13fb7fcb 100644 (file)
@@ -165,9 +165,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 205432a45d67e5d4c69cc5cbedf216c3dde2d18c..c823c8caad29d9cc42f13a9b59214ec2491ae3f4 100644 (file)
@@ -133,9 +133,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index e09319e101b8776e9aaef8f78ccbdaa0b39cacf0..8c4789c2b63e386ece1e56d24751f5204a721b27 100644 (file)
@@ -73,9 +73,8 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 50d072b78d95618c81c6904345454cd430207225..3cd4eae9e8b994231db0c18d266990bb3394cb10 100644 (file)
@@ -98,8 +98,8 @@ do_test(const DoFHandler<dim> &dof)
   deallog << std::endl;
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
 
   // Dirichlet BC
   Functions::ZeroFunction<dim>                        zero_function;
@@ -173,8 +173,8 @@ do_test(const DoFHandler<dim> &dof)
       mg_additional_data.mg_level = level;
 
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index 0409abb4bf43e937bcce10db40b86aa063fd814d..fa5e8bb7f7b68a5de08edfe95363f01291153043 100644 (file)
@@ -78,8 +78,8 @@ public:
     AffineConstraints<double> constraints;
     if (level == numbers::invalid_unsigned_int)
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_dofs(dof_handler);
         constraints.reinit(relevant_dofs);
         DoFTools::make_hanging_node_constraints(dof_handler, constraints);
         VectorTools::interpolate_boundary_values(dof_handler,
@@ -88,10 +88,8 @@ public:
       }
     else
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                      level,
-                                                      relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
         constraints.reinit(relevant_dofs);
         constraints.add_lines(mg_constrained_dofs.get_boundary_indices(level));
 
@@ -479,8 +477,8 @@ do_test(const DoFHandler<dim> &dof)
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
   AffineConstraints<double> hanging_node_constraints;
-  IndexSet                  locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet            locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
   hanging_node_constraints.reinit(locally_relevant_dofs);
   DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
   hanging_node_constraints.close();
index 27702a52e54c521131f99a5ff32f2ac74ada04f3..608e6096bf308a67d86f7787eb6abb1ced9c1cdd 100644 (file)
@@ -99,8 +99,8 @@ do_test(const DoFHandler<dim> &dof)
   deallog << std::endl;
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
 
   // Dirichlet BC
   Functions::ZeroFunction<dim>                        zero_function;
@@ -187,8 +187,8 @@ do_test(const DoFHandler<dim> &dof)
       mg_additional_data.mg_level         = level;
 
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index a0aeb74fdee8346eced0855d5b44175e488c7e16..60d6b9f0045a7360b1621c58ab372430c599ea75 100644 (file)
@@ -85,8 +85,8 @@ public:
     AffineConstraints<double> constraints;
     if (level == numbers::invalid_unsigned_int)
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_dofs(dof_handler);
         constraints.reinit(relevant_dofs);
         DoFTools::make_hanging_node_constraints(dof_handler, constraints);
         VectorTools::interpolate_boundary_values(dof_handler,
@@ -95,10 +95,8 @@ public:
       }
     else
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                      level,
-                                                      relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
         constraints.reinit(relevant_dofs);
         constraints.add_lines(mg_constrained_dofs.get_boundary_indices(level));
 
@@ -483,8 +481,8 @@ do_test(const DoFHandler<dim> &dof, const bool threaded)
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
   AffineConstraints<double> hanging_node_constraints;
-  IndexSet                  locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet            locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
   hanging_node_constraints.reinit(locally_relevant_dofs);
   DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
   hanging_node_constraints.close();
index 7f2a078e5d2109af7c42abd8cc7bf65c311c8a09..5c2825efc92b40e6d31ed5f792bbf659578665ad 100644 (file)
@@ -99,8 +99,8 @@ do_test(const DoFHandler<dim> &dof)
   deallog << std::endl;
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
 
   // Dirichlet BC
   Functions::ZeroFunction<dim>                        zero_function;
@@ -187,8 +187,8 @@ do_test(const DoFHandler<dim> &dof)
       mg_additional_data.mg_level         = level;
 
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index c1440906fe57645cfa97779664c7251ac0ec0294..72524cf2750cbcf78efcebef52c30bcf84459f2f 100644 (file)
@@ -82,8 +82,8 @@ public:
     AffineConstraints<double> constraints;
     if (level == numbers::invalid_unsigned_int)
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_dofs(dof_handler);
         constraints.reinit(relevant_dofs);
         DoFTools::make_hanging_node_constraints(dof_handler, constraints);
         VectorTools::interpolate_boundary_values(dof_handler,
@@ -92,10 +92,8 @@ public:
       }
     else
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                      level,
-                                                      relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
         constraints.reinit(relevant_dofs);
         constraints.add_lines(mg_constrained_dofs.get_boundary_indices(level));
 
@@ -480,8 +478,8 @@ do_test(const DoFHandler<dim> &dof, const bool threaded)
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
   AffineConstraints<double> hanging_node_constraints;
-  IndexSet                  locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet            locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
   hanging_node_constraints.reinit(locally_relevant_dofs);
   DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
   hanging_node_constraints.close();
index a8f0c1120c1dd8c096872947635ecc06878530b6..acdd2292d01828d6d24beadc16d3616b8f7f1d54 100644 (file)
@@ -221,8 +221,8 @@ do_test(const DoFHandler<dim> &dof, const unsigned int nb)
   deallog << std::endl;
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
 
   // Dirichlet BC
   Functions::ZeroFunction<dim>                        zero_function;
@@ -315,8 +315,8 @@ do_test(const DoFHandler<dim> &dof, const unsigned int nb)
       mg_additional_data.mg_level         = level;
 
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index 0b84c0af4d6d5028a3e73e77c3e436bc7f1987ac..8ef97b95e29d3ce7e716ef138fdd8dedbeed1ae6 100644 (file)
@@ -100,8 +100,8 @@ do_test(const DoFHandler<dim> &dof)
   deallog << std::endl;
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
 
   // Dirichlet BC
   Functions::ZeroFunction<dim>                        zero_function;
@@ -188,8 +188,8 @@ do_test(const DoFHandler<dim> &dof)
       mg_additional_data.mg_level         = level;
 
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index e19da14eb4d971d7b2d8197f1c13c67c924c9414..06164975aa566e87a053107592783324e5ed2202 100644 (file)
@@ -241,7 +241,7 @@ do_test(const std::vector<const DoFHandler<dim> *> &dof)
 
   std::vector<IndexSet> locally_relevant_dofs(dof.size());
   for (unsigned int i = 0; i < dof.size(); ++i)
-    DoFTools::extract_locally_relevant_dofs(*dof[i], locally_relevant_dofs[i]);
+    locally_relevant_dofs[i] = DoFTools::extract_locally_relevant_dofs(*dof[i]);
 
   // Dirichlet BC
   Functions::ZeroFunction<dim>                        zero_function;
@@ -349,10 +349,8 @@ do_test(const std::vector<const DoFHandler<dim> *> &dof)
         dof.size());
       for (unsigned int i = 0; i < dof.size(); ++i)
         {
-          IndexSet relevant_dofs;
-          DoFTools::extract_locally_relevant_level_dofs(*dof[i],
-                                                        level,
-                                                        relevant_dofs);
+          const IndexSet relevant_dofs =
+            DoFTools::extract_locally_relevant_level_dofs(*dof[i], level);
           level_constraints[i].reinit(relevant_dofs);
           level_constraints[i].add_lines(
             mg_constrained_dofs[i].get_boundary_indices(level));
index b4de021bf90bce96ead166e71ca91718be40a343..0262fdebaf0fd957b467b3fd52a986db46448302 100644 (file)
@@ -217,8 +217,8 @@ do_test(const DoFHandler<dim> &dof)
   deallog << std::endl;
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
 
   // Dirichlet BC
   Functions::ZeroFunction<dim>                        zero_function;
@@ -295,8 +295,8 @@ do_test(const DoFHandler<dim> &dof)
       mg_additional_data.mg_level         = level;
 
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index 0628037a826fce30be2dc46f90633f54075c70dd..cda324b67ff0b5b7109390a7c6752405f418f1d8 100644 (file)
@@ -105,8 +105,8 @@ do_test(const DoFHandler<dim> &dof)
   dirichlet_boundary[0] = &zero_function;
 
   // fine-level constraints
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
   AffineConstraints<double> constraints;
   constraints.reinit(locally_relevant_dofs);
   VectorTools::interpolate_boundary_values(dof,
@@ -160,8 +160,8 @@ do_test(const DoFHandler<dim> &dof)
       mg_additional_data.mg_level         = level;
 
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index d762500194dcf0191c5ffd4e420bfbdda578db96..34ad115e19b519e771fb6f36be237a666e3d9aab 100644 (file)
@@ -141,8 +141,7 @@ test()
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
   AffineConstraints<double> constraints;
-  IndexSet                  relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_dofs);
+  const IndexSet relevant_dofs = DoFTools::extract_locally_relevant_dofs(dof);
   constraints.reinit(relevant_dofs);
   VectorTools::interpolate_boundary_values(dof,
                                            0,
index df403f88628d2702010c43cf415b63c1d551fef7..536fc3779ad388e4088b80c739a1efc1ce42196c 100644 (file)
@@ -201,14 +201,14 @@ test(const unsigned int fe_degree)
     MatrixFree<dim, number>::AdditionalData::none;
 
   {
-    DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+    relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
     constraints.close();
 
     DoFRenumbering::matrix_free_data_locality(dof, constraints, addit_data);
   }
 
   constraints.clear();
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
   constraints.close();
 
   const QGauss<1>         quadrature(dof.get_fe().degree + 1);
index a33f058ab1eecd45fa4fca7fe215fd396f0adaa2..fb203c6eb6134157e2d7034411c4152e024ad90a 100644 (file)
@@ -399,8 +399,8 @@ namespace Step37
     pcout << "Number of degrees of freedom: " << dof_handler.n_dofs()
           << std::endl;
 
-    IndexSet locally_relevant_dofs;
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    const IndexSet locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     constraints.clear();
     constraints.reinit(locally_relevant_dofs);
@@ -442,10 +442,8 @@ namespace Step37
 
     for (unsigned int level = 0; level < nlevels; ++level)
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                      level,
-                                                      relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
         AffineConstraints<double> level_constraints;
         level_constraints.reinit(relevant_dofs);
         level_constraints.add_lines(
index d61996a510f22cf067df5f1ca0cd18619c8d3692..4969e4aa76a9cbba08d04e3b185806c351aa42b0 100644 (file)
@@ -294,7 +294,8 @@ namespace Step48
             << std::endl;
 
 
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
     constraints.clear();
     constraints.reinit(locally_relevant_dofs);
     DoFTools::make_hanging_node_constraints(dof_handler, constraints);
index 5a21efb4f629c8daadeb21be243619a69316e4ec..79f9bba504d4c5c46d54ed88ce8d8fed87558e97 100644 (file)
@@ -261,7 +261,8 @@ namespace Step48
             << std::endl;
 
 
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
     constraints.close();
 
     QGaussLobatto<1>                         quadrature(fe_degree + 1);
index 8794f3df2a84be16e1f2f8bc2a3ad85858ddf7bd..d93ba4ef9c0c851df8090316fce6a1d3c52200ca 100644 (file)
@@ -264,7 +264,8 @@ namespace Step48
             << std::endl;
 
 
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
     constraints.clear();
     constraints.reinit(locally_relevant_dofs);
     DoFTools::make_hanging_node_constraints(dof_handler, constraints);
index f6cf098152075d88ff523e547ceec6ccd46d4e0b..b21519687475e913e8aef07de5b2274c01e58d3c 100644 (file)
@@ -1035,9 +1035,8 @@ namespace StokesClass
     dof_handler_p.clear();
     dof_handler_p.distribute_dofs(fe_p);
 
-    IndexSet locally_relevant_dofs_u;
-    DoFTools::extract_locally_relevant_dofs(dof_handler_u,
-                                            locally_relevant_dofs_u);
+    const IndexSet locally_relevant_dofs_u =
+      DoFTools::extract_locally_relevant_dofs(dof_handler_u);
     constraints_u.reinit(locally_relevant_dofs_u);
     DoFTools::make_hanging_node_constraints(dof_handler_u, constraints_u);
 
@@ -1045,9 +1044,8 @@ namespace StokesClass
       dof_handler_u, 0, ExactSolution_BoundaryValues_u<dim>(), constraints_u);
     constraints_u.close();
 
-    IndexSet locally_relevant_dofs_p;
-    DoFTools::extract_locally_relevant_dofs(dof_handler_p,
-                                            locally_relevant_dofs_p);
+    const IndexSet locally_relevant_dofs_p =
+      DoFTools::extract_locally_relevant_dofs(dof_handler_p);
     constraints_p.reinit(locally_relevant_dofs_p);
     DoFTools::make_hanging_node_constraints(dof_handler_p, constraints_p);
     constraints_p.close();
@@ -1112,10 +1110,8 @@ namespace StokesClass
 
     for (unsigned int level = 0; level < n_levels; ++level)
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_level_dofs(dof_handler_u,
-                                                      level,
-                                                      relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_level_dofs(dof_handler_u, level);
         AffineConstraints<double> level_constraints;
         level_constraints.reinit(relevant_dofs);
         level_constraints.add_lines(
@@ -1173,9 +1169,8 @@ namespace StokesClass
 
     // Create constraints with no Dirchlet info
     AffineConstraints<double> constraints_u_no_dirchlet;
-    IndexSet                  locally_relevant_dofs_u;
-    DoFTools::extract_locally_relevant_dofs(dof_handler_u,
-                                            locally_relevant_dofs_u);
+    const IndexSet            locally_relevant_dofs_u =
+      DoFTools::extract_locally_relevant_dofs(dof_handler_u);
     constraints_u_no_dirchlet.reinit(locally_relevant_dofs_u);
     DoFTools::make_hanging_node_constraints(dof_handler_u,
                                             constraints_u_no_dirchlet);
index b112127e14eb0092dff5d3be8ee6a6e4a427ea56..cb3881f38e7bc0ad5240e26facc7564a2aab920e 100644 (file)
@@ -231,8 +231,8 @@ namespace Step50
     mg_dof_handler.distribute_dofs(fe);
     mg_dof_handler.distribute_mg_dofs();
 
-    DoFTools::extract_locally_relevant_dofs(mg_dof_handler,
-                                            locally_relevant_set);
+    locally_relevant_set =
+      DoFTools::extract_locally_relevant_dofs(mg_dof_handler);
 
     solution.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
     system_rhs.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
@@ -362,10 +362,8 @@ namespace Step50
     for (unsigned int level = 0; level < triangulation.n_global_levels();
          ++level)
       {
-        IndexSet dofset;
-        DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler,
-                                                      level,
-                                                      dofset);
+        const IndexSet dofset =
+          DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler, level);
         boundary_constraints[level].reinit(dofset);
         boundary_constraints[level].add_lines(
           mg_constrained_dofs.get_refinement_edge_indices(level));
index aee1b17bc8c411f6ad208c28a16004c6955ab369..913befae61bfdf4ad58ee9c139c018f2db32968a 100644 (file)
@@ -73,8 +73,7 @@ test()
                                              MPI_COMM_WORLD);
   VectorTools::interpolate(dofh, LinearFunction<dim>(), interpolated);
 
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
   TrilinosWrappers::MPI::Vector x_rel(relevant_set, MPI_COMM_WORLD);
   x_rel = interpolated;
 
index 52bda4e4f3aa1073ed5d9a1a645232f40262a813..c1a09beec3a0b0a946ccf479c6369cb9167be77a 100644 (file)
@@ -94,8 +94,7 @@ test()
     dofh.distribute_dofs(fe_collection);
   }
 
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
   TrilinosWrappers::MPI::Vector x_rel(relevant_set, dofh.get_communicator());
   {
     TrilinosWrappers::MPI::Vector interpolated(dofh.locally_owned_dofs(),
index 0db5b86d37c27a6d67e6323956bd98a5b8e4f37e..34047262bc959033af47f6da42839a04174f6720 100644 (file)
@@ -75,9 +75,9 @@ test()
   DoFTools::make_hanging_node_constraints(dof_handler, constraints);
   constraints.close();
 
-  IndexSet locally_owned_dofs, locally_relevant_dofs;
-  locally_owned_dofs = dof_handler.locally_owned_dofs();
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   PETScWrappers::MPI::Vector vec(locally_owned_dofs, MPI_COMM_WORLD);
   PETScWrappers::MPI::Vector vec_ghosted(locally_owned_dofs,
index 6d9019d5a09e1c692d05bfcc83501a4645376e41..bf3cbed9a82dd3ac756bc203ac9063af6f4612c7 100644 (file)
@@ -47,10 +47,9 @@ test()
 
   dof_handler.distribute_dofs(fe);
 
-  IndexSet locally_owned_dofs;
-  locally_owned_dofs = dof_handler.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   PETScWrappers::MPI::Vector force;
   force.reinit(locally_owned_dofs, mpi_communicator);
index 33e1a8b2366b549caaa6b317bb650b30c2c00cff..a30882272c322d12ea0bac07511e7b5cad4fc4a1 100644 (file)
@@ -80,10 +80,9 @@ test()
 
   dofh.distribute_dofs(fe);
 
-  IndexSet owned_set = dofh.locally_owned_dofs();
+  const IndexSet &owned_set = dofh.locally_owned_dofs();
 
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
 
   TrilinosWrappers::MPI::Vector x;
   x.reinit(owned_set, MPI_COMM_WORLD);
index a72cd12c0460709e9eca0d180cfbaea2b2c42e78..0210192175436991395cf7f27e333df6e4f66a47 100644 (file)
@@ -50,13 +50,11 @@ check(parallel::distributed::Triangulation<dim> &tria)
 
   dof_handler.distribute_dofs(fe);
 
-  IndexSet locally_owned_dofs = dof_handler.locally_owned_dofs();
-  IndexSet locally_active_dofs;
-
-  DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
-
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
+  const IndexSet  locally_active_dofs =
+    DoFTools::extract_locally_active_dofs(dof_handler);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   AffineConstraints<double> constraints;
 
index 8126433d641021a689d1965fafc85273b0f05c1c..76ad1f756c6da2b6b985f666610ad36a9f05a497 100644 (file)
@@ -77,8 +77,8 @@ test()
   AffineConstraints<double> constraints;
   DoFTools::make_hanging_node_constraints(dof_handler, constraints);
 
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_set);
+  const IndexSet relevant_set =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
   deallog << "relevant set:" << std::endl;
   relevant_set.print(deallog.get_file_stream());
   deallog << "constraints:" << std::endl;
index c8239076f0689b28906ca21a4d67a5fbfbae1b28..e0f78f77d3e5cb80fc8be40394f0c4121f50df2b 100644 (file)
@@ -114,7 +114,8 @@ namespace pdd
 
     // Initialize the solution
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
     locally_relevant_solution.reinit(locally_owned_dofs, mpi_communicator);
 
     locally_relevant_solution = 0;
index 51e337f81ba1135b8ea142b9b54235b7c9cfd064..cc68bd35f06b4cf5bf1b7c82d3a61aedafb8b4e4 100644 (file)
@@ -80,7 +80,8 @@ main(int argc, char *argv[])
     IndexSet                           locally_relevant_dofs;
 
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
     locally_relevant_sol.reinit(locally_owned_dofs,
                                 locally_relevant_dofs,
                                 mpi_communicator);
index 400c18af1abac84619759e475383421f10e195db..45f3e80107c4c96dc6a0743f6ff054182b1ad689 100644 (file)
@@ -74,8 +74,8 @@ test()
   DoFHandler<dim> dofh(tr);
   dofh.distribute_dofs(fe);
 
-  IndexSet locally_relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, locally_relevant_set);
+  const IndexSet locally_relevant_set =
+    DoFTools::extract_locally_relevant_dofs(dofh);
 
   TrilinosWrappers::MPI::Vector vec(dofh.locally_owned_dofs(), MPI_COMM_WORLD);
   for (unsigned int i = vec.local_range().first; i < vec.local_range().second;
index c0dfe91614bedd35afbff091357594eb8cc18df9..c10558dde4829b414d06dd1f934989868b6632d7 100644 (file)
@@ -72,8 +72,8 @@ test()
   DoFHandler<dim> dofh(tr);
   dofh.distribute_dofs(fe);
 
-  IndexSet locally_relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, locally_relevant_set);
+  const IndexSet locally_relevant_set =
+    DoFTools::extract_locally_relevant_dofs(dofh);
 
   // create a vector representing a function that is independent of the number
   // of processors involved
index 5ccf4340be30f4ff343efbe099c3d38203fc641e..36ec73ea5f3b19c4e652dbf92824a1be2877f218 100644 (file)
@@ -108,7 +108,8 @@ namespace LinearAdvectionTest
   {
     dof_handler.distribute_dofs(fe);
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     DynamicSparsityPattern dynamic_sparsity_pattern(locally_relevant_dofs);
     Table<2, DoFTools::Coupling> cell_integral_mask(fe.n_components(),
index a41da1323b69b0910e760ecf15d90aaf2dfce5fd..7b15092ee02146abdcddb5a1615530de4f230bf8 100644 (file)
@@ -50,8 +50,7 @@ test()
 
   // 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);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
   boundary_dofs.subtract_set(relevant_set);
   AssertThrow(boundary_dofs.n_elements() == 0, ExcInternalError());
 }
index 0fc28f00cda812382eb6644513f60bc4c5be58cc..3b00362782aa0db118e47a2718791f265236f83b 100644 (file)
@@ -51,8 +51,7 @@ test()
   DoFHandler<dim> dofh(tr);
   dofh.distribute_dofs(fe);
 
-  IndexSet locally_active;
-  DoFTools::extract_locally_active_dofs(dofh, locally_active);
+  const IndexSet locally_active = DoFTools::extract_locally_active_dofs(dofh);
 
   Assert(locally_active == DoFTools::dof_indices_with_subdomain_association(
                              dofh, tr.locally_owned_subdomain()),
index c6bfae7aa19405551807fb9531916de04cdf5d6d..fb72cd3b9224239ba489c60753cdc391432ebc99 100644 (file)
@@ -55,12 +55,10 @@ test()
   dofh.distribute_dofs(fe);
   dofh.distribute_mg_dofs();
 
-  IndexSet locally_level_active;
   for (unsigned int level = 0; level < tr.n_levels(); ++level)
     {
-      DoFTools::extract_locally_active_level_dofs(dofh,
-                                                  locally_level_active,
-                                                  level);
+      const IndexSet locally_level_active =
+        DoFTools::extract_locally_active_level_dofs(dofh, level);
 
       if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
         {
index 59c8701a80a3c9780ed4241ec27d3379c50f3d81..40d4092d04580e6c6998dec03b55a1e1b9906110 100644 (file)
@@ -76,8 +76,7 @@ test()
                                              MPI_COMM_WORLD);
   VectorTools::interpolate(dofh, LinearFunction<dim>(), interpolated);
 
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
   TrilinosWrappers::MPI::Vector x_rel(relevant_set, MPI_COMM_WORLD);
   x_rel = interpolated;
 
index 3c29b39a4c90a90f4cdcbd9f7c0b3bc7b2200a3e..da6244d5aad8fce72a791bda57a434d97b99d79c 100644 (file)
@@ -99,8 +99,7 @@ test()
                                              MPI_COMM_WORLD);
   VectorTools::interpolate(dofh, LinearFunction<dim>(), interpolated);
 
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
   TrilinosWrappers::MPI::Vector x_rel(relevant_set, MPI_COMM_WORLD);
   x_rel = interpolated;
 
index 87028a843fefc63b7550e5989f6d4152b9743f25..008e13bb3d58a5773c1513fddfae7a1e0d244ea3 100644 (file)
@@ -88,8 +88,7 @@ test()
                                              MPI_COMM_WORLD);
   VectorTools::interpolate(dofh, LinearFunction<dim>(), interpolated);
 
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
   TrilinosWrappers::MPI::Vector x_rel(relevant_set, MPI_COMM_WORLD);
   x_rel = interpolated;
 
index d3490acb0a90a638ede5d02175d77128daa37659..5ebf2d1d59ecf0c9d6730e94047783fe993d2611 100644 (file)
@@ -200,12 +200,12 @@ check_this(const FiniteElement<dim> &fe1, const FiniteElement<dim> &fe2)
   DoFTools::make_hanging_node_constraints(*dof2, cm2);
   cm2.close();
 
-  IndexSet locally_owned_dofs1 = dof1->locally_owned_dofs();
-  IndexSet locally_relevant_dofs1;
-  DoFTools::extract_locally_relevant_dofs(*dof1, locally_relevant_dofs1);
-  IndexSet locally_owned_dofs2 = dof2->locally_owned_dofs();
-  IndexSet locally_relevant_dofs2;
-  DoFTools::extract_locally_relevant_dofs(*dof2, locally_relevant_dofs2);
+  const IndexSet &locally_owned_dofs1 = dof1->locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs1 =
+    DoFTools::extract_locally_relevant_dofs(*dof1);
+  const IndexSet &locally_owned_dofs2 = dof2->locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs2 =
+    DoFTools::extract_locally_relevant_dofs(*dof2);
 
   VectorType in_ghosted =
     build_ghosted<VectorType>(locally_owned_dofs1, locally_relevant_dofs1);
@@ -331,12 +331,12 @@ check_this_dealii(const FiniteElement<dim> &fe1, const FiniteElement<dim> &fe2)
   DoFTools::make_hanging_node_constraints(*dof2, cm2);
   cm2.close();
 
-  IndexSet locally_owned_dofs1 = dof1->locally_owned_dofs();
-  IndexSet locally_relevant_dofs1;
-  DoFTools::extract_locally_relevant_dofs(*dof1, locally_relevant_dofs1);
-  IndexSet locally_owned_dofs2 = dof2->locally_owned_dofs();
-  IndexSet locally_relevant_dofs2;
-  DoFTools::extract_locally_relevant_dofs(*dof2, locally_relevant_dofs2);
+  const IndexSet &locally_owned_dofs1 = dof1->locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs1 =
+    DoFTools::extract_locally_relevant_dofs(*dof1);
+  const IndexSet &locally_owned_dofs2 = dof2->locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs2 =
+    DoFTools::extract_locally_relevant_dofs(*dof2);
 
   VectorType in_ghosted =
     build_ghosted<VectorType>(locally_owned_dofs1, locally_relevant_dofs1);
index a29f536fb6ec0130e44ef4c55928087eec18a83c..e52dfb60aa177a1bc249ac74960e9a5ac7c8b946 100644 (file)
@@ -115,7 +115,7 @@ namespace Step39
     dof_handler.distribute_dofs(fe);
     dof_handler.distribute_mg_dofs();
 
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_set);
+    locally_relevant_set = DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     DynamicSparsityPattern c_sparsity(dof_handler.n_dofs(),
                                       dof_handler.n_dofs());
index db1c4e7adbc0a1ca2fcf0d97fa243d0cff1fec4f..f4dbc43a2d74f0870df33f7e304f49801181d3b4 100644 (file)
@@ -102,8 +102,8 @@ test(const unsigned int degree_center,
   dh.distribute_dofs(fe_collection);
 
   // ---- constrain ----
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dh);
 
   AffineConstraints<double> constraints;
   constraints.clear();
@@ -117,8 +117,8 @@ test(const unsigned int degree_center,
   std::vector<IndexSet> locally_owned_dofs_per_processor =
     Utilities::MPI::all_gather(dh.get_communicator(), dh.locally_owned_dofs());
 
-  IndexSet locally_active_dofs;
-  DoFTools::extract_locally_active_dofs(dh, locally_active_dofs);
+  const IndexSet locally_active_dofs =
+    DoFTools::extract_locally_active_dofs(dh);
 
   if (print_constraints)
     {
index 6bf5e8a3811b1fef20cd9e8e3e4af1496371f43b..aee357f3b255d64a50a203252c28fb942aee1c74 100644 (file)
@@ -102,8 +102,8 @@ test(const unsigned int degree_center,
   dh.distribute_dofs(fe_collection);
 
   // ---- constrain ----
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dh);
 
   AffineConstraints<double> constraints;
   constraints.clear();
@@ -123,8 +123,8 @@ test(const unsigned int degree_center,
   std::vector<IndexSet> locally_owned_dofs_per_processor =
     Utilities::MPI::all_gather(dh.get_communicator(), dh.locally_owned_dofs());
 
-  IndexSet locally_active_dofs;
-  DoFTools::extract_locally_active_dofs(dh, locally_active_dofs);
+  const IndexSet locally_active_dofs =
+    DoFTools::extract_locally_active_dofs(dh);
 
   if (print_constraints)
     {
index 804c91584c6adcdadb7be4df242a3ae519d78e7e..0f8efa4d82bbd166e3ee82a5a31bf7198dd3539e 100644 (file)
@@ -117,8 +117,8 @@ test(const unsigned int degree_center,
   dh.distribute_dofs(fe_collection);
 
   // ---- constrain ----
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dh);
 
   AffineConstraints<double> constraints;
   constraints.clear();
@@ -138,8 +138,8 @@ test(const unsigned int degree_center,
   std::vector<IndexSet> locally_owned_dofs_per_processor =
     Utilities::MPI::all_gather(dh.get_communicator(), dh.locally_owned_dofs());
 
-  IndexSet locally_active_dofs;
-  DoFTools::extract_locally_active_dofs(dh, locally_active_dofs);
+  const IndexSet locally_active_dofs =
+    DoFTools::extract_locally_active_dofs(dh);
 
   if (print_constraints)
     {
index b7e945623bd0029b8a00ed291767356a05af1c45..5e57b8cb1208654704bc288e59120763dd17fffe 100644 (file)
@@ -74,8 +74,8 @@ test()
   dh.distribute_dofs(fes);
 
   // make constraints
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dh);
 
   AffineConstraints<double> constraints;
   constraints.reinit(locally_relevant_dofs);
index cd19363e55e745c4951c740d89d0e5016c2d8923..86a8718145855217dff9cc377a68459cf8d4145a 100644 (file)
@@ -94,8 +94,8 @@ test()
   dof_handler.distribute_dofs(fe_collection);
 
   // make constraints
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   AffineConstraints<double> hanging_node_constraints;
   hanging_node_constraints.reinit(locally_relevant_dofs);
index 657ac3ea153efc6593d5f79fc954ab0e66bead8e..0ae78048f2de1832099985bbdaf3ff3b2c1227c0 100644 (file)
@@ -163,8 +163,8 @@ test()
   hanging_node_constraints.distribute(interpolated);
 
   // extract a vector that has ghost elements
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_set);
+  const IndexSet relevant_set =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
   TrilinosWrappers::MPI::Vector x_rel(relevant_set, MPI_COMM_WORLD);
   x_rel = interpolated;
 
index 49f96dec104ecb633ebbbbef6a7f946688d2f850..302e532b1643d19291dc3f06220f5905dc562654 100644 (file)
@@ -185,8 +185,8 @@ namespace Step4
     dof_handler.distribute_dofs(fe);
 
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    locally_relevant_dofs.clear();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
     locally_relevant_dofs.compress();
 
     constraints.clear();
@@ -204,8 +204,8 @@ namespace Step4
       Utilities::MPI::all_gather(communicator,
                                  dof_handler.locally_owned_dofs());
 
-    IndexSet locally_active_dofs;
-    DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
+    const IndexSet locally_active_dofs =
+      DoFTools::extract_locally_active_dofs(dof_handler);
 
     AssertThrow(
       constraints.is_consistent_in_parallel(locally_owned_dofs_per_processor,
index 9841d385b703c288291b3218d34b46f273d4992b..580167978aadd7368f37e4fc7b456b55cc8bfa51 100644 (file)
@@ -137,7 +137,8 @@ namespace Step40
     dof_handler.distribute_dofs(fe);
 
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     locally_relevant_solution.reinit(locally_owned_dofs,
                                      locally_relevant_dofs,
index d6fc24085a7095d4cd24a5106a656ac7df4f0272..86350ed95499520b176aa180251c5ef15c6a5cbc 100644 (file)
@@ -145,7 +145,8 @@ namespace Step40
     dof_handler.distribute_dofs(fe);
 
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     locally_relevant_solution.reinit(locally_owned_dofs,
                                      locally_relevant_dofs,
index 3b97161c17afa25b4ca513cfaf794fd2f783672e..be90b3d78edf93e9548cda4f1628154985f73504 100644 (file)
@@ -71,8 +71,7 @@ test()
                                              MPI_COMM_WORLD);
   VectorTools::interpolate(dofh, LinearFunction<dim>(), interpolated);
 
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
   TrilinosWrappers::MPI::Vector x_rel(relevant_set, MPI_COMM_WORLD);
   x_rel = interpolated;
 
index c002a8452ebd4ca1094f99316bef2d83bf16679d..abb249c5176b9af8ba4087d3cb042ccf2da9949a 100644 (file)
@@ -65,12 +65,13 @@ test()
   AffineConstraints<PetscScalar> cm2;
   cm2.close();
 
-  IndexSet dof1_locally_owned_dofs = dofh1.locally_owned_dofs();
-  IndexSet dof2_locally_owned_dofs = dofh2.locally_owned_dofs();
-  IndexSet dof1_locally_relevant_dofs;
-  IndexSet dof2_locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dofh2, dof2_locally_relevant_dofs);
-  DoFTools::extract_locally_relevant_dofs(dofh1, dof1_locally_relevant_dofs);
+  const IndexSet &dof1_locally_owned_dofs = dofh1.locally_owned_dofs();
+  const IndexSet &dof2_locally_owned_dofs = dofh2.locally_owned_dofs();
+  const IndexSet  dof1_locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dofh1);
+  const IndexSet dof2_locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dofh2);
+
 
   PETScWrappers::MPI::Vector u1(dof1_locally_owned_dofs,
                                 dof1_locally_relevant_dofs,
index b9671206656e42206c6cdae21f4ddcb611f5f9ad..668114cd06df49768a30c916242a6c8b842e38e2 100644 (file)
@@ -85,8 +85,7 @@ test()
 
   // Integrate the difference in the first component, if everything went
   // well, this should be zero.
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
   TrilinosWrappers::MPI::Vector x_rel(relevant_set, MPI_COMM_WORLD);
   x_rel = x;
   Vector<double>               error(tr.n_active_cells());
index 86e02e892fa7043c423136190c575384c7c98bd4..9a3eeb84f49d63d5a081cc89393b9f6fb294c468 100644 (file)
@@ -66,8 +66,7 @@ setup(DoFHandler<dim> &dh,
 {
   dh.distribute_dofs(fe);
   vec.reinit(dh.locally_owned_dofs(), MPI_COMM_WORLD);
-  IndexSet locally_relevant;
-  DoFTools::extract_locally_relevant_dofs(dh, locally_relevant);
+  const IndexSet locally_relevant = DoFTools::extract_locally_relevant_dofs(dh);
   lr_vec.reinit(locally_relevant, MPI_COMM_WORLD);
 }
 
index 4db29af69388bf6433d0dc8cba3a59f1614f0b88..96cd3111ce32c8456412cc4b3fa28fb643f6a349 100644 (file)
@@ -133,8 +133,8 @@ void
 SeventhProblem<dim>::setup_system()
 {
   dof_handler.distribute_dofs(fe);
-  locally_owned_dofs = dof_handler.locally_owned_dofs();
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  locally_owned_dofs    = dof_handler.locally_owned_dofs();
+  locally_relevant_dofs = DoFTools::extract_locally_relevant_dofs(dof_handler);
   locally_relevant_solution.reinit(locally_owned_dofs,
                                    locally_relevant_dofs,
                                    mpi_communicator);
@@ -166,8 +166,8 @@ SeventhProblem<dim>::setup_second_system()
 {
   second_dof_handler.distribute_dofs(fe);
   second_locally_owned_dofs = second_dof_handler.locally_owned_dofs();
-  DoFTools::extract_locally_relevant_dofs(second_dof_handler,
-                                          second_locally_relevant_dofs);
+  second_locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(second_dof_handler);
   second_locally_relevant_solution.reinit(second_locally_owned_dofs,
                                           second_locally_relevant_dofs,
                                           mpi_communicator);
index 95c3bcb1840bbe688cb63318398a814ef2b7e39b..29ddfc078cac7e588a678af491e503ec083a5898 100644 (file)
@@ -53,8 +53,7 @@ test()
   // the result of extract_boundary_dofs is supposed to be a subset of the
   // locally relevant dofs, so do the test again with that
   {
-    IndexSet relevant_set(dofh.n_dofs());
-    DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+    const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
     AffineConstraints<double> boundary_values(relevant_set);
     DoFTools::make_zero_boundary_constraints(dofh, boundary_values);
     if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
index 2a65395a9f2d82b5a533c1f20c18b6741120da18..8293fa7e0bf6f29b65f1ba8861c4c317c31079d9 100644 (file)
@@ -60,8 +60,7 @@ test()
   // supposed to be a map that
   // contains exactly the locally
   // relevant dofs, so test this
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
 
   for (unsigned int i = 0; i < dofh.n_dofs(); ++i)
     {
index cce9488711909b3058eebf201c2df2f470d31a0a..8a2522bf3b1884c4234592ae1bae47c026413092 100644 (file)
@@ -330,9 +330,8 @@ namespace Step22
       owned_partitioning.push_back(locally_owned_dofs.get_view(n_u, n_u + n_p));
 
       relevant_partitioning.clear();
-      IndexSet locally_relevant_dofs;
-      DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                              locally_relevant_dofs);
+      const IndexSet locally_relevant_dofs =
+        DoFTools::extract_locally_relevant_dofs(dof_handler);
       relevant_partitioning.push_back(locally_relevant_dofs.get_view(0, n_u));
       relevant_partitioning.push_back(
         locally_relevant_dofs.get_view(n_u, n_u + n_p));
index 6ac44d5d80f9f20ec46bd7c85b91574d80eda4c5..091ff4526151f8abc271f0cdf447bfa532ee8696 100644 (file)
@@ -489,8 +489,8 @@ namespace Step50
     Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
 
     TrilinosWrappers::MPI::Vector temp_solution;
-    IndexSet                      idx;
-    DoFTools::extract_locally_relevant_dofs(mg_dof_handler, idx);
+    const IndexSet                idx =
+      DoFTools::extract_locally_relevant_dofs(mg_dof_handler);
     temp_solution.reinit(idx, MPI_COMM_WORLD);
     temp_solution = solution;
 
index 73ad0ebe6990374417c8805a96ea8363075a1cf6..46a054f542fb254e9679c7bcba4bee7d7be0c7e9 100644 (file)
@@ -106,8 +106,7 @@ test()
   if (myid == 0)
     deallog << "#dofs = " << dofh.locally_owned_dofs().size() << std::endl;
 
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
 
   AffineConstraints<double> constraints;
   constraints.reinit(relevant_set);
index bb51670c3d6b616b7c35cbee63824ebf5bc29b4b..5f015da9bb359622f280ac0a36ec351bf1de4447 100644 (file)
@@ -108,8 +108,7 @@ test()
   if (myid == 0)
     deallog << "#dofs = " << dofh.locally_owned_dofs().size() << std::endl;
 
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
 
   AffineConstraints<double> constraints;
   constraints.reinit(relevant_set);
index 199c48d9c893998ce6866dc55a98926408580052..6825d2a4004aa67594297f5d69e23b736e81d72d 100644 (file)
@@ -84,8 +84,7 @@ test()
   if (myid == 0)
     deallog << "#dofs = " << dofh.locally_owned_dofs().size() << std::endl;
 
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
 
   AffineConstraints<double> constraints;
   constraints.reinit(relevant_set);
index 51d04fc127bda8cd598447a567358d864fc6f759..f8cc2c293eaf71446e3b6ab9b97d18d35424c600 100644 (file)
@@ -105,8 +105,7 @@ test()
   if (myid == 0)
     deallog << "#dofs = " << dofh.locally_owned_dofs().size() << std::endl;
 
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
 
   AffineConstraints<double> constraints;
   constraints.reinit(relevant_set);
index 902b08b7e97ff7ab020f79d8f8f92589ca25485f..6d5c66aaf6597d94e34952b41c5685b412a291ce 100644 (file)
@@ -61,8 +61,7 @@ test()
   static const FE_Q<dim> fe(1);
   dofh.distribute_dofs(fe);
 
-  IndexSet dof_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, dof_set);
+  const IndexSet dof_set = DoFTools::extract_locally_relevant_dofs(dofh);
 
   AffineConstraints<double> cm;
   DoFTools::make_hanging_node_constraints(dofh, cm);
index a706f6d577d4b7aa68c14472b65dece0f8669ac5..288e874b7018fec47569133517de959925b839a1 100644 (file)
@@ -63,8 +63,7 @@ test()
       static const FE_Q<dim> fe(1);
       dofh.distribute_dofs(fe);
 
-      IndexSet dof_set;
-      DoFTools::extract_locally_relevant_dofs(dofh, dof_set);
+      const IndexSet dof_set = DoFTools::extract_locally_relevant_dofs(dofh);
 
       AffineConstraints<double> cm;
       DoFTools::make_hanging_node_constraints(dofh, cm);
index d500cc1d4e8f8625caee52dc37c75e9cfed4e54c..f72a69337bf56a3db82a24f05ad248d858fa9ca1 100644 (file)
@@ -89,13 +89,9 @@ test()
 
   dofh.distribute_dofs(fe);
 
-  IndexSet owned_set = dofh.locally_owned_dofs();
-
-  IndexSet dof_set;
-  DoFTools::extract_locally_active_dofs(dofh, dof_set);
-
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet &owned_set    = dofh.locally_owned_dofs();
+  const IndexSet  dof_set      = DoFTools::extract_locally_active_dofs(dofh);
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
 
   TrilinosWrappers::MPI::Vector x;
   x.reinit(owned_set, MPI_COMM_WORLD);
index 51d1f2b3cc1cef008add7f1b2dd6ad91cb4eca80..2305bc8fbca1041d2cb803892ab1898b75c13d08 100644 (file)
@@ -129,13 +129,9 @@ test()
 
   dofh.distribute_dofs(fe);
 
-  IndexSet owned_set = dofh.locally_owned_dofs();
-
-  IndexSet dof_set;
-  DoFTools::extract_locally_active_dofs(dofh, dof_set);
-
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  IndexSet owned_set    = dofh.locally_owned_dofs();
+  IndexSet dof_set      = DoFTools::extract_locally_active_dofs(dofh);
+  IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
 
   TrilinosWrappers::MPI::Vector x;
   x.reinit(owned_set, MPI_COMM_WORLD);
@@ -203,11 +199,9 @@ test()
 
       dofh.distribute_dofs(fe);
 
-      owned_set = dofh.locally_owned_dofs();
-
-      DoFTools::extract_locally_active_dofs(dofh, dof_set);
-
-      DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+      owned_set    = dofh.locally_owned_dofs();
+      dof_set      = DoFTools::extract_locally_active_dofs(dofh);
+      relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
 
       x.reinit(owned_set, MPI_COMM_WORLD);
 
index 15a3ff54c6c09e7121234679baec7a4af246c4a9..963709e7b0ed93e5f97e80d50c648b61b039aae4 100644 (file)
@@ -56,10 +56,8 @@ test()
 
   dofh.distribute_dofs(fe);
 
-  IndexSet owned_set = dofh.locally_owned_dofs();
-
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet &owned_set    = dofh.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
 
   TrilinosWrappers::MPI::Vector x_ref;
   x_ref.reinit(owned_set, MPI_COMM_WORLD);
index 2e9243935717554ae259265f603578e398acdfc5..c675108cbe5459adb09a351fa6ee69aa2d3d5859 100644 (file)
@@ -100,8 +100,7 @@ test()
                   << dofh.n_locally_owned_dofs() << std::endl;
         }
 
-      IndexSet dof_set;
-      DoFTools::extract_locally_active_dofs<>(dofh, dof_set);
+      const IndexSet dof_set = DoFTools::extract_locally_active_dofs<>(dofh);
       std::set<unsigned int> control_dof_set;
 
       typename DoFHandler<dim>::active_cell_iterator cell = dofh.begin_active();
index 24eff7e1d334db56a7afc4b9f95686109dd10acb..0ce4743a91cb9fb53c4594d8cffabf585ec5ac8a 100644 (file)
@@ -61,8 +61,7 @@ test()
     dofh.distribute_dofs(fe);
 
     {
-      IndexSet dof_set;
-      DoFTools::extract_locally_active_dofs(dofh, dof_set);
+      const IndexSet dof_set = DoFTools::extract_locally_active_dofs(dofh);
       if (myid == 0)
         dof_set.print(deallog);
     }
@@ -76,8 +75,7 @@ test()
     // correct. This was a bug at some point.
     Assert(n_dofs == dofh.n_dofs(), ExcInternalError());
     {
-      IndexSet dof_set;
-      DoFTools::extract_locally_active_dofs(dofh, dof_set);
+      const IndexSet dof_set = DoFTools::extract_locally_active_dofs(dofh);
 
       if (myid == 0)
         dof_set.print(deallog);
index de0f484b4f82966dfa0b9ee9a09f41b41df8c54e..6626fddd92d2cfdd12e60cfcf175c8cf15c4691d 100644 (file)
@@ -66,8 +66,7 @@ test()
     deallog << "Total dofs=" << dofh.n_dofs() << std::endl;
 
   {
-    IndexSet dof_set;
-    DoFTools::extract_locally_active_dofs(dofh, dof_set);
+    const IndexSet dof_set = DoFTools::extract_locally_active_dofs(dofh);
     if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
       dof_set.print(deallog);
   }
@@ -77,8 +76,7 @@ test()
 
   DoFRenumbering::component_wise(dofh);
   {
-    IndexSet dof_set;
-    DoFTools::extract_locally_active_dofs(dofh, dof_set);
+    const IndexSet dof_set = DoFTools::extract_locally_active_dofs(dofh);
 
     const std::vector<IndexSet> owned_dofs =
       Utilities::MPI::all_gather(MPI_COMM_WORLD, dofh.locally_owned_dofs());
index 67a91a6a167f62ca6bf427e88ec0ecfd91e11bac..ed13cf5193e1362a10805cbdf14d0c395573f22e 100644 (file)
@@ -71,8 +71,7 @@ test()
   static const FE_Q<dim> fe(1);
   dofh.distribute_dofs(fe);
 
-  IndexSet dof_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, dof_set);
+  const IndexSet dof_set = DoFTools::extract_locally_relevant_dofs(dofh);
 
   AffineConstraints<double> cm;
   DoFTools::make_hanging_node_constraints(dofh, cm);
index 5181c5e9dcb5faeac41f03011e2c9359070cc0c8..40471e2214f9305d5e3b29cf6657d9b6a7ce1a91 100644 (file)
@@ -72,13 +72,9 @@ test()
   static const FE_Q<dim> fe(1);
   dofh.distribute_dofs(fe);
 
-  IndexSet owned_set = dofh.locally_owned_dofs();
-
-  IndexSet dof_set;
-  DoFTools::extract_locally_active_dofs(dofh, dof_set);
-
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet &owned_set    = dofh.locally_owned_dofs();
+  const IndexSet  dof_set      = DoFTools::extract_locally_active_dofs(dofh);
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
 
   TrilinosWrappers::MPI::Vector x;
   x.reinit(owned_set, MPI_COMM_WORLD);
index d1c9c0a165c529145ae748e8ccbdcee4301beeff..fdbd04d20d392239c9b3a89a15c6ca55a3e0661d 100644 (file)
@@ -130,13 +130,9 @@ test()
 
   dofh.distribute_dofs(fe);
 
-  IndexSet owned_set = dofh.locally_owned_dofs();
-
-  IndexSet dof_set;
-  DoFTools::extract_locally_active_dofs(dofh, dof_set);
-
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  IndexSet owned_set    = dofh.locally_owned_dofs();
+  IndexSet dof_set      = DoFTools::extract_locally_active_dofs(dofh);
+  IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
 
   TrilinosWrappers::MPI::Vector x;
   x.reinit(owned_set, MPI_COMM_WORLD);
@@ -203,11 +199,9 @@ test()
 
       dofh.distribute_dofs(fe);
 
-      owned_set = dofh.locally_owned_dofs();
-
-      DoFTools::extract_locally_active_dofs(dofh, dof_set);
-
-      DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+      owned_set    = dofh.locally_owned_dofs();
+      dof_set      = DoFTools::extract_locally_active_dofs(dofh);
+      relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
 
       x.reinit(owned_set, MPI_COMM_WORLD);
 
index 310add33daf2722a56b3df2bb06ef63a528ecfdd..b7955c54334d1e9f0a83022cfcf2bc29370226cf 100644 (file)
@@ -67,8 +67,8 @@ test()
   dof.distribute_dofs(fe);
 
   // build constraint matrix
-  IndexSet locally_relevant(dof.n_dofs());
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant);
+  const IndexSet locally_relevant =
+    DoFTools::extract_locally_relevant_dofs(dof);
   AffineConstraints<double> constraints(locally_relevant);
   DoFTools::make_hanging_node_constraints(dof, constraints);
   constraints.close();
@@ -78,9 +78,8 @@ test()
   const unsigned int myid    = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
   const unsigned int numproc = Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD);
 
-  IndexSet locally_active(dof.n_dofs());
-  DoFTools::extract_locally_active_dofs(dof, locally_active);
-  std::ofstream file(
+  const IndexSet locally_active = DoFTools::extract_locally_active_dofs(dof);
+  std::ofstream  file(
     (std::string("dat.") + Utilities::int_to_string(myid)).c_str());
   file << "**** proc " << myid << ": \n\n";
   file << "Constraints:\n";
index f0d2ffd5edaf33a221f055c0061709034f4db994..fea342436831ebb45bf2371901475de4ea4aae75 100644 (file)
@@ -73,10 +73,9 @@ test()
 
     dh.distribute_dofs(fe);
 
-    IndexSet locally_owned_dofs = dh.locally_owned_dofs();
-    IndexSet locally_relevant_dofs;
-
-    DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_dofs);
+    const IndexSet &locally_owned_dofs = dh.locally_owned_dofs();
+    const IndexSet  locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dh);
 
     PETScWrappers::MPI::Vector x(locally_owned_dofs, MPI_COMM_WORLD);
     PETScWrappers::MPI::Vector solution(locally_owned_dofs,
@@ -120,10 +119,9 @@ test()
 
     dh.distribute_dofs(fe);
 
-    IndexSet locally_owned_dofs = dh.locally_owned_dofs();
-    IndexSet locally_relevant_dofs;
-
-    DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_dofs);
+    const IndexSet &locally_owned_dofs = dh.locally_owned_dofs();
+    const IndexSet  locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dh);
 
     PETScWrappers::MPI::Vector solution(locally_owned_dofs, MPI_COMM_WORLD);
     parallel::distributed::SolutionTransfer<dim, PETScWrappers::MPI::Vector>
index e0ac357692f6de8fb6b6228c28ec64c0cb53c048..84e21e3f5f789e7f0b4bb703081f8468ad85eac5 100644 (file)
@@ -74,10 +74,9 @@ test()
 
     dh.distribute_dofs(fe);
 
-    IndexSet locally_owned_dofs = dh.locally_owned_dofs();
-    IndexSet locally_relevant_dofs;
-
-    DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_dofs);
+    const IndexSet &locally_owned_dofs = dh.locally_owned_dofs();
+    const IndexSet  locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dh);
 
     PETScWrappers::MPI::Vector x(locally_owned_dofs, MPI_COMM_WORLD);
     PETScWrappers::MPI::Vector x2(locally_owned_dofs, MPI_COMM_WORLD);
@@ -132,10 +131,9 @@ test()
 
     dh.distribute_dofs(fe);
 
-    IndexSet locally_owned_dofs = dh.locally_owned_dofs();
-    IndexSet locally_relevant_dofs;
-
-    DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_dofs);
+    const IndexSet &locally_owned_dofs = dh.locally_owned_dofs();
+    const IndexSet  locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dh);
 
     PETScWrappers::MPI::Vector solution(locally_owned_dofs, MPI_COMM_WORLD);
     PETScWrappers::MPI::Vector solution2(locally_owned_dofs, MPI_COMM_WORLD);
index 75170e560c822d151a33f4ed170e7151f895e698..9a13ceebb986e4aa62b67df1658f096f114bace1 100644 (file)
@@ -76,9 +76,9 @@ test()
       DoFHandler<dim> dh(tr);
       dh.distribute_dofs(fe);
 
-      IndexSet locally_owned_dofs = dh.locally_owned_dofs();
-      IndexSet locally_relevant_dofs;
-      DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_dofs);
+      const IndexSet &locally_owned_dofs = dh.locally_owned_dofs();
+      const IndexSet  locally_relevant_dofs =
+        DoFTools::extract_locally_relevant_dofs(dh);
 
       PETScWrappers::MPI::Vector x(locally_owned_dofs, com_small);
       PETScWrappers::MPI::Vector rel_x(locally_owned_dofs,
@@ -123,10 +123,9 @@ test()
     DoFHandler<dim> dh(tr);
     dh.distribute_dofs(fe);
 
-    IndexSet locally_owned_dofs = dh.locally_owned_dofs();
-    IndexSet locally_relevant_dofs;
-
-    DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_dofs);
+    const IndexSet &locally_owned_dofs = dh.locally_owned_dofs();
+    const IndexSet  locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dh);
 
     PETScWrappers::MPI::Vector solution(locally_owned_dofs, com_all);
     solution = PetscScalar();
index 300b643daeb8d45c1afb1adf59e966c9418168cc..dbfaf0739a8f1ced19e1efce68f6620c46391ebd 100644 (file)
@@ -83,9 +83,9 @@ test()
 
       dh.distribute_dofs(fe_collection);
 
-      IndexSet locally_owned_dofs = dh.locally_owned_dofs();
-      IndexSet locally_relevant_dofs;
-      DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_dofs);
+      const IndexSet &locally_owned_dofs = dh.locally_owned_dofs();
+      const IndexSet  locally_relevant_dofs =
+        DoFTools::extract_locally_relevant_dofs(dh);
 
       PETScWrappers::MPI::Vector x(locally_owned_dofs, com_small);
       PETScWrappers::MPI::Vector rel_x(locally_owned_dofs,
@@ -137,10 +137,9 @@ test()
     dh.deserialize_active_fe_indices();
     dh.distribute_dofs(fe_collection);
 
-    IndexSet locally_owned_dofs = dh.locally_owned_dofs();
-    IndexSet locally_relevant_dofs;
-
-    DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_dofs);
+    const IndexSet &locally_owned_dofs = dh.locally_owned_dofs();
+    const IndexSet  locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dh);
 
     PETScWrappers::MPI::Vector solution(locally_owned_dofs, com_all);
     solution = PetscScalar();
index db48647b88f44892fd544536ec68197b8edca714..68c51b25154cf4a0edcb508c1709f9111c319bfe 100644 (file)
@@ -87,9 +87,8 @@ test(const unsigned int n_blocks = 5)
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 35ca30385198b71a143ffed50b7e72162cfb6641..f6cae836b0a5f6c1269672fae930f5590a0cea36 100644 (file)
@@ -89,9 +89,8 @@ test(const unsigned int n_blocks = 5)
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 2817d2fa92a42a74485307d8174f59b83b7a4e4f..1e85141af0a8211cc0649af654467dfa90e98b6f 100644 (file)
@@ -87,9 +87,8 @@ test(const unsigned int n_blocks = 5)
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index fadf905759e781f1add4ce3ecd820b3623a859ce..cbc1489feebd4c781826e75a8a6302206942eb8f 100644 (file)
@@ -87,9 +87,8 @@ test(const unsigned int n_blocks = 5)
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 45aadfb41a7144782bb709efa3ed67d7e271ce1e..f8b63c0e28bbecebcd713c969ab6a556e10bfe6e 100644 (file)
@@ -90,9 +90,8 @@ test(const unsigned int n_blocks = 5)
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 1bb57305082ffe0325e9e0315292618365d76cdf..92f99944c08da0d92e5cc7eb154ab533039d8b75 100644 (file)
@@ -86,9 +86,8 @@ test(const unsigned int n_blocks = 5)
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 1dc45f723c60ac0e2c4ef7e7f8e09d5b8176d005..9bc0d77ac3ca3c07319c375b7816f9bde3306c5f 100644 (file)
@@ -88,9 +88,8 @@ test(const unsigned int n_blocks = 5)
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index fda4e21f0c83b3a3f2c4310328024b86747bcf5c..25958e551fa1be52274bfa8fdc4ab253bbe8a868 100644 (file)
@@ -88,9 +88,8 @@ test(const unsigned int n = 5, const unsigned int m = 3)
   DoFHandler<dim> dof(tria);
   dof.distribute_dofs(fe);
 
-  IndexSet owned_set = dof.locally_owned_dofs();
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
+  const IndexSet &owned_set    = dof.locally_owned_dofs();
+  const IndexSet  relevant_set = DoFTools::extract_locally_relevant_dofs(dof);
 
   AffineConstraints<double> constraints(relevant_set);
   DoFTools::make_hanging_node_constraints(dof, constraints);
index 02fc5a32ddca93fba4e9d82032bd6252cb79c6fc..3301a71ea2e10e9b4d18037fbbd3682d9b0210a9 100644 (file)
@@ -62,8 +62,8 @@ test()
   DoFTools::make_hanging_node_constraints(dof2, c2);
   c2.close();
 
-  IndexSet locally_relevant_dofs2;
-  DoFTools::extract_locally_relevant_dofs(dof2, locally_relevant_dofs2);
+  const IndexSet locally_relevant_dofs2 =
+    DoFTools::extract_locally_relevant_dofs(dof2);
 
   LinearAlgebra::distributed::Vector<double> v2(dof2.locally_owned_dofs(),
                                                 locally_relevant_dofs2,
index d0304324cedf4e4d5079ed34254725a99e6bc074..6824b0843188e07ea30d367820ae24cab8b3f444 100644 (file)
@@ -64,9 +64,9 @@ test()
   DoFRenumbering::component_wise(dof1);
   DoFRenumbering::component_wise(dof2);
 
-  IndexSet locally_owned_dofs1 = dof1.locally_owned_dofs();
-  IndexSet locally_relevant_dofs1;
-  DoFTools::extract_locally_relevant_dofs(dof1, locally_relevant_dofs1);
+  const IndexSet locally_owned_dofs1 = dof1.locally_owned_dofs();
+  const IndexSet locally_relevant_dofs1 =
+    DoFTools::extract_locally_relevant_dofs(dof1);
 
   std::vector<IndexSet> owned_partitioning1;
   std::vector<IndexSet> relevant_partitioning1;
index 3815cd3a569653cdba5a35da072ca08fcb8a143e..675bad8c7d4b29dac0addb5482d9372e33623426 100644 (file)
@@ -54,9 +54,10 @@ test()
   dof1.distribute_dofs(fe1);
   dof2.distribute_dofs(fe2);
 
-  IndexSet locally_relevant_dofs1, locally_relevant_dofs2;
-  DoFTools::extract_locally_relevant_dofs(dof1, locally_relevant_dofs1);
-  DoFTools::extract_locally_relevant_dofs(dof2, locally_relevant_dofs2);
+  const IndexSet locally_relevant_dofs1 =
+    DoFTools::extract_locally_relevant_dofs(dof1);
+  const IndexSet locally_relevant_dofs2 =
+    DoFTools::extract_locally_relevant_dofs(dof2);
 
   LinearAlgebra::distributed::Vector<double> v1(dof1.locally_owned_dofs(),
                                                 locally_relevant_dofs1,
index 47e0ae92611b8c499050c752898de8d3146b22e8..9ca2b2440ae69af34421e21f1d0d22165b11d880 100644 (file)
@@ -139,7 +139,8 @@ namespace Step40
     dof_handler.distribute_dofs(fe);
 
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
     locally_relevant_solution.reinit(locally_owned_dofs,
                                      locally_relevant_dofs,
                                      mpi_communicator);
@@ -168,8 +169,8 @@ namespace Step40
     const std::vector<IndexSet> &locally_owned_dofs =
       Utilities::MPI::all_gather(MPI_COMM_WORLD,
                                  dof_handler.locally_owned_dofs());
-    IndexSet locally_active_dofs;
-    DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
+    const IndexSet locally_active_dofs =
+      DoFTools::extract_locally_active_dofs(dof_handler);
     AssertThrow(constraints.is_consistent_in_parallel(locally_owned_dofs,
                                                       locally_active_dofs,
                                                       mpi_communicator,
index 6bf2e7d5eb8a24a5bdfe091594cfa5a08b9fac9b..72225a23ce657ad420d577ac6b8a1b9858664a5b 100644 (file)
@@ -332,9 +332,8 @@ namespace Step22
       owned_partitioning.push_back(locally_owned_dofs.get_view(n_u, n_u + n_p));
 
       relevant_partitioning.clear();
-      IndexSet locally_relevant_dofs;
-      DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                              locally_relevant_dofs);
+      const IndexSet locally_relevant_dofs =
+        DoFTools::extract_locally_relevant_dofs(dof_handler);
       relevant_partitioning.push_back(locally_relevant_dofs.get_view(0, n_u));
       relevant_partitioning.push_back(
         locally_relevant_dofs.get_view(n_u, n_u + n_p));
@@ -394,8 +393,8 @@ namespace Step22
     const std::vector<IndexSet> &locally_owned_dofs =
       Utilities::MPI::all_gather(MPI_COMM_WORLD,
                                  dof_handler.locally_owned_dofs());
-    IndexSet locally_active_dofs;
-    DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
+    const IndexSet locally_active_dofs =
+      DoFTools::extract_locally_active_dofs(dof_handler);
     AssertThrow(constraints.is_consistent_in_parallel(locally_owned_dofs,
                                                       locally_active_dofs,
                                                       mpi_communicator,
index 525d00703e7256408f001dc2bf02d74717f434e8..0a46d6fc7bedfb54485b404aee3a016015920031 100644 (file)
@@ -260,9 +260,8 @@ namespace Step22
       owned_partitioning.push_back(locally_owned_dofs.get_view(n_u, n_u + n_p));
 
       relevant_partitioning.clear();
-      IndexSet locally_relevant_dofs;
-      DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                              locally_relevant_dofs);
+      const IndexSet locally_relevant_dofs =
+        DoFTools::extract_locally_relevant_dofs(dof_handler);
       relevant_partitioning.push_back(locally_relevant_dofs.get_view(0, n_u));
       relevant_partitioning.push_back(
         locally_relevant_dofs.get_view(n_u, n_u + n_p));
@@ -324,8 +323,8 @@ namespace Step22
     const std::vector<IndexSet> &locally_owned_dofs =
       Utilities::MPI::all_gather(MPI_COMM_WORLD,
                                  dof_handler.locally_owned_dofs());
-    IndexSet locally_active_dofs;
-    DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
+    const IndexSet locally_active_dofs =
+      DoFTools::extract_locally_active_dofs(dof_handler);
     AssertThrow(constraints.is_consistent_in_parallel(locally_owned_dofs,
                                                       locally_active_dofs,
                                                       mpi_communicator,
index 3c235428bff64a0ba79ae242d417e7603d05b2a7..e8855528e878f9194a61e7475a4e5639e378e958 100644 (file)
@@ -185,9 +185,9 @@ check(const unsigned int orientation, bool reverse)
 
   AffineConstraints<double> constraints;
 
-  IndexSet locally_owned_dofs = dof_handler.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   constraints.reinit(locally_relevant_dofs);
   {
@@ -209,8 +209,8 @@ check(const unsigned int orientation, bool reverse)
   const std::vector<IndexSet> locally_owned_dofs_vector =
     Utilities::MPI::all_gather(MPI_COMM_WORLD,
                                dof_handler.locally_owned_dofs());
-  IndexSet locally_active_dofs;
-  DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
+  const IndexSet locally_active_dofs =
+    DoFTools::extract_locally_active_dofs(dof_handler);
   AssertThrow(constraints.is_consistent_in_parallel(locally_owned_dofs_vector,
                                                     locally_active_dofs,
                                                     MPI_COMM_WORLD,
index 3992c23fcabe927fa67034c0895d97f54d001a8d..e8d82b849208df7d3f2bc0635e5cd4f20312407f 100644 (file)
@@ -160,8 +160,8 @@ test(const unsigned numRefinementLevels = 2)
   data_out.write_vtu_in_parallel(std::string("mesh.vtu").c_str(),
                                  mpi_communicator);
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   std::map<types::global_dof_index, Point<dim>> supportPoints;
   DoFTools::map_dofs_to_support_points(MappingQ1<dim>(),
@@ -190,8 +190,8 @@ test(const unsigned numRefinementLevels = 2)
   const std::vector<IndexSet> &locally_owned_dofs =
     Utilities::MPI::all_gather(MPI_COMM_WORLD,
                                dof_handler.locally_owned_dofs());
-  IndexSet locally_active_dofs;
-  DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
+  const IndexSet locally_active_dofs =
+    DoFTools::extract_locally_active_dofs(dof_handler);
   AssertThrow(constraints.is_consistent_in_parallel(locally_owned_dofs,
                                                     locally_active_dofs,
                                                     mpi_communicator,
index d4b6521df4e2306dd0159a986cad3a520322f987..cec4197d50e14940702b7100b97744496018fc74 100644 (file)
@@ -132,11 +132,10 @@ test(const unsigned numRefinementLevels = 2)
   data_out.write_vtu_in_parallel(std::string("mesh.vtu").c_str(),
                                  mpi_communicator);
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
-
-  IndexSet locally_active_dofs;
-  DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
+  const IndexSet locally_active_dofs =
+    DoFTools::extract_locally_active_dofs(dof_handler);
 
   const std::vector<IndexSet> locally_owned_dofs =
     Utilities::MPI::all_gather(MPI_COMM_WORLD,
index cc95ad5b417fd9c92458729af37840fa5479eb88..fe7224d0cdcbe0dc1a6b6946abcf9da4b800c2e7 100644 (file)
@@ -126,11 +126,10 @@ test()
   data_out.write_vtu_in_parallel(std::string("mesh.vtu").c_str(),
                                  mpi_communicator);
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
-
-  IndexSet locally_active_dofs;
-  DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
+  const IndexSet locally_active_dofs =
+    DoFTools::extract_locally_active_dofs(dof_handler);
 
   const std::vector<IndexSet> locally_owned_dofs =
     Utilities::MPI::all_gather(MPI_COMM_WORLD,
index 084fd40d441c5dbbdd052dad2545f455aaadfa37..88fa8107cd1db4d7c281526cea042b191e0b71f1 100644 (file)
@@ -222,9 +222,9 @@ test()
     DoFHandler<2> handler(fluid_triangulation);
     handler.distribute_dofs(fe);
 
-    IndexSet locally_owned_dofs    = handler.locally_owned_dofs();
-    IndexSet locally_relevant_dofs = handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(handler, locally_relevant_dofs);
+    const IndexSet &locally_owned_dofs = handler.locally_owned_dofs();
+    const IndexSet  locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(handler);
 
 
     PETScWrappers::MPI::Vector vector;
index 19344bf9245a5b8ee7ee72149318ab367be11167..a080f5ad360883c11cbff804761aaeda2a71c238 100644 (file)
@@ -207,7 +207,8 @@ namespace Step27
     dof_handler.distribute_dofs(fe_collection);
 
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     solution.reinit(locally_owned_dofs,
                     locally_relevant_dofs,
@@ -228,8 +229,8 @@ namespace Step27
       Utilities::MPI::all_gather(dof_handler.get_communicator(),
                                  dof_handler.locally_owned_dofs());
 
-    IndexSet locally_active_dofs;
-    DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
+    const IndexSet locally_active_dofs =
+      DoFTools::extract_locally_active_dofs(dof_handler);
 
     AssertThrow(
       constraints.is_consistent_in_parallel(locally_owned_dofs_per_processor,
index 1d2d993e0b20ca06d51721a46f320165ce1f534c..c4e9085fd6c65e4615073ac3d8f67707dd3fdd67 100644 (file)
@@ -186,8 +186,8 @@ namespace ResFlow
           << owned_partitioning[1].n_elements() << ')' << std::endl
           << std::endl;
 
-    IndexSet locally_relevant_dofs;
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    const IndexSet locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
     relevant_partitioning.resize(2);
     relevant_partitioning[0] = locally_relevant_dofs.get_view(0, n_u);
     relevant_partitioning[1] = locally_relevant_dofs.get_view(n_u, n_u + n_p);
index f789e2ecf49116d98460d0c609a6616d25abb0fd..c8a5a98eb32d4a6343dc86ab170d491b89931a24 100644 (file)
@@ -66,10 +66,8 @@ test()
 
   dh.distribute_dofs(fe);
 
-  IndexSet locally_owned_dofs = dh.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_dofs);
+  IndexSet locally_owned_dofs    = dh.locally_owned_dofs();
+  IndexSet locally_relevant_dofs = DoFTools::extract_locally_relevant_dofs(dh);
 
   PETScWrappers::MPI::Vector solution(locally_owned_dofs,
                                       locally_relevant_dofs,
@@ -87,8 +85,8 @@ test()
   tria.execute_coarsening_and_refinement();
 
   dh.distribute_dofs(fe);
-  locally_owned_dofs = dh.locally_owned_dofs();
-  DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_dofs);
+  locally_owned_dofs    = dh.locally_owned_dofs();
+  locally_relevant_dofs = DoFTools::extract_locally_relevant_dofs(dh);
 
   PETScWrappers::MPI::Vector tmp(locally_owned_dofs, MPI_COMM_WORLD);
 
index 5d46c20d7c6cd8da4fabaea9cbbbfb108bfae678..6706f12a7671c6be9cbe6e57dfe1fe686e98154d 100644 (file)
@@ -81,9 +81,8 @@ test()
 
   // ----- prepare solution -----
   dh.distribute_dofs(fe_collection);
-  IndexSet locally_owned_dofs = dh.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_dofs);
+  IndexSet locally_owned_dofs    = dh.locally_owned_dofs();
+  IndexSet locally_relevant_dofs = DoFTools::extract_locally_relevant_dofs(dh);
 
   TrilinosWrappers::MPI::Vector solution;
   solution.reinit(locally_owned_dofs, MPI_COMM_WORLD);
@@ -106,8 +105,8 @@ test()
   tria.execute_coarsening_and_refinement();
 
   dh.distribute_dofs(fe_collection);
-  locally_owned_dofs = dh.locally_owned_dofs();
-  DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_dofs);
+  locally_owned_dofs    = dh.locally_owned_dofs();
+  locally_relevant_dofs = DoFTools::extract_locally_relevant_dofs(dh);
 
   TrilinosWrappers::MPI::Vector new_solution;
   new_solution.reinit(locally_owned_dofs, MPI_COMM_WORLD);
index 0b75ab03f75a8f5b1d60abfc343b41e61639872b..347f76359bca0a00f7c562f7e9ac29da89d9c48d 100644 (file)
@@ -69,9 +69,8 @@ test()
 
   // prepare index sets
   IndexSet dgq_locally_owned_dofs = dgq_dof_handler.locally_owned_dofs();
-  IndexSet dgq_locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dgq_dof_handler,
-                                          dgq_locally_relevant_dofs);
+  IndexSet dgq_locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dgq_dof_handler);
   IndexSet dgq_ghost_dofs = dgq_locally_relevant_dofs;
   dgq_ghost_dofs.subtract_set(dgq_locally_owned_dofs);
 
@@ -108,8 +107,8 @@ test()
 
   // prepare index sets
   dgq_locally_owned_dofs = dgq_dof_handler.locally_owned_dofs();
-  DoFTools::extract_locally_relevant_dofs(dgq_dof_handler,
-                                          dgq_locally_relevant_dofs);
+  dgq_locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dgq_dof_handler);
   dgq_ghost_dofs = dgq_locally_relevant_dofs;
   dgq_ghost_dofs.subtract_set(dgq_locally_owned_dofs);
 
index 4eaae1d00ae1da74bd75edbafd72b21ddc7bca20..077c8d343d9dfa9fecf288d1f406020a8f74f557 100644 (file)
@@ -63,8 +63,8 @@ transfer(const MPI_Comm comm)
   DoFHandler<dim> dof_handler(tria);
   dof_handler.begin(0)->child(0)->set_active_fe_index(1);
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   LinearAlgebra::distributed::Vector<double> solution(
     dof_handler.locally_owned_dofs(), locally_relevant_dofs, comm);
index e1989a87f43066bf093b354490769dd78daf444a..030bd04d755f49120cc8a6f1a99efffec59095b2 100644 (file)
@@ -180,9 +180,8 @@ namespace Step37
 
     dof_euler.distribute_dofs(fe_system);
     {
-      IndexSet locally_relevant_euler;
-      DoFTools::extract_locally_relevant_dofs(dof_euler,
-                                              locally_relevant_euler);
+      const IndexSet locally_relevant_euler =
+        DoFTools::extract_locally_relevant_dofs(dof_euler);
       euler_positions.reinit(dof_euler.locally_owned_dofs(),
                              locally_relevant_euler,
                              MPI_COMM_WORLD);
@@ -209,7 +208,8 @@ namespace Step37
     pcout << "Number of degrees of freedom: " << dof_handler.n_dofs()
           << std::endl;
 
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     constraints.clear();
     constraints.reinit(locally_relevant_dofs);
@@ -251,10 +251,8 @@ namespace Step37
 
     for (unsigned int level = 0; level < nlevels; ++level)
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                      level,
-                                                      relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
         AffineConstraints<double> level_constraints;
         level_constraints.reinit(relevant_dofs);
         level_constraints.add_lines(
index 0247cad2bca86000b5d953098ebe8bcd678fd4f2..f644c7eafdb6f264714a057118436cdece1dd51d 100644 (file)
@@ -462,7 +462,7 @@ namespace Step39
     dof_handler.distribute_dofs(fe);
     dof_handler.distribute_mg_dofs();
 
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_set);
+    locally_relevant_set = DoFTools::extract_locally_relevant_dofs(dof_handler);
     solution.reinit(dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
     right_hand_side.reinit(dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
 
@@ -665,10 +665,8 @@ namespace Step39
         smoother_data[l].relaxation = 0.7;
         smoother_data[l].inversion  = PreconditionBlockBase<double>::svd;
         TrilinosWrappers::MPI::Vector *ghost = &(temp_vectors[l]);
-        IndexSet                       relevant_dofs;
-        DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                      l,
-                                                      relevant_dofs);
+        const IndexSet                 relevant_dofs =
+          DoFTools::extract_locally_relevant_level_dofs(dof_handler, l);
         ghost->reinit(dof_handler.locally_owned_mg_dofs(l),
                       relevant_dofs,
                       MPI_COMM_WORLD);
index fcd8752fbb9fc9ea85549549de13457ddf094816..4d9cb893cbc30027c4f3b332bc3180245215f4f9 100644 (file)
@@ -463,7 +463,7 @@ namespace Step39
     dof_handler.distribute_dofs(fe);
     dof_handler.distribute_mg_dofs();
 
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_set);
+    locally_relevant_set = DoFTools::extract_locally_relevant_dofs(dof_handler);
     solution.reinit(dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
     right_hand_side.reinit(dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
 
index 98d9823e096916ae3e9fd7180b7d001342867bd6..7f5380010291069448699389c5507acb5742e4c9 100644 (file)
@@ -131,7 +131,8 @@ namespace Step40
     dof_handler.distribute_dofs(fe);
 
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     locally_relevant_solution.reinit(locally_owned_dofs,
                                      locally_relevant_dofs,
index 81c7d807adae14fa88e077ecd8627bca187b667b..333632aab5f59944543b6e0e3d54ef5dbdee3dee 100644 (file)
@@ -135,7 +135,8 @@ namespace Step40
   {
     dof_handler.distribute_dofs(fe);
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     {
       std::vector<types::global_dof_index> starting_indices;
@@ -191,8 +192,8 @@ namespace Step40
       DoFRenumbering::Cuthill_McKee(dof_handler, false, true, starting_indices);
 
       locally_owned_dofs = dof_handler.locally_owned_dofs();
-      DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                              locally_relevant_dofs);
+      locally_relevant_dofs =
+        DoFTools::extract_locally_relevant_dofs(dof_handler);
     }
 
     locally_relevant_solution.reinit(locally_owned_dofs,
index 69ba4ced49c6a675f9b8539efdab531600f4bc1b..528e85f86eeb009d641543881cc81cdded042d52 100644 (file)
@@ -136,7 +136,8 @@ namespace Step40
   {
     dof_handler.distribute_dofs(fe);
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     {
       std::vector<types::global_dof_index> starting_indices;
@@ -192,8 +193,8 @@ namespace Step40
       DoFRenumbering::Cuthill_McKee(dof_handler, false, true, starting_indices);
 
       locally_owned_dofs = dof_handler.locally_owned_dofs();
-      DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                              locally_relevant_dofs);
+      locally_relevant_dofs =
+        DoFTools::extract_locally_relevant_dofs(dof_handler);
     }
 
     locally_relevant_solution.reinit(locally_owned_dofs,
index ef8a176db1b7f07725c02c0c8fd2344e8d4a3cb4..fcddcb4ea4b80337314899fe7b5fc37cf7bdcb3b 100644 (file)
@@ -131,7 +131,8 @@ namespace Step40
     dof_handler.distribute_dofs(fe);
 
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     locally_relevant_solution.reinit(locally_owned_dofs,
                                      locally_relevant_dofs,
index cc4029893692b96208cc052070e1ba1010495b80..f400c58890fc83bc5626445f72560fa4ef8c6a9a 100644 (file)
@@ -90,8 +90,8 @@ test()
   DoFHandler<dim> dofh(tr);
   dofh.distribute_dofs(fe);
 
-  IndexSet locally_relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, locally_relevant_set);
+  const IndexSet locally_relevant_set =
+    DoFTools::extract_locally_relevant_dofs(dofh);
 
   AffineConstraints<double> cm;
   cm.reinit(locally_relevant_set);
index 778fc849723d5f251d20472b919799fbfc68a75d..86ac673641f3d85f34c68bd6b31393fdd9df4724 100644 (file)
@@ -211,7 +211,8 @@ namespace Step27
     dof_handler.distribute_dofs(fe_collection);
 
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     solution.reinit(locally_owned_dofs,
                     locally_relevant_dofs,
@@ -232,8 +233,8 @@ namespace Step27
       Utilities::MPI::all_gather(dof_handler.get_communicator(),
                                  dof_handler.locally_owned_dofs());
 
-    IndexSet locally_active_dofs;
-    DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
+    const IndexSet locally_active_dofs =
+      DoFTools::extract_locally_active_dofs(dof_handler);
 
     AssertThrow(
       constraints.is_consistent_in_parallel(locally_owned_dofs_per_processor,
index 296393181b1701642b9aafa7c56df2d9bf1a4f0c..1cebbde370a514942f01f785d6759b60c7da5990 100644 (file)
@@ -126,9 +126,9 @@ test(const unsigned int n_glob_ref = 2, const unsigned int n_ref = 0)
   dof_handler.distribute_dofs(fe);
   dof_handler.distribute_mg_dofs();
 
-  IndexSet locally_owned_dofs, locally_relevant_dofs;
-  locally_owned_dofs = dof_handler.locally_owned_dofs();
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   // constraints:
   AffineConstraints<double> constraints;
@@ -191,8 +191,8 @@ test(const unsigned int n_glob_ref = 2, const unsigned int n_ref = 0)
     level_projection(min_level, max_level);
   for (unsigned int level = min_level; level <= max_level; ++level)
     {
-      IndexSet set;
-      DoFTools::extract_locally_relevant_level_dofs(dof_handler, level, set);
+      const IndexSet set =
+        DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
       level_projection[level].reinit(dof_handler.locally_owned_mg_dofs(level),
                                      set,
                                      mpi_communicator);
index a58f98554ca1f8e07a1cab89366a85a47e929771..a30f5b954e6b7d4b5bfcd8c61f8c5b640217e03e 100644 (file)
@@ -80,8 +80,8 @@ test()
   dof_handler.distribute_dofs(fe);
   dof_handler.distribute_mg_dofs();
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   AffineConstraints<double> constraints;
   constraints.reinit(locally_relevant_dofs);
index 7504161416aab9ef0e38ec2f50065ce612fada2c..864ccd2c16518d238f3c7f507e89c8fee3671014 100644 (file)
@@ -55,8 +55,8 @@ do_test()
   dof_handler.distribute_mg_dofs();
 
   // Make FE vector
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   using VectorType = LinearAlgebra::distributed::Vector<double>;
   VectorType global_dof_vector;
index 5848f0ecd6c3963f9b92d1af98f57fa8caf32df7..d9c069f22ee5c1195833b82919ceee37f9995a61 100644 (file)
@@ -59,8 +59,8 @@ do_test()
   dof_handler.distribute_mg_dofs();
 
   // Make FE vector
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   using VectorType = LinearAlgebra::distributed::Vector<double>;
   VectorType global_dof_vector;
index b58df2f12dcf241abeb8d44d266f50bbcbe7835c..fdf916d9eeb618605b51fa38d1f18953d08dcfa0 100644 (file)
@@ -35,11 +35,11 @@ initialize_dof_vector(LinearAlgebra::distributed::Vector<Number> &vec,
 {
   IndexSet locally_relevant_dofs;
   if (level == numbers::invalid_unsigned_int)
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
   else
-    DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                  level,
-                                                  locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
 
 
   const parallel::TriangulationBase<MeshType::dimension> *dist_tria =
index 549e5323a325fdb6bea1dd04a37550ce88eaf4c0..810f7d52a13cf43f7d96f0fbbb0e7f8ff02a0f57 100644 (file)
@@ -81,9 +81,8 @@ test(const unsigned int n_refinements,
       dof_handler.distribute_dofs(*fe);
 
       // set up constraints
-      IndexSet locally_relevant_dofs;
-      DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                              locally_relevant_dofs);
+      const IndexSet locally_relevant_dofs =
+        DoFTools::extract_locally_relevant_dofs(dof_handler);
       constraint.reinit(locally_relevant_dofs);
       VectorTools::interpolate_boundary_values(
         *mapping, dof_handler, 0, Functions::ZeroFunction<dim>(), constraint);
index bccaf283b5b2438cac9c9f23be7ee3afa45f8dde..278ef18265fba97e8ef300ad9d796bf8ca8a2563 100644 (file)
@@ -67,10 +67,8 @@ test(const unsigned int n_refinements, const unsigned int fe_degree_fine)
       auto &op         = operators[l];
 
       // set up constraints
-      IndexSet relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                    l,
-                                                    relevant_dofs);
+      const IndexSet relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof_handler, l);
       constraint.reinit(relevant_dofs);
       constraint.add_lines(mg_constrained_dofs.get_boundary_indices(l));
       constraint.close();
index 0f4be4b029e44d940ce99b0fbf03f8cc9f2b5b2e..35245389b4280300afa260210c2a86f6ce108e90 100644 (file)
@@ -65,10 +65,8 @@ test(const unsigned int n_refinements, const unsigned int fe_degree_fine)
       auto &op         = operators[l];
 
       // set up constraints
-      IndexSet relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                    l,
-                                                    relevant_dofs);
+      const IndexSet relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof_handler, l);
       constraint.reinit(relevant_dofs);
       constraint.add_lines(mg_constrained_dofs.get_boundary_indices(l));
       constraint.close();
index 4021082f577360128b51489ec2f1bb4fd2e45174..8f68647bd5173a121d81848f44c9a75cb9cb7fca 100644 (file)
@@ -108,9 +108,8 @@ test(const unsigned int n_refinements,
       dof_handler.distribute_dofs(*fe);
 
       // set up constraints
-      IndexSet locally_relevant_dofs;
-      DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                              locally_relevant_dofs);
+      const IndexSet locally_relevant_dofs =
+        DoFTools::extract_locally_relevant_dofs(dof_handler);
       constraint.reinit(locally_relevant_dofs);
       VectorTools::interpolate_boundary_values(
         *mapping, dof_handler, 0, Functions::ZeroFunction<dim>(), constraint);
index 40c9671d6cf4617f1995bb87e03456b58dc2ee2e..097df28d9c59ed9ccea92888c0617f0c4bfe5fba 100644 (file)
@@ -79,10 +79,8 @@ test(const unsigned int n_refinements, const unsigned int fe_degree_fine)
       mg_constrained_dofs.make_zero_boundary_constraints(dof_handler,
                                                          dirichlet_boundary);
 
-      IndexSet relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                    0 /*level*/,
-                                                    relevant_dofs);
+      const IndexSet relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof_handler, 0 /*level*/);
       constraint.reinit(relevant_dofs);
       constraint.add_lines(
         mg_constrained_dofs.get_boundary_indices(0 /*level*/));
index 2545767e013914212a7067b498b3e5c8927fda41..b63bb76dd8a5c932e93398650cc403e0d18b4e6f 100644 (file)
@@ -82,10 +82,8 @@ test(const unsigned int n_refinements,
       mg_constrained_dofs.make_zero_boundary_constraints(dof_handler,
                                                          dirichlet_boundary);
 
-      IndexSet relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                    level,
-                                                    relevant_dofs);
+      const IndexSet relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
       constraint.reinit(relevant_dofs);
       constraint.add_lines(mg_constrained_dofs.get_boundary_indices(level));
       constraint.close();
index 881e02f9f04f5c5ea1e16767c5e57400a6e0eec6..5cfc2d8d18e59bda61e5d68b042f3129c20f3fe0 100644 (file)
@@ -82,9 +82,8 @@ test(const unsigned int n_refinements,
       dof_handler.distribute_dofs(*fe);
 
       // set up constraints
-      IndexSet locally_relevant_dofs;
-      DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                              locally_relevant_dofs);
+      const IndexSet locally_relevant_dofs =
+        DoFTools::extract_locally_relevant_dofs(dof_handler);
       constraint.reinit(locally_relevant_dofs);
       VectorTools::interpolate_boundary_values(
         *mapping, dof_handler, 0, Functions::ZeroFunction<dim>(), constraint);
index fc5b7256c54cb9ba0511f9a2b235062766a6b100..f0a199a4aceff6076c9319d1a5dba33ef8674f15 100644 (file)
@@ -73,9 +73,8 @@ test(const unsigned int n_refinements,
       dof_handler.distribute_dofs(*fe);
 
       // set up constraints
-      IndexSet locally_relevant_dofs;
-      DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                              locally_relevant_dofs);
+      const IndexSet locally_relevant_dofs =
+        DoFTools::extract_locally_relevant_dofs(dof_handler);
       constraint.reinit(locally_relevant_dofs);
       VectorTools::interpolate_boundary_values(
         *_mapping, dof_handler, 0, Functions::ZeroFunction<dim>(), constraint);
index 05fa1370d5420b7c85406df0b537e1ec857811b5..1772d22b393fef1dc0a4d0b5529d14ce2c3015f6 100644 (file)
@@ -64,9 +64,8 @@ test(const unsigned int n_refinements, const unsigned int fe_degree_fine)
       dof_handler.distribute_dofs(*fe);
 
       // set up constraints
-      IndexSet locally_relevant_dofs;
-      DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                              locally_relevant_dofs);
+      const IndexSet locally_relevant_dofs =
+        DoFTools::extract_locally_relevant_dofs(dof_handler);
       constraint.reinit(locally_relevant_dofs);
       VectorTools::interpolate_boundary_values(
         mapping, dof_handler, 0, Functions::ZeroFunction<dim>(), constraint);
index d357f433c652e6dbce2af2913a454c430db12a99..0f42c5301a66884628bfca54464080b7cf54684b 100644 (file)
@@ -139,9 +139,8 @@ test(const unsigned int n_refinements,
       dof_handler.distribute_dofs(*fe);
 
       // set up constraints
-      IndexSet locally_relevant_dofs;
-      DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                              locally_relevant_dofs);
+      const IndexSet locally_relevant_dofs =
+        DoFTools::extract_locally_relevant_dofs(dof_handler);
       constraint.reinit(locally_relevant_dofs);
       VectorTools::interpolate_boundary_values(
         *mapping, dof_handler, 0, Functions::ZeroFunction<dim>(), constraint);
index 875f6f9b286993659398a995cd0b2eebaa3bc508..cf19efba55d8e61d708c958ddee7fa63bf3c7944 100644 (file)
@@ -98,8 +98,8 @@ do_test(const DoFHandler<dim> &dof)
   deallog << std::endl;
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
 
   // Dirichlet BC
   Functions::ZeroFunction<dim>                        zero_function;
@@ -173,8 +173,8 @@ do_test(const DoFHandler<dim> &dof)
       mg_additional_data.mg_level = level;
 
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index 3e625c69335960fbf2d20bcf0c98ebbf453c5149..3b40c6a914695f6fc39d8c137f7dce3e281ca299 100644 (file)
@@ -78,8 +78,8 @@ public:
     AffineConstraints<double> constraints;
     if (level == numbers::invalid_unsigned_int)
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_dofs(dof_handler);
         constraints.reinit(relevant_dofs);
         DoFTools::make_hanging_node_constraints(dof_handler, constraints);
         VectorTools::interpolate_boundary_values(dof_handler,
@@ -88,10 +88,8 @@ public:
       }
     else
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                      level,
-                                                      relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
         constraints.reinit(relevant_dofs);
         constraints.add_lines(mg_constrained_dofs.get_boundary_indices(level));
 
@@ -479,8 +477,8 @@ do_test(const DoFHandler<dim> &dof)
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
   AffineConstraints<double> hanging_node_constraints;
-  IndexSet                  locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet            locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
   hanging_node_constraints.reinit(locally_relevant_dofs);
   DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
   hanging_node_constraints.close();
index 65117a6c4e0c40488699dccafe3cc788c7f0b64f..a2bd0618f75d417221c6ae5e2525d8bcd12c1e2e 100644 (file)
@@ -99,8 +99,8 @@ do_test(const DoFHandler<dim> &dof)
   deallog << std::endl;
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
 
   // Dirichlet BC
   Functions::ZeroFunction<dim>                        zero_function;
@@ -187,8 +187,8 @@ do_test(const DoFHandler<dim> &dof)
       mg_additional_data.mg_level         = level;
 
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index 8194bce990c8e14160cd68e03cf7b8b32c6d62cb..b45c7b113e16b642b1260038d07c1d5ed25f1e34 100644 (file)
@@ -85,8 +85,8 @@ public:
     AffineConstraints<double> constraints;
     if (level == numbers::invalid_unsigned_int)
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_dofs(dof_handler);
         constraints.reinit(relevant_dofs);
         DoFTools::make_hanging_node_constraints(dof_handler, constraints);
         VectorTools::interpolate_boundary_values(dof_handler,
@@ -95,10 +95,8 @@ public:
       }
     else
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                      level,
-                                                      relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
         constraints.reinit(relevant_dofs);
         constraints.add_lines(mg_constrained_dofs.get_boundary_indices(level));
 
@@ -483,8 +481,8 @@ do_test(const DoFHandler<dim> &dof, const bool threaded)
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
   AffineConstraints<double> hanging_node_constraints;
-  IndexSet                  locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet            locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
   hanging_node_constraints.reinit(locally_relevant_dofs);
   DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
   hanging_node_constraints.close();
index 0eaaa3a1b929624e4d7e56c47342fe975b2bc866..764df6461d06a767196f11e4b4689e53ba5cd60b 100644 (file)
@@ -99,8 +99,8 @@ do_test(const DoFHandler<dim> &dof)
   deallog << std::endl;
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
 
   // Dirichlet BC
   Functions::ZeroFunction<dim>                        zero_function;
@@ -187,8 +187,8 @@ do_test(const DoFHandler<dim> &dof)
       mg_additional_data.mg_level         = level;
 
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index 69863db9ad1e7b2e22e3e8336462c898ec699e81..e858938e41ca1189531d04b3e262b4890f0f8b22 100644 (file)
@@ -82,8 +82,8 @@ public:
     AffineConstraints<double> constraints;
     if (level == numbers::invalid_unsigned_int)
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_dofs(dof_handler);
         constraints.reinit(relevant_dofs);
         DoFTools::make_hanging_node_constraints(dof_handler, constraints);
         VectorTools::interpolate_boundary_values(dof_handler,
@@ -92,10 +92,8 @@ public:
       }
     else
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                      level,
-                                                      relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
         constraints.reinit(relevant_dofs);
         constraints.add_lines(mg_constrained_dofs.get_boundary_indices(level));
 
@@ -480,8 +478,8 @@ do_test(const DoFHandler<dim> &dof, const bool threaded)
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
   AffineConstraints<double> hanging_node_constraints;
-  IndexSet                  locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet            locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
   hanging_node_constraints.reinit(locally_relevant_dofs);
   DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
   hanging_node_constraints.close();
index fbe0395231b87c55de00ae477ef48a9397e9a865..a55f71e0272489ea89d12ea3e00c9ed9fde283a8 100644 (file)
@@ -221,8 +221,8 @@ do_test(const DoFHandler<dim> &dof, const unsigned int nb)
   deallog << std::endl;
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
 
   // Dirichlet BC
   Functions::ZeroFunction<dim>                        zero_function;
@@ -315,8 +315,8 @@ do_test(const DoFHandler<dim> &dof, const unsigned int nb)
       mg_additional_data.mg_level         = level;
 
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index e2b6dfc02efa3b231edf009c448f8e0f6fccee7b..56001c7a6df322b88e617aad77800c26906bef6b 100644 (file)
@@ -100,8 +100,8 @@ do_test(const DoFHandler<dim> &dof)
   deallog << std::endl;
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
 
   // Dirichlet BC
   Functions::ZeroFunction<dim>                        zero_function;
@@ -188,8 +188,8 @@ do_test(const DoFHandler<dim> &dof)
       mg_additional_data.mg_level         = level;
 
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index e3b8a77dcaae1aecfefcfc5f0c37fa046b1cc8c8..3175054b230f9826954ad18448316d9fc897d7c9 100644 (file)
@@ -241,7 +241,7 @@ do_test(const std::vector<const DoFHandler<dim> *> &dof)
 
   std::vector<IndexSet> locally_relevant_dofs(dof.size());
   for (unsigned int i = 0; i < dof.size(); ++i)
-    DoFTools::extract_locally_relevant_dofs(*dof[i], locally_relevant_dofs[i]);
+    locally_relevant_dofs[i] = DoFTools::extract_locally_relevant_dofs(*dof[i]);
 
   // Dirichlet BC
   Functions::ZeroFunction<dim>                        zero_function;
@@ -349,10 +349,8 @@ do_test(const std::vector<const DoFHandler<dim> *> &dof)
         dof.size());
       for (unsigned int i = 0; i < dof.size(); ++i)
         {
-          IndexSet relevant_dofs;
-          DoFTools::extract_locally_relevant_level_dofs(*dof[i],
-                                                        level,
-                                                        relevant_dofs);
+          const IndexSet relevant_dofs =
+            DoFTools::extract_locally_relevant_level_dofs(*dof[i], level);
           level_constraints[i].reinit(relevant_dofs);
           level_constraints[i].add_lines(
             mg_constrained_dofs[i].get_boundary_indices(level));
index 6a2d19da8edec0d2187bb20564a111564de19e77..83f92ea0aee991d751e65452e7270e22389f7a28 100644 (file)
@@ -217,8 +217,8 @@ do_test(const DoFHandler<dim> &dof)
   deallog << std::endl;
   deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
 
   // Dirichlet BC
   Functions::ZeroFunction<dim>                        zero_function;
@@ -295,8 +295,8 @@ do_test(const DoFHandler<dim> &dof)
       mg_additional_data.mg_level         = level;
 
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index abf5fcc9cce351b2ab192bf35c51b367b77cbf67..97c59b6ef74cbee6ad0a329442e966e8f0fb419a 100644 (file)
@@ -105,8 +105,8 @@ do_test(const DoFHandler<dim> &dof)
   dirichlet_boundary[0] = &zero_function;
 
   // fine-level constraints
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof);
   AffineConstraints<double> constraints;
   constraints.reinit(locally_relevant_dofs);
   VectorTools::interpolate_boundary_values(dof,
@@ -160,8 +160,8 @@ do_test(const DoFHandler<dim> &dof)
       mg_additional_data.mg_level         = level;
 
       AffineConstraints<double> level_constraints;
-      IndexSet                  relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
+      const IndexSet            relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof, level);
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
         mg_constrained_dofs.get_boundary_indices(level));
index 43bcfb0c1660dfd4ecacf5f3c0139c3e4c8c6981..0f7412cd2b9405dd557eafb83a12febf39c6865a 100644 (file)
@@ -399,8 +399,8 @@ namespace Step37
     pcout << "Number of degrees of freedom: " << dof_handler.n_dofs()
           << std::endl;
 
-    IndexSet locally_relevant_dofs;
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    const IndexSet locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     constraints.clear();
     constraints.reinit(locally_relevant_dofs);
@@ -442,10 +442,8 @@ namespace Step37
 
     for (unsigned int level = 0; level < nlevels; ++level)
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                      level,
-                                                      relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
         AffineConstraints<double> level_constraints;
         level_constraints.reinit(relevant_dofs);
         level_constraints.add_lines(
index 8952a0a8170878a232cc0c8cae6b84c9a9ac5e11..34a3a5bcafded61c1bc372c4b2bef3e31ef0e6d5 100644 (file)
@@ -1035,9 +1035,8 @@ namespace StokesClass
     dof_handler_p.clear();
     dof_handler_p.distribute_dofs(fe_p);
 
-    IndexSet locally_relevant_dofs_u;
-    DoFTools::extract_locally_relevant_dofs(dof_handler_u,
-                                            locally_relevant_dofs_u);
+    const IndexSet locally_relevant_dofs_u =
+      DoFTools::extract_locally_relevant_dofs(dof_handler_u);
     constraints_u.reinit(locally_relevant_dofs_u);
     DoFTools::make_hanging_node_constraints(dof_handler_u, constraints_u);
 
@@ -1045,9 +1044,8 @@ namespace StokesClass
       dof_handler_u, 0, ExactSolution_BoundaryValues_u<dim>(), constraints_u);
     constraints_u.close();
 
-    IndexSet locally_relevant_dofs_p;
-    DoFTools::extract_locally_relevant_dofs(dof_handler_p,
-                                            locally_relevant_dofs_p);
+    const IndexSet locally_relevant_dofs_p =
+      DoFTools::extract_locally_relevant_dofs(dof_handler_p);
     constraints_p.reinit(locally_relevant_dofs_p);
     DoFTools::make_hanging_node_constraints(dof_handler_p, constraints_p);
     constraints_p.close();
@@ -1112,10 +1110,8 @@ namespace StokesClass
 
     for (unsigned int level = 0; level < n_levels; ++level)
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_level_dofs(dof_handler_u,
-                                                      level,
-                                                      relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_level_dofs(dof_handler_u, level);
         AffineConstraints<double> level_constraints;
         level_constraints.reinit(relevant_dofs);
         level_constraints.add_lines(
@@ -1173,9 +1169,8 @@ namespace StokesClass
 
     // Create constraints with no Dirchlet info
     AffineConstraints<double> constraints_u_no_dirchlet;
-    IndexSet                  locally_relevant_dofs_u;
-    DoFTools::extract_locally_relevant_dofs(dof_handler_u,
-                                            locally_relevant_dofs_u);
+    const IndexSet            locally_relevant_dofs_u =
+      DoFTools::extract_locally_relevant_dofs(dof_handler_u);
     constraints_u_no_dirchlet.reinit(locally_relevant_dofs_u);
     DoFTools::make_hanging_node_constraints(dof_handler_u,
                                             constraints_u_no_dirchlet);
index e5adc2746283ddc5eb57ae421e3d30e1e9ad8617..665c50ad71740e40019eb705f2714d09c52165a0 100644 (file)
@@ -87,10 +87,8 @@ check(const unsigned int fe_degree)
           LinearAlgebra::distributed::Vector<Number> v1, v2;
           LinearAlgebra::distributed::Vector<double> v1_cpy, v2_cpy, v3;
           v1.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
-          IndexSet relevant_set;
-          DoFTools::extract_locally_relevant_level_dofs(mgdof,
-                                                        level,
-                                                        relevant_set);
+          const IndexSet relevant_set =
+            DoFTools::extract_locally_relevant_level_dofs(mgdof, level);
           v2.reinit(mgdof.locally_owned_mg_dofs(level),
                     relevant_set,
                     MPI_COMM_WORLD);
index 067c480e9a3a8808290361f35d404d1fa376d382..595e889d6a79c2adc50c7d7a9b45d8d97c51cc8c 100644 (file)
@@ -147,8 +147,8 @@ check_fe(FiniteElement<dim> &fe)
       deallog << "get_boundary_indices:" << std::endl;
       bi.print(deallog);
 
-      IndexSet relevant;
-      DoFTools::extract_locally_relevant_level_dofs(dofh, level, relevant);
+      const IndexSet relevant =
+        DoFTools::extract_locally_relevant_level_dofs(dofh, level);
       deallog << "relevant:" << std::endl;
       relevant.print(deallog);
 
@@ -184,8 +184,8 @@ check_fe(FiniteElement<dim> &fe)
       {
         deallog << "Level " << level << ':' << std::endl;
 
-        IndexSet relevant;
-        DoFTools::extract_locally_relevant_level_dofs(dofh, level, relevant);
+        const IndexSet relevant =
+          DoFTools::extract_locally_relevant_level_dofs(dofh, level);
         mg_boundary_constraints[level].reinit(relevant);
         mg_boundary_constraints[level].add_lines(boundary_indices[level]);
 
@@ -229,8 +229,8 @@ check_fe(FiniteElement<dim> &fe)
                                                    level_boundary_indices);
         const auto &bi = mg_constrained_dofs_1.get_boundary_indices(level);
 
-        IndexSet relevant;
-        DoFTools::extract_locally_relevant_level_dofs(dofh, level, relevant);
+        const IndexSet relevant =
+          DoFTools::extract_locally_relevant_level_dofs(dofh, level);
 
         deallog << ((bi ==
                      (relevant &
index d6172e8e41d00e16a2d4d7447b7e1def06a6f1e2..a1a0cff9a1be2dd8d5d5815da49e2bc5c448a623 100644 (file)
@@ -207,8 +207,8 @@ check_fe(FiniteElement<dim> &fe)
       deallog << "get_boundary_indices:" << std::endl;
       bi.print(deallog);
 
-      IndexSet relevant;
-      DoFTools::extract_locally_relevant_level_dofs(dofh, level, relevant);
+      const IndexSet relevant =
+        DoFTools::extract_locally_relevant_level_dofs(dofh, level);
       deallog << "relevant:" << std::endl;
       relevant.print(deallog);
 
index 9f543778cc2f71275a5542aa1f0cf9da9dda5f97..4da2a04d811ee9bd159feebb9617a405ff792b74 100644 (file)
@@ -51,10 +51,8 @@ check()
 
   for (unsigned int level = 0; level < tr.n_levels(); ++level)
     {
-      IndexSet relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(mgdof,
-                                                    level,
-                                                    relevant_dofs);
+      const IndexSet relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(mgdof, level);
       AffineConstraints<double> level_constraints;
       level_constraints.reinit(relevant_dofs);
 
index 2b230f1a09cedb9577fa5c40ea305aab6dc33fa6..b0a2d05937c506e933d14ca3d108cce5fe3a790f 100644 (file)
@@ -144,8 +144,8 @@ namespace Step50
     mg_dof_handler.distribute_dofs(fe);
     mg_dof_handler.distribute_mg_dofs();
 
-    DoFTools::extract_locally_relevant_dofs(mg_dof_handler,
-                                            locally_relevant_set);
+    locally_relevant_set =
+      DoFTools::extract_locally_relevant_dofs(mg_dof_handler);
 
     solution.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
     system_rhs.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
@@ -281,10 +281,8 @@ namespace Step50
     for (unsigned int level = 0; level < triangulation.n_global_levels();
          ++level)
       {
-        IndexSet dofset;
-        DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler,
-                                                      level,
-                                                      dofset);
+        const IndexSet dofset =
+          DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler, level);
         boundary_constraints[level].reinit(dofset);
         boundary_constraints[level].add_lines(
           mg_constrained_dofs.get_refinement_edge_indices(level));
index 024b0623057dbc385619fcd2fac91ecd3402b0f6..e808c12f89028016ec498da4ba905188a8acda1d 100644 (file)
@@ -82,14 +82,14 @@ test()
 
   FE_Q<dim>                 fe(2);
   DoFHandler<dim>           mg_dof_handler(tria);
-  IndexSet                  locally_relevant_set;
   AffineConstraints<double> constraints;
   MGConstrainedDoFs         mg_constrained_dofs;
 
   mg_dof_handler.distribute_dofs(fe);
   mg_dof_handler.distribute_mg_dofs();
 
-  DoFTools::extract_locally_relevant_dofs(mg_dof_handler, locally_relevant_set);
+  const IndexSet locally_relevant_set =
+    DoFTools::extract_locally_relevant_dofs(mg_dof_handler);
 
   constraints.reinit(locally_relevant_set);
   DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
index fb777addbdc4a47e90c2365cbe9b18e0d16fa241..a5cd8ff9fda25786e572382651772a2fb798a753 100644 (file)
@@ -80,8 +80,8 @@ test()
   dof_handler.distribute_dofs(fe);
   dof_handler.distribute_mg_dofs();
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   AffineConstraints<double> constraints;
   constraints.reinit(locally_relevant_dofs);
index 059924d1fce881091b37b270e30f7072559c4c8c..73532b78ed701ae76807ebfd0bffbd6949667da0 100644 (file)
@@ -201,8 +201,8 @@ namespace Step50
     mg_dof_handler.distribute_dofs(fe);
     mg_dof_handler.distribute_mg_dofs();
 
-    DoFTools::extract_locally_relevant_dofs(mg_dof_handler,
-                                            locally_relevant_set);
+    locally_relevant_set =
+      DoFTools::extract_locally_relevant_dofs(mg_dof_handler);
 
     solution.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
     system_rhs.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
@@ -348,10 +348,8 @@ namespace Step50
     for (unsigned int level = 0; level < triangulation.n_global_levels();
          ++level)
       {
-        IndexSet dofset;
-        DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler,
-                                                      level,
-                                                      dofset);
+        const IndexSet dofset =
+          DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler, level);
         boundary_constraints[level].reinit(dofset);
         boundary_constraints[level].add_lines(
           mg_constrained_dofs.get_refinement_edge_indices(level));
index c02bbee97743db19197a1fa71c2ab368a489a94f..5546f604630922fa946249cd546e4be67fb01279 100644 (file)
@@ -55,8 +55,8 @@ do_test()
   dof_handler.distribute_mg_dofs();
 
   // Make FE vector
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   using VectorType = LinearAlgebra::distributed::Vector<double>;
   VectorType global_dof_vector;
index 497b9f8d32e51acc6056fb86426c8235d303d840..785c553df6cb9d47ffe51b9fb35e0d643a9e3af6 100644 (file)
@@ -59,8 +59,8 @@ do_test()
   dof_handler.distribute_mg_dofs();
 
   // Make FE vector
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   using VectorType = LinearAlgebra::distributed::Vector<double>;
   VectorType global_dof_vector;
index 736b21c449292c09373c200dc12c29f5fbc96e8c..5575a1dfe38910774c24c18ebd92dd0ff3f9ef20 100644 (file)
@@ -194,8 +194,8 @@ namespace Step50
     mg_dof_handler.distribute_dofs(fe);
     mg_dof_handler.distribute_mg_dofs();
 
-    DoFTools::extract_locally_relevant_dofs(mg_dof_handler,
-                                            locally_relevant_set);
+    locally_relevant_set =
+      DoFTools::extract_locally_relevant_dofs(mg_dof_handler);
 
     solution.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
     system_rhs.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
@@ -347,10 +347,8 @@ namespace Step50
     for (unsigned int level = 0; level < triangulation.n_global_levels();
          ++level)
       {
-        IndexSet dofset;
-        DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler,
-                                                      level,
-                                                      dofset);
+        const IndexSet dofset =
+          DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler, level);
         boundary_constraints[level].reinit(dofset);
         boundary_constraints[level].add_lines(
           mg_constrained_dofs.get_refinement_edge_indices(level));
index a24802eeaf3cfd32fbaccd1db84a722652cbbfa7..be074f51002065d0fc9882fb0e8c5bfb69f072d0 100644 (file)
@@ -194,8 +194,8 @@ namespace Step50
     mg_dof_handler.distribute_dofs(fe);
     mg_dof_handler.distribute_mg_dofs();
 
-    DoFTools::extract_locally_relevant_dofs(mg_dof_handler,
-                                            locally_relevant_set);
+    locally_relevant_set =
+      DoFTools::extract_locally_relevant_dofs(mg_dof_handler);
 
     solution.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
     system_rhs.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
@@ -346,10 +346,8 @@ namespace Step50
     for (unsigned int level = 0; level < triangulation.n_global_levels();
          ++level)
       {
-        IndexSet dofset;
-        DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler,
-                                                      level,
-                                                      dofset);
+        const IndexSet dofset =
+          DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler, level);
         boundary_constraints[level].reinit(dofset);
         boundary_constraints[level].add_lines(
           mg_constrained_dofs.get_refinement_edge_indices(level));
index 871b3a6757c7af9b99bdc78ac3da90bb814ea706..201dfd021277a785a05a822b3509d4bd36f61b22 100644 (file)
@@ -194,8 +194,8 @@ namespace Step50
     mg_dof_handler.distribute_dofs(fe);
     mg_dof_handler.distribute_mg_dofs();
 
-    DoFTools::extract_locally_relevant_dofs(mg_dof_handler,
-                                            locally_relevant_set);
+    locally_relevant_set =
+      DoFTools::extract_locally_relevant_dofs(mg_dof_handler);
 
     solution.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
     system_rhs.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
@@ -347,10 +347,8 @@ namespace Step50
     for (unsigned int level = 0; level < triangulation.n_global_levels();
          ++level)
       {
-        IndexSet dofset;
-        DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler,
-                                                      level,
-                                                      dofset);
+        const IndexSet dofset =
+          DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler, level);
         boundary_constraints[level].reinit(dofset);
         boundary_constraints[level].add_lines(
           mg_constrained_dofs.get_refinement_edge_indices(level));
index 81828fbc02349f35429b4ce226d9a1ce7d40e700..bd18826b51151e8faa437115f3f849cf62edf2f2 100644 (file)
@@ -198,8 +198,8 @@ namespace Step50
     mg_dof_handler.distribute_dofs(fe);
     mg_dof_handler.distribute_mg_dofs();
 
-    DoFTools::extract_locally_relevant_dofs(mg_dof_handler,
-                                            locally_relevant_set);
+    locally_relevant_set =
+      DoFTools::extract_locally_relevant_dofs(mg_dof_handler);
 
     solution.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
     system_rhs.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
@@ -345,10 +345,8 @@ namespace Step50
     for (unsigned int level = 0; level < triangulation.n_global_levels();
          ++level)
       {
-        IndexSet dofset;
-        DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler,
-                                                      level,
-                                                      dofset);
+        const IndexSet dofset =
+          DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler, level);
         boundary_constraints[level].reinit(dofset);
         boundary_constraints[level].add_lines(
           mg_constrained_dofs.get_refinement_edge_indices(level));
index 3e4276cc0040abd7197712ac51257c3b0c1ea26a..b699294c176f45617f7213da64721c2ca29af2c6 100644 (file)
@@ -198,8 +198,8 @@ namespace Step50
     mg_dof_handler.distribute_dofs(fe);
     mg_dof_handler.distribute_mg_dofs();
 
-    DoFTools::extract_locally_relevant_dofs(mg_dof_handler,
-                                            locally_relevant_set);
+    locally_relevant_set =
+      DoFTools::extract_locally_relevant_dofs(mg_dof_handler);
 
     solution.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
     system_rhs.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
@@ -353,10 +353,8 @@ namespace Step50
     for (unsigned int level = 0; level < triangulation.n_global_levels();
          ++level)
       {
-        IndexSet dofset;
-        DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler,
-                                                      level,
-                                                      dofset);
+        const IndexSet dofset =
+          DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler, level);
         boundary_constraints[level].reinit(dofset);
         boundary_constraints[level].add_lines(
           mg_constrained_dofs.get_refinement_edge_indices(level));
index 402f8a19662c8a780e434ed250428e1456d01501..8ed0e56d967c86cfcb06d224a44f8bdaef7a1a17 100644 (file)
@@ -129,8 +129,8 @@ check_fe(FiniteElement<dim> &fe)
   mg_constrained_dofs.initialize(dofh);
 
   AffineConstraints<double> hanging_node_constraints;
-  IndexSet                  locally_relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, locally_relevant_set);
+  const IndexSet            locally_relevant_set =
+    DoFTools::extract_locally_relevant_dofs(dofh);
   hanging_node_constraints.reinit(locally_relevant_set);
   DoFTools::make_hanging_node_constraints(dofh, hanging_node_constraints);
   hanging_node_constraints.close();
index aa26e61e892ccd59af29c14a084c6d768838693b..ae3a5c32fe1e49aa2b36e1e09fc3448ba9dfb0b0 100644 (file)
@@ -87,10 +87,8 @@ check(const unsigned int fe_degree)
           LinearAlgebra::distributed::Vector<Number> v1, v2;
           LinearAlgebra::distributed::Vector<double> v1_cpy, v2_cpy, v3;
           v1.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
-          IndexSet relevant_set;
-          DoFTools::extract_locally_relevant_level_dofs(mgdof,
-                                                        level,
-                                                        relevant_set);
+          const IndexSet relevant_set =
+            DoFTools::extract_locally_relevant_level_dofs(mgdof, level);
           v2.reinit(mgdof.locally_owned_mg_dofs(level),
                     relevant_set,
                     MPI_COMM_WORLD);
index 61dbcc9005ef177c217cbf3b9d7414b46a8d103a..38c1c1369e24840d607791f3b726672d9f23b960 100644 (file)
@@ -50,8 +50,8 @@ check()
   MGConstrainedDoFs mg_constrained_dofs;
   mg_constrained_dofs.initialize(mgdof);
 
-  IndexSet relevant_dofs;
-  DoFTools::extract_locally_relevant_level_dofs(mgdof, 0, relevant_dofs);
+  const IndexSet relevant_dofs =
+    DoFTools::extract_locally_relevant_level_dofs(mgdof, 0);
   AffineConstraints<double> user_constraints;
   user_constraints.reinit(relevant_dofs);
 
index 1bc314c91f05fe44f52c630ba29e8df8d9413850..64123fbc11ed44c25965fa45667d1d0f048264be 100644 (file)
@@ -47,8 +47,8 @@ check()
   MGConstrainedDoFs mg_constrained_dofs;
   mg_constrained_dofs.initialize(mgdof);
 
-  IndexSet relevant_dofs;
-  DoFTools::extract_locally_relevant_level_dofs(mgdof, 0, relevant_dofs);
+  const IndexSet relevant_dofs =
+    DoFTools::extract_locally_relevant_level_dofs(mgdof, 0);
   AffineConstraints<double> user_constraints;
   user_constraints.reinit(relevant_dofs);
 
index 07f893cd411ceab89bd17566907c2b408297b88e..4d9e8e9ad893c4b587428ad59c15d767b1bebd34 100644 (file)
@@ -55,8 +55,8 @@ test()
   const auto      mpi_comm   = dof_handler.get_communicator();
   const IndexSet &owned_dofs = dof_handler.locally_owned_dofs();
 
-  IndexSet relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_dofs);
+  const IndexSet relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   AffineConstraints<typename MatrixType::value_type> constraints;
 
index e9638891f84a70e3b4cac6f1c40a02f0ca052eef..3451766065c7daf2415a167cd6ecf5271d65b961 100644 (file)
@@ -1037,9 +1037,8 @@ namespace StokesClass
     dof_handler_p.clear();
     dof_handler_p.distribute_dofs(fe_p);
 
-    IndexSet locally_relevant_dofs_u;
-    DoFTools::extract_locally_relevant_dofs(dof_handler_u,
-                                            locally_relevant_dofs_u);
+    const IndexSet locally_relevant_dofs_u =
+      DoFTools::extract_locally_relevant_dofs(dof_handler_u);
     constraints_u.reinit(locally_relevant_dofs_u);
     DoFTools::make_hanging_node_constraints(dof_handler_u, constraints_u);
 
@@ -1054,9 +1053,8 @@ namespace StokesClass
                                                     constraints_u);
     constraints_u.close();
 
-    IndexSet locally_relevant_dofs_p;
-    DoFTools::extract_locally_relevant_dofs(dof_handler_p,
-                                            locally_relevant_dofs_p);
+    const IndexSet locally_relevant_dofs_p =
+      DoFTools::extract_locally_relevant_dofs(dof_handler_p);
     constraints_p.reinit(locally_relevant_dofs_p);
     DoFTools::make_hanging_node_constraints(dof_handler_p, constraints_p);
     constraints_p.close();
@@ -1121,10 +1119,8 @@ namespace StokesClass
 
     for (unsigned int level = 0; level < n_levels; ++level)
       {
-        IndexSet relevant_dofs;
-        DoFTools::extract_locally_relevant_level_dofs(dof_handler_u,
-                                                      level,
-                                                      relevant_dofs);
+        const IndexSet relevant_dofs =
+          DoFTools::extract_locally_relevant_level_dofs(dof_handler_u, level);
         AffineConstraints<double> level_constraints;
         level_constraints.reinit(relevant_dofs);
         // level_constraints.add_lines(
@@ -1197,9 +1193,8 @@ namespace StokesClass
 
     // Create constraints with no Dirchlet info
     AffineConstraints<double> constraints_u_no_dirchlet;
-    IndexSet                  locally_relevant_dofs_u;
-    DoFTools::extract_locally_relevant_dofs(dof_handler_u,
-                                            locally_relevant_dofs_u);
+    const IndexSet            locally_relevant_dofs_u =
+      DoFTools::extract_locally_relevant_dofs(dof_handler_u);
     constraints_u_no_dirchlet.reinit(locally_relevant_dofs_u);
     DoFTools::make_hanging_node_constraints(dof_handler_u,
                                             constraints_u_no_dirchlet);
index 7e1fa6a1c8010d61224a808c5f479ff8340226cd..18916c4643d09a688e21307dbde03009a11739bd 100644 (file)
@@ -111,8 +111,8 @@ do_project(const parallel::distributed::Triangulation<dim> &triangulation,
   deallog << "n_cells=" << triangulation.n_global_active_cells() << std::endl;
   deallog << "n_dofs=" << dof_handler.n_dofs() << std::endl;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   AffineConstraints<double> constraints;
   constraints.reinit(locally_relevant_dofs);
index ed363be6e31f9652239986cd444de78bd8dcf467..cc255c4410501eea1a0bd5b7c0e1771434430435 100644 (file)
@@ -124,8 +124,8 @@ do_project(const parallel::distributed::Triangulation<dim> &triangulation,
       dof_handlers[i]->distribute_dofs(*fes[i]);
       deallog << "n_dofs=" << dof_handlers[i]->n_dofs() << std::endl;
 
-      DoFTools::extract_locally_relevant_dofs(*dof_handlers[i],
-                                              locally_relevant_dofs[i]);
+      locally_relevant_dofs[i] =
+        DoFTools::extract_locally_relevant_dofs(*dof_handlers[i]);
 
       constraints[i].reinit(locally_relevant_dofs[i]);
       DoFTools::make_hanging_node_constraints(*dof_handlers[i], constraints[i]);
index 6dd035050eb7c0cd7f2d1535bcee875a32a5c796..99be321dc94ba1e5a33fbbda5ebdd450ea9bd467 100644 (file)
@@ -69,9 +69,9 @@ test()
   DoFHandler<dim, spacedim> space_dh(tria);
   space_dh.distribute_dofs(fe);
 
-  IndexSet locally_owned_dofs = space_dh.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(space_dh, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = space_dh.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(space_dh);
 
   if (my_mpi_id == 0)
     deallog << "dim: " << dim << ", spacedim: " << spacedim << std::endl
index bd10143f90bd2f12bdb41fff9b4137c3d548c7b6..58705b459168b2a33496b7817b44300628ce7ee8 100644 (file)
@@ -78,9 +78,9 @@ test()
   DoFHandler<dim, spacedim> space_dh(space_tria);
   space_dh.distribute_dofs(space_fe);
 
-  IndexSet locally_owned_dofs = space_dh.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(space_dh, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = space_dh.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(space_dh);
 
   if (my_mpi_id == 0)
     deallog << "dim: " << dim << ", spacedim: " << spacedim << std::endl
index 299b96dd284d2fe749cb915c40f3e7a261a76589..ab8c244746f8aa60ccc96020fc9e4c6276658beb 100644 (file)
@@ -82,9 +82,9 @@ test()
   DoFHandler<dim, spacedim> space_dh(space_tria);
   space_dh.distribute_dofs(space_fe);
 
-  IndexSet locally_owned_dofs = space_dh.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(space_dh, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = space_dh.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(space_dh);
 
   if (my_mpi_id == 0)
     deallog << "dim: " << dim << ", spacedim: " << spacedim << std::endl
index 9cd2b913e7b711bca4e9f3e2185134f84c2e8838..351b95135a4732f95dc728d48f0bcbb1033f6cc1 100644 (file)
@@ -81,9 +81,9 @@ test()
   DoFHandler<dim, spacedim> space_dh(space_tria);
   space_dh.distribute_dofs(space_fe);
 
-  IndexSet locally_owned_dofs = space_dh.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(space_dh, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = space_dh.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(space_dh);
 
   if (my_mpi_id == 0)
     deallog << "dim: " << dim << ", spacedim: " << spacedim << std::endl
index e5a760b05610ddd3b7f02ddcb691033b7b24effc..2dc7134e3bb885d56ddd06c32f982fd694ce2b0b 100644 (file)
@@ -76,9 +76,9 @@ test()
   DoFHandler<dim, spacedim> space_dh(space_tria);
   space_dh.distribute_dofs(space_fe);
 
-  IndexSet locally_owned_dofs = space_dh.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(space_dh, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = space_dh.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(space_dh);
 
   if (my_mpi_id == 0)
     deallog << "dim: " << dim << ", spacedim: " << spacedim << std::endl
index 2fa7d8ba663dc07995b01fe8a660edd4e1b83cc2..0b2d24f20e5edbe7d328e9fc1065733cec64f27d 100644 (file)
@@ -78,9 +78,9 @@ test()
   DoFHandler<dim, spacedim> space_dh(space_tria);
   space_dh.distribute_dofs(space_fe);
 
-  IndexSet locally_owned_dofs = space_dh.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(space_dh, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = space_dh.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(space_dh);
 
   if (my_mpi_id == 0)
     deallog << "dim: " << dim << ", spacedim: " << spacedim << std::endl
index 611d260fd5a247ee255110e5fa3a49bfb4fe503c..28abc99d43ab1e31419d83851f44b1436e8a27f1 100644 (file)
@@ -398,9 +398,9 @@ namespace Step68
   ParticleTracking<dim>::setup_background_dofs()
   {
     fluid_dh.distribute_dofs(fluid_fe);
-    const IndexSet locally_owned_dofs = fluid_dh.locally_owned_dofs();
-    IndexSet       locally_relevant_dofs;
-    DoFTools::extract_locally_relevant_dofs(fluid_dh, locally_relevant_dofs);
+    const IndexSet &locally_owned_dofs = fluid_dh.locally_owned_dofs();
+    const IndexSet  locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(fluid_dh);
 
     velocity_field.reinit(locally_owned_dofs,
                           locally_relevant_dofs,
index 255edc3cf07d520160b842cc72203a392eb18a19..681fce86b6d4d614c675a63d8cb2fe60886bee9c 100644 (file)
@@ -502,8 +502,7 @@ LaplaceProblem<dim>::setup_dofs()
       else
         dof_h.distribute_dofs(*fes[level + 1 - coarse_triangulations.size()]);
 
-      IndexSet relevant_dofs;
-      DoFTools::extract_locally_relevant_dofs(dof_h, relevant_dofs);
+      IndexSet relevant_dofs = DoFTools::extract_locally_relevant_dofs(dof_h);
       AffineConstraints<float> &constraints = level_constraints[level];
       constraints.reinit(relevant_dofs);
       DoFTools::make_hanging_node_constraints(dof_h, constraints);
@@ -517,7 +516,7 @@ LaplaceProblem<dim>::setup_dofs()
                                                 additional_data);
 
       // now create the final constraints object
-      DoFTools::extract_locally_relevant_dofs(dof_h, relevant_dofs);
+      relevant_dofs = DoFTools::extract_locally_relevant_dofs(dof_h);
       constraints.clear();
       constraints.reinit(relevant_dofs);
       DoFTools::make_hanging_node_constraints(dof_h, constraints);
index 4fffa02e321be2a5f16c10b8b5e7eb0a4faa6364..c555019a7e3ad16e3919b5e32f1bf0264d38e22d 100644 (file)
@@ -369,8 +369,8 @@ LaplaceProblem<dim>::setup_dofs()
 
   debug_output << "Number of DoFs: " << dof_handler.n_dofs() << std::endl;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   constraints.clear();
   constraints.reinit(locally_relevant_dofs);
@@ -391,10 +391,8 @@ LaplaceProblem<dim>::setup_dofs()
 
   for (unsigned int level = 0; level < triangulation.n_global_levels(); ++level)
     {
-      IndexSet relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                    level,
-                                                    relevant_dofs);
+      const IndexSet relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
       AffineConstraints<double> level_constraints;
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
@@ -442,10 +440,8 @@ LaplaceProblem<dim>::setup_matrix_free()
 
   for (unsigned int level = 0; level < nlevels; ++level)
     {
-      IndexSet relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                    level,
-                                                    relevant_dofs);
+      const IndexSet relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
       AffineConstraints<double> level_constraints;
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
index 472cbe74787ae8e2755b5342fca34b2c429408ca..6c3cbdeabc8089b24a5aed3db8600f673ff23d87 100644 (file)
@@ -369,8 +369,8 @@ LaplaceProblem<dim>::setup_dofs()
 
   debug_output << "Number of DoFs: " << dof_handler.n_dofs() << std::endl;
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   constraints.clear();
   constraints.reinit(locally_relevant_dofs);
@@ -391,10 +391,8 @@ LaplaceProblem<dim>::setup_dofs()
 
   for (unsigned int level = 0; level < triangulation.n_global_levels(); ++level)
     {
-      IndexSet relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                    level,
-                                                    relevant_dofs);
+      const IndexSet relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
       AffineConstraints<double> level_constraints;
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
@@ -442,10 +440,8 @@ LaplaceProblem<dim>::setup_matrix_free()
 
   for (unsigned int level = 0; level < nlevels; ++level)
     {
-      IndexSet relevant_dofs;
-      DoFTools::extract_locally_relevant_level_dofs(dof_handler,
-                                                    level,
-                                                    relevant_dofs);
+      const IndexSet relevant_dofs =
+        DoFTools::extract_locally_relevant_level_dofs(dof_handler, level);
       AffineConstraints<double> level_constraints;
       level_constraints.reinit(relevant_dofs);
       level_constraints.add_lines(
index 565580f60e2f5bd02193f5e5756505ac419d88da..4150ab19f750112aada3567e2486113ba49ae90d 100644 (file)
@@ -263,8 +263,8 @@ namespace Step68
   ParticleTracking<dim>::setup_background_dofs()
   {
     fluid_dh.distribute_dofs(fluid_fe);
-    const IndexSet locally_owned_dofs = fluid_dh.locally_owned_dofs();
-    const IndexSet locally_relevant_dofs =
+    const IndexSet &locally_owned_dofs = fluid_dh.locally_owned_dofs();
+    const IndexSet  locally_relevant_dofs =
       DoFTools::extract_locally_relevant_dofs(fluid_dh);
 
     velocity_field.reinit(locally_owned_dofs,
index 9a3fb8ba8f4ecbf59e5030052e3020d401f8078d..2e9433e72632202bc683e525b05210c828dfbb09 100644 (file)
@@ -69,16 +69,13 @@ main(int argc, char *argv[])
   GridGenerator::hyper_cube(triangulation);
   triangulation.refine_global(3);
 
-
-  IndexSet locally_owned_dofs;
-  IndexSet locally_relevant_dofs;
-  IndexSet locally_active_dofs;
-
   dof_handler.distribute_dofs(fe);
 
-  locally_owned_dofs    = dof_handler.locally_owned_dofs();
-  locally_relevant_dofs = DoFTools::extract_locally_relevant_dofs(dof_handler);
-  locally_active_dofs   = DoFTools::extract_locally_active_dofs(dof_handler);
+  const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
+  const IndexSet locally_active_dofs =
+    DoFTools::extract_locally_active_dofs(dof_handler);
 
   DynamicSparsityPattern dsp(locally_relevant_dofs);
 
index 732e4a2a553f51b8b45c59abe6044d1cbcf2e199..b20d67e3bcf603fe3499a5259eb6d3a9fcc64687 100644 (file)
@@ -178,8 +178,8 @@ namespace Step77
         dof_handler.distribute_dofs(fe);
       }
 
-    IndexSet locally_owned_dofs = dof_handler.locally_owned_dofs();
-    IndexSet locally_relevant_dofs =
+    const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
+    const IndexSet  locally_relevant_dofs =
       DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     // Specifically, we need two types of AffineConstraints.
index efc17427df4917fe0c621cff58dfe4b6fbf335ca..f09b608f1205ffa199790d9e124782e980ee6705 100644 (file)
@@ -80,9 +80,9 @@ test()
   DoFHandler<dim> dof_handler(tria);
   dof_handler.distribute_dofs(fe);
 
-  IndexSet locally_owned_dofs = dof_handler.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   PETScWrappers::MPI::Vector                 vector, vector_locally_relevant;
   LinearAlgebra::distributed::Vector<double> vector_Re,
index d0b14e10954b11f2cb2f9db01cfe9aac1c9c1201..c0942548f1b118d8ea5a4d93997d2649164ba23b 100644 (file)
@@ -74,9 +74,9 @@ test(const unsigned int poly_degree = 1)
   DoFHandler<dim> dof_handler(tria);
   dof_handler.distribute_dofs(fe);
 
-  IndexSet locally_owned_dofs = dof_handler.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   PETScWrappers::MPI::Vector       vector;
   PETScWrappers::MPI::SparseMatrix mass_matrix;
index 2655f2cfb2f332befc148c51671656d1cbe1e252..24d69d679b5ad0e6ff8c1224a871b3c1295101d2 100644 (file)
@@ -352,7 +352,8 @@ namespace Step18
   {
     dof_handler.distribute_dofs(fe);
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
     hanging_node_constraints.clear();
     DoFTools::make_hanging_node_constraints(dof_handler,
                                             hanging_node_constraints);
index f88da9342cceb62610ebf8f5cef1c6a934704d2d..ba5760246df2793f7fc9cad73da07823542e40c0 100644 (file)
@@ -368,7 +368,8 @@ namespace Step18
   {
     dof_handler.distribute_dofs(fe);
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
     hanging_node_constraints.clear();
     DoFTools::make_hanging_node_constraints(dof_handler,
                                             hanging_node_constraints);
index 5920952f860287a80c1fff841a35d52e63a880f8..e7197643c452fed76a7b344651ef9a03030c8269 100644 (file)
@@ -57,9 +57,8 @@ template <int dim, int spacedim>
 std::shared_ptr<const Utilities::MPI::Partitioner>
 create_partitioner(const DoFHandler<dim, spacedim> &dof_handler)
 {
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   return std::make_shared<const Utilities::MPI::Partitioner>(
     dof_handler.locally_owned_dofs(),
index e68faf3a60e1c228e5e25791503eac84d9f593ca..617d527fc88604df1d83f1e50ee2dd9697494579 100644 (file)
@@ -57,9 +57,8 @@ template <int dim, int spacedim>
 std::shared_ptr<const Utilities::MPI::Partitioner>
 create_partitioner(const DoFHandler<dim, spacedim> &dof_handler)
 {
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   return std::make_shared<const Utilities::MPI::Partitioner>(
     dof_handler.locally_owned_dofs(),
index eb21c217d94412f29e1b8ae5b18f2c4da04c4a0e..59e869ad082c68d14c61ca8d140c2dcd4f8a53c8 100644 (file)
@@ -68,9 +68,8 @@ template <int dim, int spacedim>
 std::shared_ptr<const Utilities::MPI::Partitioner>
 create_partitioner(const DoFHandler<dim, spacedim> &dof_handler)
 {
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   return std::make_shared<const Utilities::MPI::Partitioner>(
     dof_handler.locally_owned_dofs(),
index b235b8a3af532e9c5c7d4294dade911f46f3dcf5..3f76f39f49177e8e0099e17150dcdee2d474cf13 100644 (file)
@@ -103,9 +103,8 @@ template <int dim, int spacedim>
 std::shared_ptr<const Utilities::MPI::Partitioner>
 create_partitioner(const DoFHandler<dim, spacedim> &dof_handler)
 {
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   return std::make_shared<const Utilities::MPI::Partitioner>(
     dof_handler.locally_owned_dofs(),
index de5894d8ce6912191156e1735a1e9533998782f3..d556d5968eb1c9acb6eb8ed653ad3d2fd60f7d13 100644 (file)
@@ -86,9 +86,8 @@ template <int dim, int spacedim>
 std::shared_ptr<const Utilities::MPI::Partitioner>
 create_partitioner(const DoFHandler<dim, spacedim> &dof_handler)
 {
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   return std::make_shared<const Utilities::MPI::Partitioner>(
     dof_handler.locally_owned_dofs(),
index 4916403000ea2ea5991003b3b4bd4dc4f7336b23..c0d2a0a9ad1cbe1220c975a032a3ea06a382076e 100644 (file)
@@ -93,9 +93,8 @@ template <int dim, int spacedim>
 std::shared_ptr<const Utilities::MPI::Partitioner>
 create_partitioner(const DoFHandler<dim, spacedim> &dof_handler)
 {
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   return std::make_shared<const Utilities::MPI::Partitioner>(
     dof_handler.locally_owned_dofs(),
index fb4551e9cb5ddca67c3d2283f21c9f7a5009c327..f2f9bb76e3d5e6f100da1903bcb97e7aac0159b3 100644 (file)
@@ -66,9 +66,8 @@ template <int dim, int spacedim>
 std::shared_ptr<const Utilities::MPI::Partitioner>
 create_partitioner(const DoFHandler<dim, spacedim> &dof_handler)
 {
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   return std::make_shared<const Utilities::MPI::Partitioner>(
     dof_handler.locally_owned_dofs(),
index ff5978a14fb88af54ab2e1b4071a8c5f6bf97233..078b5a12a652ac3b9ade259e30e8ee7f5d6f8735 100644 (file)
@@ -62,9 +62,8 @@ template <int dim, int spacedim>
 std::shared_ptr<const Utilities::MPI::Partitioner>
 create_partitioner(const DoFHandler<dim, spacedim> &dof_handler)
 {
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   return std::make_shared<const Utilities::MPI::Partitioner>(
     dof_handler.locally_owned_dofs(),
index 65790bcf7f79d8a886fb678e8e0d37dc1b274bf3..2d119b080cb0ab6a924852b6c52652e9bb3d141c 100644 (file)
@@ -61,9 +61,8 @@ template <int dim, int spacedim>
 std::shared_ptr<const Utilities::MPI::Partitioner>
 create_partitioner(const DoFHandler<dim, spacedim> &dof_handler)
 {
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   return std::make_shared<const Utilities::MPI::Partitioner>(
     dof_handler.locally_owned_dofs(),
index 7ad8295b725a896bde7be2e21e6aacc5ed9f54ec..a3c38bbcaf8f816ba9e071f97ab197ab3530eed2 100644 (file)
@@ -61,9 +61,8 @@ template <int dim, int spacedim>
 std::shared_ptr<const Utilities::MPI::Partitioner>
 create_partitioner(const DoFHandler<dim, spacedim> &dof_handler)
 {
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   return std::make_shared<const Utilities::MPI::Partitioner>(
     dof_handler.locally_owned_dofs(),
index 1283ee7480731248c1a5bdf2330d683a561b0f7a..89d1ee6f2d78501a86345a605c754aa375921b3e 100644 (file)
@@ -48,9 +48,8 @@ template <int dim, int spacedim>
 std::shared_ptr<const Utilities::MPI::Partitioner>
 create_partitioner(const DoFHandler<dim, spacedim> &dof_handler)
 {
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   return std::make_shared<const Utilities::MPI::Partitioner>(
     dof_handler.locally_owned_dofs(),
index dfea4e12bde2f5ca4f808e8cf3f5836d101c31d0..e2a89c93f23357a6710a45e6e59d256f24609e36 100644 (file)
@@ -62,9 +62,8 @@ template <int dim, int spacedim>
 std::shared_ptr<const Utilities::MPI::Partitioner>
 create_partitioner(const DoFHandler<dim, spacedim> &dof_handler)
 {
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   return std::make_shared<const Utilities::MPI::Partitioner>(
     dof_handler.locally_owned_dofs(),
index c16bc4edb0fba51217598b2f4494f5965842a650..4e7d06c028d1bf62f25c57187878149d10f81d89 100644 (file)
@@ -84,9 +84,9 @@ test(const FiniteElement<dim, spacedim> &fe, const unsigned int n_components)
   DoFHandler<dim> dof_handler(tria);
   dof_handler.distribute_dofs(fe);
 
-  IndexSet owned_dofs = dof_handler.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet &owned_dofs = dof_handler.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   LinearAlgebra::distributed::Vector<double> solution;
 
index 31e51b6b41050ede817831c983fa93f9f9160407..425031bdbe51c883215a04e08c982827ce971ce7 100644 (file)
@@ -56,8 +56,7 @@ test()
 
   // 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);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
   boundary_dofs.subtract_set(relevant_set);
   AssertThrow(boundary_dofs.n_elements() == 0, ExcInternalError());
 }
index e58a7925530baf880afdc26d114c0ccdd0084a62..a1df1fd504d879d5e240c4a6e628dabc64b09f22 100644 (file)
@@ -149,8 +149,8 @@ test(const Triangulation<dim, spacedim> &tria,
 
   const MPI_Comm comm = get_communicator(dof_handler.get_triangulation());
 
-  IndexSet locally_relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
 
 #ifdef DEAL_II_WITH_TRILINOS
index 56e512e7b33f5766fbadbfe811d24fc32ba95995..dbdbb1664e0329161b8340ab35dc1434058accf2 100644 (file)
@@ -495,7 +495,8 @@ namespace Step18
   {
     dof_handler.distribute_dofs(fe);
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     // The next step is to set up constraints due to hanging nodes. This has
     // been handled many times before:
index 86e83665a7058a2fe900211072d6d07b0682a6da..5f9be617039de19013dd7255a24ed3957c9d3652 100644 (file)
@@ -165,7 +165,8 @@ namespace Step40
     dof_handler.distribute_dofs(fe);
 
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     locally_relevant_solution.reinit(locally_owned_dofs,
                                      locally_relevant_dofs,
index 593c393db9669fe525ecd6d4ea788b5ab50659ea..897d8b179dfc89604b19358e72d69f73ec89f07d 100644 (file)
@@ -455,8 +455,8 @@ namespace Step55
     owned_partitioning[1] =
       dof_handler.locally_owned_dofs().get_view(n_u, n_u + n_p);
 
-    IndexSet locally_relevant_dofs;
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    const IndexSet locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
     relevant_partitioning.resize(2);
     relevant_partitioning[0] = locally_relevant_dofs.get_view(0, n_u);
     relevant_partitioning[1] = locally_relevant_dofs.get_view(n_u, n_u + n_p);
index 91756214aaec881d7da6d64c1d5b2bbe43ee258a..5b65bfeb57874b44f308d1b5edff4afd07e0620d 100644 (file)
@@ -299,8 +299,8 @@ namespace Step68
   {
     fluid_dh.distribute_dofs(fluid_fe);
     const IndexSet locally_owned_dofs = fluid_dh.locally_owned_dofs();
-    IndexSet       locally_relevant_dofs;
-    DoFTools::extract_locally_relevant_dofs(fluid_dh, locally_relevant_dofs);
+    const IndexSet locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(fluid_dh);
 
     velocity_field.reinit(locally_owned_dofs,
                           locally_relevant_dofs,
index 102ab4b41f6b839c68e120bbac642cb787af705f..e37f0a4fe9cd636e034958d3264091150a034377 100644 (file)
@@ -104,9 +104,8 @@ test(std::string solver_name, std::string preconditioner_name)
   std::vector<dealii::IndexSet> locally_owned_dofs_per_processor =
     DoFTools::locally_owned_dofs_per_subdomain(dof_handler);
   locally_owned_dofs = locally_owned_dofs_per_processor[this_mpi_process];
-  locally_relevant_dofs.clear();
-  dealii::DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                                  locally_relevant_dofs);
+  locally_relevant_dofs =
+    dealii::DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   constraints.clear();
   constraints.reinit(locally_relevant_dofs);
index 914288d53dc114826005f38ccb9a007ec2571d60..d25561fc52ead28699d3964376f1dae0e5265369 100644 (file)
@@ -104,9 +104,8 @@ test(std::string solver_name, std::string preconditioner_name)
   std::vector<dealii::IndexSet> locally_owned_dofs_per_processor =
     DoFTools::locally_owned_dofs_per_subdomain(dof_handler);
   locally_owned_dofs = locally_owned_dofs_per_processor[this_mpi_process];
-  locally_relevant_dofs.clear();
-  dealii::DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                                  locally_relevant_dofs);
+  locally_relevant_dofs =
+    dealii::DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   constraints.clear();
   constraints.reinit(locally_relevant_dofs);
index 96fc6f81f14283376ab523b3785c044a0103d281..2efc0e9fce1abdcbf95c00427505b293d1847a84 100644 (file)
@@ -104,9 +104,8 @@ test(std::string solver_name, std::string preconditioner_name)
   std::vector<dealii::IndexSet> locally_owned_dofs_per_processor =
     DoFTools::locally_owned_dofs_per_subdomain(dof_handler);
   locally_owned_dofs = locally_owned_dofs_per_processor[this_mpi_process];
-  locally_relevant_dofs.clear();
-  dealii::DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                                  locally_relevant_dofs);
+  locally_relevant_dofs =
+    dealii::DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   constraints.clear();
   constraints.reinit(locally_relevant_dofs);
index 772997cb05148c5eb4c4f6ff9a3aaa566ed58139..8d746ccfd0a4f4e9a99855ad9c7c89e08704ebe2 100644 (file)
@@ -284,8 +284,8 @@ LaplaceProblem<dim>::setup_system()
   }
   {
     TrilinosWrappers::SparsityPattern csp;
-    IndexSet                          relevant_set;
-    DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_set);
+    const IndexSet                    relevant_set =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
     csp.reinit(locally_owned, locally_owned, relevant_set, MPI_COMM_WORLD);
     DoFTools::make_sparsity_pattern(dof_handler, csp, constraints, false);
     csp.compress();
index 0ba9800d582d52437eb3fd7a8b093861ff0813fa..7e6d4f524fac09d6ad095d94fe647066800e8b7b 100644 (file)
@@ -285,8 +285,8 @@ LaplaceProblem<dim>::setup_system()
   }
   {
     TrilinosWrappers::SparsityPattern csp;
-    IndexSet                          relevant_set;
-    DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_set);
+    const IndexSet                    relevant_set =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
     csp.reinit(locally_owned, locally_owned, relevant_set, MPI_COMM_WORLD);
     DoFTools::make_sparsity_pattern(dof_handler, csp, constraints, false);
     csp.compress();
index e6b4a764a263c7ccb9e3b03b7fed2c58f186f5da..0b764a9286220036aedea54fd84bb4537ee47966 100644 (file)
@@ -279,13 +279,14 @@ LaplaceProblem<dim>::setup_system()
                        std::placeholders::_1)));
 
   TrilinosWrappers::BlockSparsityPattern csp(2, 2);
-  std::vector<IndexSet>                  locally_owned(2), relevant_set(2);
-  IndexSet locally_owned_total = dof_handler.locally_owned_dofs(),
-           relevant_total;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_total);
+  const IndexSet &locally_owned_total = dof_handler.locally_owned_dofs();
+  const IndexSet  relevant_total =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   const std::vector<types::global_dof_index> dofs_per_block =
     DoFTools::count_dofs_per_fe_block(dof_handler, blocks);
+
+  std::vector<IndexSet> locally_owned(2), relevant_set(2);
   locally_owned[0] = locally_owned_total.get_view(0, dofs_per_block[0]);
   locally_owned[1] =
     locally_owned_total.get_view(dofs_per_block[0], dof_handler.n_dofs());
index 88fbd9686c0a044c7f5155ad353383b4e2ff6b97..bacc32aba4ea6ce5d5345ab536260318047fc87f 100644 (file)
@@ -285,8 +285,8 @@ LaplaceProblem<dim>::setup_system()
     reference_rhs.reinit(locally_owned, MPI_COMM_WORLD);
   }
   {
-    IndexSet relevant_set;
-    DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_set);
+    const IndexSet relevant_set =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
     DynamicSparsityPattern csp(dof_handler.n_dofs(),
                                dof_handler.n_dofs(),
                                relevant_set);
index bf8cdb88a879f6a6f7a65d3bd7874280c0b18208..3bb207efe251b7ab8730b7cb541e6efa99c08c53 100644 (file)
@@ -281,13 +281,14 @@ LaplaceProblem<dim>::setup_system()
                        std::placeholders::_1)));
 
   TrilinosWrappers::BlockSparsityPattern csp(2, 2);
-  std::vector<IndexSet>                  locally_owned(2), relevant_set(2);
-  IndexSet locally_owned_total = dof_handler.locally_owned_dofs(),
-           relevant_total;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_total);
+  const IndexSet &locally_owned_total = dof_handler.locally_owned_dofs();
+  const IndexSet  relevant_total =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   const std::vector<types::global_dof_index> dofs_per_block =
     DoFTools::count_dofs_per_fe_block(dof_handler, blocks);
+
+  std::vector<IndexSet> locally_owned(2), relevant_set(2);
   locally_owned[0] = locally_owned_total.get_view(0, dofs_per_block[0]);
   locally_owned[1] =
     locally_owned_total.get_view(dofs_per_block[0], dof_handler.n_dofs());
index 50754ef803fb4ce134ec6b1a7893e7f941c2166f..f0651d4369182b9f48e57e8e6f201b2293d5c096 100644 (file)
@@ -285,8 +285,8 @@ LaplaceProblem<dim>::setup_system()
   }
   {
     TrilinosWrappers::SparsityPattern csp;
-    IndexSet                          relevant_set;
-    DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_set);
+    const IndexSet                    relevant_set =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
     // TODO: currently no Trilinos version is capable of doing this...
     // #if DEAL_II_TRILINOS_VERSION_GTE(11,14,0)
     // Cannot pre-build sparsity pattern, Trilinos must provide it...
index b8791a94c45da313fe5cd745d87286386602c9fe..3757e173ad5e553d48f914945ef74be3127adcaf 100644 (file)
@@ -192,10 +192,9 @@ Step4<dim>::setup_system()
                                            constraints);
   constraints.close();
 
-  IndexSet locally_owned_dofs = dof_handler.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
 
   DynamicSparsityPattern dsp(dof_handler.n_dofs());
index fdcefd0475f673cb097f682f44ef5c9595b4ca8a..1b1b3158edc33b19f926bd494b7cfc705fa52e12 100644 (file)
@@ -154,10 +154,9 @@ Step4<dim>::setup_system()
                                            constraints);
   constraints.close();
 
-  IndexSet locally_owned_dofs = dof_handler.locally_owned_dofs();
-  IndexSet locally_relevant_dofs;
-
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs();
+  const IndexSet  locally_relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
 
   DynamicSparsityPattern dsp(dof_handler.n_dofs());
index b99021195ceacaf1d35c9890364b32f6ef20b8e7..54ea3c7d08389ea64aaf71b590b0e30c3cd9c267 100644 (file)
@@ -153,7 +153,8 @@ namespace LinearAdvectionTest
   {
     dof_handler.distribute_dofs(fe);
     locally_owned_dofs = dof_handler.locally_owned_dofs();
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
 
     DynamicSparsityPattern dynamic_sparsity_pattern(locally_relevant_dofs);
     Table<2, DoFTools::Coupling> cell_integral_mask(1, 1);
index 4d256367ee5ecb6e6944e6f6350701459e4e3091..1f3837cf62513f7ac1e6319adff768a21a4c9605 100644 (file)
@@ -48,9 +48,9 @@ test()
   Table<2, DoFTools::Coupling> coupling(1, 1);
   coupling.fill(DoFTools::none);
 
-  const IndexSet system_partitioning = dof_handler.locally_owned_dofs();
-  IndexSet       system_relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dof_handler, system_relevant_set);
+  const IndexSet &system_partitioning = dof_handler.locally_owned_dofs();
+  const IndexSet  system_relevant_set =
+    DoFTools::extract_locally_relevant_dofs(dof_handler);
 
 
   // create an empty sparsity pattern
index 44263b11dcfe55ae7eec2d434aed6d67948537b9..46c6634cd7c353cb5b03072fb81f34c0644e085d 100644 (file)
@@ -116,7 +116,8 @@ private:
   {
     locally_owned_dofs = dof_handler.locally_owned_dofs();
     locally_owned_dofs.print(deallog);
-    DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+    locally_relevant_dofs =
+      DoFTools::extract_locally_relevant_dofs(dof_handler);
     locally_relevant_dofs.print(deallog);
 
     DynamicSparsityPattern sparsity_pattern(locally_relevant_dofs);
index 1ed7def214d1887db9ea14bfe1ada4396fc489a1..b5b04e000ce4278cebd3cb1f24611c35ca55af08 100644 (file)
@@ -196,8 +196,8 @@ Test_Solver_Output::setup_system()
   TimerOutput::Scope t(timer, "setup");
 
   dof_handler.distribute_dofs(fe);
-  locally_owned_dofs = dof_handler.locally_owned_dofs();
-  DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
+  locally_owned_dofs    = dof_handler.locally_owned_dofs();
+  locally_relevant_dofs = DoFTools::extract_locally_relevant_dofs(dof_handler);
 
   locally_relevant_solution.reinit(locally_owned_dofs,
                                    locally_relevant_dofs,
index 47f40873f3867e242e052bbe92571fd3687b0640..1ac0481692f252bf55dded4292006b7f85f2e6bd 100644 (file)
@@ -99,9 +99,8 @@ namespace Step22
       owned_partitioning.push_back(locally_owned_dofs.get_view(n_u, n_u + n_p));
 
       relevant_partitioning.clear();
-      IndexSet locally_relevant_dofs;
-      DoFTools::extract_locally_relevant_dofs(dof_handler,
-                                              locally_relevant_dofs);
+      const IndexSet locally_relevant_dofs =
+        DoFTools::extract_locally_relevant_dofs(dof_handler);
       relevant_partitioning.push_back(locally_relevant_dofs.get_view(0, n_u));
       relevant_partitioning.push_back(
         locally_relevant_dofs.get_view(n_u, n_u + n_p));
index 4b97d341c2c2099bcd48e567f8409b5342a86260..43cd8f3f287159f3eb3a722dbd2769e1850466ff 100644 (file)
@@ -46,8 +46,8 @@ test()
   DoFHandler<dim> dh(triangulation);
   dh.distribute_dofs(fe_system);
 
-  IndexSet relevant_partitioning(dh.n_dofs());
-  DoFTools::extract_locally_relevant_dofs(dh, relevant_partitioning);
+  const IndexSet relevant_partitioning =
+    DoFTools::extract_locally_relevant_dofs(dh);
 
   // generate empty constraints
   AffineConstraints<double> constraints;
index bded2cc84ab7ed14aec0e9d33abf22814e897f92..7bb542a29b74aed755145fb0b267f6bb3ef772c4 100644 (file)
@@ -101,8 +101,8 @@ test()
   QIterated<dim> quadrature(QTrapezoid<1>(), 5);
 
   const dealii::Function<dim, double> *w = nullptr;
-  IndexSet                             relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dofhandler, relevant_dofs);
+  const IndexSet                       relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dofhandler);
   VectorType ghosted(dofhandler.locally_owned_dofs(),
                      relevant_dofs,
                      MPI_COMM_WORLD);
@@ -150,8 +150,8 @@ test_simplex()
   const dealii::Function<dim, double> *w = nullptr;
   MappingFE<dim>                       mapping(FE_SimplexP<dim>(1));
 
-  IndexSet relevant_dofs;
-  DoFTools::extract_locally_relevant_dofs(dofhandler, relevant_dofs);
+  const IndexSet relevant_dofs =
+    DoFTools::extract_locally_relevant_dofs(dofhandler);
   VectorType ghosted(dofhandler.locally_owned_dofs(),
                      relevant_dofs,
                      MPI_COMM_WORLD);
index 6db6488b643f87dcdccf598aaae1aadbee17e0e4..fc6ce7de6e8a7b15f9b4b09d6b156a1b30842b40 100644 (file)
@@ -83,8 +83,7 @@ test(VectorTools::NormType norm, double value, double exp = 2.0)
 
   VectorTools::interpolate(dofh, Ref<dim>(), interpolated);
 
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
   TrilinosWrappers::MPI::Vector solution(relevant_set, MPI_COMM_WORLD);
   solution = interpolated;
 
index 06ae481f99e56a584af9860291c598b1ab132076..797f90d2d0bce4b002dd57f37350d6322607cefe 100644 (file)
@@ -87,8 +87,7 @@ test(VectorTools::NormType norm, double value, double exp = 2.0)
 
   VectorTools::interpolate(dofh, Ref<dim>(), interpolated);
 
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
   TrilinosWrappers::MPI::Vector solution(relevant_set, MPI_COMM_WORLD);
   solution = interpolated;
 
index bce2ce8b7b5b79996a8fb0fe6f43acdd288fbee4..64433b42e12c2833d786455953a8ddf84219f3f8 100644 (file)
@@ -94,8 +94,7 @@ test(VectorTools::NormType norm, double value, double exp = 2.0)
 
   VectorTools::interpolate(dofh, Ref<dim>(), interpolated);
 
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
   TrilinosWrappers::MPI::Vector solution(relevant_set, MPI_COMM_WORLD);
   solution = interpolated;
 
index d0ac8a1394e9ddeac9d2a19e96253e05152e1311..65e376a54a5b627b07f683a34563ff60ac39bd8e 100644 (file)
@@ -105,8 +105,7 @@ test(VectorTools::NormType norm, double value, double exp = 2.0)
 
   VectorTools::interpolate(dofh, Ref<dim>(), interpolated);
 
-  IndexSet relevant_set;
-  DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
+  const IndexSet relevant_set = DoFTools::extract_locally_relevant_dofs(dofh);
   TrilinosWrappers::MPI::Vector solution(relevant_set, MPI_COMM_WORLD);
   solution = interpolated;
 
index daf47a0a09ccf4b1a944041269550ded8005fcb4..aa717d92e621b6c8c8e195dbc8872427ea2cab44 100644 (file)
@@ -53,12 +53,11 @@ run(const dealii::Triangulation<dim> &triangulation)
   const dealii::FESystem<dim> fe_system_coarse(fe_q_coarse, dim);
   dof_handler_coarse.distribute_dofs(fe_system_coarse);
 
-  Vector           solution_coarse;
-  dealii::IndexSet locally_owned_dofs_coarse =
+  Vector                 solution_coarse;
+  const dealii::IndexSet locally_owned_dofs_coarse =
     dof_handler_coarse.locally_owned_dofs();
-  dealii::IndexSet ghost_dofs_coarse;
-  dealii::DoFTools::extract_locally_relevant_dofs(dof_handler_coarse,
-                                                  ghost_dofs_coarse);
+  dealii::IndexSet ghost_dofs_coarse =
+    dealii::DoFTools::extract_locally_relevant_dofs(dof_handler_coarse);
   dealii::IndexSet locally_relevant_dofs_coarse = ghost_dofs_coarse;
   ghost_dofs_coarse.subtract_set(locally_owned_dofs_coarse);
 
@@ -91,12 +90,11 @@ run(const dealii::Triangulation<dim> &triangulation)
   const dealii::FESystem<dim> fe_system_fine(fe_q_fine, dim);
   dof_handler_fine.distribute_dofs(fe_system_fine);
 
-  Vector           solution_fine;
-  dealii::IndexSet locally_owned_dofs_fine =
+  Vector                 solution_fine;
+  const dealii::IndexSet locally_owned_dofs_fine =
     dof_handler_fine.locally_owned_dofs();
-  dealii::IndexSet ghost_dofs_fine;
-  dealii::DoFTools::extract_locally_relevant_dofs(dof_handler_fine,
-                                                  ghost_dofs_fine);
+  dealii::IndexSet ghost_dofs_fine =
+    dealii::DoFTools::extract_locally_relevant_dofs(dof_handler_fine);
   dealii::IndexSet locally_relevant_dofs_fine = ghost_dofs_fine;
   ghost_dofs_fine.subtract_set(locally_owned_dofs_fine);
 

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.