From f0de5bb399f60d08718adb2e731276567df14a25 Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Thu, 3 Nov 2011 16:34:09 +0100
Subject: [PATCH] Use umv for performance

---
 src/one-body-sample.cc | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc
index 7da8b25a..fddc9712 100644
--- a/src/one-body-sample.cc
+++ b/src/one-body-sample.cc
@@ -187,15 +187,12 @@ int main() {
         leafView, p1Basis, frictionalNodes, nodalIntegrals);
 
     for (size_t run = 1; run <= runs; ++run) {
-      f = 0;
-      VectorType neumannTerm(grid.size(grid.maxLevel(), dim));
+      // f = neumann
       assemble_neumann<GridType, GridType::LeafGridView, SmallVector, P1Basis>(
-          leafView, p1Basis, neumannNodes, neumannTerm);
-      f += neumannTerm;
+          leafView, p1Basis, neumannNodes, f);
 
-      VectorType updateTerm(grid.size(grid.maxLevel(), dim));
-      stiffnessMatrix.mv(u1, updateTerm);
-      f += updateTerm;
+      // f += linear update
+      stiffnessMatrix.umv(u1, f);
 
       // {{{ Assemble terms for the nonlinearity
       // TODO: Random value
-- 
GitLab