]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Un-hp-ify these codes to test the original functionality of step-1 through step-10
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 31 Jul 2006 15:11:06 +0000 (15:11 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 31 Jul 2006 15:11:06 +0000 (15:11 +0000)
git-svn-id: https://svn.dealii.org/trunk@13540 0785d39b-7218-0410-832d-ea1e28bc413d

13 files changed:
tests/bits/step-10.cc
tests/bits/step-2.cc
tests/bits/step-3.cc
tests/bits/step-3a.cc
tests/bits/step-3b.cc
tests/bits/step-3c.cc
tests/bits/step-4.cc
tests/bits/step-5.cc
tests/bits/step-6.cc
tests/bits/step-7.cc
tests/bits/step-8.cc
tests/bits/step-9.cc
tests/bits/step-9/cmp/i686-pc-linux-gnu+gcc4.1

index 70740b4fb26bd9acfd7e4b8118594f191b840b96..83f8e167dd460d199efdb781361f04850bcdfc8c 100644 (file)
@@ -85,7 +85,7 @@ void compute_pi_by_area ()
   deallog << "Computation of Pi by the area:" << std::endl
            << "==============================" << std::endl;
 
-  const hp::QCollection<dim> quadrature(QGauss<dim>(4));
+  const QGauss<dim> quadrature (4);
 
   for (unsigned int degree=1; degree<5; ++degree)
     {
@@ -97,14 +97,13 @@ void compute_pi_by_area ()
       static const HyperBallBoundary<dim> boundary;
       triangulation.set_boundary (0, boundary);
 
-      MappingQ<dim> m(degree);
-      const hp::MappingCollection<dim> mapping (m);
+      MappingQ<dim> mapping(degree);
 
-      const hp::FECollection<dim>     dummy_fe (FE_Q<dim>(1));
+      const FE_Q<dim>     dummy_fe (1);
 
-      hp::DoFHandler<dim> dof_handler (triangulation);
+      DoFHandler<dim> dof_handler (triangulation);
 
-      hp::FEValues<dim> x_fe_values (mapping, dummy_fe, quadrature,
+      FEValues<dim> x_fe_values (mapping, dummy_fe, quadrature,
                                update_JxW_values);
 
       ConvergenceTable table;
@@ -118,7 +117,7 @@ void compute_pi_by_area ()
 
          long double area = 0;
 
-         typename hp::DoFHandler<dim>::active_cell_iterator
+         typename DoFHandler<dim>::active_cell_iterator
            cell = dof_handler.begin_active(),
            endc = dof_handler.end();
          for (; cell!=endc; ++cell)
@@ -153,7 +152,7 @@ void compute_pi_by_perimeter ()
   deallog << "Computation of Pi by the perimeter:" << std::endl
            << "===================================" << std::endl;
 
-  const hp::QCollection<dim-1> quadrature(QGauss<dim-1>(4));
+  const QGauss<dim-1> quadrature (4);
 
   for (unsigned int degree=1; degree<5; ++degree)
     {
@@ -164,13 +163,12 @@ void compute_pi_by_perimeter ()
       static const HyperBallBoundary<dim> boundary;
       triangulation.set_boundary (0, boundary);
 
-      const MappingQ<dim> m (degree);
-      const hp::MappingCollection<dim> mapping(m);
-      const hp::FECollection<dim>     fe (FE_Q<dim>(1));
+      const MappingQ<dim> mapping (degree);
+      const FE_Q<dim>     fe (1);
 
-      hp::DoFHandler<dim> dof_handler (triangulation);
+      DoFHandler<dim> dof_handler (triangulation);
 
-      hp::FEFaceValues<dim> x_fe_face_values (mapping, fe, quadrature,
+      FEFaceValues<dim> x_fe_face_values (mapping, fe, quadrature,
                                         update_JxW_values);
       ConvergenceTable table;
 
@@ -181,7 +179,7 @@ void compute_pi_by_perimeter ()
 
          dof_handler.distribute_dofs (fe);
 
-         typename hp::DoFHandler<dim>::active_cell_iterator
+         typename DoFHandler<dim>::active_cell_iterator
            cell = dof_handler.begin_active(),
            endc = dof_handler.end();
          long double perimeter = 0;
index 519c053ac10b9a65fe553a07537ed560fe44a237..2acbc9c45313ad07a72790fac46bb4af100f8386 100644 (file)
@@ -72,9 +72,9 @@ void make_grid (Triangulation<2> &triangulation)
 }
 
 
-void distribute_dofs (hp::DoFHandler<2> &dof_handler) 
+void distribute_dofs (DoFHandler<2> &dof_handler) 
 {
-  static const hp::FECollection<2> finite_element(FE_Q<2>(1));
+  static const FE_Q<2> finite_element(1);
   dof_handler.distribute_dofs (finite_element);
 
   SparsityPattern sparsity_pattern (dof_handler.n_dofs(),
@@ -89,7 +89,7 @@ void distribute_dofs (hp::DoFHandler<2> &dof_handler)
 
 
 
-void renumber_dofs (hp::DoFHandler<2> &dof_handler) 
+void renumber_dofs (DoFHandler<2> &dof_handler) 
 {
   DoFRenumbering::Cuthill_McKee (dof_handler);
   SparsityPattern sparsity_pattern (dof_handler.n_dofs(),
@@ -116,7 +116,7 @@ int main ()
   Triangulation<2> triangulation;
   make_grid (triangulation);
 
-  hp::DoFHandler<2> dof_handler (triangulation);
+  DoFHandler<2> dof_handler (triangulation);
 
   distribute_dofs (dof_handler);
   renumber_dofs (dof_handler);
index cf03776bb0a38ec5fcf871f92093fbf4456e6898..85815617f44513d355890b5972af96b6a3af53e3 100644 (file)
@@ -64,8 +64,8 @@ class LaplaceProblem
     void output_results () const;
 
     Triangulation<2>     triangulation;
-    hp::FECollection<2>              fe;
-    hp::DoFHandler<2>        dof_handler;
+    FE_Q<2>              fe;
+    DoFHandler<2>        dof_handler;
 
     SparsityPattern      sparsity_pattern;
     SparseMatrix<double> system_matrix;
@@ -76,7 +76,7 @@ class LaplaceProblem
 
 
 LaplaceProblem::LaplaceProblem () :
-                fe (FE_Q<2>(1)),
+                fe (1),
                dof_handler (triangulation)
 {}
 
@@ -114,19 +114,19 @@ void LaplaceProblem::make_grid_and_dofs ()
 
 void LaplaceProblem::assemble_system () 
 {
-  hp::QCollection<2>  quadrature_formula(QGauss<2>(2));
-  hp::FEValues<2> x_fe_values (fe, quadrature_formula, 
+  QGauss<2>  quadrature_formula(2);
+  FEValues<2> x_fe_values (fe, quadrature_formula, 
                         update_values | update_gradients | update_JxW_values);
   
-  const unsigned int   dofs_per_cell = fe[0].dofs_per_cell;
-  const unsigned int   n_q_points    = quadrature_formula[0].n_quadrature_points;
+  const unsigned int   dofs_per_cell = fe.dofs_per_cell;
+  const unsigned int   n_q_points    = quadrature_formula.n_quadrature_points;
 
   FullMatrix<double>   cell_matrix (dofs_per_cell, dofs_per_cell);
   Vector<double>       cell_rhs (dofs_per_cell);
 
   std::vector<unsigned int> local_dof_indices (dofs_per_cell);
 
-  hp::DoFHandler<2>::active_cell_iterator
+  DoFHandler<2>::active_cell_iterator
     cell = dof_handler.begin_active(),
     endc = dof_handler.end();
   for (; cell!=endc; ++cell)
@@ -190,7 +190,7 @@ void LaplaceProblem::solve ()
 
 void LaplaceProblem::output_results () const
 {
-  DataOut<2,hp::DoFHandler<2> > data_out;
+  DataOut<2,DoFHandler<2> > data_out;
   data_out.attach_dof_handler (dof_handler);
   data_out.add_data_vector (solution, "solution");
   data_out.build_patches ();
index 755fbcf9a4709e516bfafbf3f912e57828cdc0d2..80f076c1333cc0fe07b98382b2bd34691184e5e4 100644 (file)
@@ -67,7 +67,7 @@ class LaplaceProblem
 
     Triangulation<2>     triangulation;
     hp::FECollection<2>              fe;
-    hp::DoFHandler<2>        dof_handler;
+    DoFHandler<2>        dof_handler;
 
     SparsityPattern      sparsity_pattern;
     SparseMatrix<double> system_matrix;
@@ -99,7 +99,7 @@ void LaplaceProblem::make_grid_and_dofs ()
          << triangulation.n_cells()
          << std::endl;
 
-  hp::DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (),
+  DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (),
                                          endc = dof_handler.end ();
   
   unsigned int cell_no = 0;
@@ -149,7 +149,7 @@ void LaplaceProblem::make_grid_and_dofs ()
 void LaplaceProblem::assemble_system () 
 {
   hp::QCollection<2>  quadrature_formula(QGauss<2>(6));
-  hp::FEValues<2> x_fe_values (fe, quadrature_formula, 
+  FEValues<2> x_fe_values (fe, quadrature_formula, 
                               update_values | update_gradients | update_JxW_values);
   
   const unsigned int   max_dofs_per_cell = fe.max_dofs_per_cell ();
@@ -160,7 +160,7 @@ void LaplaceProblem::assemble_system ()
 
   std::vector<unsigned int> local_dof_indices (max_dofs_per_cell);
 
-  hp::DoFHandler<2>::active_cell_iterator
+  DoFHandler<2>::active_cell_iterator
     cell = dof_handler.begin_active(),
     endc = dof_handler.end();
   for (; cell!=endc; ++cell)
@@ -234,7 +234,7 @@ void LaplaceProblem::solve ()
 
 void LaplaceProblem::output_results () const
 {
-  DataOut<2,hp::DoFHandler<2> > data_out;
+  DataOut<2,DoFHandler<2> > data_out;
   data_out.attach_dof_handler (dof_handler);
   data_out.add_data_vector (solution, "solution");
   data_out.build_patches ();
index 10950992bd9be52ef8aded952491bea9639e45f1..01a271d561cf0e20d47536655160b8442a0fae33 100644 (file)
@@ -67,7 +67,7 @@ class LaplaceProblem
 
     Triangulation<2>     triangulation;
     hp::FECollection<2>              fe;
-    hp::DoFHandler<2>        dof_handler;
+    DoFHandler<2>        dof_handler;
 
     SparsityPattern      sparsity_pattern;
     SparseMatrix<double> system_matrix;
@@ -99,7 +99,7 @@ void LaplaceProblem::make_grid_and_dofs ()
          << triangulation.n_cells()
          << std::endl;
 
-  hp::DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (),
+  DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (),
                                          endc = dof_handler.end ();
   
   unsigned int cell_no = 0;
@@ -146,7 +146,7 @@ void LaplaceProblem::make_grid_and_dofs ()
 void LaplaceProblem::assemble_system () 
 {
   hp::QCollection<2>  quadrature_formula(QGauss<2>(6));
-  hp::FEValues<2> x_fe_values (fe, quadrature_formula, 
+  FEValues<2> x_fe_values (fe, quadrature_formula, 
                               update_values | update_gradients | update_JxW_values);
   
   const unsigned int   max_dofs_per_cell = fe.max_dofs_per_cell ();
@@ -157,7 +157,7 @@ void LaplaceProblem::assemble_system ()
 
   std::vector<unsigned int> local_dof_indices (max_dofs_per_cell);
 
-  hp::DoFHandler<2>::active_cell_iterator
+  DoFHandler<2>::active_cell_iterator
     cell = dof_handler.begin_active(),
     endc = dof_handler.end();
   for (; cell!=endc; ++cell)
@@ -231,7 +231,7 @@ void LaplaceProblem::solve ()
 
 void LaplaceProblem::output_results () const
 {
-  DataOut<2,hp::DoFHandler<2> > data_out;
+  DataOut<2,DoFHandler<2> > data_out;
   data_out.attach_dof_handler (dof_handler);
   data_out.add_data_vector (solution, "solution");
   data_out.build_patches ();
index b2737bffc2121fe764114749296b2993c05d72ef..cc32b64cff8584f03b784496b3c9d2a72591335b 100644 (file)
@@ -66,7 +66,7 @@ class LaplaceProblem
 
     Triangulation<2>     triangulation;
     hp::FECollection<2>              fe;
-    hp::DoFHandler<2>        dof_handler;
+    DoFHandler<2>        dof_handler;
 
     SparsityPattern      sparsity_pattern;
     SparseMatrix<double> system_matrix;
@@ -98,7 +98,7 @@ void LaplaceProblem::make_grid_and_dofs ()
          << triangulation.n_cells()
          << std::endl;
 
-  hp::DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (),
+  DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (),
                                          endc = dof_handler.end ();
   
   unsigned int cell_no = 0;
@@ -149,7 +149,7 @@ void LaplaceProblem::assemble_system ()
   for (unsigned int p = 0; p < fe.size (); ++p)
     quadrature_formula.push_back (QGauss<2> (p + 2));
 
-  hp::FEValues<2> x_fe_values (fe, quadrature_formula, 
+  FEValues<2> x_fe_values (fe, quadrature_formula, 
                               update_values | update_gradients | update_JxW_values);
   
   const unsigned int   max_dofs_per_cell = fe.max_dofs_per_cell ();
@@ -159,7 +159,7 @@ void LaplaceProblem::assemble_system ()
 
   std::vector<unsigned int> local_dof_indices (max_dofs_per_cell);
 
-  hp::DoFHandler<2>::active_cell_iterator
+  DoFHandler<2>::active_cell_iterator
     cell = dof_handler.begin_active(),
     endc = dof_handler.end();
   for (; cell!=endc; ++cell)
@@ -233,7 +233,7 @@ void LaplaceProblem::solve ()
 
 void LaplaceProblem::output_results () const
 {
-  DataOut<2,hp::DoFHandler<2> > data_out;
+  DataOut<2,DoFHandler<2> > data_out;
   data_out.attach_dof_handler (dof_handler);
   data_out.add_data_vector (solution, "solution");
   data_out.build_patches ();
index 07b6d55a8cc859ba49dff1e04b6d327f2b8d517b..83a56964bd8de5e4b8d5d1f61674ca5b10498dc1 100644 (file)
@@ -61,8 +61,8 @@ class LaplaceProblem
     void output_results () const;
 
     Triangulation<dim>   triangulation;
-    hp::FECollection<dim>            fe;
-    hp::DoFHandler<dim>      dof_handler;
+    FE_Q<dim>            fe;
+    DoFHandler<dim>      dof_handler;
 
     SparsityPattern      sparsity_pattern;
     SparseMatrix<double> system_matrix;
@@ -125,7 +125,7 @@ double BoundaryValues<dim>::value (const Point<dim> &p,
 
 template <int dim>
 LaplaceProblem<dim>::LaplaceProblem () :
-                fe (FE_Q<dim>(1)),
+                fe (1),
                dof_handler (triangulation)
 {}
 
@@ -167,23 +167,23 @@ void LaplaceProblem<dim>::make_grid_and_dofs ()
 template <int dim>
 void LaplaceProblem<dim>::assemble_system () 
 {  
-  hp::QCollection<dim>  quadrature_formula(QGauss<dim>(2));
+  QGauss<dim>  quadrature_formula (2);
 
   const RightHandSide<dim> right_hand_side;
 
-  hp::FEValues<dim> x_fe_values (fe, quadrature_formula, 
+  FEValues<dim> x_fe_values (fe, quadrature_formula, 
                           update_values   | update_gradients |
                            update_q_points | update_JxW_values);
 
-  const unsigned int   dofs_per_cell = fe[0].dofs_per_cell;
-  const unsigned int   n_q_points    = quadrature_formula[0].n_quadrature_points;
+  const unsigned int   dofs_per_cell = fe.dofs_per_cell;
+  const unsigned int   n_q_points    = quadrature_formula.n_quadrature_points;
 
   FullMatrix<double>   cell_matrix (dofs_per_cell, dofs_per_cell);
   Vector<double>       cell_rhs (dofs_per_cell);
 
   std::vector<unsigned int> local_dof_indices (dofs_per_cell);
 
-  typename hp::DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active(),
+  typename DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active(),
                                                 endc = dof_handler.end();
   for (; cell!=endc; ++cell)
     {
@@ -251,7 +251,7 @@ void LaplaceProblem<dim>::solve ()
 template <int dim>
 void LaplaceProblem<dim>::output_results () const
 {
-  DataOut<dim,hp::DoFHandler<dim> > data_out;
+  DataOut<dim,DoFHandler<dim> > data_out;
 
   data_out.attach_dof_handler (dof_handler);
   data_out.add_data_vector (solution, "solution");
index d951e334c792c1fa7a04576204cf90dd5bebd98d..96c7d3642f3d6bc8276ae3d7101426024b7749d2 100644 (file)
@@ -63,8 +63,8 @@ class LaplaceProblem
     void output_results (const unsigned int cycle) const;
 
     Triangulation<dim>   triangulation;
-    hp::FECollection<dim>            fe;
-    hp::DoFHandler<dim>      dof_handler;
+    FE_Q<dim>            fe;
+    DoFHandler<dim>      dof_handler;
 
     SparsityPattern      sparsity_pattern;
     SparseMatrix<double> system_matrix;
@@ -131,7 +131,7 @@ void Coefficient<dim>::value_list (const std::vector<Point<dim> > &points,
 
 template <int dim>
 LaplaceProblem<dim>::LaplaceProblem () :
-                fe (FE_Q<dim>(1)),
+                fe (1),
                dof_handler (triangulation)
 {}
 
@@ -165,14 +165,14 @@ void LaplaceProblem<dim>::setup_system ()
 template <int dim>
 void LaplaceProblem<dim>::assemble_system () 
 {  
-  hp::QCollection<dim>  quadrature_formula(QGauss<dim>(2));
+  QGauss<dim>  quadrature_formula (2);
 
-  hp::FEValues<dim> x_fe_values (fe, quadrature_formula, 
+  FEValues<dim> x_fe_values (fe, quadrature_formula, 
                           update_values    |  update_gradients |
                           update_q_points  |  update_JxW_values);
 
-  const unsigned int   dofs_per_cell = fe[0].dofs_per_cell;
-  const unsigned int   n_q_points    = quadrature_formula[0].n_quadrature_points;
+  const unsigned int   dofs_per_cell = fe.dofs_per_cell;
+  const unsigned int   n_q_points    = quadrature_formula.n_quadrature_points;
 
   FullMatrix<double>   cell_matrix (dofs_per_cell, dofs_per_cell);
   Vector<double>       cell_rhs (dofs_per_cell);
@@ -182,7 +182,7 @@ void LaplaceProblem<dim>::assemble_system ()
   const Coefficient<dim> coefficient;
   std::vector<double>    coefficient_values (n_q_points);
 
-  typename hp::DoFHandler<dim>::active_cell_iterator
+  typename DoFHandler<dim>::active_cell_iterator
     cell = dof_handler.begin_active(),
     endc = dof_handler.end();
   for (; cell!=endc; ++cell)
@@ -262,7 +262,7 @@ void LaplaceProblem<dim>::output_results (const unsigned int cycle) const
   if (cycle >= 2)
     return;
   
-  DataOut<dim,hp::DoFHandler<dim> > data_out;
+  DataOut<dim,DoFHandler<dim> > data_out;
 
   data_out.attach_dof_handler (dof_handler);
   data_out.add_data_vector (solution, "solution");
index 5d74a891f64e5ef6d60388599a00efebf0c67b6c..8b01cec620ded830316c7e648ffb75f9b26cc8b5 100644 (file)
@@ -75,8 +75,8 @@ class LaplaceProblem
 
     Triangulation<dim>   triangulation;
 
-    hp::DoFHandler<dim>      dof_handler;
-    hp::FECollection<dim>            fe;
+    DoFHandler<dim>      dof_handler;
+    FE_Q<dim>            fe;
 
     ConstraintMatrix     hanging_node_constraints;
 
@@ -146,7 +146,7 @@ void Coefficient<dim>::value_list (const std::vector<Point<dim> > &points,
 template <int dim>
 LaplaceProblem<dim>::LaplaceProblem () :
                dof_handler (triangulation),
-                fe (FE_Q<dim>(2))
+                fe (2)
 {}
 
 
@@ -190,14 +190,14 @@ void LaplaceProblem<dim>::setup_system ()
 template <int dim>
 void LaplaceProblem<dim>::assemble_system () 
 {  
-  const hp::QCollection<dim>  quadrature_formula(QGauss<dim>(3));
+  const QGauss<dim>  quadrature_formula (3);
 
-  hp::FEValues<dim> x_fe_values (fe, quadrature_formula, 
+  FEValues<dim> x_fe_values (fe, quadrature_formula, 
                           update_values    |  update_gradients |
                           update_q_points  |  update_JxW_values);
 
-  const unsigned int   dofs_per_cell = fe[0].dofs_per_cell;
-  const unsigned int   n_q_points    = quadrature_formula[0].n_quadrature_points;
+  const unsigned int   dofs_per_cell = fe.dofs_per_cell;
+  const unsigned int   n_q_points    = quadrature_formula.n_quadrature_points;
 
   FullMatrix<double>   cell_matrix (dofs_per_cell, dofs_per_cell);
   Vector<double>       cell_rhs (dofs_per_cell);
@@ -207,7 +207,7 @@ void LaplaceProblem<dim>::assemble_system ()
   const Coefficient<dim> coefficient;
   std::vector<double>    coefficient_values (n_q_points);
 
-  typename hp::DoFHandler<dim>::active_cell_iterator
+  typename DoFHandler<dim>::active_cell_iterator
     cell = dof_handler.begin_active(),
     endc = dof_handler.end();
   for (; cell!=endc; ++cell)
@@ -359,7 +359,7 @@ void LaplaceProblem<dim>::run ()
   DataOutBase::EpsFlags eps_flags;
   eps_flags.z_scaling = 4;
   
-  DataOut<dim,hp::DoFHandler<dim> > data_out;
+  DataOut<dim,DoFHandler<dim> > data_out;
   data_out.set_flags (eps_flags);
 
   data_out.attach_dof_handler (dof_handler);
index 54fe31358b351ab84ba8cab4e77f2c7ca9040965..98b322e51596ebcb1db6dc6e164fd8d43581d5b5 100644 (file)
@@ -179,7 +179,7 @@ class HelmholtzProblem
          global_refinement, adaptive_refinement
     };
     
-    HelmholtzProblem (const hp::FECollection<dim> &fe,
+    HelmholtzProblem (const FiniteElement<dim> &fe,
                       const RefinementMode      refinement_mode);
 
     ~HelmholtzProblem ();
@@ -194,9 +194,9 @@ class HelmholtzProblem
     void process_solution (const unsigned int cycle);
 
     Triangulation<dim>                      triangulation;
-    hp::DoFHandler<dim>                         dof_handler;
+    DoFHandler<dim>                         dof_handler;
 
-    SmartPointer<const hp::FECollection<dim> > fe;
+    SmartPointer<const FiniteElement<dim> > fe;
 
     ConstraintMatrix                        hanging_node_constraints;
 
@@ -215,7 +215,7 @@ class HelmholtzProblem
 
 
 template <int dim>
-HelmholtzProblem<dim>::HelmholtzProblem (const hp::FECollection<dim> &fe,
+HelmholtzProblem<dim>::HelmholtzProblem (const FiniteElement<dim> &fe,
                                          const RefinementMode refinement_mode) :
                dof_handler (triangulation),
                fe (&fe),
@@ -261,24 +261,24 @@ void HelmholtzProblem<dim>::setup_system ()
 template <int dim>
 void HelmholtzProblem<dim>::assemble_system () 
 {  
-  hp::QCollection<dim>   quadrature_formula(QGauss<dim>(3));
-  hp::QCollection<dim-1> face_quadrature_formula(QGauss<dim-1>(3));
+  QGauss<dim>   quadrature_formula (3);
+  QGauss<dim-1> face_quadrature_formula (3);
 
-  const unsigned int n_q_points    = quadrature_formula[0].n_quadrature_points;
-  const unsigned int n_face_q_points = face_quadrature_formula[0].n_quadrature_points;
+  const unsigned int n_q_points    = quadrature_formula.n_quadrature_points;
+  const unsigned int n_face_q_points = face_quadrature_formula.n_quadrature_points;
 
-  const unsigned int dofs_per_cell = (*fe)[0].dofs_per_cell;
+  const unsigned int dofs_per_cell = (*fe).dofs_per_cell;
 
   FullMatrix<double>   cell_matrix (dofs_per_cell, dofs_per_cell);
   Vector<double>       cell_rhs (dofs_per_cell);
 
   std::vector<unsigned int> local_dof_indices (dofs_per_cell);
   
-  hp::FEValues<dim>  x_fe_values (*fe, quadrature_formula, 
+  FEValues<dim>  x_fe_values (*fe, quadrature_formula, 
                            update_values   | update_gradients |
                             update_q_points | update_JxW_values);
 
-  hp::FEFaceValues<dim> x_fe_face_values (*fe, face_quadrature_formula, 
+  FEFaceValues<dim> x_fe_face_values (*fe, face_quadrature_formula, 
                                    update_values         | update_q_points  |
                                     update_normal_vectors | update_JxW_values);
 
@@ -287,7 +287,7 @@ void HelmholtzProblem<dim>::assemble_system ()
 
   const Solution<dim> exact_solution;
   
-  typename hp::DoFHandler<dim>::active_cell_iterator
+  typename DoFHandler<dim>::active_cell_iterator
     cell = dof_handler.begin_active(),
     endc = dof_handler.end();
   for (; cell!=endc; ++cell)
@@ -432,7 +432,7 @@ void HelmholtzProblem<dim>::process_solution (const unsigned int cycle)
                                     solution,
                                     Solution<dim>(),
                                     difference_per_cell,
-                                    hp::QCollection<dim>(QGauss<dim>(3)),
+                                    QGauss<dim>(3),
                                     VectorTools::L2_norm);
   const double L2_error = difference_per_cell.l2_norm();
 
@@ -440,7 +440,7 @@ void HelmholtzProblem<dim>::process_solution (const unsigned int cycle)
                                     solution,
                                     Solution<dim>(),
                                     difference_per_cell,
-                                    hp::QCollection<dim>(QGauss<dim>(3)),
+                                    QGauss<dim>(3),
                                     VectorTools::H1_seminorm);
   const double H1_error = difference_per_cell.l2_norm();
 
@@ -450,7 +450,7 @@ void HelmholtzProblem<dim>::process_solution (const unsigned int cycle)
                                     solution,
                                     Solution<dim>(),
                                     difference_per_cell,
-                                    hp::QCollection<dim>(q_iterated),
+                                    q_iterated,
                                     VectorTools::Linfty_norm);
   const double Linfty_error = difference_per_cell.linfty_norm();
 
@@ -526,7 +526,7 @@ void HelmholtzProblem<dim>::run ()
                Assert (false, ExcNotImplemented());
        }
 
-      switch ((*fe)[0].degree)
+      switch ((*fe).degree)
        {
          case 1:
                gmv_filename += "-q1";
@@ -541,11 +541,11 @@ void HelmholtzProblem<dim>::run ()
 
       gmv_filename += ".gmv";
 
-      DataOut<dim,hp::DoFHandler<dim> > data_out;
+      DataOut<dim,DoFHandler<dim> > data_out;
       data_out.attach_dof_handler (dof_handler);
       data_out.add_data_vector (solution, "solution");
 
-      data_out.build_patches ((*fe)[0].degree);
+      data_out.build_patches ((*fe).degree);
       data_out.write_gmv (deallog.get_file_stream());
     }
   
@@ -584,7 +584,7 @@ void HelmholtzProblem<dim>::run ()
             Assert (false, ExcNotImplemented());
     }
 
-  switch ((*fe)[0].degree)
+  switch ((*fe).degree)
     {
       case 1:
             error_filename += "-q1";
@@ -635,7 +635,7 @@ void HelmholtzProblem<dim>::run ()
          default:
                Assert (false, ExcNotImplemented());
        }
-      switch ((*fe)[0].degree)
+      switch ((*fe).degree)
        {
          case 1:
                conv_filename += "-q1";
@@ -673,7 +673,7 @@ int main ()
                  << "=============================================" << std::endl
                  << std::endl;
        
-       hp::FECollection<dim> fe(FE_Q<dim>(1));
+       FE_Q<dim> fe(1);
        HelmholtzProblem<dim>
          helmholtz_problem_2d (fe, HelmholtzProblem<dim>::adaptive_refinement);
 
@@ -687,7 +687,7 @@ int main ()
                  << "===========================================" << std::endl
                  << std::endl;
        
-       hp::FECollection<dim> fe(FE_Q<dim>(1));
+       FE_Q<dim> fe(1);
        HelmholtzProblem<dim>
          helmholtz_problem_2d (fe, HelmholtzProblem<dim>::global_refinement);
 
@@ -701,7 +701,7 @@ int main ()
                  << "===========================================" << std::endl
                  << std::endl;
        
-       hp::FECollection<dim> fe(FE_Q<dim>(2));
+       FE_Q<dim> fe(2);
        HelmholtzProblem<dim>
          helmholtz_problem_2d (fe, HelmholtzProblem<dim>::global_refinement);
 
index 43b6c94dc1cdde0e886457e26d9af4116cae950b..b628ee38cd363e42755674d149384a376139c07b 100644 (file)
@@ -68,9 +68,9 @@ class ElasticProblem
     void output_results (const unsigned int cycle) const;
 
     Triangulation<dim>   triangulation;
-    hp::DoFHandler<dim>      dof_handler;
+    DoFHandler<dim>      dof_handler;
 
-    hp::FECollection<dim>        fe;
+    FESystem<dim>        fe;
 
     ConstraintMatrix     hanging_node_constraints;
 
@@ -154,7 +154,7 @@ template <int dim>
 ElasticProblem<dim>::ElasticProblem ()
                :
                dof_handler (triangulation),
-               fe (FESystem<dim>(FE_Q<dim>(1), dim))
+               fe (FE_Q<dim>(1), dim)
 {}
 
 
@@ -196,14 +196,14 @@ void ElasticProblem<dim>::setup_system ()
 template <int dim>
 void ElasticProblem<dim>::assemble_system () 
 {  
-  hp::QCollection<dim>  quadrature_formula(QGauss<dim>(2));
+  QGauss<dim>  quadrature_formula (2);
 
-  hp::FEValues<dim> x_fe_values (fe, quadrature_formula, 
+  FEValues<dim> x_fe_values (fe, quadrature_formula, 
                           update_values   | update_gradients |
                            update_q_points | update_JxW_values);
 
-  const unsigned int   dofs_per_cell = fe[0].dofs_per_cell;
-  const unsigned int   n_q_points    = quadrature_formula[0].n_quadrature_points;
+  const unsigned int   dofs_per_cell = fe.dofs_per_cell;
+  const unsigned int   n_q_points    = quadrature_formula.n_quadrature_points;
 
   FullMatrix<double>   cell_matrix (dofs_per_cell, dofs_per_cell);
   Vector<double>       cell_rhs (dofs_per_cell);
@@ -220,7 +220,7 @@ void ElasticProblem<dim>::assemble_system ()
                                           Vector<double>(dim));
 
 
-  typename hp::DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active(),
+  typename DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active(),
                                                 endc = dof_handler.end();
   for (; cell!=endc; ++cell)
     {
@@ -239,12 +239,12 @@ void ElasticProblem<dim>::assemble_system ()
       for (unsigned int i=0; i<dofs_per_cell; ++i)
        {
          const unsigned int 
-           component_i = fe[0].system_to_component_index(i).first;
+           component_i = fe.system_to_component_index(i).first;
          
          for (unsigned int j=0; j<dofs_per_cell; ++j) 
            {
              const unsigned int 
-               component_j = fe[0].system_to_component_index(j).first;
+               component_j = fe.system_to_component_index(j).first;
              
              for (unsigned int q_point=0; q_point<n_q_points;
                   ++q_point)
@@ -275,7 +275,7 @@ void ElasticProblem<dim>::assemble_system ()
       for (unsigned int i=0; i<dofs_per_cell; ++i)
        {
          const unsigned int 
-           component_i = fe[0].system_to_component_index(i).first;
+           component_i = fe.system_to_component_index(i).first;
          
          for (unsigned int q_point=0; q_point<n_q_points; ++q_point)
            cell_rhs(i) += fe_values.shape_value(i,q_point) *
@@ -359,7 +359,7 @@ void ElasticProblem<dim>::output_results (const unsigned int cycle) const
   
   filename += ".gmv";
 
-  DataOut<dim,hp::DoFHandler<dim> > data_out;
+  DataOut<dim,DoFHandler<dim> > data_out;
   data_out.attach_dof_handler (dof_handler);
 
  
index c82cfd78a18e3d9dea631b9f8ef4d6d2e27ea2e8..f45d9da226f47a579b072b051bec1efdd9097f90 100644 (file)
@@ -73,17 +73,17 @@ class AdvectionProblem
   private:
     void setup_system ();
     void assemble_system ();
-    void assemble_system_interval (const typename hp::DoFHandler<dim>::active_cell_iterator &begin,
-                                  const typename hp::DoFHandler<dim>::active_cell_iterator &end);
+    void assemble_system_interval (const typename DoFHandler<dim>::active_cell_iterator &begin,
+                                  const typename DoFHandler<dim>::active_cell_iterator &end);
     
     void solve ();
     void refine_grid ();
     void output_results (const unsigned int cycle) const;
 
     Triangulation<dim>   triangulation;
-    hp::DoFHandler<dim>      dof_handler;
+    DoFHandler<dim>      dof_handler;
 
-    hp::FECollection<dim>            fe;
+    FE_Q<dim>            fe;
 
     ConstraintMatrix     hanging_node_constraints;
 
@@ -255,7 +255,7 @@ class GradientEstimation
 {
   public:
     template <int dim>
-    static void estimate (const hp::DoFHandler<dim> &dof,
+    static void estimate (const DoFHandler<dim> &dof,
                          const Vector<double>  &solution,
                          Vector<float>         &error_per_cell);
 
@@ -269,7 +269,7 @@ class GradientEstimation
     typedef std::pair<unsigned int,unsigned int> IndexInterval;
 
     template <int dim>
-    static void estimate_interval (const hp::DoFHandler<dim> &dof,
+    static void estimate_interval (const DoFHandler<dim> &dof,
                                   const Vector<double>  &solution,
                                   const IndexInterval   &index_interval,
                                   Vector<float>         &error_per_cell);    
@@ -282,7 +282,7 @@ class GradientEstimation
 template <int dim>
 AdvectionProblem<dim>::AdvectionProblem () :
                dof_handler (triangulation),
-               fe(FE_Q<dim>(1))
+               fe(1)
 {}
 
 
@@ -328,7 +328,7 @@ void AdvectionProblem<dim>::assemble_system ()
   const unsigned int n_threads = multithread_info.n_default_threads;
   Threads::ThreadGroup<> threads;
 
-  typedef typename hp::DoFHandler<dim>::active_cell_iterator active_cell_iterator;
+  typedef typename DoFHandler<dim>::active_cell_iterator active_cell_iterator;
   std::vector<std::pair<active_cell_iterator,active_cell_iterator> >
     thread_ranges 
     = Threads::split_range<active_cell_iterator> (dof_handler.begin_active (),
@@ -352,26 +352,26 @@ void AdvectionProblem<dim>::assemble_system ()
 template <int dim>
 void
 AdvectionProblem<dim>::
-assemble_system_interval (const typename hp::DoFHandler<dim>::active_cell_iterator &begin,
-                         const typename hp::DoFHandler<dim>::active_cell_iterator &end) 
+assemble_system_interval (const typename DoFHandler<dim>::active_cell_iterator &begin,
+                         const typename DoFHandler<dim>::active_cell_iterator &end) 
 {
   const AdvectionField<dim> advection_field;
   const RightHandSide<dim>  right_hand_side;
   const BoundaryValues<dim> boundary_values;
   
-  hp::QCollection<dim>   quadrature_formula(QGauss<dim>(2));
-  hp::QCollection<dim-1> face_quadrature_formula(QGauss<dim-1>(2));
+  QGauss<dim>   quadrature_formula (2);
+  QGauss<dim-1> face_quadrature_formula (2);
   
-  hp::FEValues<dim> x_fe_values (fe, quadrature_formula, 
+  FEValues<dim> x_fe_values (fe, quadrature_formula, 
                           update_values   | update_gradients |
                            update_q_points | update_JxW_values);
-  hp::FEFaceValues<dim> x_fe_face_values (fe, face_quadrature_formula,
+  FEFaceValues<dim> x_fe_face_values (fe, face_quadrature_formula,
                                    update_values     | update_q_points   |
                                     update_JxW_values | update_normal_vectors);
 
   const unsigned int   dofs_per_cell   = fe[0].dofs_per_cell;
-  const unsigned int   n_q_points      = quadrature_formula[0].n_quadrature_points;
-  const unsigned int   n_face_q_points = face_quadrature_formula[0].n_quadrature_points;
+  const unsigned int   n_q_points      = quadrature_formula.n_quadrature_points;
+  const unsigned int   n_face_q_points = face_quadrature_formula.n_quadrature_points;
 
   FullMatrix<double>   cell_matrix (dofs_per_cell, dofs_per_cell);
   Vector<double>       cell_rhs (dofs_per_cell);
@@ -383,7 +383,7 @@ assemble_system_interval (const typename hp::DoFHandler<dim>::active_cell_iterat
   std::vector<double>         face_boundary_values (n_face_q_points);
   std::vector<Tensor<1,dim> > face_advection_directions (n_face_q_points);
 
-  typename hp::DoFHandler<dim>::active_cell_iterator cell;
+  typename DoFHandler<dim>::active_cell_iterator cell;
   for (cell=begin; cell!=end; ++cell)
     {
       cell_matrix = 0;
@@ -546,7 +546,7 @@ void AdvectionProblem<dim>::run ()
       output_results (cycle);
     };
 
-  DataOut<dim,hp::DoFHandler<dim> > data_out;
+  DataOut<dim,DoFHandler<dim> > data_out;
   data_out.attach_dof_handler (dof_handler);
   data_out.add_data_vector (solution, "solution");
   data_out.build_patches ();
@@ -559,7 +559,7 @@ void AdvectionProblem<dim>::run ()
 
 template <int dim>
 void 
-GradientEstimation::estimate (const hp::DoFHandler<dim> &dof_handler,
+GradientEstimation::estimate (const DoFHandler<dim> &dof_handler,
                              const Vector<double>  &solution,
                              Vector<float>         &error_per_cell)
 {
@@ -573,7 +573,7 @@ GradientEstimation::estimate (const hp::DoFHandler<dim> &dof_handler,
                               n_threads);
 
   Threads::ThreadGroup<> threads;
-  void (*estimate_interval_ptr) (const hp::DoFHandler<dim> &,
+  void (*estimate_interval_ptr) (const DoFHandler<dim> &,
                                 const Vector<double> &,
                                 const IndexInterval &,
                                 Vector<float> &)
@@ -588,20 +588,19 @@ GradientEstimation::estimate (const hp::DoFHandler<dim> &dof_handler,
 
 template <int dim>
 void 
-GradientEstimation::estimate_interval (const hp::DoFHandler<dim> &dof_handler,
+GradientEstimation::estimate_interval (const DoFHandler<dim> &dof_handler,
                                       const Vector<double>  &solution,
                                       const IndexInterval   &index_interval,
                                       Vector<float>         &error_per_cell)
 {
-  QMidpoint<dim> xmidpoint;
-  hp::QCollection<dim> midpoint_rule (xmidpoint);
-  hp::FEValues<dim>  x_fe_midpoint_value (dof_handler.get_fe(),
+  QMidpoint<dim> midpoint_rule;
+  FEValues<dim>  x_fe_midpoint_value (dof_handler.get_fe(),
                                    midpoint_rule,
                                    update_values | update_q_points);
   
   Tensor<2,dim> Y;
 
-  typename hp::DoFHandler<dim>::active_cell_iterator cell, endc;
+  typename DoFHandler<dim>::active_cell_iterator cell, endc;
 
   cell = dof_handler.begin_active();
   advance (cell, static_cast<signed int>(index_interval.first));
@@ -613,7 +612,7 @@ GradientEstimation::estimate_interval (const hp::DoFHandler<dim> &dof_handler,
     error_on_this_cell = error_per_cell.begin() + index_interval.first;
   
 
-  std::vector<typename hp::DoFHandler<dim>::active_cell_iterator> active_neighbors;
+  std::vector<typename DoFHandler<dim>::active_cell_iterator> active_neighbors;
   active_neighbors.reserve (GeometryInfo<dim>::faces_per_cell *
                            GeometryInfo<dim>::subfaces_per_face);
 
@@ -631,9 +630,9 @@ GradientEstimation::estimate_interval (const hp::DoFHandler<dim> &dof_handler,
       for (unsigned int face_no=0; face_no<GeometryInfo<dim>::faces_per_cell; ++face_no)
        if (! cell->at_boundary(face_no))
          {
-           const typename hp::DoFHandler<dim>::face_iterator 
+           const typename DoFHandler<dim>::face_iterator 
              face = cell->face(face_no);
-           const typename hp::DoFHandler<dim>::cell_iterator 
+           const typename DoFHandler<dim>::cell_iterator 
              neighbor = cell->neighbor(face_no);
 
            if (neighbor->active())
@@ -642,7 +641,7 @@ GradientEstimation::estimate_interval (const hp::DoFHandler<dim> &dof_handler,
              {
                if (dim == 1)
                  {
-                   typename hp::DoFHandler<dim>::cell_iterator
+                   typename DoFHandler<dim>::cell_iterator
                      neighbor_child = neighbor;
                    while (neighbor_child->has_children())
                      neighbor_child = neighbor_child->child (face_no==0 ? 1 : 0);
@@ -666,11 +665,11 @@ GradientEstimation::estimate_interval (const hp::DoFHandler<dim> &dof_handler,
                
 
       std::vector<double> neighbor_midpoint_value(1);
-      typename std::vector<typename hp::DoFHandler<dim>::active_cell_iterator>::const_iterator
+      typename std::vector<typename DoFHandler<dim>::active_cell_iterator>::const_iterator
        neighbor_ptr = active_neighbors.begin();
       for (; neighbor_ptr!=active_neighbors.end(); ++neighbor_ptr)
        {
-         const typename hp::DoFHandler<dim>::active_cell_iterator
+         const typename DoFHandler<dim>::active_cell_iterator
            neighbor = *neighbor_ptr;
            
          x_fe_midpoint_value.reinit (neighbor);
index 217f82639258d29d109f81564c1b75bdb2906ccc..01d0d43752bc30dbc03bff7ec00821af91a2ddb3 100644 (file)
@@ -1045,7 +1045,7 @@ DEAL::Cycle 1:
 DEAL::   Number of active cells:       643
 DEAL::   Number of degrees of freedom: 793
 DEAL:Bicgstab::Starting value 0.26
-DEAL:Bicgstab::Convergence step 85 value 0
+DEAL:Bicgstab::Convergence step 88 value 0
 %!PS-Adobe-2.0 EPSF-1.2
 %%Title: deal.II Output
 %%Creator: the deal.II library
@@ -3427,7 +3427,7 @@ DEAL::Cycle 2:
 DEAL::   Number of active cells:       1663
 DEAL::   Number of degrees of freedom: 1946
 DEAL:Bicgstab::Starting value 0.20
-DEAL:Bicgstab::Convergence step 117 value 0
+DEAL:Bicgstab::Convergence step 116 value 0
 %!PS-Adobe-2.0 EPSF-1.2
 %%Title: deal.II Output
 %%Creator: the deal.II library

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.