]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a few more things in the RT element.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 1 Feb 2005 13:49:06 +0000 (13:49 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 1 Feb 2005 13:49:06 +0000 (13:49 +0000)
git-svn-id: https://svn.dealii.org/trunk@9884 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/fe_raviart_thomas.cc
deal.II/doc/news/changes.html
tests/bits/Makefile
tests/bits/nedelec_1.cc [new file with mode: 0644]
tests/bits/rt_1.cc

index 2fb51bee2f175771ed9ae24f33608b8603c3868d..2de27e5ff3bbe07a37d6f3c1b69b42a5184d1c0e 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2003, 2004 by the deal.II authors
+//    Copyright (C) 2003, 2004, 2005 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -1658,6 +1658,8 @@ FE_RaviartThomas<dim>::fill_fe_face_values (const Mapping<dim>
                                   // number of conversions
   if (flags & update_values)
     {
+      Assert (fe_data.shape_values.size() == dofs_per_cell,
+              ExcInternalError());
       Assert (fe_data.shape_values[0].size() ==
               GeometryInfo<dim>::faces_per_cell * n_q_points *
              (dim == 3 ? 2 : 1),
@@ -1688,8 +1690,11 @@ FE_RaviartThomas<dim>::fill_fe_face_values (const Mapping<dim>
       
   if (flags & update_gradients)
     {
-      Assert (fe_data.shape_gradients.size() ==
-              GeometryInfo<dim>::faces_per_cell * n_q_points,
+      Assert (fe_data.shape_values.size() == dofs_per_cell,
+              ExcInternalError());
+      Assert (fe_data.shape_gradients[0].size() ==
+              GeometryInfo<dim>::faces_per_cell * n_q_points *
+             (dim == 3 ? 2 : 1),
               ExcInternalError());
 
       std::vector<Tensor<2,dim> > shape_grads1 (n_q_points);
index a6fa8b31b567d6cc70d6421c60ba5eae6e4af707..6d2014b9ee01cdadaa87b26cbd7c6bb5fc657685 100644 (file)
@@ -57,10 +57,11 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
 
 <ol>
   <li> <p>
-       Fixed: A wrong assertion in the Raviart-Thomas finite element class has
-       been fixed, that was triggered when integrating face terms.
+       Fixed: Several wrong assertions in the Raviart-Thomas finite element
+       class have been fixed, that were triggered when integrating face terms.
        <br> 
-       (Oliver Kayser-Herold, 2005/01/24)
+       (Oliver Kayser-Herold, 2005/01/24; 
+        WB, 2005/01/31)
        </p>
 </ol>
 
index 10f7e393e2756d5f399d379804b217773c12a293..77e694e862a2424745ea90222ff8714d94b6ade5 100644 (file)
@@ -65,7 +65,8 @@ tests_x = anna_? \
          point_difference_* \
          umfpack_* \
          fe_q_3d* \
-          rt_*
+          rt_* \
+         nedelec_*
 
 # tests for the hp branch:
 #        fe_collection_*
diff --git a/tests/bits/nedelec_1.cc b/tests/bits/nedelec_1.cc
new file mode 100644 (file)
index 0000000..d290e7d
--- /dev/null
@@ -0,0 +1,63 @@
+//----------------------------  nedelec_1.cc  ---------------------------
+//    $Id$
+//    Version: $Name$ 
+//
+//    Copyright (C) 2005 by the deal.II authors and
+//
+//    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.
+//
+//----------------------------  nedelec_1.cc  ---------------------------
+
+
+// this test is modeled after after the nedelec_1 test, since that one failed. I
+// just wanted to check that the nedelec element that has much of the same
+// code also works. turns out, all was fine
+
+#include "../tests.h"
+#include <base/logstream.h>
+#include <base/quadrature_lib.h>
+#include <grid/tria.h>
+#include <dofs/dof_handler.h>
+#include <grid/grid_generator.h>
+#include <grid/tria_accessor.h>
+#include <grid/tria_iterator.h>
+#include <dofs/dof_accessor.h>
+#include <dofs/dof_tools.h>
+#include <fe/fe_nedelec.h>     
+#include <fe/fe_values.h>
+#include <iostream>
+#include <fstream>
+
+
+template <int dim>
+void test ()
+{
+  Triangulation<dim> triangulation;
+  GridGenerator::hyper_cube (triangulation, -1, 1);
+
+  FE_Nedelec<dim> fe (1);
+  DoFHandler<dim> dof_handler (triangulation);
+  dof_handler.distribute_dofs (fe);
+
+  QGauss<dim-1> q(2);
+  FEFaceValues<dim> fe_values (fe, q, update_values|update_gradients);
+  fe_values.reinit (dof_handler.begin_active(), 0);
+
+  deallog << "OK" << std::endl;
+}
+
+
+int main () 
+{
+  std::ofstream logfile("nedelec_1.output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+
+  test<2> ();
+  test<3> ();
+  
+  return 0;
+}
index 319dff8c41cd0aed50f270f0a02ce8c5cc05537b..a1d5130b3defbf0a432d9726d3d91767b4ace816 100644 (file)
 
 
 template <int dim>
-void test ()
+void test (const unsigned int degree,
+           const unsigned int q_order)
 {
   Triangulation<dim> triangulation;
   GridGenerator::hyper_cube (triangulation, -1, 1);
 
+  FE_RaviartThomas<dim> fe (degree);
   DoFHandler<dim> dof_handler (triangulation);
-  FE_RaviartThomas<dim> fe (1);
   dof_handler.distribute_dofs (fe);
 
-  QGauss<dim-1> q(2);
-  FEFaceValues<dim> fe_values (fe, q, update_values|update_gradients);
+  QGauss<dim-1> q(q_order);
+  FEFaceValues<dim> fe_values (fe, q,
+                               update_values |
+                               update_gradients |
+                               update_second_derivatives |
+                               update_q_points |
+                               update_jacobians);
   fe_values.reinit (dof_handler.begin_active(), 0);
 
   deallog << "OK" << std::endl;
@@ -55,7 +61,9 @@ int main ()
   deallog.attach(logfile);
   deallog.depth_console(0);
 
-  test<2> ();
-  test<3> ();
+  for (unsigned int degree=0; degree<3; ++degree)
+    for (unsigned int q_order=1; q_order<=3; ++q_order)
+      test<2> (degree, q_order);
+
   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.