]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add a test 4993/head
authorMatthias Maier <tamiko@43-1.org>
Thu, 31 Aug 2017 16:40:30 +0000 (11:40 -0500)
committerMatthias Maier <tamiko@43-1.org>
Thu, 31 Aug 2017 18:04:18 +0000 (13:04 -0500)
tests/fe/fe_system_generalized_support_points.cc [new file with mode: 0644]
tests/fe/fe_system_generalized_support_points.output [new file with mode: 0644]

diff --git a/tests/fe/fe_system_generalized_support_points.cc b/tests/fe/fe_system_generalized_support_points.cc
new file mode 100644 (file)
index 0000000..447bdd6
--- /dev/null
@@ -0,0 +1,64 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2017 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 at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+// Check that FiniteElement::get_generalized_support_points() returns a
+// vector of unique generalized support points.
+
+#include "../tests.h"
+
+#include <deal.II/fe/fe_q.h>
+#include <deal.II/fe/fe_nedelec.h>
+#include <deal.II/fe/fe_raviart_thomas.h>
+#include <deal.II/fe/fe_system.h>
+
+#include <vector>
+
+using namespace dealii;
+
+template<int dim>
+void test()
+{
+  const auto print = [](const FiniteElement<dim> &fe)
+  {
+    deallog << fe.get_name() << std::endl;
+    for (auto it : fe.get_generalized_support_points())
+      {
+        deallog << "(" << it[0] << "," << it[1] << ") ";
+      }
+    deallog << std::endl;
+  };
+
+  deallog << "dim " << dim << " lowest order" << std::endl;
+  print(FE_Q<dim>(1));
+  print(FE_RaviartThomas<dim>(0));
+  print(FE_Nedelec<dim>(0));
+  print(FESystem(FE_RaviartThomas<dim>(0), 3, FE_Nedelec<dim>(0), 3));
+  print(FESystem(FESystem(FE_RaviartThomas<dim>(0), 3, FE_Nedelec<dim>(0), 3), 2, FE_Q<dim>(1), 3, FE_Q<dim>(1), 3));
+
+  deallog << "dim " << dim << " higher order" << std::endl;
+  print(FE_Q<dim>(2));
+  print(FE_RaviartThomas<dim>(1));
+  print(FE_Nedelec<dim>(1));
+  print(FESystem(FE_RaviartThomas<dim>(1), 3, FE_Nedelec<dim>(1), 3));
+  print(FESystem(FESystem(FE_RaviartThomas<dim>(1), 3, FE_Nedelec<dim>(1), 3), 2, FE_Q<dim>(2), 3, FE_Q<dim>(1), 3));
+}
+
+int main ()
+{
+  initlog();
+
+  test<2>();
+  test<3>();
+}
diff --git a/tests/fe/fe_system_generalized_support_points.output b/tests/fe/fe_system_generalized_support_points.output
new file mode 100644 (file)
index 0000000..de5c4d3
--- /dev/null
@@ -0,0 +1,45 @@
+
+DEAL::dim 2 lowest order
+DEAL::FE_Q<2>(1)
+DEAL::(0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) 
+DEAL::FE_RaviartThomas<2>(0)
+DEAL::(0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) 
+DEAL::FE_Nedelec<2>(0)
+DEAL::(0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) 
+DEAL::FESystem<2>[FE_RaviartThomas<2>(0)^3-FE_Nedelec<2>(0)^3]
+DEAL::(0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) 
+DEAL::FESystem<2>[FESystem<2>[FE_RaviartThomas<2>(0)^3-FE_Nedelec<2>(0)^3]^2-FE_Q<2>(1)^3-FE_Q<2>(1)^3]
+DEAL::(0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) 
+DEAL::dim 2 higher order
+DEAL::FE_Q<2>(2)
+DEAL::(0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) (0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.500000,0.500000) 
+DEAL::FE_RaviartThomas<2>(1)
+DEAL::(0.00000,0.211325) (0.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (0.211325,0.00000) (0.788675,0.00000) (0.211325,1.00000) (0.788675,1.00000) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) 
+DEAL::FE_Nedelec<2>(1)
+DEAL::(0.00000,0.211325) (0.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (0.211325,0.00000) (0.788675,0.00000) (0.211325,1.00000) (0.788675,1.00000) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) 
+DEAL::FESystem<2>[FE_RaviartThomas<2>(1)^3-FE_Nedelec<2>(1)^3]
+DEAL::(0.00000,0.211325) (0.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (0.211325,0.00000) (0.788675,0.00000) (0.211325,1.00000) (0.788675,1.00000) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) 
+DEAL::FESystem<2>[FESystem<2>[FE_RaviartThomas<2>(1)^3-FE_Nedelec<2>(1)^3]^2-FE_Q<2>(2)^3-FE_Q<2>(1)^3]
+DEAL::(0.00000,0.211325) (0.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (0.211325,0.00000) (0.788675,0.00000) (0.211325,1.00000) (0.788675,1.00000) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) (0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) (0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.500000,0.500000) 
+DEAL::dim 3 lowest order
+DEAL::FE_Q<3>(1)
+DEAL::(0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) (0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) 
+DEAL::FE_RaviartThomas<3>(0)
+DEAL::(0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.500000,0.500000) (0.500000,0.500000) 
+DEAL::FE_Nedelec<3>(0)
+DEAL::(0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) 
+DEAL::FESystem<3>[FE_RaviartThomas<3>(0)^3-FE_Nedelec<3>(0)^3]
+DEAL::(0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.500000,0.500000) (0.500000,0.500000) (0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) 
+DEAL::FESystem<3>[FESystem<3>[FE_RaviartThomas<3>(0)^3-FE_Nedelec<3>(0)^3]^2-FE_Q<3>(1)^3-FE_Q<3>(1)^3]
+DEAL::(0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.500000,0.500000) (0.500000,0.500000) (0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) (0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) (0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) 
+DEAL::dim 3 higher order
+DEAL::FE_Q<3>(2)
+DEAL::(0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) (0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) (0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) (0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.500000,0.500000) (0.500000,0.500000) (0.500000,0.500000) 
+DEAL::FE_RaviartThomas<3>(1)
+DEAL::(0.00000,0.211325) (0.00000,0.788675) (0.00000,0.211325) (0.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (0.211325,0.00000) (0.211325,0.00000) (0.788675,0.00000) (0.788675,0.00000) (0.211325,1.00000) (0.211325,1.00000) (0.788675,1.00000) (0.788675,1.00000) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) 
+DEAL::FE_Nedelec<3>(1)
+DEAL::(0.00000,0.211325) (0.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (0.211325,0.00000) (0.788675,0.00000) (0.211325,1.00000) (0.788675,1.00000) (0.00000,0.211325) (0.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (0.211325,0.00000) (0.788675,0.00000) (0.211325,1.00000) (0.788675,1.00000) (0.00000,0.00000) (0.00000,0.00000) (1.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (0.00000,1.00000) (1.00000,1.00000) (1.00000,1.00000) (0.00000,0.211325) (0.00000,0.788675) (0.00000,0.211325) (0.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (0.211325,0.00000) (0.211325,0.00000) (0.788675,0.00000) (0.788675,0.00000) (0.211325,1.00000) (0.211325,1.00000) (0.788675,1.00000) (0.788675,1.00000) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) 
+DEAL::FESystem<3>[FE_RaviartThomas<3>(1)^3-FE_Nedelec<3>(1)^3]
+DEAL::(0.00000,0.211325) (0.00000,0.788675) (0.00000,0.211325) (0.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (0.211325,0.00000) (0.211325,0.00000) (0.788675,0.00000) (0.788675,0.00000) (0.211325,1.00000) (0.211325,1.00000) (0.788675,1.00000) (0.788675,1.00000) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) (0.00000,0.211325) (0.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (0.211325,0.00000) (0.788675,0.00000) (0.211325,1.00000) (0.788675,1.00000) (0.00000,0.211325) (0.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (0.211325,0.00000) (0.788675,0.00000) (0.211325,1.00000) (0.788675,1.00000) (0.00000,0.00000) (0.00000,0.00000) (1.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (0.00000,1.00000) (1.00000,1.00000) (1.00000,1.00000) 
+DEAL::FESystem<3>[FESystem<3>[FE_RaviartThomas<3>(1)^3-FE_Nedelec<3>(1)^3]^2-FE_Q<3>(2)^3-FE_Q<3>(1)^3]
+DEAL::(0.00000,0.211325) (0.00000,0.788675) (0.00000,0.211325) (0.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (0.211325,0.00000) (0.211325,0.00000) (0.788675,0.00000) (0.788675,0.00000) (0.211325,1.00000) (0.211325,1.00000) (0.788675,1.00000) (0.788675,1.00000) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) (0.211325,0.211325) (0.788675,0.211325) (0.211325,0.788675) (0.788675,0.788675) (0.00000,0.211325) (0.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (0.211325,0.00000) (0.788675,0.00000) (0.211325,1.00000) (0.788675,1.00000) (0.00000,0.211325) (0.00000,0.788675) (1.00000,0.211325) (1.00000,0.788675) (0.211325,0.00000) (0.788675,0.00000) (0.211325,1.00000) (0.788675,1.00000) (0.00000,0.00000) (0.00000,0.00000) (1.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (0.00000,1.00000) (1.00000,1.00000) (1.00000,1.00000) (0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) (0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) (0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.00000,0.00000) (1.00000,0.00000) (0.00000,1.00000) (1.00000,1.00000) (0.00000,0.500000) (1.00000,0.500000) (0.500000,0.00000) (0.500000,1.00000) (0.500000,0.500000) (0.500000,0.500000) (0.500000,0.500000) 

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.