From: guido Date: Thu, 20 Apr 2000 14:42:12 +0000 (+0000) Subject: local mg works for Q1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47162c00d0725f960e77db3ea31f47c709465152;p=dealii-svn.git local mg works for Q1 git-svn-id: https://svn.dealii.org/trunk@2761 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/multigrid/mg_smoother.templates.h b/deal.II/deal.II/include/multigrid/mg_smoother.templates.h index cc98583b82..b786b24add 100644 --- a/deal.II/deal.II/include/multigrid/mg_smoother.templates.h +++ b/deal.II/deal.II/include/multigrid/mg_smoother.templates.h @@ -27,6 +27,7 @@ MGSmootherRelaxation::smooth (const unsigned int level, for(unsigned i=0;i > prolongation_matrices; + vector > prolongation_matrices; }; diff --git a/deal.II/deal.II/include/multigrid/multigrid.templates.h b/deal.II/deal.II/include/multigrid/multigrid.templates.h index 820d2bdc7d..77d7be4f8b 100644 --- a/deal.II/deal.II/include/multigrid/multigrid.templates.h +++ b/deal.II/deal.II/include/multigrid/multigrid.templates.h @@ -38,15 +38,18 @@ Multigrid::copy_to_mg (const Vector&) template template void -Multigrid::copy_to_mg (const Vector& src) +Multigrid::copy_to_mg (const Vector& osrc) { + // Make src a real finite element function + Vector src = osrc; +// constraints->distribute(src); + const unsigned int dofs_per_cell = mg_dof_handler->get_fe().dofs_per_cell; const unsigned int dofs_per_face = mg_dof_handler->get_fe().dofs_per_face; // set the elements of the vectors // on all levels to zero defect.clear(); -// constraints->condense(src); vector global_dof_indices (dofs_per_cell); vector level_dof_indices (dofs_per_cell); @@ -102,14 +105,16 @@ Multigrid::copy_to_mg (const Vector& src) for (unsigned int i=0; i::faces_per_cell; ++face_n) { const MGDoFHandler::face_iterator face = level_cell->face(face_n); if (face->has_children()) { face->get_mg_dof_indices(level_face_indices); + + + // Delete values on refinement edge, + // since restriction will add them again. for (unsigned int i=0; i &mg_dof) }; prolongation_sparsities[level].compress (); - prolongation_matrices.push_back (SparseMatrix()); + prolongation_matrices.push_back (SparseMatrix()); prolongation_matrices[level].reinit (prolongation_sparsities[level]);