--- /dev/null
+// ---------------------------------------------------------------------
+//
+// 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;
+}
--- /dev/null
+
+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
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// 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;
+}
--- /dev/null
+
+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
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// 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;
+}
--- /dev/null
+
+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
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// 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;
+}
--- /dev/null
+
+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
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// 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;
+}
--- /dev/null
+
+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
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// 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;
+}
--- /dev/null
+
+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
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// 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;
+}
--- /dev/null
+
+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
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// 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;
+}
--- /dev/null
+
+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
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// 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;
+}
--- /dev/null
+
+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