From: Martin Kronbichler Date: Tue, 30 Dec 2008 11:20:01 +0000 (+0000) Subject: Projection of functions can be done more efficiently by simulaneously creating mass... X-Git-Tag: v8.0.0~8204 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=987448c6ce0cdf2a01751fda1fb8ca2504db59f1;p=dealii.git Projection of functions can be done more efficiently by simulaneously creating mass matrix and right hand side vector. git-svn-id: https://svn.dealii.org/trunk@18061 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/numerics/vectors.templates.h b/deal.II/deal.II/include/numerics/vectors.templates.h index e911b304e8..c347cb5fa4 100644 --- a/deal.II/deal.II/include/numerics/vectors.templates.h +++ b/deal.II/deal.II/include/numerics/vectors.templates.h @@ -469,9 +469,10 @@ void VectorTools::project (const Mapping &mapping, SparseMatrix mass_matrix (sparsity); Vector tmp (mass_matrix.n()); - MatrixCreator::create_mass_matrix (mapping, dof, quadrature, mass_matrix); - - VectorTools::create_right_hand_side (mapping, dof, quadrature, function, tmp); + // create mass matrix and rhs at once, + // which is faster. + MatrixCreator::create_mass_matrix (mapping, dof, quadrature, mass_matrix, + function, tmp); constraints.condense (mass_matrix); constraints.condense (tmp);