]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Run also in 3d.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 17 Oct 2002 19:55:32 +0000 (19:55 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 17 Oct 2002 19:55:32 +0000 (19:55 +0000)
git-svn-id: https://svn.dealii.org/trunk@6683 0785d39b-7218-0410-832d-ea1e28bc413d

tests/fe/anna_1.cc
tests/fe/anna_1.checked

index 0d0b0920a4f834fd2649345bdd07df92f4a3c0f1..19af72477fdcd8d5276afd8691ae88b6e438bea9 100644 (file)
@@ -38,6 +38,7 @@
 #include <fstream>
 
 
+template <int dim>
 class SystemTest 
 {
   public:
@@ -50,21 +51,23 @@ class SystemTest
     void check_numbering ();
 
                                    
-    Triangulation<2>     triangulation;
-    FESystem<2>          fe;
-    DoFHandler<2>        dof_handler;
+    Triangulation<dim>     triangulation;
+    FESystem<dim>          fe;
+    DoFHandler<dim>        dof_handler;
 
                                   
 };
 
-SystemTest::SystemTest () :
-                fe (FE_Nedelec<2>(1), 2,
-                    FE_Q<2>(1), 1),
+template <int dim>
+SystemTest<dim>::SystemTest () :
+                fe (FE_Nedelec<dim>(1), 2,
+                    FE_Q<dim>(1), 1),
                dof_handler (triangulation)
 {};
 
 
-void SystemTest::make_grid_and_dofs ()
+template <int dim>
+void SystemTest<dim>::make_grid_and_dofs ()
 {
                                  
   GridGenerator::hyper_cube (triangulation, -1, 1);
@@ -80,7 +83,8 @@ void SystemTest::make_grid_and_dofs ()
                                  
 };
 
-void SystemTest::shape_to_components () 
+template <int dim>
+void SystemTest<dim>::shape_to_components () 
 {
                                    // testing, if the shape function
                                    // with index i is of type Nedelec:
@@ -94,9 +98,10 @@ void SystemTest::shape_to_components ()
 
 
 
-void SystemTest::check_numbering () 
+template <int dim>
+void SystemTest<dim>::check_numbering () 
 {
-  DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active(),
+  DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active(),
                                       endc = dof_handler.end();
   std::vector<unsigned int>    local_dof_indices(fe.dofs_per_cell);
        
@@ -135,7 +140,8 @@ void SystemTest::check_numbering ()
 };
 
 
-void SystemTest::run () 
+template <int dim>
+void SystemTest<dim>::run () 
 {
   make_grid_and_dofs ();
   shape_to_components ();
@@ -150,7 +156,7 @@ int main ()
   deallog.attach(logfile);
   deallog.depth_console(0);
 
-  SystemTest system_test;
-  system_test.run ();
+  SystemTest<2>().run();
+  SystemTest<3>().run();  
   return 0;
 };
index fcbb87df7a618a6c6968c853a8e404ad76eeac0b..a300a73261a3d8ed9ed0cb26576ff9115572109b 100644 (file)
@@ -42,3 +42,106 @@ DEAL::  DoF 6 belongs to base 0, instance 1
 DEAL::  DoF 3 belongs to base 0, instance 0
 DEAL::  DoF 7 belongs to base 0, instance 1
 DEAL::
+DEAL::Number of active cells: 1
+DEAL::Total number of cells: 1
+DEAL::Number of degrees of freedom: 32
+DEAL::  shapefunction 0 is Nedelec:  false
+DEAL::  shapefunction 1 is Nedelec:  false
+DEAL::  shapefunction 2 is Nedelec:  false
+DEAL::  shapefunction 3 is Nedelec:  false
+DEAL::  shapefunction 4 is Nedelec:  false
+DEAL::  shapefunction 5 is Nedelec:  false
+DEAL::  shapefunction 6 is Nedelec:  false
+DEAL::  shapefunction 7 is Nedelec:  false
+DEAL::  shapefunction 8 is Nedelec:  true
+DEAL::  shapefunction 9 is Nedelec:  true
+DEAL::  shapefunction 10 is Nedelec:  true
+DEAL::  shapefunction 11 is Nedelec:  true
+DEAL::  shapefunction 12 is Nedelec:  true
+DEAL::  shapefunction 13 is Nedelec:  true
+DEAL::  shapefunction 14 is Nedelec:  true
+DEAL::  shapefunction 15 is Nedelec:  true
+DEAL::  shapefunction 16 is Nedelec:  true
+DEAL::  shapefunction 17 is Nedelec:  true
+DEAL::  shapefunction 18 is Nedelec:  true
+DEAL::  shapefunction 19 is Nedelec:  true
+DEAL::  shapefunction 20 is Nedelec:  true
+DEAL::  shapefunction 21 is Nedelec:  true
+DEAL::  shapefunction 22 is Nedelec:  true
+DEAL::  shapefunction 23 is Nedelec:  true
+DEAL::  shapefunction 24 is Nedelec:  true
+DEAL::  shapefunction 25 is Nedelec:  true
+DEAL::  shapefunction 26 is Nedelec:  true
+DEAL::  shapefunction 27 is Nedelec:  true
+DEAL::  shapefunction 28 is Nedelec:  true
+DEAL::  shapefunction 29 is Nedelec:  true
+DEAL::  shapefunction 30 is Nedelec:  true
+DEAL::  shapefunction 31 is Nedelec:  true
+DEAL::  DoF 0 belongs to base element 1, instance 0
+DEAL::  DoF 1 belongs to base element 1, instance 0
+DEAL::  DoF 2 belongs to base element 1, instance 0
+DEAL::  DoF 3 belongs to base element 1, instance 0
+DEAL::  DoF 4 belongs to base element 1, instance 0
+DEAL::  DoF 5 belongs to base element 1, instance 0
+DEAL::  DoF 6 belongs to base element 1, instance 0
+DEAL::  DoF 7 belongs to base element 1, instance 0
+DEAL::  DoF 8 belongs to base element 0, instance 0
+DEAL::  DoF 9 belongs to base element 0, instance 1
+DEAL::  DoF 10 belongs to base element 0, instance 0
+DEAL::  DoF 11 belongs to base element 0, instance 1
+DEAL::  DoF 12 belongs to base element 0, instance 0
+DEAL::  DoF 13 belongs to base element 0, instance 1
+DEAL::  DoF 14 belongs to base element 0, instance 0
+DEAL::  DoF 15 belongs to base element 0, instance 1
+DEAL::  DoF 16 belongs to base element 0, instance 0
+DEAL::  DoF 17 belongs to base element 0, instance 1
+DEAL::  DoF 18 belongs to base element 0, instance 0
+DEAL::  DoF 19 belongs to base element 0, instance 1
+DEAL::  DoF 20 belongs to base element 0, instance 0
+DEAL::  DoF 21 belongs to base element 0, instance 1
+DEAL::  DoF 22 belongs to base element 0, instance 0
+DEAL::  DoF 23 belongs to base element 0, instance 1
+DEAL::  DoF 24 belongs to base element 0, instance 0
+DEAL::  DoF 25 belongs to base element 0, instance 1
+DEAL::  DoF 26 belongs to base element 0, instance 0
+DEAL::  DoF 27 belongs to base element 0, instance 1
+DEAL::  DoF 28 belongs to base element 0, instance 0
+DEAL::  DoF 29 belongs to base element 0, instance 1
+DEAL::  DoF 30 belongs to base element 0, instance 0
+DEAL::  DoF 31 belongs to base element 0, instance 1
+DEAL::
+DEAL::  Now we renumber the DoFs component-wise:
+DEAL::  ****************************************
+DEAL::  DoF 24 belongs to base 1, instance 0
+DEAL::  DoF 25 belongs to base 1, instance 0
+DEAL::  DoF 26 belongs to base 1, instance 0
+DEAL::  DoF 27 belongs to base 1, instance 0
+DEAL::  DoF 28 belongs to base 1, instance 0
+DEAL::  DoF 29 belongs to base 1, instance 0
+DEAL::  DoF 30 belongs to base 1, instance 0
+DEAL::  DoF 31 belongs to base 1, instance 0
+DEAL::  DoF 0 belongs to base 0, instance 0
+DEAL::  DoF 12 belongs to base 0, instance 1
+DEAL::  DoF 1 belongs to base 0, instance 0
+DEAL::  DoF 13 belongs to base 0, instance 1
+DEAL::  DoF 2 belongs to base 0, instance 0
+DEAL::  DoF 14 belongs to base 0, instance 1
+DEAL::  DoF 3 belongs to base 0, instance 0
+DEAL::  DoF 15 belongs to base 0, instance 1
+DEAL::  DoF 4 belongs to base 0, instance 0
+DEAL::  DoF 16 belongs to base 0, instance 1
+DEAL::  DoF 5 belongs to base 0, instance 0
+DEAL::  DoF 17 belongs to base 0, instance 1
+DEAL::  DoF 6 belongs to base 0, instance 0
+DEAL::  DoF 18 belongs to base 0, instance 1
+DEAL::  DoF 7 belongs to base 0, instance 0
+DEAL::  DoF 19 belongs to base 0, instance 1
+DEAL::  DoF 8 belongs to base 0, instance 0
+DEAL::  DoF 20 belongs to base 0, instance 1
+DEAL::  DoF 9 belongs to base 0, instance 0
+DEAL::  DoF 21 belongs to base 0, instance 1
+DEAL::  DoF 10 belongs to base 0, instance 0
+DEAL::  DoF 22 belongs to base 0, instance 1
+DEAL::  DoF 11 belongs to base 0, instance 0
+DEAL::  DoF 23 belongs to base 0, instance 1
+DEAL::

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.