]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add test. 1850/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 9 Nov 2015 01:18:22 +0000 (19:18 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 9 Nov 2015 01:18:22 +0000 (19:18 -0600)
This is a simplified test of FESystems whose base elements are again FESystems.
The test helped me debug a couple of issues, and might be of help again
at a later time. It is a simpler version of fe/shapes_system.

tests/fe/shapes_system_02.cc [new file with mode: 0644]
tests/fe/shapes_system_02.output [new file with mode: 0644]

diff --git a/tests/fe/shapes_system_02.cc b/tests/fe/shapes_system_02.cc
new file mode 100644 (file)
index 0000000..5161356
--- /dev/null
@@ -0,0 +1,64 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2013 - 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.
+//
+// ---------------------------------------------------------------------
+
+
+// a simplified version of shapes_system.cc
+
+#include "../tests.h"
+#include "shapes.h"
+#include <deal.II/fe/fe_q.h>
+#include <deal.II/fe/fe_dgp.h>
+#include <deal.II/fe/fe_dgq.h>
+#include <deal.II/fe/fe_nedelec.h>
+#include <deal.II/fe/fe_system.h>
+#include <deal.II/fe/mapping_q1.h>
+#include <fstream>
+#include <string>
+
+#define PRECISION 8
+
+template<int dim>
+void plot_FE_System_shape_functions()
+{
+  MappingQGeneric<dim> m(1);
+
+  FESystem<dim> p3(FE_Q<dim>(1), 1,
+                   FESystem<dim> (FE_Q<dim>(1),2), 2);
+  test_compute_functions(m, p3, "System_1");
+
+  FESystem<dim> p4(p3, 2,
+                   FESystem<dim> (p3,3), 1,
+                   p3, 1);
+  test_compute_functions(m, p4, "System_2");
+}
+
+
+int
+main()
+{
+  std::ofstream logfile ("output");
+  deallog << std::setprecision(PRECISION) << std::fixed;
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+  deallog << "FE_System<1>" << std::endl;
+  plot_FE_System_shape_functions<1>();
+  deallog << "FE_System<2>" << std::endl;
+  plot_FE_System_shape_functions<2>();
+  deallog << "FE_System<3>" << std::endl;
+  plot_FE_System_shape_functions<3>();
+
+  return 0;
+}
diff --git a/tests/fe/shapes_system_02.output b/tests/fe/shapes_system_02.output
new file mode 100644 (file)
index 0000000..34dd77f
--- /dev/null
@@ -0,0 +1,4 @@
+
+DEAL::FE_System<1>
+DEAL::FE_System<2>
+DEAL::FE_System<3>

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.