From 15b5fe996de1115d291c683b8d8c125a9552951a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Steffen=20M=C3=BCthing?= <muething@dune-project.org>
Date: Tue, 19 Nov 2013 09:35:15 +0100
Subject: [PATCH] [BCRSMatrix] Introduce new build stages notAllocated (aliased
 to notbuilt) and building

Right now, some build modes reuse the same build stage value across
several actual stages. This patch splits the notbuilt stage into
notAllocated and building, avoiding that ambiguity.
---
 dune/istl/bcrsmatrix.hh | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/dune/istl/bcrsmatrix.hh b/dune/istl/bcrsmatrix.hh
index fc8a4e85d..2b3d2ddb2 100644
--- a/dune/istl/bcrsmatrix.hh
+++ b/dune/istl/bcrsmatrix.hh
@@ -415,15 +415,19 @@ namespace Dune {
     friend struct MatrixDimension<BCRSMatrix>;
   public:
     enum BuildStage {
-      /** @brief Matrix is not built at all. */
+      /** @brief Matrix is not built at all, no memory has been allocated, build mode and size can still be set. */
       notbuilt=0,
+      /** @brief Matrix is not built at all, no memory has been allocated, build mode and size can still be set. */
+      notAllocated=0,
+      /** @brief Matrix is currently being built, some memory has been allocated, build mode and size are fixed. */
+      building=1,
       /** @brief The row sizes of the matrix are known.
        *
        * Only used in random mode.
        */
-      rowSizesBuilt=1,
-      /** @brief The matrix structure is fully built.*/
-      built=2
+      rowSizesBuilt=2,
+      /** @brief The matrix structure is fully built. */
+      built=3,
     };
 
     //===== type definitions and constants
-- 
GitLab