]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Projection of functions can be done more efficiently by simulaneously creating mass...
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 30 Dec 2008 11:20:01 +0000 (11:20 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 30 Dec 2008 11:20:01 +0000 (11:20 +0000)
git-svn-id: https://svn.dealii.org/trunk@18061 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/vectors.templates.h

index e911b304e877599d4c241e88d5a99f30eea23c3f..c347cb5fa425c7a08d35f29f6c46cfac9dde205b 100644 (file)
@@ -469,9 +469,10 @@ void VectorTools::project (const Mapping<dim, spacedim>       &mapping,
   SparseMatrix<double> mass_matrix (sparsity);
   Vector<double> 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);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.