From 241378a2c1b22a2b87276f9da62cf61c171e097f Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Tue, 7 Apr 2020 09:17:41 +0200 Subject: [PATCH] Avoid use of deprecated functions in tests --- tests/bits/fe_tools_01a.cc | 6 +++--- tests/bits/fe_tools_01b.cc | 6 +++--- tests/bits/fe_tools_01c.cc | 12 ++++++------ tests/fe/numbering.cc | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/bits/fe_tools_01a.cc b/tests/bits/fe_tools_01a.cc index f6495a8f5b..93e6586aa2 100644 --- a/tests/bits/fe_tools_01a.cc +++ b/tests/bits/fe_tools_01a.cc @@ -33,7 +33,7 @@ // check -// DoFTools::lexicographic_to_hierarchic_numbering +// FETools::lexicographic_to_hierarchic_numbering template @@ -42,8 +42,8 @@ check(const FE_Q &fe, const std::string &name) { deallog << "Checking " << name << " in " << dim << "d:" << std::endl; - std::vector n(fe.dofs_per_cell); - FETools::lexicographic_to_hierarchic_numbering(fe, n); + const std::vector n = + FETools::lexicographic_to_hierarchic_numbering(fe.degree); for (unsigned int i = 0; i < fe.dofs_per_cell; ++i) deallog << n[i] << " "; deallog << std::endl; diff --git a/tests/bits/fe_tools_01b.cc b/tests/bits/fe_tools_01b.cc index f46cea5883..d17fbd7e64 100644 --- a/tests/bits/fe_tools_01b.cc +++ b/tests/bits/fe_tools_01b.cc @@ -33,7 +33,7 @@ // check -// DoFTools::hierarchic_to_lexicographic_numbering +// FETools::hierarchic_to_lexicographic_numbering template @@ -42,8 +42,8 @@ check(const FE_Q &fe, const std::string &name) { deallog << "Checking " << name << " in " << dim << "d:" << std::endl; - std::vector n(fe.dofs_per_cell); - FETools::hierarchic_to_lexicographic_numbering(fe, n); + const std::vector n = + FETools::hierarchic_to_lexicographic_numbering(fe.degree); for (unsigned int i = 0; i < fe.dofs_per_cell; ++i) deallog << n[i] << " "; deallog << std::endl; diff --git a/tests/bits/fe_tools_01c.cc b/tests/bits/fe_tools_01c.cc index 5f5a7c3f96..b21929875a 100644 --- a/tests/bits/fe_tools_01c.cc +++ b/tests/bits/fe_tools_01c.cc @@ -33,9 +33,9 @@ // check invertability of the map from -// DoFTools::hierarchic_to_lexicographic_numbering +// FETools::hierarchic_to_lexicographic_numbering // to -// DoFTools::lexicographic_to_hierarchic_numbering +// FETools::lexicographic_to_hierarchic_numbering template @@ -44,11 +44,11 @@ check(const FE_Q &fe, const std::string &name) { deallog << "Checking " << name << " in " << dim << "d:" << std::endl; - std::vector n1(fe.dofs_per_cell); - FETools::hierarchic_to_lexicographic_numbering(fe, n1); + const std::vector n1 = + FETools::hierarchic_to_lexicographic_numbering(fe.degree); - std::vector n2(fe.dofs_per_cell); - FETools::lexicographic_to_hierarchic_numbering(fe, n2); + const std::vector n2 = + FETools::lexicographic_to_hierarchic_numbering(fe.degree); for (unsigned int i = 0; i < fe.dofs_per_cell; ++i) { diff --git a/tests/fe/numbering.cc b/tests/fe/numbering.cc index 9b61b540fd..f0d4770038 100644 --- a/tests/fe/numbering.cc +++ b/tests/fe/numbering.cc @@ -234,8 +234,8 @@ check(const FE_Q &fe) // identity. output the two maps to // generate some output for // automatic comparison - std::vector l2h(fe.dofs_per_cell); - FETools::lexicographic_to_hierarchic_numbering(fe, l2h); + const std::vector l2h = + FETools::lexicographic_to_hierarchic_numbering(fe.degree); for (unsigned int i = 0; i < dofs_per_cell; ++i) { Assert(l2h[hierarchic_to_lexicographic_numbering[i]] == i, @@ -247,8 +247,8 @@ check(const FE_Q &fe) // finally, we also have the // forward map in the lib, so check // for equality - std::vector h2l(fe.dofs_per_cell); - FETools::hierarchic_to_lexicographic_numbering(fe, h2l); + const std::vector h2l = + FETools::hierarchic_to_lexicographic_numbering(fe.degree); AssertThrow(hierarchic_to_lexicographic_numbering == h2l, ExcInternalError()); } -- 2.39.5