]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a number of tests.
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 20 Aug 2021 19:18:43 +0000 (13:18 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 24 Aug 2021 19:53:40 +0000 (13:53 -0600)
18 files changed:
tests/hp/hp_line_dof_identities_mixed_multiway.cc [new file with mode: 0644]
tests/hp/hp_line_dof_identities_mixed_multiway.output [new file with mode: 0644]
tests/hp/hp_line_dof_identities_q_multiway.cc [new file with mode: 0644]
tests/hp/hp_line_dof_identities_q_multiway.output [new file with mode: 0644]
tests/hp/hp_line_dof_identities_q_system_multiway.cc [new file with mode: 0644]
tests/hp/hp_line_dof_identities_q_system_multiway.output [new file with mode: 0644]
tests/hp/hp_quad_dof_identities_mixed_multiway.cc [new file with mode: 0644]
tests/hp/hp_quad_dof_identities_mixed_multiway.output [new file with mode: 0644]
tests/hp/hp_quad_dof_identities_q_multiway.cc [new file with mode: 0644]
tests/hp/hp_quad_dof_identities_q_multiway.output [new file with mode: 0644]
tests/hp/hp_quad_dof_identities_q_system_multiway.cc [new file with mode: 0644]
tests/hp/hp_quad_dof_identities_q_system_multiway.output [new file with mode: 0644]
tests/hp/hp_vertex_dof_identities_mixed_multiway.cc [new file with mode: 0644]
tests/hp/hp_vertex_dof_identities_mixed_multiway.output [new file with mode: 0644]
tests/hp/hp_vertex_dof_identities_q_multiway.cc [new file with mode: 0644]
tests/hp/hp_vertex_dof_identities_q_multiway.output [new file with mode: 0644]
tests/hp/hp_vertex_dof_identities_q_system_multiway.cc [new file with mode: 0644]
tests/hp/hp_vertex_dof_identities_q_system_multiway.output [new file with mode: 0644]

diff --git a/tests/hp/hp_line_dof_identities_mixed_multiway.cc b/tests/hp/hp_line_dof_identities_mixed_multiway.cc
new file mode 100644 (file)
index 0000000..ad54b4c
--- /dev/null
@@ -0,0 +1,76 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2005 - 2018 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+
+
+// check FE_Collection::hp_line_dof_identities with multiway
+// identities for a combination of FE_Q element and FE_DGQ
+// elements. Only the FE_Q elements have DoFs on vertices so only they
+// will participate in the identities.
+
+
+#include <deal.II/fe/fe_dgq.h>
+#include <deal.II/fe/fe_q.h>
+
+#include <deal.II/hp/fe_collection.h>
+
+#include "../tests.h"
+
+
+
+template <int dim>
+void
+test()
+{
+  deallog << "dim=" << dim << std::endl;
+
+  hp::FECollection<dim> fe_collection;
+  for (unsigned int i = 1; i <= 8; ++i)
+    {
+      fe_collection.push_back(FE_Q<dim>(i));
+      fe_collection.push_back(FE_DGQ<dim>(i));
+    }
+
+  // construct the complete set of fe indices
+  std::set<unsigned int> fe_indices;
+  for (unsigned int i = 0; i < fe_collection.size(); ++i)
+    fe_indices.emplace(i);
+
+  const auto identities = fe_collection.hp_line_dof_identities(fe_indices);
+
+  for (unsigned int i = 0; i < identities.size(); ++i)
+    {
+      deallog << "Identity set #" << i << std::endl;
+      for (const auto &p : identities[i])
+        {
+          deallog << "  " << fe_collection[p.first].get_name()
+                  << ": line dof index " << p.second << std::endl;
+        }
+    }
+}
+
+
+
+int
+main()
+{
+  initlog();
+  deallog.get_file_stream().precision(2);
+
+  test<2>();
+  test<3>();
+
+  deallog << "OK" << std::endl;
+}
diff --git a/tests/hp/hp_line_dof_identities_mixed_multiway.output b/tests/hp/hp_line_dof_identities_mixed_multiway.output
new file mode 100644 (file)
index 0000000..a9b6b8c
--- /dev/null
@@ -0,0 +1,14 @@
+
+DEAL::dim=2
+DEAL::Identity set #0
+DEAL::  FE_Q<2>(2): line dof index 0
+DEAL::  FE_Q<2>(4): line dof index 1
+DEAL::  FE_Q<2>(6): line dof index 2
+DEAL::  FE_Q<2>(8): line dof index 3
+DEAL::dim=3
+DEAL::Identity set #0
+DEAL::  FE_Q<3>(2): line dof index 0
+DEAL::  FE_Q<3>(4): line dof index 1
+DEAL::  FE_Q<3>(6): line dof index 2
+DEAL::  FE_Q<3>(8): line dof index 3
+DEAL::OK
diff --git a/tests/hp/hp_line_dof_identities_q_multiway.cc b/tests/hp/hp_line_dof_identities_q_multiway.cc
new file mode 100644 (file)
index 0000000..a798d3b
--- /dev/null
@@ -0,0 +1,72 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2005 - 2018 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+
+
+// check FE_Collection::hp_line_dof_identities with multiway
+// identities for the FE_Q element
+
+
+#include <deal.II/fe/fe_q.h>
+
+#include <deal.II/hp/fe_collection.h>
+
+#include "../tests.h"
+
+
+
+template <int dim>
+void
+test()
+{
+  deallog << "dim=" << dim << std::endl;
+
+  hp::FECollection<dim> fe_collection;
+  for (unsigned int i = 1; i <= 8; ++i)
+    fe_collection.push_back(FE_Q<dim>(i));
+
+  // construct the complete set of fe indices
+  std::set<unsigned int> fe_indices;
+  for (unsigned int i = 0; i < fe_collection.size(); ++i)
+    fe_indices.emplace(i);
+
+  const auto identities = fe_collection.hp_line_dof_identities(fe_indices);
+
+  for (unsigned int i = 0; i < identities.size(); ++i)
+    {
+      deallog << "Identity set #" << i << std::endl;
+      for (const auto &p : identities[i])
+        {
+          deallog << "  " << fe_collection[p.first].get_name()
+                  << ": line dof index " << p.second << std::endl;
+        }
+    }
+
+  deallog << std::endl;
+}
+
+
+
+int
+main()
+{
+  initlog();
+  deallog.get_file_stream().precision(2);
+
+  test<2>();
+  test<3>();
+
+  deallog << "OK" << std::endl;
+}
diff --git a/tests/hp/hp_line_dof_identities_q_multiway.output b/tests/hp/hp_line_dof_identities_q_multiway.output
new file mode 100644 (file)
index 0000000..56af1c2
--- /dev/null
@@ -0,0 +1,16 @@
+
+DEAL::dim=2
+DEAL::Identity set #0
+DEAL::  FE_Q<2>(2): line dof index 0
+DEAL::  FE_Q<2>(4): line dof index 1
+DEAL::  FE_Q<2>(6): line dof index 2
+DEAL::  FE_Q<2>(8): line dof index 3
+DEAL::
+DEAL::dim=3
+DEAL::Identity set #0
+DEAL::  FE_Q<3>(2): line dof index 0
+DEAL::  FE_Q<3>(4): line dof index 1
+DEAL::  FE_Q<3>(6): line dof index 2
+DEAL::  FE_Q<3>(8): line dof index 3
+DEAL::
+DEAL::OK
diff --git a/tests/hp/hp_line_dof_identities_q_system_multiway.cc b/tests/hp/hp_line_dof_identities_q_system_multiway.cc
new file mode 100644 (file)
index 0000000..e4f2d82
--- /dev/null
@@ -0,0 +1,74 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2005 - 2018 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+
+
+// check FE_Collection::hp_line_dof_identities with multiway
+// identities for a system of FE_Q elements. Each vector component of
+// the system will form its own identity set.
+
+
+#include <deal.II/fe/fe_q.h>
+#include <deal.II/fe/fe_system.h>
+
+#include <deal.II/hp/fe_collection.h>
+
+#include "../tests.h"
+
+
+
+template <int dim>
+void
+test()
+{
+  deallog << "dim=" << dim << std::endl;
+
+  hp::FECollection<dim> fe_collection;
+  for (unsigned int i = 1; i <= 8; ++i)
+    fe_collection.push_back(FESystem<dim>(FE_Q<dim>(i), 2));
+
+  // construct the complete set of fe indices
+  std::set<unsigned int> fe_indices;
+  for (unsigned int i = 0; i < fe_collection.size(); ++i)
+    fe_indices.emplace(i);
+
+  const auto identities = fe_collection.hp_line_dof_identities(fe_indices);
+
+  for (unsigned int i = 0; i < identities.size(); ++i)
+    {
+      deallog << "Identity set #" << i << std::endl;
+      for (const auto &p : identities[i])
+        {
+          deallog << "  " << fe_collection[p.first].get_name()
+                  << ": line dof index " << p.second << std::endl;
+        }
+    }
+
+  deallog << std::endl;
+}
+
+
+
+int
+main()
+{
+  initlog();
+  deallog.get_file_stream().precision(2);
+
+  test<2>();
+  test<3>();
+
+  deallog << "OK" << std::endl;
+}
diff --git a/tests/hp/hp_line_dof_identities_q_system_multiway.output b/tests/hp/hp_line_dof_identities_q_system_multiway.output
new file mode 100644 (file)
index 0000000..08a6618
--- /dev/null
@@ -0,0 +1,26 @@
+
+DEAL::dim=2
+DEAL::Identity set #0
+DEAL::  FESystem<2>[FE_Q<2>(2)^2]: line dof index 0
+DEAL::  FESystem<2>[FE_Q<2>(4)^2]: line dof index 1
+DEAL::  FESystem<2>[FE_Q<2>(6)^2]: line dof index 2
+DEAL::  FESystem<2>[FE_Q<2>(8)^2]: line dof index 3
+DEAL::Identity set #1
+DEAL::  FESystem<2>[FE_Q<2>(2)^2]: line dof index 1
+DEAL::  FESystem<2>[FE_Q<2>(4)^2]: line dof index 4
+DEAL::  FESystem<2>[FE_Q<2>(6)^2]: line dof index 7
+DEAL::  FESystem<2>[FE_Q<2>(8)^2]: line dof index 10
+DEAL::
+DEAL::dim=3
+DEAL::Identity set #0
+DEAL::  FESystem<3>[FE_Q<3>(2)^2]: line dof index 0
+DEAL::  FESystem<3>[FE_Q<3>(4)^2]: line dof index 1
+DEAL::  FESystem<3>[FE_Q<3>(6)^2]: line dof index 2
+DEAL::  FESystem<3>[FE_Q<3>(8)^2]: line dof index 3
+DEAL::Identity set #1
+DEAL::  FESystem<3>[FE_Q<3>(2)^2]: line dof index 1
+DEAL::  FESystem<3>[FE_Q<3>(4)^2]: line dof index 4
+DEAL::  FESystem<3>[FE_Q<3>(6)^2]: line dof index 7
+DEAL::  FESystem<3>[FE_Q<3>(8)^2]: line dof index 10
+DEAL::
+DEAL::OK
diff --git a/tests/hp/hp_quad_dof_identities_mixed_multiway.cc b/tests/hp/hp_quad_dof_identities_mixed_multiway.cc
new file mode 100644 (file)
index 0000000..0625e92
--- /dev/null
@@ -0,0 +1,77 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2005 - 2018 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+
+
+// check FE_Collection::hp_quad_dof_identities with multiway
+// identities for a combination of FE_Q element and FE_DGQ
+// elements. Only the FE_Q elements have DoFs on vertices so only they
+// will participate in the identities.
+
+
+#include <deal.II/fe/fe_dgq.h>
+#include <deal.II/fe/fe_q.h>
+
+#include <deal.II/hp/fe_collection.h>
+
+#include "../tests.h"
+
+
+
+template <int dim>
+void
+test()
+{
+  deallog << "dim=" << dim << std::endl;
+
+  hp::FECollection<dim> fe_collection;
+  for (unsigned int i = 1; i <= 8; ++i)
+    {
+      fe_collection.push_back(FE_Q<dim>(i));
+      fe_collection.push_back(FE_DGQ<dim>(i));
+    }
+
+  // construct the complete set of fe indices
+  std::set<unsigned int> fe_indices;
+  for (unsigned int i = 0; i < fe_collection.size(); ++i)
+    fe_indices.emplace(i);
+
+  const auto identities = fe_collection.hp_quad_dof_identities(fe_indices);
+
+  for (unsigned int i = 0; i < identities.size(); ++i)
+    {
+      deallog << "Identity set #" << i << std::endl;
+      for (const auto &p : identities[i])
+        {
+          deallog << "  " << fe_collection[p.first].get_name()
+                  << ": quad dof index " << p.second << std::endl;
+        }
+    }
+
+  deallog << std::endl;
+}
+
+
+
+int
+main()
+{
+  initlog();
+  deallog.get_file_stream().precision(2);
+
+  test<3>();
+
+  deallog << "OK" << std::endl;
+}
diff --git a/tests/hp/hp_quad_dof_identities_mixed_multiway.output b/tests/hp/hp_quad_dof_identities_mixed_multiway.output
new file mode 100644 (file)
index 0000000..751d60b
--- /dev/null
@@ -0,0 +1,9 @@
+
+DEAL::dim=3
+DEAL::Identity set #0
+DEAL::  FE_Q<3>(2): quad dof index 0
+DEAL::  FE_Q<3>(4): quad dof index 4
+DEAL::  FE_Q<3>(6): quad dof index 12
+DEAL::  FE_Q<3>(8): quad dof index 24
+DEAL::
+DEAL::OK
diff --git a/tests/hp/hp_quad_dof_identities_q_multiway.cc b/tests/hp/hp_quad_dof_identities_q_multiway.cc
new file mode 100644 (file)
index 0000000..cbe9380
--- /dev/null
@@ -0,0 +1,71 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2005 - 2018 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+
+
+// check FE_Collection::hp_quad_dof_identities with multiway
+// identities for the FE_Q element
+
+
+#include <deal.II/fe/fe_q.h>
+
+#include <deal.II/hp/fe_collection.h>
+
+#include "../tests.h"
+
+
+
+template <int dim>
+void
+test()
+{
+  deallog << "dim=" << dim << std::endl;
+
+  hp::FECollection<dim> fe_collection;
+  for (unsigned int i = 1; i <= 8; ++i)
+    fe_collection.push_back(FE_Q<dim>(i));
+
+  // construct the complete set of fe indices
+  std::set<unsigned int> fe_indices;
+  for (unsigned int i = 0; i < fe_collection.size(); ++i)
+    fe_indices.emplace(i);
+
+  const auto identities = fe_collection.hp_quad_dof_identities(fe_indices);
+
+  for (unsigned int i = 0; i < identities.size(); ++i)
+    {
+      deallog << "Identity set #" << i << std::endl;
+      for (const auto &p : identities[i])
+        {
+          deallog << "  " << fe_collection[p.first].get_name()
+                  << ": quad dof index " << p.second << std::endl;
+        }
+    }
+
+  deallog << std::endl;
+}
+
+
+
+int
+main()
+{
+  initlog();
+  deallog.get_file_stream().precision(2);
+
+  test<3>();
+
+  deallog << "OK" << std::endl;
+}
diff --git a/tests/hp/hp_quad_dof_identities_q_multiway.output b/tests/hp/hp_quad_dof_identities_q_multiway.output
new file mode 100644 (file)
index 0000000..751d60b
--- /dev/null
@@ -0,0 +1,9 @@
+
+DEAL::dim=3
+DEAL::Identity set #0
+DEAL::  FE_Q<3>(2): quad dof index 0
+DEAL::  FE_Q<3>(4): quad dof index 4
+DEAL::  FE_Q<3>(6): quad dof index 12
+DEAL::  FE_Q<3>(8): quad dof index 24
+DEAL::
+DEAL::OK
diff --git a/tests/hp/hp_quad_dof_identities_q_system_multiway.cc b/tests/hp/hp_quad_dof_identities_q_system_multiway.cc
new file mode 100644 (file)
index 0000000..1ae3ff2
--- /dev/null
@@ -0,0 +1,73 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2005 - 2018 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+
+
+// check FE_Collection::hp_quad_dof_identities with multiway
+// identities for a system of FE_Q elements. Each vector component of
+// the system will form its own identity set.
+
+
+#include <deal.II/fe/fe_q.h>
+#include <deal.II/fe/fe_system.h>
+
+#include <deal.II/hp/fe_collection.h>
+
+#include "../tests.h"
+
+
+
+template <int dim>
+void
+test()
+{
+  deallog << "dim=" << dim << std::endl;
+
+  hp::FECollection<dim> fe_collection;
+  for (unsigned int i = 1; i <= 8; ++i)
+    fe_collection.push_back(FESystem<dim>(FE_Q<dim>(i), 2));
+
+  // construct the complete set of fe indices
+  std::set<unsigned int> fe_indices;
+  for (unsigned int i = 0; i < fe_collection.size(); ++i)
+    fe_indices.emplace(i);
+
+  const auto identities = fe_collection.hp_quad_dof_identities(fe_indices);
+
+  for (unsigned int i = 0; i < identities.size(); ++i)
+    {
+      deallog << "Identity set #" << i << std::endl;
+      for (const auto &p : identities[i])
+        {
+          deallog << "  " << fe_collection[p.first].get_name()
+                  << ": quad dof index " << p.second << std::endl;
+        }
+    }
+
+  deallog << std::endl;
+}
+
+
+
+int
+main()
+{
+  initlog();
+  deallog.get_file_stream().precision(2);
+
+  test<3>();
+
+  deallog << "OK" << std::endl;
+}
diff --git a/tests/hp/hp_quad_dof_identities_q_system_multiway.output b/tests/hp/hp_quad_dof_identities_q_system_multiway.output
new file mode 100644 (file)
index 0000000..55e9527
--- /dev/null
@@ -0,0 +1,14 @@
+
+DEAL::dim=3
+DEAL::Identity set #0
+DEAL::  FESystem<3>[FE_Q<3>(2)^2]: quad dof index 0
+DEAL::  FESystem<3>[FE_Q<3>(4)^2]: quad dof index 4
+DEAL::  FESystem<3>[FE_Q<3>(6)^2]: quad dof index 12
+DEAL::  FESystem<3>[FE_Q<3>(8)^2]: quad dof index 24
+DEAL::Identity set #1
+DEAL::  FESystem<3>[FE_Q<3>(2)^2]: quad dof index 1
+DEAL::  FESystem<3>[FE_Q<3>(4)^2]: quad dof index 13
+DEAL::  FESystem<3>[FE_Q<3>(6)^2]: quad dof index 37
+DEAL::  FESystem<3>[FE_Q<3>(8)^2]: quad dof index 73
+DEAL::
+DEAL::OK
diff --git a/tests/hp/hp_vertex_dof_identities_mixed_multiway.cc b/tests/hp/hp_vertex_dof_identities_mixed_multiway.cc
new file mode 100644 (file)
index 0000000..54c42fc
--- /dev/null
@@ -0,0 +1,79 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2005 - 2018 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+
+
+// check FE_Collection::hp_vertex_dof_identities with multiway
+// identities for a combination of FE_Q element and FE_DGQ
+// elements. Only the FE_Q elements have DoFs on vertices so only they
+// will participate in the identities.
+
+
+#include <deal.II/fe/fe_dgq.h>
+#include <deal.II/fe/fe_q.h>
+
+#include <deal.II/hp/fe_collection.h>
+
+#include "../tests.h"
+
+
+
+template <int dim>
+void
+test()
+{
+  deallog << "dim=" << dim << std::endl;
+
+  hp::FECollection<dim> fe_collection;
+  for (unsigned int i = 1; i <= 8; ++i)
+    {
+      fe_collection.push_back(FE_Q<dim>(i));
+      fe_collection.push_back(FE_DGQ<dim>(i));
+    }
+
+  // construct the complete set of fe indices
+  std::set<unsigned int> fe_indices;
+  for (unsigned int i = 0; i < fe_collection.size(); ++i)
+    fe_indices.emplace(i);
+
+  const auto identities = fe_collection.hp_vertex_dof_identities(fe_indices);
+
+  for (unsigned int i = 0; i < identities.size(); ++i)
+    {
+      deallog << "Identity set #" << i << std::endl;
+      for (const auto &p : identities[i])
+        {
+          deallog << "  " << fe_collection[p.first].get_name()
+                  << ": vertex dof index " << p.second << std::endl;
+        }
+    }
+
+  deallog << std::endl;
+}
+
+
+
+int
+main()
+{
+  initlog();
+  deallog.get_file_stream().precision(2);
+
+  test<1>();
+  test<2>();
+  test<3>();
+
+  deallog << "OK" << std::endl;
+}
diff --git a/tests/hp/hp_vertex_dof_identities_mixed_multiway.output b/tests/hp/hp_vertex_dof_identities_mixed_multiway.output
new file mode 100644 (file)
index 0000000..4f2ce6a
--- /dev/null
@@ -0,0 +1,35 @@
+
+DEAL::dim=1
+DEAL::Identity set #0
+DEAL::  FE_Q<1>(1): vertex dof index 0
+DEAL::  FE_Q<1>(2): vertex dof index 0
+DEAL::  FE_Q<1>(3): vertex dof index 0
+DEAL::  FE_Q<1>(4): vertex dof index 0
+DEAL::  FE_Q<1>(5): vertex dof index 0
+DEAL::  FE_Q<1>(6): vertex dof index 0
+DEAL::  FE_Q<1>(7): vertex dof index 0
+DEAL::  FE_Q<1>(8): vertex dof index 0
+DEAL::
+DEAL::dim=2
+DEAL::Identity set #0
+DEAL::  FE_Q<2>(1): vertex dof index 0
+DEAL::  FE_Q<2>(2): vertex dof index 0
+DEAL::  FE_Q<2>(3): vertex dof index 0
+DEAL::  FE_Q<2>(4): vertex dof index 0
+DEAL::  FE_Q<2>(5): vertex dof index 0
+DEAL::  FE_Q<2>(6): vertex dof index 0
+DEAL::  FE_Q<2>(7): vertex dof index 0
+DEAL::  FE_Q<2>(8): vertex dof index 0
+DEAL::
+DEAL::dim=3
+DEAL::Identity set #0
+DEAL::  FE_Q<3>(1): vertex dof index 0
+DEAL::  FE_Q<3>(2): vertex dof index 0
+DEAL::  FE_Q<3>(3): vertex dof index 0
+DEAL::  FE_Q<3>(4): vertex dof index 0
+DEAL::  FE_Q<3>(5): vertex dof index 0
+DEAL::  FE_Q<3>(6): vertex dof index 0
+DEAL::  FE_Q<3>(7): vertex dof index 0
+DEAL::  FE_Q<3>(8): vertex dof index 0
+DEAL::
+DEAL::OK
diff --git a/tests/hp/hp_vertex_dof_identities_q_multiway.cc b/tests/hp/hp_vertex_dof_identities_q_multiway.cc
new file mode 100644 (file)
index 0000000..ce71968
--- /dev/null
@@ -0,0 +1,73 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2005 - 2018 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+
+
+// check FE_Collection::hp_vertex_dof_identities with multiway
+// identities for the FE_Q element
+
+
+#include <deal.II/fe/fe_q.h>
+
+#include <deal.II/hp/fe_collection.h>
+
+#include "../tests.h"
+
+
+
+template <int dim>
+void
+test()
+{
+  deallog << "dim=" << dim << std::endl;
+
+  hp::FECollection<dim> fe_collection;
+  for (unsigned int i = 1; i <= 8; ++i)
+    fe_collection.push_back(FE_Q<dim>(i));
+
+  // construct the complete set of fe indices
+  std::set<unsigned int> fe_indices;
+  for (unsigned int i = 0; i < fe_collection.size(); ++i)
+    fe_indices.emplace(i);
+
+  const auto identities = fe_collection.hp_vertex_dof_identities(fe_indices);
+
+  for (unsigned int i = 0; i < identities.size(); ++i)
+    {
+      deallog << "Identity set #" << i << std::endl;
+      for (const auto &p : identities[i])
+        {
+          deallog << "  " << fe_collection[p.first].get_name()
+                  << ": vertex dof index " << p.second << std::endl;
+        }
+    }
+
+  deallog << std::endl;
+}
+
+
+
+int
+main()
+{
+  initlog();
+  deallog.get_file_stream().precision(2);
+
+  test<1>();
+  test<2>();
+  test<3>();
+
+  deallog << "OK" << std::endl;
+}
diff --git a/tests/hp/hp_vertex_dof_identities_q_multiway.output b/tests/hp/hp_vertex_dof_identities_q_multiway.output
new file mode 100644 (file)
index 0000000..4f2ce6a
--- /dev/null
@@ -0,0 +1,35 @@
+
+DEAL::dim=1
+DEAL::Identity set #0
+DEAL::  FE_Q<1>(1): vertex dof index 0
+DEAL::  FE_Q<1>(2): vertex dof index 0
+DEAL::  FE_Q<1>(3): vertex dof index 0
+DEAL::  FE_Q<1>(4): vertex dof index 0
+DEAL::  FE_Q<1>(5): vertex dof index 0
+DEAL::  FE_Q<1>(6): vertex dof index 0
+DEAL::  FE_Q<1>(7): vertex dof index 0
+DEAL::  FE_Q<1>(8): vertex dof index 0
+DEAL::
+DEAL::dim=2
+DEAL::Identity set #0
+DEAL::  FE_Q<2>(1): vertex dof index 0
+DEAL::  FE_Q<2>(2): vertex dof index 0
+DEAL::  FE_Q<2>(3): vertex dof index 0
+DEAL::  FE_Q<2>(4): vertex dof index 0
+DEAL::  FE_Q<2>(5): vertex dof index 0
+DEAL::  FE_Q<2>(6): vertex dof index 0
+DEAL::  FE_Q<2>(7): vertex dof index 0
+DEAL::  FE_Q<2>(8): vertex dof index 0
+DEAL::
+DEAL::dim=3
+DEAL::Identity set #0
+DEAL::  FE_Q<3>(1): vertex dof index 0
+DEAL::  FE_Q<3>(2): vertex dof index 0
+DEAL::  FE_Q<3>(3): vertex dof index 0
+DEAL::  FE_Q<3>(4): vertex dof index 0
+DEAL::  FE_Q<3>(5): vertex dof index 0
+DEAL::  FE_Q<3>(6): vertex dof index 0
+DEAL::  FE_Q<3>(7): vertex dof index 0
+DEAL::  FE_Q<3>(8): vertex dof index 0
+DEAL::
+DEAL::OK
diff --git a/tests/hp/hp_vertex_dof_identities_q_system_multiway.cc b/tests/hp/hp_vertex_dof_identities_q_system_multiway.cc
new file mode 100644 (file)
index 0000000..530d5a2
--- /dev/null
@@ -0,0 +1,75 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2005 - 2018 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+
+
+// check FE_Collection::hp_vertex_dof_identities with multiway
+// identities for a system of FE_Q elements. Each vector component of
+// the system will form its own identity set.
+
+
+#include <deal.II/fe/fe_q.h>
+#include <deal.II/fe/fe_system.h>
+
+#include <deal.II/hp/fe_collection.h>
+
+#include "../tests.h"
+
+
+
+template <int dim>
+void
+test()
+{
+  deallog << "dim=" << dim << std::endl;
+
+  hp::FECollection<dim> fe_collection;
+  for (unsigned int i = 1; i <= 8; ++i)
+    fe_collection.push_back(FESystem<dim>(FE_Q<dim>(i), 2));
+
+  // construct the complete set of fe indices
+  std::set<unsigned int> fe_indices;
+  for (unsigned int i = 0; i < fe_collection.size(); ++i)
+    fe_indices.emplace(i);
+
+  const auto identities = fe_collection.hp_vertex_dof_identities(fe_indices);
+
+  for (unsigned int i = 0; i < identities.size(); ++i)
+    {
+      deallog << "Identity set #" << i << std::endl;
+      for (const auto &p : identities[i])
+        {
+          deallog << "  " << fe_collection[p.first].get_name()
+                  << ": vertex dof index " << p.second << std::endl;
+        }
+    }
+
+  deallog << std::endl;
+}
+
+
+
+int
+main()
+{
+  initlog();
+  deallog.get_file_stream().precision(2);
+
+  test<1>();
+  test<2>();
+  test<3>();
+
+  deallog << "OK" << std::endl;
+}
diff --git a/tests/hp/hp_vertex_dof_identities_q_system_multiway.output b/tests/hp/hp_vertex_dof_identities_q_system_multiway.output
new file mode 100644 (file)
index 0000000..f775bff
--- /dev/null
@@ -0,0 +1,62 @@
+
+DEAL::dim=1
+DEAL::Identity set #0
+DEAL::  FESystem<1>[FE_Q<1>(1)^2]: vertex dof index 0
+DEAL::  FESystem<1>[FE_Q<1>(2)^2]: vertex dof index 0
+DEAL::  FESystem<1>[FE_Q<1>(3)^2]: vertex dof index 0
+DEAL::  FESystem<1>[FE_Q<1>(4)^2]: vertex dof index 0
+DEAL::  FESystem<1>[FE_Q<1>(5)^2]: vertex dof index 0
+DEAL::  FESystem<1>[FE_Q<1>(6)^2]: vertex dof index 0
+DEAL::  FESystem<1>[FE_Q<1>(7)^2]: vertex dof index 0
+DEAL::  FESystem<1>[FE_Q<1>(8)^2]: vertex dof index 0
+DEAL::Identity set #1
+DEAL::  FESystem<1>[FE_Q<1>(1)^2]: vertex dof index 1
+DEAL::  FESystem<1>[FE_Q<1>(2)^2]: vertex dof index 1
+DEAL::  FESystem<1>[FE_Q<1>(3)^2]: vertex dof index 1
+DEAL::  FESystem<1>[FE_Q<1>(4)^2]: vertex dof index 1
+DEAL::  FESystem<1>[FE_Q<1>(5)^2]: vertex dof index 1
+DEAL::  FESystem<1>[FE_Q<1>(6)^2]: vertex dof index 1
+DEAL::  FESystem<1>[FE_Q<1>(7)^2]: vertex dof index 1
+DEAL::  FESystem<1>[FE_Q<1>(8)^2]: vertex dof index 1
+DEAL::
+DEAL::dim=2
+DEAL::Identity set #0
+DEAL::  FESystem<2>[FE_Q<2>(1)^2]: vertex dof index 0
+DEAL::  FESystem<2>[FE_Q<2>(2)^2]: vertex dof index 0
+DEAL::  FESystem<2>[FE_Q<2>(3)^2]: vertex dof index 0
+DEAL::  FESystem<2>[FE_Q<2>(4)^2]: vertex dof index 0
+DEAL::  FESystem<2>[FE_Q<2>(5)^2]: vertex dof index 0
+DEAL::  FESystem<2>[FE_Q<2>(6)^2]: vertex dof index 0
+DEAL::  FESystem<2>[FE_Q<2>(7)^2]: vertex dof index 0
+DEAL::  FESystem<2>[FE_Q<2>(8)^2]: vertex dof index 0
+DEAL::Identity set #1
+DEAL::  FESystem<2>[FE_Q<2>(1)^2]: vertex dof index 1
+DEAL::  FESystem<2>[FE_Q<2>(2)^2]: vertex dof index 1
+DEAL::  FESystem<2>[FE_Q<2>(3)^2]: vertex dof index 1
+DEAL::  FESystem<2>[FE_Q<2>(4)^2]: vertex dof index 1
+DEAL::  FESystem<2>[FE_Q<2>(5)^2]: vertex dof index 1
+DEAL::  FESystem<2>[FE_Q<2>(6)^2]: vertex dof index 1
+DEAL::  FESystem<2>[FE_Q<2>(7)^2]: vertex dof index 1
+DEAL::  FESystem<2>[FE_Q<2>(8)^2]: vertex dof index 1
+DEAL::
+DEAL::dim=3
+DEAL::Identity set #0
+DEAL::  FESystem<3>[FE_Q<3>(1)^2]: vertex dof index 0
+DEAL::  FESystem<3>[FE_Q<3>(2)^2]: vertex dof index 0
+DEAL::  FESystem<3>[FE_Q<3>(3)^2]: vertex dof index 0
+DEAL::  FESystem<3>[FE_Q<3>(4)^2]: vertex dof index 0
+DEAL::  FESystem<3>[FE_Q<3>(5)^2]: vertex dof index 0
+DEAL::  FESystem<3>[FE_Q<3>(6)^2]: vertex dof index 0
+DEAL::  FESystem<3>[FE_Q<3>(7)^2]: vertex dof index 0
+DEAL::  FESystem<3>[FE_Q<3>(8)^2]: vertex dof index 0
+DEAL::Identity set #1
+DEAL::  FESystem<3>[FE_Q<3>(1)^2]: vertex dof index 1
+DEAL::  FESystem<3>[FE_Q<3>(2)^2]: vertex dof index 1
+DEAL::  FESystem<3>[FE_Q<3>(3)^2]: vertex dof index 1
+DEAL::  FESystem<3>[FE_Q<3>(4)^2]: vertex dof index 1
+DEAL::  FESystem<3>[FE_Q<3>(5)^2]: vertex dof index 1
+DEAL::  FESystem<3>[FE_Q<3>(6)^2]: vertex dof index 1
+DEAL::  FESystem<3>[FE_Q<3>(7)^2]: vertex dof index 1
+DEAL::  FESystem<3>[FE_Q<3>(8)^2]: vertex dof index 1
+DEAL::
+DEAL::OK

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.