From fb85dc95914a3fc0b5035d12bce785cf5b8bd480 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 2 Jan 2015 13:18:08 -0600 Subject: [PATCH] Remove deprecated variant of DoFTools::make_sparsity_pattern with a vector-of-vector mask. --- doc/news/changes.h | 1 + include/deal.II/dofs/dof_tools.h | 40 -------------------- tests/bits/dof_tools_02a.cc | 12 +++--- tests/bits/dof_tools_02a_constraints_true.cc | 4 +- tests/bits/dof_tools_02b.cc | 12 +++--- tests/bits/dof_tools_02b_x.cc | 10 +++-- tests/bits/dof_tools_02c.cc | 12 +++--- tests/bits/dof_tools_02d.cc | 10 +++-- tests/bits/dof_tools_02d_x.cc | 12 +++--- tests/deal.II/create_laplace_matrix_02.cc | 7 ++-- tests/deal.II/create_laplace_matrix_02b.cc | 7 ++-- tests/deal.II/create_laplace_matrix_04.cc | 7 ++-- tests/deal.II/create_laplace_matrix_04b.cc | 7 ++-- tests/deal.II/create_mass_matrix_02.cc | 7 ++-- tests/deal.II/create_mass_matrix_02b.cc | 5 ++- tests/deal.II/create_mass_matrix_04.cc | 7 ++-- tests/deal.II/create_mass_matrix_04b.cc | 7 ++-- tests/deal.II/create_mass_matrix_05.cc | 13 ++++--- tests/deal.II/matrices.cc | 7 ++-- tests/deal.II/sparsity_pattern.cc | 7 ++-- tests/deal.II/sparsity_pattern_01.cc | 7 ++-- tests/deal.II/sparsity_pattern_01_x.cc | 7 ++-- tests/deal.II/sparsity_pattern_x.cc | 7 ++-- tests/fe/non_primitive_1.cc | 9 +++-- tests/hp/create_laplace_matrix_02.cc | 7 ++-- tests/hp/create_laplace_matrix_02b.cc | 7 ++-- tests/hp/create_laplace_matrix_04.cc | 7 ++-- tests/hp/create_laplace_matrix_04b.cc | 7 ++-- tests/hp/create_mass_matrix_02.cc | 7 ++-- tests/hp/create_mass_matrix_02b.cc | 7 ++-- tests/hp/create_mass_matrix_04.cc | 7 ++-- tests/hp/create_mass_matrix_04b.cc | 7 ++-- tests/hp/create_mass_matrix_05.cc | 12 +++--- tests/hp/matrices.cc | 7 ++-- tests/hp/matrices_hp.cc | 7 ++-- 35 files changed, 155 insertions(+), 151 deletions(-) diff --git a/doc/news/changes.h b/doc/news/changes.h index 930bb82e47..55df560dec 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -73,6 +73,7 @@ inconvenience this causes. library to the muparser library after the deal.II 8.1 release). - DoFRenumbering::downstream_dg. - DoFTools::count_dofs_per_component. + - DoFTools::make_sparsity_pattern with a vector-of-vector mask.
  • Removed: The config.h file no longer exports HAVE_* definitions. diff --git a/include/deal.II/dofs/dof_tools.h b/include/deal.II/dofs/dof_tools.h index 47419c1ab7..a545b4c5fa 100644 --- a/include/deal.II/dofs/dof_tools.h +++ b/include/deal.II/dofs/dof_tools.h @@ -499,18 +499,6 @@ namespace DoFTools const bool keep_constrained_dofs = true, const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id); - /** - * @deprecated This is the old form of the previous function. It generates a - * table of DoFTools::Coupling values (where a true value in - * the mask is translated into a Coupling::always value in the table) and - * calls the function above. - */ - template - void - make_sparsity_pattern (const DH &dof, - const std::vector > &mask, - SparsityPattern &sparsity_pattern) DEAL_II_DEPRECATED; - /** * Construct a sparsity pattern that allows coupling degrees of freedom on * two different but related meshes. @@ -2355,34 +2343,6 @@ namespace DoFTools } - template - inline - void - make_sparsity_pattern (const DH &dof, - const std::vector > &mask, - SparsityPattern &sparsity_pattern) - { - const unsigned int ncomp = dof.get_fe().n_components(); - - Assert (mask.size() == ncomp, - ExcDimensionMismatch(mask.size(), ncomp)); - for (unsigned int i=0; i couplings(ncomp, ncomp); - for (unsigned int i=0; i void map_support_points_to_dofs ( diff --git a/tests/bits/dof_tools_02a.cc b/tests/bits/dof_tools_02a.cc index b646d55bdc..f2a5a5283c 100644 --- a/tests/bits/dof_tools_02a.cc +++ b/tests/bits/dof_tools_02a.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2013 by the deal.II authors +// Copyright (C) 2003 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -21,7 +21,7 @@ // check // DoFTools:: // make_sparsity_pattern (const DoFHandler &, -// std::vector > &, +// Table<2,DoFTools::Coupling> &, // SparsityPattern &); @@ -34,10 +34,12 @@ check_this (const DoFHandler &dof_handler) { // set up X-shape mask const unsigned int n_components = dof_handler.get_fe().n_components(); - std::vector > mask (n_components, - std::vector(n_components,false)); + Table<2,DoFTools::Coupling> mask (n_components, n_components); for (unsigned int i=0; i &, -// std::vector > &, +// Table<2,DoFTools::Coupling> &, // SparsityPattern &, // ConstraintMatrix, // true); diff --git a/tests/bits/dof_tools_02b.cc b/tests/bits/dof_tools_02b.cc index 3d763018d6..1cff78af70 100644 --- a/tests/bits/dof_tools_02b.cc +++ b/tests/bits/dof_tools_02b.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2013 by the deal.II authors +// Copyright (C) 2003 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -21,7 +21,7 @@ // check // DoFTools:: // make_sparsity_pattern (const DoFHandler &, -// std::vector > &, +// Table<2,Coupling> &, // CompressedSparsityPattern &); std::string output_file_name = "output"; @@ -33,10 +33,12 @@ check_this (const DoFHandler &dof_handler) { // set up X-shape mask const unsigned int n_components = dof_handler.get_fe().n_components(); - std::vector > mask (n_components, - std::vector(n_components,false)); + Table<2,DoFTools::Coupling> mask (n_components, n_components); for (unsigned int i=0; i &dof_handler) { // set up X-shape mask const unsigned int n_components = dof_handler.get_fe().n_components(); - std::vector > mask (n_components, - std::vector(n_components,false)); + Table<2,DoFTools::Coupling> mask (n_components, n_components); for (unsigned int i=0; i &, -// std::vector > &, +// Table<2,Coupling> &, // BlockSparsityPattern &); std::string output_file_name = "output"; @@ -33,10 +33,12 @@ check_this (const DoFHandler &dof_handler) { // set up X-shape mask const unsigned int n_components = dof_handler.get_fe().n_components(); - std::vector > mask (n_components, - std::vector(n_components,false)); + Table<2,DoFTools::Coupling> mask (n_components, n_components); for (unsigned int i=0; i &dof_handler) { // set up X-shape mask const unsigned int n_components = dof_handler.get_fe().n_components(); - std::vector > mask (n_components, - std::vector(n_components,false)); + Table<2,DoFTools::Coupling> mask (n_components, n_components); for (unsigned int i=0; i &, -// std::vector > &, +// Table<2,Coupling> &, // BlockCompressedSetSparsityPattern &); std::string output_file_name = "output"; @@ -33,10 +33,12 @@ check_this (const DoFHandler &dof_handler) { // set up X-shape mask const unsigned int n_components = dof_handler.get_fe().n_components(); - std::vector > mask (n_components, - std::vector(n_components,false)); + Table<2,DoFTools::Coupling> mask (n_components, n_components); for (unsigned int i=0; i > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/deal.II/create_laplace_matrix_02b.cc b/tests/deal.II/create_laplace_matrix_02b.cc index f42fb83277..59217a736c 100644 --- a/tests/deal.II/create_laplace_matrix_02b.cc +++ b/tests/deal.II/create_laplace_matrix_02b.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -84,8 +84,9 @@ check () // that different components should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/deal.II/create_laplace_matrix_04.cc b/tests/deal.II/create_laplace_matrix_04.cc index 530f53465b..91424be6d1 100644 --- a/tests/deal.II/create_laplace_matrix_04.cc +++ b/tests/deal.II/create_laplace_matrix_04.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -82,8 +82,9 @@ check () // that different components should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/deal.II/create_laplace_matrix_04b.cc b/tests/deal.II/create_laplace_matrix_04b.cc index 3ef8d4f0ed..1b0ea1ccc5 100644 --- a/tests/deal.II/create_laplace_matrix_04b.cc +++ b/tests/deal.II/create_laplace_matrix_04b.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -83,8 +83,9 @@ check () // that different components should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/deal.II/create_mass_matrix_02.cc b/tests/deal.II/create_mass_matrix_02.cc index f64faf8ca2..06ac3a863c 100644 --- a/tests/deal.II/create_mass_matrix_02.cc +++ b/tests/deal.II/create_mass_matrix_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -83,8 +83,9 @@ check () // that different components should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/deal.II/create_mass_matrix_02b.cc b/tests/deal.II/create_mass_matrix_02b.cc index 4186fc10cd..d0da9799d7 100644 --- a/tests/deal.II/create_mass_matrix_02b.cc +++ b/tests/deal.II/create_mass_matrix_02b.cc @@ -84,8 +84,9 @@ check () // that different components should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/deal.II/create_mass_matrix_04.cc b/tests/deal.II/create_mass_matrix_04.cc index d0cf308481..2d3ff08476 100644 --- a/tests/deal.II/create_mass_matrix_04.cc +++ b/tests/deal.II/create_mass_matrix_04.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -82,8 +82,9 @@ check () // that different components should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/deal.II/create_mass_matrix_04b.cc b/tests/deal.II/create_mass_matrix_04b.cc index 3a30f963fe..3683b921d2 100644 --- a/tests/deal.II/create_mass_matrix_04b.cc +++ b/tests/deal.II/create_mass_matrix_04b.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -83,8 +83,9 @@ check () // that different components should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/deal.II/create_mass_matrix_05.cc b/tests/deal.II/create_mass_matrix_05.cc index e0b2211b07..d437a718a1 100644 --- a/tests/deal.II/create_mass_matrix_05.cc +++ b/tests/deal.II/create_mass_matrix_05.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -74,14 +74,17 @@ check () // that different blocks should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (dim*2, - std::vector(dim*2, false)); + const unsigned int n_components = 2*dim; + Table<2,DoFTools::Coupling> mask (n_components, n_components); + for (unsigned int i=0; i > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/deal.II/sparsity_pattern.cc b/tests/deal.II/sparsity_pattern.cc index d728836c87..726c750530 100644 --- a/tests/deal.II/sparsity_pattern.cc +++ b/tests/deal.II/sparsity_pattern.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -127,8 +127,9 @@ check () // create sparsity pattern. note // that different components should // not couple, so use pattern - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; //--------------- Regular sparsity pattern checks ----------------- diff --git a/tests/deal.II/sparsity_pattern_01.cc b/tests/deal.II/sparsity_pattern_01.cc index 4993baf759..22f11007be 100644 --- a/tests/deal.II/sparsity_pattern_01.cc +++ b/tests/deal.II/sparsity_pattern_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -126,8 +126,9 @@ check () // create sparsity pattern. note // that different components should // not couple, so use pattern - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; //--------------- Regular sparsity pattern checks ----------------- diff --git a/tests/deal.II/sparsity_pattern_01_x.cc b/tests/deal.II/sparsity_pattern_01_x.cc index 206e832739..2a514b09e4 100644 --- a/tests/deal.II/sparsity_pattern_01_x.cc +++ b/tests/deal.II/sparsity_pattern_01_x.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -127,8 +127,9 @@ check () // create sparsity pattern. note // that different components should // not couple, so use pattern - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; //--------------- Regular sparsity pattern checks ----------------- diff --git a/tests/deal.II/sparsity_pattern_x.cc b/tests/deal.II/sparsity_pattern_x.cc index 72e6deb960..a30400ab99 100644 --- a/tests/deal.II/sparsity_pattern_x.cc +++ b/tests/deal.II/sparsity_pattern_x.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -127,8 +127,9 @@ check () // create sparsity pattern. note // that different components should // not couple, so use pattern - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; //--------------- Regular sparsity pattern checks ----------------- diff --git a/tests/fe/non_primitive_1.cc b/tests/fe/non_primitive_1.cc index c6776ee6a2..4983cb6b68 100644 --- a/tests/fe/non_primitive_1.cc +++ b/tests/fe/non_primitive_1.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2001 - 2013 by the deal.II authors +// Copyright (C) 2001 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -295,8 +295,11 @@ test () // for the stokes equation the // pressure does not couple to // itself - std::vector > mask (dim+1, std::vector (dim+1, true)); - mask[dim][dim] = false; + Table<2,DoFTools::Coupling> mask (dim+1, dim+1); + for (unsigned int i=0; i > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/hp/create_laplace_matrix_02b.cc b/tests/hp/create_laplace_matrix_02b.cc index cc389f1623..a0cd137f23 100644 --- a/tests/hp/create_laplace_matrix_02b.cc +++ b/tests/hp/create_laplace_matrix_02b.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -97,8 +97,9 @@ check () // that different components should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/hp/create_laplace_matrix_04.cc b/tests/hp/create_laplace_matrix_04.cc index 8c9f0f1adb..0458600dee 100644 --- a/tests/hp/create_laplace_matrix_04.cc +++ b/tests/hp/create_laplace_matrix_04.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -95,8 +95,9 @@ check () // that different components should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/hp/create_laplace_matrix_04b.cc b/tests/hp/create_laplace_matrix_04b.cc index 0b0f0f491f..a0f7068e00 100644 --- a/tests/hp/create_laplace_matrix_04b.cc +++ b/tests/hp/create_laplace_matrix_04b.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -96,8 +96,9 @@ check () // that different components should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/hp/create_mass_matrix_02.cc b/tests/hp/create_mass_matrix_02.cc index 286a6474f1..bb4531b31d 100644 --- a/tests/hp/create_mass_matrix_02.cc +++ b/tests/hp/create_mass_matrix_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -96,8 +96,9 @@ check () // that different components should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/hp/create_mass_matrix_02b.cc b/tests/hp/create_mass_matrix_02b.cc index e66b14a617..9f456f700f 100644 --- a/tests/hp/create_mass_matrix_02b.cc +++ b/tests/hp/create_mass_matrix_02b.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -97,8 +97,9 @@ check () // that different components should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/hp/create_mass_matrix_04.cc b/tests/hp/create_mass_matrix_04.cc index 08bbf6fc8d..30962f1aae 100644 --- a/tests/hp/create_mass_matrix_04.cc +++ b/tests/hp/create_mass_matrix_04.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -95,8 +95,9 @@ check () // that different components should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/hp/create_mass_matrix_04b.cc b/tests/hp/create_mass_matrix_04b.cc index cbca58c73e..1533782d4d 100644 --- a/tests/hp/create_mass_matrix_04b.cc +++ b/tests/hp/create_mass_matrix_04b.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -96,8 +96,9 @@ check () // that different components should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/hp/create_mass_matrix_05.cc b/tests/hp/create_mass_matrix_05.cc index 3d46bfd79e..719a564904 100644 --- a/tests/hp/create_mass_matrix_05.cc +++ b/tests/hp/create_mass_matrix_05.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -89,14 +89,16 @@ check () // that different blocks should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (dim*2, - std::vector(dim*2, false)); + Table<2,DoFTools::Coupling> mask (2*dim, 2*dim); + for (unsigned int i=0; i<2*dim; ++i) + for (unsigned int j=0; j<2*dim; ++j) + mask[i][j] = DoFTools::none; for (unsigned int i=0; i > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); diff --git a/tests/hp/matrices_hp.cc b/tests/hp/matrices_hp.cc index 309b988e40..b4a40a8634 100644 --- a/tests/hp/matrices_hp.cc +++ b/tests/hp/matrices_hp.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -169,8 +169,9 @@ check () // that different components should // not couple, so use pattern SparsityPattern sparsity (dof.n_dofs(), dof.n_dofs()); - std::vector > mask (2, std::vector(2, false)); - mask[0][0] = mask[1][1] = true; + Table<2,DoFTools::Coupling> mask (2, 2); + mask(0,0) = mask(1,1) = DoFTools::always; + mask(0,1) = mask(1,0) = DoFTools::none; DoFTools::make_sparsity_pattern (dof, mask, sparsity); ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (dof, constraints); -- 2.39.5