From 5a4a55676d2f3013bbf7c5adab0c7770c3aba7c2 Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Thu, 3 Nov 2011 00:31:45 +0100
Subject: [PATCH] Move blocks around

---
 src/one-body-sample.cc | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc
index 5f105be4..3b648758 100644
--- a/src/one-body-sample.cc
+++ b/src/one-body-sample.cc
@@ -171,19 +171,18 @@ int main() {
       BoundaryPatch<GridType::LeafGridView> neumannBoundary(grid.leafView(),
                                                             neumannNodes);
 
-      { // constant 1D function
-        std::vector<Dune::FieldVector<double, 1>> nodalIntegrals;
-        ConstantFunction<SmallVector, Dune::FieldVector<double, 1>>
-        constantOneFunction(1);
-        NeumannBoundaryAssembler<GridType, Dune::FieldVector<double, 1>>
-        neumannBoundaryAssembler(constantOneFunction);
-
-        BoundaryFunctionalAssembler<P1Basis> boundaryFunctionalAssembler(
-            p1Basis, neumannBoundary);
-        boundaryFunctionalAssembler.assemble(
-            neumannBoundaryAssembler, nodalIntegrals,
-            true); // resize the output vector and zero all of its entries
-      }
+      // constant 1D function
+      std::vector<Dune::FieldVector<double, 1>> nodalIntegrals;
+      ConstantFunction<SmallVector, Dune::FieldVector<double, 1>>
+      constantOneFunction(1);
+      NeumannBoundaryAssembler<GridType, Dune::FieldVector<double, 1>>
+      neumannBoundaryAssembler(constantOneFunction);
+
+      BoundaryFunctionalAssembler<P1Basis> boundaryFunctionalAssembler(
+          p1Basis, neumannBoundary);
+      boundaryFunctionalAssembler.assemble(
+          neumannBoundaryAssembler, nodalIntegrals,
+          true); // resize the output vector and zero all of its entries
 
       { // constant 2D function
         std::vector<SmallVector> b;
@@ -200,9 +199,8 @@ int main() {
             neumannBoundaryAssembler, b,
             true); // resize the output vector and zero all of its entries
       }
-    }
 
-    { // experiment with convex problems and the like
+      // experiment with convex problems and the like
 
       typedef ZeroNonlinearity<SmallVector, SmallMatrix> NonlinearityType;
       NonlinearityType phi;
-- 
GitLab