]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid use of deprecated functions in tests
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 7 Apr 2020 07:17:41 +0000 (09:17 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 8 Apr 2020 10:25:32 +0000 (12:25 +0200)
tests/bits/fe_tools_01a.cc
tests/bits/fe_tools_01b.cc
tests/bits/fe_tools_01c.cc
tests/fe/numbering.cc

index f6495a8f5beb40da7a127b013669b284648ae8ef..93e6586aa24e8f8dbf42e0139598874d606116ef 100644 (file)
@@ -33,7 +33,7 @@
 
 
 // check
-//   DoFTools::lexicographic_to_hierarchic_numbering
+//   FETools::lexicographic_to_hierarchic_numbering
 
 
 template <int dim>
@@ -42,8 +42,8 @@ check(const FE_Q<dim> &fe, const std::string &name)
 {
   deallog << "Checking " << name << " in " << dim << "d:" << std::endl;
 
-  std::vector<unsigned int> n(fe.dofs_per_cell);
-  FETools::lexicographic_to_hierarchic_numbering(fe, n);
+  const std::vector<unsigned int> n =
+    FETools::lexicographic_to_hierarchic_numbering<dim>(fe.degree);
   for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
     deallog << n[i] << " ";
   deallog << std::endl;
index f46cea5883cfbf5505cb82b85d1eae9ba3452c1d..d17fbd7e646e7085402c8d78a0109e86aaa1b5d2 100644 (file)
@@ -33,7 +33,7 @@
 
 
 // check
-//   DoFTools::hierarchic_to_lexicographic_numbering
+//   FETools::hierarchic_to_lexicographic_numbering
 
 
 template <int dim>
@@ -42,8 +42,8 @@ check(const FE_Q<dim> &fe, const std::string &name)
 {
   deallog << "Checking " << name << " in " << dim << "d:" << std::endl;
 
-  std::vector<unsigned int> n(fe.dofs_per_cell);
-  FETools::hierarchic_to_lexicographic_numbering(fe, n);
+  const std::vector<unsigned int> n =
+    FETools::hierarchic_to_lexicographic_numbering<dim>(fe.degree);
   for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
     deallog << n[i] << " ";
   deallog << std::endl;
index 5f5a7c3f96027d90ae882a90546d9fce98a909a7..b21929875a8d55976a8b6bdea70ee964230c11b1 100644 (file)
@@ -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 <int dim>
@@ -44,11 +44,11 @@ check(const FE_Q<dim> &fe, const std::string &name)
 {
   deallog << "Checking " << name << " in " << dim << "d:" << std::endl;
 
-  std::vector<unsigned int> n1(fe.dofs_per_cell);
-  FETools::hierarchic_to_lexicographic_numbering(fe, n1);
+  const std::vector<unsigned int> n1 =
+    FETools::hierarchic_to_lexicographic_numbering<dim>(fe.degree);
 
-  std::vector<unsigned int> n2(fe.dofs_per_cell);
-  FETools::lexicographic_to_hierarchic_numbering(fe, n2);
+  const std::vector<unsigned int> n2 =
+    FETools::lexicographic_to_hierarchic_numbering<dim>(fe.degree);
 
   for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
     {
index 9b61b540fd887c7d85595377608a484325cd9093..f0d4770038e28522ad21021f17d2f01b2ff72a52 100644 (file)
@@ -234,8 +234,8 @@ check(const FE_Q<dim> &fe)
   // identity. output the two maps to
   // generate some output for
   // automatic comparison
-  std::vector<unsigned int> l2h(fe.dofs_per_cell);
-  FETools::lexicographic_to_hierarchic_numbering(fe, l2h);
+  const std::vector<unsigned int> l2h =
+    FETools::lexicographic_to_hierarchic_numbering<dim>(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<dim> &fe)
   // finally, we also have the
   // forward map in the lib, so check
   // for equality
-  std::vector<unsigned int> h2l(fe.dofs_per_cell);
-  FETools::hierarchic_to_lexicographic_numbering(fe, h2l);
+  const std::vector<unsigned int> h2l =
+    FETools::hierarchic_to_lexicographic_numbering<dim>(fe.degree);
   AssertThrow(hierarchic_to_lexicographic_numbering == h2l, ExcInternalError());
 }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.