]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a test. 5090/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 14 Sep 2017 22:04:59 +0000 (16:04 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 17 Sep 2017 23:56:47 +0000 (17:56 -0600)
tests/fe/system_04.cc [new file with mode: 0644]
tests/fe/system_04.output [new file with mode: 0644]

diff --git a/tests/fe/system_04.cc b/tests/fe/system_04.cc
new file mode 100644 (file)
index 0000000..35e508c
--- /dev/null
@@ -0,0 +1,67 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2003 - 2015 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.
+//
+// ---------------------------------------------------------------------
+
+
+// like the _03 test, but use the variadic constructor with the
+// promotion rule that converts individual elements into pairs of the
+// element and multiplicity one
+
+#include "../tests.h"
+#include <deal.II/fe/fe_q.h>
+#include <deal.II/fe/fe_dgq.h>
+#include <deal.II/fe/fe_dgp.h>
+#include <deal.II/fe/fe_system.h>
+#include <deal.II/fe/fe_tools.h>
+
+#include <string>
+
+template <int dim>
+void
+check(FESystem<dim> &fe)
+{
+  deallog << fe.get_name() << std::endl;
+  deallog << "components: " << fe.n_components() << std::endl;
+  deallog << "blocks: " << fe.n_blocks() << std::endl;
+  deallog << "conforms H1: " << fe.conforms(FiniteElementData<dim>::H1) << std::endl;
+  deallog << "n_base_elements: " << fe.n_base_elements() << std::endl;
+}
+
+int
+main()
+{
+  initlog();
+
+  {
+    FESystem<2> fe (FE_Q<2>(1)^2, FE_Q<2>(1));
+    check<2>(fe);
+  }
+  {
+    FESystem<2> fe (FE_Q<2>(1)^2, FE_DGQ<2>(2)^0, FE_Q<2>(1));
+    check<2>(fe);
+  }
+  {
+    FESystem<2> fe (FESystem<2>(FE_Q<2>(1)^2), FE_Q<2>(1));
+    check<2>(fe);
+  }
+  {
+    FESystem<2> fe (FESystem<2>(FE_Q<2>(1)^2)^1, FE_DGQ<2>(2)^0, FE_Q<2>(1));
+    check<2>(fe);
+  }
+
+  return 0;
+}
+
+
+
diff --git a/tests/fe/system_04.output b/tests/fe/system_04.output
new file mode 100644 (file)
index 0000000..bad0cea
--- /dev/null
@@ -0,0 +1,21 @@
+
+DEAL::FESystem<2>[FE_Q<2>(1)^2-FE_Q<2>(1)]
+DEAL::components: 3
+DEAL::blocks: 3
+DEAL::conforms H1: 1
+DEAL::n_base_elements: 2
+DEAL::FESystem<2>[FE_Q<2>(1)^2-FE_Q<2>(1)]
+DEAL::components: 3
+DEAL::blocks: 3
+DEAL::conforms H1: 1
+DEAL::n_base_elements: 2
+DEAL::FESystem<2>[FESystem<2>[FE_Q<2>(1)^2]-FE_Q<2>(1)]
+DEAL::components: 3
+DEAL::blocks: 2
+DEAL::conforms H1: 1
+DEAL::n_base_elements: 2
+DEAL::FESystem<2>[FESystem<2>[FE_Q<2>(1)^2]-FE_Q<2>(1)]
+DEAL::components: 3
+DEAL::blocks: 2
+DEAL::conforms H1: 1
+DEAL::n_base_elements: 2

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.