From 59d4232ca462a1216e83096700f3d9eda7fb38e4 Mon Sep 17 00:00:00 2001 From: guido Date: Thu, 10 Sep 1998 16:12:13 +0000 Subject: [PATCH] create_interpolation_matrix ok interpolation for vectors git-svn-id: https://svn.dealii.org/trunk@604 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/numerics/matrices.cc | 8 ++++---- deal.II/deal.II/source/numerics/vectors.cc | 11 +++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/deal.II/deal.II/source/numerics/matrices.cc b/deal.II/deal.II/source/numerics/matrices.cc index 425f34dae9..dd8c5c0177 100644 --- a/deal.II/deal.II/source/numerics/matrices.cc +++ b/deal.II/deal.II/source/numerics/matrices.cc @@ -804,14 +804,14 @@ MatrixCreator::create_interpolation_matrix(const FiniteElement &high, const FiniteElement &low, dFMatrix& result) { - result.reinit (high.total_dofs, low.total_dofs); + result.reinit (low.total_dofs, high.total_dofs); vector > unit_support_points (high.total_dofs); high.get_unit_support_points (unit_support_points); - for (unsigned int i=0; i::interpolate(const DoFHandler &high_dof, const dVector &high, dVector &low) { + dVector cell_high(high_dof.get_fe().total_dofs); + dVector cell_low(low_dof.get_fe().total_dofs); + DoFHandler::active_cell_iterator h = high_dof.begin_active(); + DoFHandler::active_cell_iterator l = low_dof.begin_active(); + + for(; h != high_dof.end(); ++h, ++l) + { + h->get_dof_values(high, cell_high); + transfer.vmult(cell_low, cell_high); + l->distribute_local_to_global(cell_low, low); + } } #if deal_II_dimension == 1 -- 2.39.5