From: wolf Date: Mon, 20 Jun 2005 19:56:53 +0000 (+0000) Subject: FEValues can now be initialized with tria iterators, there is no need anymore X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=433f8b59e46ec6aab90a3e524b0af5e555daf260;p=dealii-svn.git FEValues can now be initialized with tria iterators, there is no need anymore for dummy dofhandler objects. git-svn-id: https://svn.dealii.org/trunk@10892 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/fe_tools.cc b/deal.II/deal.II/source/fe/fe_tools.cc index e9b2978d7d..66e21d7976 100644 --- a/deal.II/deal.II/source/fe/fe_tools.cc +++ b/deal.II/deal.II/source/fe/fe_tools.cc @@ -406,20 +406,12 @@ void FETools::get_projection_matrix (const FiniteElement &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 tr; GridGenerator::hyper_cube(tr); - DoFHandler dof1(tr); - dof1.distribute_dofs(fe1); - typename DoFHandler::active_cell_iterator cell1 = dof1.begin(); - DoFHandler dof2(tr); - dof2.distribute_dofs(fe2); - typename DoFHandler::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 &fe1, // Set up FEValues. const UpdateFlags flags = update_values | update_q_points | update_JxW_values; FEValues val1 (fe1, quadrature, update_values); - val1.reinit (cell1); + val1.reinit (tr.begin_active()); FEValues val2 (fe2, quadrature, flags); - val2.reinit (cell2); + val2.reinit (tr.begin_active()); // Integrate and invert mass matrix // This happens in the target space