From 9fc9d9ccab38cbb468f8c74cfdd075e342e8aec5 Mon Sep 17 00:00:00 2001 From: wolf Date: Thu, 8 Apr 1999 17:35:32 +0000 Subject: [PATCH] Fix a bug in the multigrid code. git-svn-id: https://svn.dealii.org/trunk@1109 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/multigrid/multigrid.cc | 20 +++++++++++++++++-- deal.II/deal.II/source/numerics/multigrid.cc | 20 +++++++++++++++++-- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/deal.II/deal.II/source/multigrid/multigrid.cc b/deal.II/deal.II/source/multigrid/multigrid.cc index c51528c279..835d134a7a 100644 --- a/deal.II/deal.II/source/multigrid/multigrid.cc +++ b/deal.II/deal.II/source/multigrid/multigrid.cc @@ -10,6 +10,11 @@ #include +MultiGridBase::~MultiGridBase () +{}; + + + MultiGridBase::MultiGridBase(MGTransferBase& transfer, unsigned maxlevel, unsigned minlevel, unsigned pre_smooth, unsigned post_smooth) @@ -116,6 +121,16 @@ void MGTransferPrebuilt::build_matrices (const MGDoFHandler &mg_dof) for (unsigned int level=0; level::cell_iterator cell=mg_dof.begin(level); cell != mg_dof.end(level); ++cell) @@ -132,7 +147,7 @@ void MGTransferPrebuilt::build_matrices (const MGDoFHandler &mg_dof) const FullMatrix &prolongation = mg_dof.get_fe().prolongate(child); - cell->child(child)->get_dof_indices (dof_indices_child); + cell->child(child)->get_mg_dof_indices (dof_indices_child); // now tag the entries in the // matrix which will be used @@ -147,6 +162,7 @@ void MGTransferPrebuilt::build_matrices (const MGDoFHandler &mg_dof) }; }; }; + prolongation_sparsities[level].compress (); prolongation_matrices.push_back (SparseMatrix()); prolongation_matrices[level].reinit (prolongation_sparsities[level]); @@ -168,7 +184,7 @@ void MGTransferPrebuilt::build_matrices (const MGDoFHandler &mg_dof) const FullMatrix &prolongation = mg_dof.get_fe().prolongate(child); - cell->child(child)->get_dof_indices (dof_indices_child); + cell->child(child)->get_mg_dof_indices (dof_indices_child); // now set the entries in the // matrix diff --git a/deal.II/deal.II/source/numerics/multigrid.cc b/deal.II/deal.II/source/numerics/multigrid.cc index c51528c279..835d134a7a 100644 --- a/deal.II/deal.II/source/numerics/multigrid.cc +++ b/deal.II/deal.II/source/numerics/multigrid.cc @@ -10,6 +10,11 @@ #include +MultiGridBase::~MultiGridBase () +{}; + + + MultiGridBase::MultiGridBase(MGTransferBase& transfer, unsigned maxlevel, unsigned minlevel, unsigned pre_smooth, unsigned post_smooth) @@ -116,6 +121,16 @@ void MGTransferPrebuilt::build_matrices (const MGDoFHandler &mg_dof) for (unsigned int level=0; level::cell_iterator cell=mg_dof.begin(level); cell != mg_dof.end(level); ++cell) @@ -132,7 +147,7 @@ void MGTransferPrebuilt::build_matrices (const MGDoFHandler &mg_dof) const FullMatrix &prolongation = mg_dof.get_fe().prolongate(child); - cell->child(child)->get_dof_indices (dof_indices_child); + cell->child(child)->get_mg_dof_indices (dof_indices_child); // now tag the entries in the // matrix which will be used @@ -147,6 +162,7 @@ void MGTransferPrebuilt::build_matrices (const MGDoFHandler &mg_dof) }; }; }; + prolongation_sparsities[level].compress (); prolongation_matrices.push_back (SparseMatrix()); prolongation_matrices[level].reinit (prolongation_sparsities[level]); @@ -168,7 +184,7 @@ void MGTransferPrebuilt::build_matrices (const MGDoFHandler &mg_dof) const FullMatrix &prolongation = mg_dof.get_fe().prolongate(child); - cell->child(child)->get_dof_indices (dof_indices_child); + cell->child(child)->get_mg_dof_indices (dof_indices_child); // now set the entries in the // matrix -- 2.39.5