]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Generalize test.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 3 Feb 2014 21:01:26 +0000 (21:01 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 3 Feb 2014 21:01:26 +0000 (21:01 +0000)
git-svn-id: https://svn.dealii.org/trunk@32397 0785d39b-7218-0410-832d-ea1e28bc413d

tests/deal.II/fe_values_view_29.cc
tests/deal.II/fe_values_view_29.output

index cd8a9795beb9c588cc98d81210eaee5b9888f21d..e5f27a480a1afa674149e3affba36ee77664a9ac 100644 (file)
@@ -68,7 +68,8 @@ Tensor<1,3> curl (const Tensor<2,3> &grads)
 
 template<int dim>
 void test (const Triangulation<dim> &tr,
-           const FiniteElement<dim> &fe)
+           const FiniteElement<dim> &fe,
+          const unsigned int degree)
 {
   deallog << "FE=" << fe.get_name()
           << std::endl;
@@ -81,7 +82,7 @@ void test (const Triangulation<dim> &tr,
   // equals the vector function (0,x^2)
   ConstraintMatrix cm;
   cm.close ();
-  VectorTools::project (dof, cm, QGauss<2>(4), F(), fe_function);
+  VectorTools::project (dof, cm, QGauss<2>(2+degree), F(), fe_function);
   
   const QGauss<dim> quadrature(2);
   FEValues<dim> fe_values (fe, quadrature,
@@ -124,8 +125,11 @@ void test_hyper_cube()
   Triangulation<dim> tr;
   GridGenerator::hyper_cube(tr);
 
-  FE_Nedelec<dim> fe(2);
-  test(tr, fe);
+  for (unsigned int degree=2; degree<5; ++degree)
+    {
+      FE_Nedelec<dim> fe(degree);
+      test(tr, fe, degree);
+    }
 }
 
 
index 534b134add2b5749ee52cf3d844ce05f568ed663..7903818da5b6b7bacc8648974a0699aa0befa249 100644 (file)
@@ -8,3 +8,21 @@ DEAL::  curls[q]= 0.423
 DEAL::  grads[q]= 0.00 0.00 0.423 -2.00e-16
 DEAL::  curls[q]= 1.58
 DEAL::  grads[q]= 0.00 0.00 1.58 -3.38e-16
+DEAL::FE=FE_Nedelec<2>(3)
+DEAL::  curls[q]= 0.423
+DEAL::  grads[q]= 0.00 0.00 0.423 5.69e-17
+DEAL::  curls[q]= 1.58
+DEAL::  grads[q]= 0.00 0.00 1.58 1.29e-15
+DEAL::  curls[q]= 0.423
+DEAL::  grads[q]= 0.00 0.00 0.423 2.40e-15
+DEAL::  curls[q]= 1.58
+DEAL::  grads[q]= 0.00 0.00 1.58 6.52e-16
+DEAL::FE=FE_Nedelec<2>(4)
+DEAL::  curls[q]= 0.423
+DEAL::  grads[q]= 0.00 0.00 0.423 -1.06e-15
+DEAL::  curls[q]= 1.58
+DEAL::  grads[q]= 0.00 0.00 1.58 2.32e-15
+DEAL::  curls[q]= 0.423
+DEAL::  grads[q]= 0.00 0.00 0.423 1.64e-15
+DEAL::  curls[q]= 1.58
+DEAL::  grads[q]= 0.00 0.00 1.58 -2.01e-15

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.