]> https://gitweb.dealii.org/ - dealii.git/commitdiff
throw exception if no diagonal element has been entered
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Sat, 3 Dec 2005 17:29:05 +0000 (17:29 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Sat, 3 Dec 2005 17:29:05 +0000 (17:29 +0000)
git-svn-id: https://svn.dealii.org/trunk@11809 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/block_matrix_array.h
deal.II/lac/source/block_matrix_array.cc

index 78e0715a845859f87c56373305a218f58d10aa6e..4a867ecfd533d63d215b7e2238a318a965ce66cc 100644 (file)
@@ -532,7 +532,22 @@ class BlockTrianglePrecondition
                                      * @{ */
 
                                     /**
-                                     * Multiple diagonal element.
+                                     * Each diagonal block must
+                                     * contain one and only one
+                                     * matrix. If this exception is
+                                     * thrown, you did not enter a
+                                     * matrix here.
+                                     */
+    DeclException1(ExcNoDiagonal,
+                  unsigned int,
+                  << "No diagonal entry was added for block " << arg1);
+    
+                                    /**
+                                     * Each diagonal block must
+                                     * contain one and only one
+                                     * matrix. If this exception is
+                                     * thrown, you entered a second
+                                     * matrix here.
                                      */
     DeclException1(ExcMultipleDiagonal,
                   unsigned int,
index 734758e295c4f12e36a7caa4fe68d4b283339916..bc0870f62fa519de0cacce7762df86de4b6aa7bc 100644 (file)
@@ -333,6 +333,8 @@ BlockTrianglePrecondition<number>::do_row (
          dst.block(i).add (-1 * m->prefix, aux);
        }
     }
+  Assert (diagonal != end, ExcNoDiagonal(row_num));
+  
   if (diagonal->transpose)
     diagonal->matrix->Tvmult(aux, dst.block(row_num));
   else

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.