From e60ef66d9b5ecee7cbaa4adef142ccbdb12747c9 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Tue, 30 Dec 2008 11:20:01 +0000 Subject: [PATCH] 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 --- deal.II/deal.II/include/numerics/vectors.templates.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); -- 2.39.5