]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Reduce test to the minimum.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 29 Jun 2011 17:17:08 +0000 (17:17 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 29 Jun 2011 17:17:08 +0000 (17:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@23878 0785d39b-7218-0410-832d-ea1e28bc413d

tests/deal.II/no_flux_06.cc

index bef1ad3e2bc1577a0a424a5c279f58c6c5c9f76b..a6068635efbf87857fcd87e3198d35ee3a655f84 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$ 
 //
-//    Copyright (C) 2007, 2008 by the deal.II authors
+//    Copyright (C) 2007, 2008, 2011 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 //----------------------------------------------------------------------
 
 
-// no normal flux constraints on a hyper cube for all faces
-// this caused ExcMessage (\"Cycle in constraints detected!\")"
-// in 3d with a higher order mapping.
-// TH: change mapping to order <4 and it works.
+// no normal flux constraints on a hyper cube for all faces this caused
+// ExcMessage (\"Cycle in constraints detected!\")" in 3d with a higher order
+// mapping.  to make things even weirder, mappings of order <4 work.
 
 #include "../tests.h"
 #include <deal.II/base/logstream.h>
 #include <fstream>
 
 
+
 template<int dim>
-void test (const Triangulation<dim>& tr,
-                     const FiniteElement<dim>& fe)
+void test_hyper_cube()
 {
+  Triangulation<dim> tr;
+  GridGenerator::hyper_cube(tr);
+  
+  FESystem<dim> fe (FE_Q<dim>(2), dim);
+
   DoFHandler<dim> dof(tr);
   dof.distribute_dofs(fe);
 
-      deallog << "FE=" << fe.get_name()
-             << std::endl;
+  deallog << "FE=" << fe.get_name()
+         << std::endl;
 
-      std::set<unsigned char> boundary_ids;
-      boundary_ids.insert (0);
+  std::set<unsigned char> boundary_ids;
+  boundary_ids.insert (0);
 
-      ConstraintMatrix cm;
-      const MappingQ<dim>                 mapping(4);
-      VectorTools::compute_no_normal_flux_constraints (dof, 0, boundary_ids, cm, mapping);
-      cm.close();
+  ConstraintMatrix cm;
+  const MappingQ<dim> mapping(4);
+  VectorTools::compute_no_normal_flux_constraints (dof, 0,
+                                                  boundary_ids, cm,
+                                                  mapping);
+  cm.close();
       
 
-      cm.print (deallog.get_file_stream ());
-}
-
-
-template<int dim>
-void test_hyper_cube()
-{
-  Triangulation<dim> tr;
-  GridGenerator::hyper_cube(tr);
-  
-  tr.refine_global(0);
-
-  for (unsigned int degree=1; degree<4; ++degree)
-    {
-      FESystem<dim> fe (FE_Q<dim>(degree), dim);
-      test(tr, fe);
-    }
+  cm.print (deallog.get_file_stream ());
 }
 
 

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.