]> https://gitweb.dealii.org/ - dealii.git/commitdiff
.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 2 May 2003 23:12:52 +0000 (23:12 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 2 May 2003 23:12:52 +0000 (23:12 +0000)
git-svn-id: https://svn.dealii.org/trunk@7557 0785d39b-7218-0410-832d-ea1e28bc413d

tests/fe/rt_3.cc [new file with mode: 0644]
tests/fe/rt_4.cc [new file with mode: 0644]

diff --git a/tests/fe/rt_3.cc b/tests/fe/rt_3.cc
new file mode 100644 (file)
index 0000000..9867631
--- /dev/null
@@ -0,0 +1,64 @@
+//----------------------------  rt_3.cc  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2003 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------  rt_3.cc  ---------------------------
+
+
+// Just output the constraint matrices of the RT element
+
+#include <base/logstream.h>
+#include <fe/fe_raviart_thomas.h>
+
+#include <fstream>
+#include <string>
+
+#define PRECISION 5
+
+
+
+template<int dim>
+void
+test(const unsigned int degree)
+{
+  deallog << "FE_RaviartThomas<" << dim << "> (" << degree << ")"
+         << std::endl;
+  
+  FE_RaviartThomas<dim> fe_rt(degree);
+  const FullMatrix<double> & constraints = fe_rt.constraints();
+
+  for (unsigned int i=0; i<constraints.m(); ++i)
+    {
+      for (unsigned int j=0; j<constraints.n(); ++j)
+       deallog << constraints(i,j) << ' ';
+      deallog << std::endl;
+    }
+  
+  deallog << std::endl;
+}
+
+
+int
+main()
+{
+  std::ofstream logfile ("rt_3.output");
+  logfile.precision (PRECISION);
+  logfile.setf(std::ios::fixed);  
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+
+  for (unsigned int degree=0; degree<4; ++degree)
+    test<2>(degree);
+  
+  return 0;
+}
+
+
+
diff --git a/tests/fe/rt_4.cc b/tests/fe/rt_4.cc
new file mode 100644 (file)
index 0000000..99fab02
--- /dev/null
@@ -0,0 +1,69 @@
+//----------------------------  rt_4.cc  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2003 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------  rt_4.cc  ---------------------------
+
+
+// Just output the prolongation matrices of the RT element
+
+#include <base/logstream.h>
+#include <fe/fe_raviart_thomas.h>
+
+#include <fstream>
+#include <string>
+
+#define PRECISION 5
+
+
+
+template<int dim>
+void
+test(const unsigned int degree)
+{
+  deallog << "FE_RaviartThomas<" << dim << "> (" << degree << ")"
+         << std::endl;
+  
+  FE_RaviartThomas<dim> fe_rt(degree);
+
+  for (unsigned int c=0; c<GeometryInfo<dim>::children_per_cell; ++c)
+    {
+      const FullMatrix<double> & m = fe_rt.prolongate(c);
+
+      for (unsigned int i=0; i<m.m(); ++i)
+       {
+         for (unsigned int j=0; j<m.n(); ++j)
+           deallog << m(i,j) << ' ';
+         deallog << std::endl;
+       }
+      
+      deallog << std::endl;
+    }
+}
+
+
+int
+main()
+{
+  std::ofstream logfile ("rt_4.output");
+  logfile.precision (PRECISION);
+  logfile.setf(std::ios::fixed);  
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+
+  for (unsigned int degree=0; degree<4; ++degree)
+    test<2>(degree);
+//  test<3>(degree);
+  
+  return 0;
+}
+
+
+

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.