From: Daniel Arndt Date: Thu, 22 Sep 2016 20:25:54 +0000 (+0200) Subject: Eliminate unused ConstraintMatrix in tests X-Git-Tag: v8.5.0-rc1~640^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1e7af8a28ba74bc97dfb1db0c1a796a8ab55361;p=dealii.git Eliminate unused ConstraintMatrix in tests --- diff --git a/tests/matrix_free/parallel_multigrid_adaptive.cc b/tests/matrix_free/parallel_multigrid_adaptive.cc index 0de815ad43..1ac481fb76 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive.cc @@ -374,11 +374,9 @@ class MGTransferMF : public MGTransferPrebuilt &laplace, - const ConstraintMatrix &hanging_node_constraints, const MGConstrainedDoFs &mg_constrained_dofs) : - MGTransferPrebuilt >(hanging_node_constraints, - mg_constrained_dofs), + MGTransferPrebuilt >(mg_constrained_dofs), laplace_operator (laplace) { } @@ -493,7 +491,6 @@ void do_test (const DoFHandler &dof) mg_interface_matrices[level].initialize(mg_matrices[level]); MGTransferMF mg_transfer(mg_matrices, - hanging_node_constraints, mg_constrained_dofs); mg_transfer.build_matrices(dof); diff --git a/tests/mpi/multigrid_adaptive.cc b/tests/mpi/multigrid_adaptive.cc index d6cfd8d5db..5f4ec9248c 100644 --- a/tests/mpi/multigrid_adaptive.cc +++ b/tests/mpi/multigrid_adaptive.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2015 by the deal.II authors +// Copyright (C) 2008 - 2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -95,7 +95,6 @@ namespace Step50 matrix_t system_matrix; - ConstraintMatrix hanging_node_constraints; ConstraintMatrix constraints; vector_t solution; @@ -186,8 +185,6 @@ namespace Step50 system_rhs.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD); constraints.clear (); - hanging_node_constraints.clear (); - DoFTools::make_hanging_node_constraints (mg_dof_handler, hanging_node_constraints); DoFTools::make_hanging_node_constraints (mg_dof_handler, constraints); typename FunctionMap::type dirichlet_boundary; @@ -197,7 +194,6 @@ namespace Step50 dirichlet_boundary, constraints); constraints.close (); - hanging_node_constraints.close (); DynamicSparsityPattern csp(mg_dof_handler.n_dofs(), mg_dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (mg_dof_handler, csp, constraints); @@ -389,7 +385,7 @@ namespace Step50 template void LaplaceProblem::solve () { - MGTransferPrebuilt mg_transfer(hanging_node_constraints, mg_constrained_dofs); + MGTransferPrebuilt mg_transfer(mg_constrained_dofs); mg_transfer.build_matrices(mg_dof_handler); matrix_t coarse_matrix; diff --git a/tests/mpi/multigrid_uniform.cc b/tests/mpi/multigrid_uniform.cc index b986d675b7..fb75b2a496 100644 --- a/tests/mpi/multigrid_uniform.cc +++ b/tests/mpi/multigrid_uniform.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2015 by the deal.II authors +// Copyright (C) 2008 - 2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -95,7 +95,6 @@ namespace Step50 matrix_t system_matrix; - ConstraintMatrix hanging_node_constraints; ConstraintMatrix constraints; vector_t solution; @@ -186,8 +185,6 @@ namespace Step50 system_rhs.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD); constraints.clear (); - hanging_node_constraints.clear (); - DoFTools::make_hanging_node_constraints (mg_dof_handler, hanging_node_constraints); DoFTools::make_hanging_node_constraints (mg_dof_handler, constraints); typename FunctionMap::type dirichlet_boundary; @@ -197,7 +194,6 @@ namespace Step50 dirichlet_boundary, constraints); constraints.close (); - hanging_node_constraints.close (); DynamicSparsityPattern csp(mg_dof_handler.n_dofs(), mg_dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (mg_dof_handler, csp, constraints); @@ -375,7 +371,7 @@ namespace Step50 template void LaplaceProblem::solve () { - MGTransferPrebuilt mg_transfer(hanging_node_constraints, mg_constrained_dofs); + MGTransferPrebuilt mg_transfer(mg_constrained_dofs); mg_transfer.build_matrices(mg_dof_handler); matrix_t coarse_matrix; diff --git a/tests/multigrid/mg_coarse_01.cc b/tests/multigrid/mg_coarse_01.cc index 680608db8d..5f65bac14c 100644 --- a/tests/multigrid/mg_coarse_01.cc +++ b/tests/multigrid/mg_coarse_01.cc @@ -111,7 +111,6 @@ namespace Step50 IndexSet locally_relevant_set; - ConstraintMatrix hanging_node_constraints; ConstraintMatrix constraints; vector_t solution; @@ -207,8 +206,6 @@ namespace Step50 solution.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD); system_rhs.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD); constraints.reinit (locally_relevant_set); - hanging_node_constraints.reinit (locally_relevant_set); - DoFTools::make_hanging_node_constraints (mg_dof_handler, hanging_node_constraints); DoFTools::make_hanging_node_constraints (mg_dof_handler, constraints); typename FunctionMap::type dirichlet_boundary; @@ -218,7 +215,6 @@ namespace Step50 dirichlet_boundary, constraints); constraints.close (); - hanging_node_constraints.close (); DynamicSparsityPattern dsp(mg_dof_handler.n_dofs(), mg_dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (mg_dof_handler, dsp, constraints); @@ -446,7 +442,7 @@ namespace Step50 template void LaplaceProblem::vcycle (const MGCoarseGridBase &coarse_grid_solver) { - MGTransferPrebuilt mg_transfer(hanging_node_constraints, mg_constrained_dofs); + MGTransferPrebuilt mg_transfer(mg_constrained_dofs); mg_transfer.build_matrices(mg_dof_handler); typedef LA::MPI::PreconditionJacobi Smoother; diff --git a/tests/multigrid/mg_output_dirichlet.cc b/tests/multigrid/mg_output_dirichlet.cc index b16fa4a71f..6f779c54d5 100644 --- a/tests/multigrid/mg_output_dirichlet.cc +++ b/tests/multigrid/mg_output_dirichlet.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2015 by the deal.II authors +// Copyright (C) 2000 - 2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -217,14 +217,6 @@ void check_simple(const FiniteElement &fe) mgdof_renumbered.distribute_dofs(fe); mgdof_renumbered.distribute_mg_dofs(fe); - ConstraintMatrix hnc, hnc_renumbered; - hnc.clear (); - hnc_renumbered.clear (); - DoFTools::make_hanging_node_constraints ( - mgdof, - hnc); - hnc.close (); - std::vector block_component (4,0); block_component[2] = 1; block_component[3] = 1; @@ -233,21 +225,16 @@ void check_simple(const FiniteElement &fe) for (unsigned int level=0; level > transfer(hnc, mg_constrained_dofs); + MGTransferPrebuilt > transfer(mg_constrained_dofs); transfer.build_matrices(mgdof); - MGTransferPrebuilt > transfer_renumbered(hnc_renumbered, mg_constrained_dofs_renumbered); + MGTransferPrebuilt > transfer_renumbered(mg_constrained_dofs_renumbered); transfer_renumbered.build_matrices(mgdof_renumbered); Vector u(mgdof.n_dofs()); diff --git a/tests/multigrid/mg_output_neumann.cc b/tests/multigrid/mg_output_neumann.cc index 5599c95deb..1a2d4c047e 100644 --- a/tests/multigrid/mg_output_neumann.cc +++ b/tests/multigrid/mg_output_neumann.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2015 by the deal.II authors +// Copyright (C) 2000 - 2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -215,14 +215,6 @@ void check_simple(const FiniteElement &fe) mgdof_renumbered.distribute_dofs(fe); mgdof_renumbered.distribute_mg_dofs(fe); - ConstraintMatrix hnc, hnc_renumbered; - hnc.clear (); - hnc_renumbered.clear (); - DoFTools::make_hanging_node_constraints ( - mgdof, - hnc); - hnc.close (); - std::vector block_component (4,0); block_component[2] = 1; block_component[3] = 1; @@ -231,21 +223,16 @@ void check_simple(const FiniteElement &fe) for (unsigned int level=0; level > transfer(hnc, mg_constrained_dofs); + MGTransferPrebuilt > transfer(mg_constrained_dofs); transfer.build_matrices(mgdof); - MGTransferPrebuilt > transfer_renumbered(hnc_renumbered, mg_constrained_dofs_renumbered); + MGTransferPrebuilt > transfer_renumbered(mg_constrained_dofs_renumbered); transfer_renumbered.build_matrices(mgdof_renumbered); // Fill vector u with some cell based numbering diff --git a/tests/multigrid/mg_renumbered_01.cc b/tests/multigrid/mg_renumbered_01.cc index 3cdcc92afe..9502a4b6e9 100644 --- a/tests/multigrid/mg_renumbered_01.cc +++ b/tests/multigrid/mg_renumbered_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2010 - 2015 by the deal.II authors +// Copyright (C) 2010 - 2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -340,12 +340,9 @@ void LaplaceProblem::test () MGConstrainedDoFs mg_constrained_dofs_renumbered; mg_constrained_dofs_renumbered.initialize(mg_dof_handler_renumbered, dirichlet_boundary); - ConstraintMatrix constraints; - constraints.close(); - - MGTransferPrebuilt > mg_transfer (constraints, mg_constrained_dofs); + MGTransferPrebuilt > mg_transfer (mg_constrained_dofs); mg_transfer.build_matrices(mg_dof_handler); - MGTransferPrebuilt > mg_transfer_renumbered (constraints, mg_constrained_dofs_renumbered); + MGTransferPrebuilt > mg_transfer_renumbered (mg_constrained_dofs_renumbered); mg_transfer_renumbered.build_matrices(mg_dof_handler_renumbered); FullMatrix coarse_matrix; diff --git a/tests/multigrid/mg_renumbered_03.cc b/tests/multigrid/mg_renumbered_03.cc index ba954a3ad7..fae5912959 100644 --- a/tests/multigrid/mg_renumbered_03.cc +++ b/tests/multigrid/mg_renumbered_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2013 - 2015 by the deal.II authors +// Copyright (C) 2013 - 2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -335,12 +335,9 @@ void LaplaceProblem::test () MGConstrainedDoFs mg_constrained_dofs_renumbered; mg_constrained_dofs_renumbered.initialize(mg_dof_handler_renumbered, dirichlet_boundary); - ConstraintMatrix constraints; - constraints.close(); - - MGTransferPrebuilt > mg_transfer (constraints, mg_constrained_dofs); + MGTransferPrebuilt > mg_transfer (mg_constrained_dofs); mg_transfer.build_matrices(mg_dof_handler); - MGTransferPrebuilt > mg_transfer_renumbered (constraints, mg_constrained_dofs_renumbered); + MGTransferPrebuilt > mg_transfer_renumbered (mg_constrained_dofs_renumbered); mg_transfer_renumbered.build_matrices(mg_dof_handler_renumbered); Vector test; diff --git a/tests/multigrid/step-16-02.cc b/tests/multigrid/step-16-02.cc index f0db1c43d6..fad336ce31 100644 --- a/tests/multigrid/step-16-02.cc +++ b/tests/multigrid/step-16-02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2015 by the deal.II authors +// Copyright (C) 2003 - 2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -140,7 +140,6 @@ private: SparsityPattern sparsity_pattern; SparseMatrix system_matrix; - ConstraintMatrix hanging_node_constraints; ConstraintMatrix constraints; Vector solution; @@ -239,9 +238,7 @@ void LaplaceProblem::setup_system () system_rhs.reinit (mg_dof_handler.n_dofs()); constraints.clear (); - hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (mg_dof_handler, constraints); - DoFTools::make_hanging_node_constraints (mg_dof_handler, hanging_node_constraints); typename FunctionMap::type dirichlet_boundary; ZeroFunction homogeneous_dirichlet_bc (1); dirichlet_boundary[0] = &homogeneous_dirichlet_bc; @@ -251,7 +248,6 @@ void LaplaceProblem::setup_system () dirichlet_boundary, constraints); constraints.close (); - hanging_node_constraints.close (); constraints.condense (sparsity_pattern); sparsity_pattern.compress(); system_matrix.reinit (sparsity_pattern); @@ -454,7 +450,7 @@ void LaplaceProblem::assemble_multigrid (const bool &use_mw) template void LaplaceProblem::solve () { - MGTransferPrebuilt > mg_transfer(hanging_node_constraints, mg_constrained_dofs); + MGTransferPrebuilt > mg_transfer(mg_constrained_dofs); mg_transfer.build_matrices(mg_dof_handler); FullMatrix coarse_matrix; diff --git a/tests/multigrid/step-16-03.cc b/tests/multigrid/step-16-03.cc index 3b34b55850..93c7efad49 100644 --- a/tests/multigrid/step-16-03.cc +++ b/tests/multigrid/step-16-03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2015 by the deal.II authors +// Copyright (C) 2003 - 2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -80,7 +80,6 @@ private: SparsityPattern sparsity_pattern; SparseMatrix system_matrix; - ConstraintMatrix hanging_node_constraints; ConstraintMatrix constraints; Vector solution; @@ -169,9 +168,7 @@ void LaplaceProblem::setup_system () system_rhs.reinit (mg_dof_handler.n_dofs()); constraints.clear (); - hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (mg_dof_handler, constraints); - DoFTools::make_hanging_node_constraints (mg_dof_handler, hanging_node_constraints); typename FunctionMap::type dirichlet_boundary; ZeroFunction homogeneous_dirichlet_bc (1); dirichlet_boundary[0] = &homogeneous_dirichlet_bc; @@ -181,7 +178,6 @@ void LaplaceProblem::setup_system () dirichlet_boundary, constraints); constraints.close (); - hanging_node_constraints.close (); constraints.condense (sparsity_pattern); sparsity_pattern.compress(); system_matrix.reinit (sparsity_pattern); @@ -362,8 +358,7 @@ void LaplaceProblem::assemble_multigrid () template void LaplaceProblem::solve () { - MGTransferPrebuilt > mg_transfer(hanging_node_constraints, - mg_constrained_dofs); + MGTransferPrebuilt > mg_transfer(mg_constrained_dofs); mg_transfer.build_matrices(mg_dof_handler); FullMatrix coarse_matrix; diff --git a/tests/multigrid/step-16-04.cc b/tests/multigrid/step-16-04.cc index 8cedd17400..4dad17ec20 100644 --- a/tests/multigrid/step-16-04.cc +++ b/tests/multigrid/step-16-04.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2015 by the deal.II authors +// Copyright (C) 2003 - 2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -82,7 +82,6 @@ private: SparsityPattern sparsity_pattern; SparseMatrix system_matrix; - ConstraintMatrix hanging_node_constraints; ConstraintMatrix constraints; LinearAlgebra::distributed::Vector solution; @@ -173,9 +172,7 @@ void LaplaceProblem::setup_system () system_rhs.reinit (mg_dof_handler.n_dofs()); constraints.clear (); - hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (mg_dof_handler, constraints); - DoFTools::make_hanging_node_constraints (mg_dof_handler, hanging_node_constraints); typename FunctionMap::type dirichlet_boundary; ZeroFunction homogeneous_dirichlet_bc (1); dirichlet_boundary[0] = &homogeneous_dirichlet_bc; @@ -185,7 +182,6 @@ void LaplaceProblem::setup_system () dirichlet_boundary, constraints); constraints.close (); - hanging_node_constraints.close (); constraints.condense (sparsity_pattern); sparsity_pattern.compress(); system_matrix.reinit (sparsity_pattern); @@ -372,7 +368,7 @@ template void LaplaceProblem::solve () { MGTransferPrebuilt > - mg_transfer(hanging_node_constraints, mg_constrained_dofs); + mg_transfer(mg_constrained_dofs); mg_transfer.build_matrices(mg_dof_handler); SolverControl coarse_solver_control (1000, 1e-10, false, false); diff --git a/tests/multigrid/step-16-50-mpi-linear-operator.cc b/tests/multigrid/step-16-50-mpi-linear-operator.cc index 376af6d5f9..b0f5118275 100644 --- a/tests/multigrid/step-16-50-mpi-linear-operator.cc +++ b/tests/multigrid/step-16-50-mpi-linear-operator.cc @@ -112,7 +112,6 @@ namespace Step50 IndexSet locally_relevant_set; - ConstraintMatrix hanging_node_constraints; ConstraintMatrix constraints; vector_t solution; @@ -203,8 +202,6 @@ namespace Step50 system_rhs.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD); constraints.reinit (locally_relevant_set); - hanging_node_constraints.reinit (locally_relevant_set); - DoFTools::make_hanging_node_constraints (mg_dof_handler, hanging_node_constraints); DoFTools::make_hanging_node_constraints (mg_dof_handler, constraints); typename FunctionMap::type dirichlet_boundary; @@ -214,7 +211,6 @@ namespace Step50 dirichlet_boundary, constraints); constraints.close (); - hanging_node_constraints.close (); DynamicSparsityPattern dsp(mg_dof_handler.n_dofs(), mg_dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (mg_dof_handler, dsp, constraints); @@ -424,7 +420,7 @@ namespace Step50 template void LaplaceProblem::solve () { - MGTransferPrebuilt mg_transfer(hanging_node_constraints, mg_constrained_dofs); + MGTransferPrebuilt mg_transfer(mg_constrained_dofs); mg_transfer.build_matrices(mg_dof_handler); matrix_t &coarse_matrix = mg_matrices[0]; diff --git a/tests/multigrid/step-16-50-mpi-smoother.cc b/tests/multigrid/step-16-50-mpi-smoother.cc index 3e1851f919..2cfb947c75 100644 --- a/tests/multigrid/step-16-50-mpi-smoother.cc +++ b/tests/multigrid/step-16-50-mpi-smoother.cc @@ -112,7 +112,6 @@ namespace Step50 IndexSet locally_relevant_set; - ConstraintMatrix hanging_node_constraints; ConstraintMatrix constraints; vector_t solution; @@ -203,8 +202,6 @@ namespace Step50 system_rhs.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD); constraints.reinit (locally_relevant_set); - hanging_node_constraints.reinit (locally_relevant_set); - DoFTools::make_hanging_node_constraints (mg_dof_handler, hanging_node_constraints); DoFTools::make_hanging_node_constraints (mg_dof_handler, constraints); typename FunctionMap::type dirichlet_boundary; @@ -214,7 +211,6 @@ namespace Step50 dirichlet_boundary, constraints); constraints.close (); - hanging_node_constraints.close (); DynamicSparsityPattern dsp(mg_dof_handler.n_dofs(), mg_dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (mg_dof_handler, dsp, constraints); @@ -424,7 +420,7 @@ namespace Step50 template void LaplaceProblem::solve () { - MGTransferPrebuilt mg_transfer(hanging_node_constraints, mg_constrained_dofs); + MGTransferPrebuilt mg_transfer(mg_constrained_dofs); mg_transfer.build_matrices(mg_dof_handler); // pre and post smoothers: diff --git a/tests/multigrid/step-16-50-mpi.cc b/tests/multigrid/step-16-50-mpi.cc index 21c0be80f0..9fcf2083e8 100644 --- a/tests/multigrid/step-16-50-mpi.cc +++ b/tests/multigrid/step-16-50-mpi.cc @@ -112,7 +112,6 @@ namespace Step50 IndexSet locally_relevant_set; - ConstraintMatrix hanging_node_constraints; ConstraintMatrix constraints; vector_t solution; @@ -203,8 +202,6 @@ namespace Step50 system_rhs.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD); constraints.reinit (locally_relevant_set); - hanging_node_constraints.reinit (locally_relevant_set); - DoFTools::make_hanging_node_constraints (mg_dof_handler, hanging_node_constraints); DoFTools::make_hanging_node_constraints (mg_dof_handler, constraints); typename FunctionMap::type dirichlet_boundary; @@ -214,7 +211,6 @@ namespace Step50 dirichlet_boundary, constraints); constraints.close (); - hanging_node_constraints.close (); DynamicSparsityPattern dsp(mg_dof_handler.n_dofs(), mg_dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (mg_dof_handler, dsp, constraints); @@ -424,7 +420,7 @@ namespace Step50 template void LaplaceProblem::solve () { - MGTransferPrebuilt mg_transfer(hanging_node_constraints, mg_constrained_dofs); + MGTransferPrebuilt mg_transfer(mg_constrained_dofs); mg_transfer.build_matrices(mg_dof_handler); matrix_t &coarse_matrix = mg_matrices[0]; diff --git a/tests/multigrid/step-16-50-serial.cc b/tests/multigrid/step-16-50-serial.cc index 8065556777..2827ece53c 100644 --- a/tests/multigrid/step-16-50-serial.cc +++ b/tests/multigrid/step-16-50-serial.cc @@ -85,7 +85,6 @@ private: SparsityPattern sparsity_pattern; SparseMatrix system_matrix; - ConstraintMatrix hanging_node_constraints; ConstraintMatrix constraints; Vector solution; @@ -174,9 +173,7 @@ void LaplaceProblem::setup_system () system_rhs.reinit (mg_dof_handler.n_dofs()); constraints.clear (); - hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (mg_dof_handler, constraints); - DoFTools::make_hanging_node_constraints (mg_dof_handler, hanging_node_constraints); typename FunctionMap::type dirichlet_boundary; ZeroFunction homogeneous_dirichlet_bc (1); dirichlet_boundary[0] = &homogeneous_dirichlet_bc; @@ -186,7 +183,6 @@ void LaplaceProblem::setup_system () dirichlet_boundary, constraints); constraints.close (); - hanging_node_constraints.close (); constraints.condense (sparsity_pattern); sparsity_pattern.compress(); system_matrix.reinit (sparsity_pattern); @@ -370,7 +366,7 @@ void LaplaceProblem::solve () typedef SparseMatrix matrix_t; typedef Vector vector_t; - MGTransferPrebuilt mg_transfer(hanging_node_constraints, mg_constrained_dofs); + MGTransferPrebuilt mg_transfer(mg_constrained_dofs); mg_transfer.build_matrices(mg_dof_handler); matrix_t &coarse_matrix = mg_matrices[0]; diff --git a/tests/multigrid/step-16-bdry1.cc b/tests/multigrid/step-16-bdry1.cc index 65654de9f0..4273629136 100644 --- a/tests/multigrid/step-16-bdry1.cc +++ b/tests/multigrid/step-16-bdry1.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2015 by the deal.II authors +// Copyright (C) 2003 - 2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -141,7 +141,6 @@ private: SparsityPattern sparsity_pattern; SparseMatrix system_matrix; - ConstraintMatrix hanging_node_constraints; ConstraintMatrix constraints; Vector solution; @@ -240,9 +239,7 @@ void LaplaceProblem::setup_system () system_rhs.reinit (mg_dof_handler.n_dofs()); constraints.clear (); - hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (mg_dof_handler, constraints); - DoFTools::make_hanging_node_constraints (mg_dof_handler, hanging_node_constraints); typename FunctionMap::type dirichlet_boundary; ZeroFunction homogeneous_dirichlet_bc (1); dirichlet_boundary[0] = &homogeneous_dirichlet_bc; @@ -252,7 +249,6 @@ void LaplaceProblem::setup_system () dirichlet_boundary, constraints); constraints.close (); - hanging_node_constraints.close (); constraints.condense (sparsity_pattern); sparsity_pattern.compress(); system_matrix.reinit (sparsity_pattern); @@ -472,7 +468,7 @@ void LaplaceProblem::assemble_multigrid (bool use_mw) template void LaplaceProblem::solve (bool use_mw) { - MGTransferPrebuilt > mg_transfer(hanging_node_constraints, mg_constrained_dofs); + MGTransferPrebuilt > mg_transfer(mg_constrained_dofs); mg_transfer.build_matrices(mg_dof_handler); FullMatrix coarse_matrix; diff --git a/tests/multigrid/step-16.cc b/tests/multigrid/step-16.cc index df7f05abfd..12702cee2d 100644 --- a/tests/multigrid/step-16.cc +++ b/tests/multigrid/step-16.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2015 by the deal.II authors +// Copyright (C) 2003 - 2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -81,7 +81,6 @@ private: SparsityPattern sparsity_pattern; SparseMatrix system_matrix; - ConstraintMatrix hanging_node_constraints; ConstraintMatrix constraints; Vector solution; @@ -177,9 +176,7 @@ void LaplaceProblem::setup_system () system_rhs.reinit (mg_dof_handler.n_dofs()); constraints.clear (); - hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (mg_dof_handler, constraints); - DoFTools::make_hanging_node_constraints (mg_dof_handler, hanging_node_constraints); typename FunctionMap::type dirichlet_boundary; ZeroFunction homogeneous_dirichlet_bc (1); dirichlet_boundary[0] = &homogeneous_dirichlet_bc; @@ -189,7 +186,6 @@ void LaplaceProblem::setup_system () dirichlet_boundary, constraints); constraints.close (); - hanging_node_constraints.close (); constraints.condense (sparsity_pattern); sparsity_pattern.compress(); system_matrix.reinit (sparsity_pattern); @@ -449,7 +445,7 @@ void LaplaceProblem::assemble_multigrid () template void LaplaceProblem::solve () { - MGTransferPrebuilt > mg_transfer(hanging_node_constraints, mg_constrained_dofs); + MGTransferPrebuilt > mg_transfer(mg_constrained_dofs); mg_transfer.build_matrices(mg_dof_handler); FullMatrix coarse_matrix; diff --git a/tests/multigrid/step-50_01.cc b/tests/multigrid/step-50_01.cc index d1fdeeb6fd..10a8815851 100644 --- a/tests/multigrid/step-50_01.cc +++ b/tests/multigrid/step-50_01.cc @@ -109,7 +109,6 @@ namespace Step50 IndexSet locally_relevant_set; - ConstraintMatrix hanging_node_constraints; ConstraintMatrix constraints; vector_t solution; @@ -205,8 +204,6 @@ namespace Step50 solution.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD); system_rhs.reinit(mg_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD); constraints.reinit (locally_relevant_set); - hanging_node_constraints.reinit (locally_relevant_set); - DoFTools::make_hanging_node_constraints (mg_dof_handler, hanging_node_constraints); DoFTools::make_hanging_node_constraints (mg_dof_handler, constraints); typename FunctionMap::type dirichlet_boundary; @@ -216,7 +213,6 @@ namespace Step50 dirichlet_boundary, constraints); constraints.close (); - hanging_node_constraints.close (); DynamicSparsityPattern dsp(mg_dof_handler.n_dofs(), mg_dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (mg_dof_handler, dsp, constraints); @@ -422,7 +418,7 @@ namespace Step50 template void LaplaceProblem::solve () { - MGTransferPrebuilt mg_transfer(hanging_node_constraints, mg_constrained_dofs); + MGTransferPrebuilt mg_transfer(mg_constrained_dofs); mg_transfer.build_matrices(mg_dof_handler); matrix_t &coarse_matrix = mg_matrices[0]; diff --git a/tests/multigrid/transfer_04.cc b/tests/multigrid/transfer_04.cc index 055d9bdbc2..feee72b3bf 100644 --- a/tests/multigrid/transfer_04.cc +++ b/tests/multigrid/transfer_04.cc @@ -131,7 +131,7 @@ void check_fe(FiniteElement &fe) DoFTools::make_hanging_node_constraints (dofh, hanging_node_constraints); hanging_node_constraints.close(); - MGTransferPrebuilt transfer(hanging_node_constraints, mg_constrained_dofs); + MGTransferPrebuilt transfer(mg_constrained_dofs); transfer.build_matrices(dofh); //transfer.print_indices(deallog.get_file_stream()); diff --git a/tests/multigrid/transfer_matrix_free_01.cc b/tests/multigrid/transfer_matrix_free_01.cc index 22980e61ae..ded6003728 100644 --- a/tests/multigrid/transfer_matrix_free_01.cc +++ b/tests/multigrid/transfer_matrix_free_01.cc @@ -62,7 +62,6 @@ void check(const unsigned int fe_degree) mgdof.distribute_dofs(fe); mgdof.distribute_mg_dofs(fe); - ConstraintMatrix hanging_node_constraints; MGConstrainedDoFs mg_constrained_dofs; ZeroFunction zero_function; typename FunctionMap::type dirichlet_boundary; @@ -71,7 +70,7 @@ void check(const unsigned int fe_degree) // build reference MGTransferPrebuilt > - transfer_ref(hanging_node_constraints, mg_constrained_dofs); + transfer_ref(mg_constrained_dofs); transfer_ref.build_matrices(mgdof); // build matrix-free transfer diff --git a/tests/multigrid/transfer_matrix_free_02.cc b/tests/multigrid/transfer_matrix_free_02.cc index 2aa638c5cd..b6afc27b22 100644 --- a/tests/multigrid/transfer_matrix_free_02.cc +++ b/tests/multigrid/transfer_matrix_free_02.cc @@ -82,13 +82,6 @@ void check(const unsigned int fe_degree) mgdof.distribute_dofs(fe); mgdof.distribute_mg_dofs(fe); - ConstraintMatrix hanging_node_constraints; - IndexSet relevant_dofs; - DoFTools::extract_locally_relevant_dofs(mgdof, relevant_dofs); - hanging_node_constraints.reinit(relevant_dofs); - DoFTools::make_hanging_node_constraints(mgdof, hanging_node_constraints); - hanging_node_constraints.close(); - MGConstrainedDoFs mg_constrained_dofs; ZeroFunction zero_function; typename FunctionMap::type dirichlet_boundary; @@ -97,7 +90,7 @@ void check(const unsigned int fe_degree) // build reference MGTransferPrebuilt > - transfer_ref(hanging_node_constraints, mg_constrained_dofs); + transfer_ref(mg_constrained_dofs); transfer_ref.build_matrices(mgdof); // build matrix-free transfer diff --git a/tests/multigrid/transfer_matrix_free_03.cc b/tests/multigrid/transfer_matrix_free_03.cc index 63dfee45d9..3b114db1a3 100644 --- a/tests/multigrid/transfer_matrix_free_03.cc +++ b/tests/multigrid/transfer_matrix_free_03.cc @@ -59,13 +59,6 @@ void check(const unsigned int fe_degree) mgdof.distribute_dofs(fe); mgdof.distribute_mg_dofs(fe); - ConstraintMatrix hanging_node_constraints; - IndexSet relevant_dofs; - DoFTools::extract_locally_relevant_dofs(mgdof, relevant_dofs); - hanging_node_constraints.reinit(relevant_dofs); - DoFTools::make_hanging_node_constraints(mgdof, hanging_node_constraints); - hanging_node_constraints.close(); - MGConstrainedDoFs mg_constrained_dofs; ZeroFunction zero_function; typename FunctionMap::type dirichlet_boundary; @@ -74,7 +67,7 @@ void check(const unsigned int fe_degree) // build reference MGTransferPrebuilt > - transfer_ref(hanging_node_constraints, mg_constrained_dofs); + transfer_ref(mg_constrained_dofs); transfer_ref.build_matrices(mgdof); // build matrix-free transfer diff --git a/tests/multigrid/transfer_matrix_free_06.cc b/tests/multigrid/transfer_matrix_free_06.cc index a27626bc8c..3b0dd5c89b 100644 --- a/tests/multigrid/transfer_matrix_free_06.cc +++ b/tests/multigrid/transfer_matrix_free_06.cc @@ -84,13 +84,6 @@ void check(const unsigned int fe_degree) mgdof.distribute_dofs(fe); mgdof.distribute_mg_dofs(fe); - ConstraintMatrix hanging_node_constraints; - IndexSet relevant_dofs; - DoFTools::extract_locally_relevant_dofs(mgdof, relevant_dofs); - hanging_node_constraints.reinit(relevant_dofs); - DoFTools::make_hanging_node_constraints(mgdof, hanging_node_constraints); - hanging_node_constraints.close(); - MGConstrainedDoFs mg_constrained_dofs; ZeroFunction zero_function; typename FunctionMap::type dirichlet_boundary; @@ -99,7 +92,7 @@ void check(const unsigned int fe_degree) // build reference MGTransferPrebuilt > - transfer_ref(hanging_node_constraints, mg_constrained_dofs); + transfer_ref(mg_constrained_dofs); transfer_ref.build_matrices(mgdof); // build matrix-free transfer diff --git a/tests/multigrid/transfer_prebuilt_02.cc b/tests/multigrid/transfer_prebuilt_02.cc index e16f840aef..2f8a701382 100644 --- a/tests/multigrid/transfer_prebuilt_02.cc +++ b/tests/multigrid/transfer_prebuilt_02.cc @@ -58,14 +58,10 @@ void check_simple(const FiniteElement &fe) mgdof.distribute_dofs(fe); mgdof.distribute_mg_dofs(fe); - ConstraintMatrix hanging_node_constraints; - DoFTools::make_hanging_node_constraints (mgdof, hanging_node_constraints); - hanging_node_constraints.close (); - MGConstrainedDoFs mg_constrained_dofs; mg_constrained_dofs.initialize(mgdof); - MGTransferPrebuilt > transfer(hanging_node_constraints, mg_constrained_dofs); + MGTransferPrebuilt > transfer(mg_constrained_dofs); transfer.build_matrices(mgdof); transfer.print_matrices(deallog.get_file_stream()); diff --git a/tests/multigrid/transfer_prebuilt_03.cc b/tests/multigrid/transfer_prebuilt_03.cc index 56011f1aea..430dcd50a6 100644 --- a/tests/multigrid/transfer_prebuilt_03.cc +++ b/tests/multigrid/transfer_prebuilt_03.cc @@ -59,10 +59,6 @@ void check_simple(const FiniteElement &fe) mgdof.distribute_dofs(fe); mgdof.distribute_mg_dofs(fe); - ConstraintMatrix hanging_node_constraints; - DoFTools::make_hanging_node_constraints (mgdof, hanging_node_constraints); - hanging_node_constraints.close (); - typename FunctionMap::type dirichlet_boundary; ZeroFunction homogeneous_dirichlet_bc (1); dirichlet_boundary[0] = &homogeneous_dirichlet_bc; @@ -70,7 +66,7 @@ void check_simple(const FiniteElement &fe) MGConstrainedDoFs mg_constrained_dofs; mg_constrained_dofs.initialize(mgdof, dirichlet_boundary); - MGTransferPrebuilt > transfer(hanging_node_constraints, mg_constrained_dofs); + MGTransferPrebuilt > transfer(mg_constrained_dofs); transfer.build_matrices(mgdof); transfer.print_matrices(deallog.get_file_stream()); diff --git a/tests/multigrid/transfer_prebuilt_04.cc b/tests/multigrid/transfer_prebuilt_04.cc index 15e61789e0..ca1932a15a 100644 --- a/tests/multigrid/transfer_prebuilt_04.cc +++ b/tests/multigrid/transfer_prebuilt_04.cc @@ -56,13 +56,6 @@ void check() mgdof.distribute_dofs(fe); mgdof.distribute_mg_dofs(fe); - ConstraintMatrix hanging_node_constraints; - IndexSet relevant_dofs; - DoFTools::extract_locally_relevant_dofs(mgdof, relevant_dofs); - hanging_node_constraints.reinit(relevant_dofs); - DoFTools::make_hanging_node_constraints(mgdof, hanging_node_constraints); - hanging_node_constraints.close(); - MGConstrainedDoFs mg_constrained_dofs; ZeroFunction zero_function; typename FunctionMap::type dirichlet_boundary; @@ -85,7 +78,7 @@ void check() } MGTransferPrebuilt > - transfer_ref(hanging_node_constraints, mg_constrained_dofs); + transfer_ref(mg_constrained_dofs); transfer_ref.build_matrices(mgdof); } } diff --git a/tests/multigrid/transfer_system_adaptive_02.cc b/tests/multigrid/transfer_system_adaptive_02.cc index f9d920ac12..65053d111e 100644 --- a/tests/multigrid/transfer_system_adaptive_02.cc +++ b/tests/multigrid/transfer_system_adaptive_02.cc @@ -154,8 +154,7 @@ void check (const FiniteElement &fe) MGConstrainedDoFs mg_constrained_dofs; mg_constrained_dofs.initialize(mg_dof_handler, dirichlet_boundary); - ConstraintMatrix constraints; - MGTransferPrebuilt > transfer(constraints, mg_constrained_dofs); + MGTransferPrebuilt > transfer(mg_constrained_dofs); transfer.build_matrices(mg_dof_handler); FullMatrix prolong_0_1 (mg_dof_handler.n_dofs(1),