]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Another test that presently produces wrong results
authorkayser-herold <kayser-herold@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 29 Jul 2006 22:02:39 +0000 (22:02 +0000)
committerkayser-herold <kayser-herold@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 29 Jul 2006 22:02:39 +0000 (22:02 +0000)
git-svn-id: https://svn.dealii.org/trunk@13510 0785d39b-7218-0410-832d-ea1e28bc413d

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

diff --git a/tests/fe/rt_13.cc b/tests/fe/rt_13.cc
new file mode 100644 (file)
index 0000000..58d43c8
--- /dev/null
@@ -0,0 +1,98 @@
+//----------------------------  rt_13.cc  ---------------------------
+//    rt_13.cc,v 1.3 2003/06/09 16:00:38 wolf Exp
+//    Version: 
+//
+//    Copyright (C) 2003, 2005, 2006 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_13.cc  ---------------------------
+
+// Like rt_11, but for gradients (just as rt_12 is to rt_10)
+
+#include "../tests.h"
+#include <base/quadrature_lib.h>
+#include <base/logstream.h>
+#include <lac/vector.h>
+#include <lac/solver_cg.h>
+#include <lac/precondition.h>
+#include <lac/vector_memory.h>
+#include <lac/sparse_matrix.h>
+#include <lac/sparsity_pattern.h>
+#include <grid/tria.h>
+#include <grid/tria_iterator.h>
+#include <dofs/dof_accessor.h>
+#include <grid/grid_generator.h>
+#include <grid/grid_tools.h>
+#include <fe/fe_raviart_thomas.h>
+#include <fe/fe_values.h>
+
+#include <vector>
+#include <fstream>
+#include <string>
+
+#define PRECISION 2
+
+
+std::ofstream logfile ("rt_13/output");
+
+template<int dim>
+void
+test (const unsigned int degree)
+{
+  FE_RaviartThomas<dim> fe_rt(degree);
+
+  deallog << "Degree=" << degree
+         << std::endl;
+  
+  for (double h=1; h>1./128; h/=2)
+    {      
+      deallog << "  h=" << h
+             << std::endl;
+
+      Triangulation<dim> tr;
+      GridGenerator::hyper_cube(tr, 0., h);
+
+      DoFHandler<dim> dof(tr);
+      dof.distribute_dofs(fe_rt);
+
+      QTrapez<dim-1> quadrature;
+
+      FEFaceValues<dim> fe_values (fe_rt, quadrature, update_gradients);
+      fe_values.reinit (dof.begin_active(), 0);
+      for (unsigned int q=0; q<quadrature.n_quadrature_points; ++q)
+       {
+         deallog << "    Quadrature point " << q << ": ";
+         for (unsigned int i=0; i<fe_rt.dofs_per_cell; ++i)
+           {
+             deallog << '[';
+             for (unsigned int c=0; c<fe_rt.n_components(); ++c)
+               deallog << fe_values.shape_grad_component(i,q,c) << ' ';
+             deallog << ']';
+           }
+         deallog << std::endl;
+       }
+    }
+}
+
+
+int
+main()
+{
+  logfile.precision (PRECISION);
+  logfile.setf(std::ios::fixed);  
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  for (unsigned int i=0; i<4; ++i)
+    test<2>(i);
+  
+  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.