From: Wolfgang Bangerth Date: Sat, 17 Mar 2018 00:32:21 +0000 (-0600) Subject: Minor update to FETools::get_interpolation_difference_matrix(). X-Git-Tag: v9.0.0-rc1~313^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=708f67b506465a15fcb90e340af0ec2e012562d5;p=dealii.git Minor update to FETools::get_interpolation_difference_matrix(). In particular, (i) update the documentation slightly, and (ii) simplify the logic of the implementation by using IdentityMatrix. This also fixes the bug that there was an assumption that the matrix was all zeros beforehand. --- diff --git a/include/deal.II/fe/fe_tools.h b/include/deal.II/fe/fe_tools.h index 312e9663af..eb5991591c 100644 --- a/include/deal.II/fe/fe_tools.h +++ b/include/deal.II/fe/fe_tools.h @@ -210,14 +210,15 @@ namespace FETools FullMatrix &interpolation_matrix); /** - * Compute the identity matrix minus the back interpolation matrix. The @p - * difference_matrix needs to be of size (fe1.dofs_per_cell, - * fe1.dofs_per_cell). + * Compute the identity matrix minus the back interpolation matrix. + * The @p difference_matrix will be of size (fe1.dofs_per_cell, + * fe1.dofs_per_cell) after this function. Previous content + * of the argument will be overwritten. * * This function computes the matrix that transforms a @p fe1 function $z$ to * $z-I_hz$ where $I_h$ denotes the interpolation operator from the @p fe1 - * space to the @p fe2 space. This matrix hence is useful to evaluate error- - * representations where $z$ denotes the dual solution. + * space to the @p fe2 space. This matrix hence is useful to evaluate + * error-representations where $z$ denotes the dual solution. */ template void diff --git a/include/deal.II/fe/fe_tools.templates.h b/include/deal.II/fe/fe_tools.templates.h index 7be75da35c..785d87879f 100644 --- a/include/deal.II/fe/fe_tools.templates.h +++ b/include/deal.II/fe/fe_tools.templates.h @@ -1512,10 +1512,8 @@ namespace FETools FullMatrix interpolation_matrix(fe1.dofs_per_cell); get_back_interpolation_matrix(fe1, fe2, interpolation_matrix); - for (unsigned int i=0; i