From 3fa3365e58b427feaac3865a25d23c0bab2443d4 Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Thu, 3 Nov 2011 14:22:00 +0100
Subject: [PATCH] Move declarations around

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

diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc
index 3501cda8..6597700b 100644
--- a/src/one-body-sample.cc
+++ b/src/one-body-sample.cc
@@ -185,16 +185,6 @@ int main() {
     u1 = 0;
     VectorType u2 = u1;
 
-    // TODO: populate on S_F
-    std::vector<double> coefficientOfFriction;
-    coefficientOfFriction.resize(grid.size(grid.maxLevel(), dim));
-    std::fill(coefficientOfFriction.begin(), coefficientOfFriction.end(), 0.0);
-
-    // TODO: populate on S_F
-    std::vector<double> normalStress;
-    normalStress.resize(grid.size(grid.maxLevel(), dim));
-    std::fill(normalStress.begin(), normalStress.end(), 0.0);
-
     VectorType f(grid.size(grid.maxLevel(), dim));
     assemble_neumann<GridType, SmallVector, P1Basis>(grid, p1Basis,
                                                      neumannNodes, f);
@@ -215,6 +205,17 @@ int main() {
           frictionalBoundaryAssembler, nodalIntegrals,
           true); // resize the output vector and zero all of its entries
 
+      // TODO: populate on S_F
+      std::vector<double> normalStress;
+      normalStress.resize(grid.size(grid.maxLevel(), dim));
+      std::fill(normalStress.begin(), normalStress.end(), 0.0);
+
+      // TODO: populate on S_F
+      std::vector<double> coefficientOfFriction;
+      coefficientOfFriction.resize(grid.size(grid.maxLevel(), dim));
+      std::fill(coefficientOfFriction.begin(), coefficientOfFriction.end(),
+                0.0);
+
       Dune::GlobalNonlinearity<dim, Dune::LinearFunction> myGlobalNonlinearity(
           coefficientOfFriction, normalStress, nodalIntegrals);
 
-- 
GitLab