]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
FEValues can now be initialized with tria iterators, there is no need anymore
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 20 Jun 2005 19:56:53 +0000 (19:56 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 20 Jun 2005 19:56:53 +0000 (19:56 +0000)
for dummy dofhandler objects.

git-svn-id: https://svn.dealii.org/trunk@10892 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/fe_tools.cc

index e9b2978d7d9d2ad2e738b9a63bcb6d12c7217ec4..66e21d79763489d000d5b84b5c251690e6754b0c 100644 (file)
@@ -406,20 +406,12 @@ void FETools::get_projection_matrix (const FiniteElement<dim> &fe1,
   
   unsigned int n1 = fe1.dofs_per_cell;
   unsigned int n2 = fe2.dofs_per_cell;
-                                  // First, create a mass matrix. We
-                                  // cannot use MatrixTools, since we
-                                  // want to have a FullMatrix.
-                                  //
+
+                                  // First, create a local mass matrix for
+                                  // the unit cell
   Triangulation<dim> tr;
   GridGenerator::hyper_cube(tr);
   
-  DoFHandler<dim> dof1(tr);
-  dof1.distribute_dofs(fe1);
-  typename DoFHandler<dim>::active_cell_iterator cell1 = dof1.begin();
-  DoFHandler<dim> dof2(tr);
-  dof2.distribute_dofs(fe2);
-  typename DoFHandler<dim>::active_cell_iterator cell2 = dof2.begin();
-  
                                   // Choose a quadrature rule
                                   // Gauss is exact up to degree 2n-1
   const unsigned int degree = std::max(fe1.tensor_degree(), fe2.tensor_degree());
@@ -430,9 +422,9 @@ void FETools::get_projection_matrix (const FiniteElement<dim> &fe1,
                                   // Set up FEValues.
   const UpdateFlags flags = update_values | update_q_points | update_JxW_values;
   FEValues<dim> val1 (fe1, quadrature, update_values);
-  val1.reinit (cell1);
+  val1.reinit (tr.begin_active());
   FEValues<dim> val2 (fe2, quadrature, flags);
-  val2.reinit (cell2);
+  val2.reinit (tr.begin_active());
 
                                   // Integrate and invert mass matrix
                                   // This happens in the target space

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.