]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Unify handling of ExcPetscError. 2786/head
authorDavid Wells <wellsd2@rpi.edu>
Fri, 8 Jul 2016 16:16:27 +0000 (12:16 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Fri, 8 Jul 2016 16:16:27 +0000 (12:16 -0400)
14 files changed:
include/deal.II/lac/la_parallel_vector.templates.h
include/deal.II/lac/petsc_matrix_base.h
include/deal.II/lac/petsc_vector_base.h
include/deal.II/lac/read_write_vector.templates.h
include/deal.II/lac/vector.templates.h
source/lac/petsc_full_matrix.cc
source/lac/petsc_matrix_base.cc
source/lac/petsc_matrix_free.cc
source/lac/petsc_parallel_sparse_matrix.cc
source/lac/petsc_precondition.cc
source/lac/petsc_solver.cc
source/lac/petsc_sparse_matrix.cc
source/lac/petsc_vector.cc
source/lac/petsc_vector_base.cc

index ef0384b0fb0f605e5626b3d70c9d0ace1df0d6ff..1c3c48237d0909ee8f4aa6db9e671e7ee357a8ae 100644 (file)
@@ -18,6 +18,7 @@
 
 
 #include <deal.II/base/config.h>
+#include <deal.II/lac/exceptions.h>
 #include <deal.II/lac/la_parallel_vector.h>
 #include <deal.II/lac/vector_operations_internal.h>
 #include <deal.II/lac/read_write_vector.h>
index acca524ec264b0b72a72bc14ad89600e6a507ef7..397a0d37d4f0ceadfc08fa74427e769947f9120b 100644 (file)
@@ -884,13 +884,6 @@ namespace PETScWrappers
      */
     std::size_t memory_consumption() const;
 
-    /**
-     * Exception
-     */
-    DeclException1 (ExcPETScError,
-                    int,
-                    << "An error with error number " << arg1
-                    << " occurred while calling a PETSc function");
     /**
      * Exception
      */
index 42ef242a9a989144bb95784d01aa97a043057593..938e1ddd9c258afca4a32c3a02d843277a671f48 100644 (file)
@@ -154,14 +154,6 @@ namespace PETScWrappers
        * the referenced element of the vector.
        */
       operator PetscScalar () const;
-
-      /**
-       * Exception
-       */
-      DeclException1 (ExcPETScError,
-                      int,
-                      << "An error with error number " << arg1
-                      << " occurred while calling a PETSc function");
       /**
        * Exception
        */
index 3a745de51326644a3d395ba0e6303882f801ddad..59ce51a7c495c94a59aee62fa112f09480162fdc 100644 (file)
 
 
 #include <deal.II/base/config.h>
+#include <deal.II/base/partitioner.h>
+
+#include <deal.II/lac/exceptions.h>
 #include <deal.II/lac/read_write_vector.h>
 #include <deal.II/lac/vector_operations_internal.h>
-#include <deal.II/base/partitioner.h>
 #include <deal.II/lac/la_parallel_vector.h>
 
 #ifdef DEAL_II_WITH_PETSC
index 66fec398032b79ef7666a8fa88d994ff136baf50..ce2a2287fc7c82b844f28ebcb20b12ec77c3b0ab 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <deal.II/base/template_constraints.h>
 #include <deal.II/base/numbers.h>
+#include <deal.II/lac/exceptions.h>
 #include <deal.II/lac/vector.h>
 #include <deal.II/lac/block_vector.h>
 #include <deal.II/lac/vector_operations_internal.h>
index 6ff013ac3406f774b1e2cf3c36bb755fe1d8d67a..46e8b05ddea8ce40f4a906e37a024b33a2ef570d 100644 (file)
@@ -17,7 +17,7 @@
 
 #ifdef DEAL_II_WITH_PETSC
 
-#  include <deal.II/lac/petsc_vector.h>
+#include <deal.II/lac/exceptions.h>
 
 DEAL_II_NAMESPACE_OPEN
 
index 941370e3bcce185fd4b8b79d7e3f6dbd72fa9c05..0d34d31a43057e8b43c2b17bfd93007fd076a33b 100644 (file)
@@ -17,6 +17,7 @@
 
 #ifdef DEAL_II_WITH_PETSC
 
+#  include <deal.II/lac/exceptions.h>
 #  include <deal.II/lac/petsc_full_matrix.h>
 #  include <deal.II/lac/petsc_sparse_matrix.h>
 #  include <deal.II/lac/petsc_parallel_sparse_matrix.h>
@@ -52,7 +53,7 @@ namespace PETScWrappers
       int ierr;
       (void)ierr;
       ierr = MatGetRow(*matrix, this->a_row, &ncols, &colnums, &values);
-      AssertThrow (ierr == 0, MatrixBase::ExcPETScError(ierr));
+      AssertThrow (ierr == 0, ExcPETScError(ierr));
 
       // copy it into our caches if the line
       // isn't empty. if it is, then we've
@@ -66,7 +67,7 @@ namespace PETScWrappers
 
       // and finally restore the matrix
       ierr = MatRestoreRow(*matrix, this->a_row, &ncols, &colnums, &values);
-      AssertThrow (ierr == 0, MatrixBase::ExcPETScError(ierr));
+      AssertThrow (ierr == 0, ExcPETScError(ierr));
     }
   }
 
@@ -355,7 +356,7 @@ namespace PETScWrappers
 //query this information from PETSc
     int ierr;
     ierr = MatGetRow(*this, row, &ncols, &colnums, &values);
-    AssertThrow (ierr == 0, MatrixBase::ExcPETScError(ierr));
+    AssertThrow (ierr == 0, ExcPETScError(ierr));
 
     // then restore the matrix and return the number of columns in this row as
     // queried previously. Starting with PETSc 3.4, MatRestoreRow actually
@@ -364,7 +365,7 @@ namespace PETScWrappers
     // and return the saved value.
     const PetscInt ncols_saved = ncols;
     ierr = MatRestoreRow(*this, row, &ncols, &colnums, &values);
-    AssertThrow (ierr == 0, MatrixBase::ExcPETScError(ierr));
+    AssertThrow (ierr == 0, ExcPETScError(ierr));
 
     return ncols_saved;
   }
@@ -644,7 +645,7 @@ namespace PETScWrappers
       {
         int ierr = MatGetRow(*this, row, &ncols, &colnums, &values);
         (void)ierr;
-        AssertThrow (ierr == 0, MatrixBase::ExcPETScError(ierr));
+        AssertThrow (ierr == 0, ExcPETScError(ierr));
 
         for (PetscInt col = 0; col < ncols; ++col)
           {
@@ -652,7 +653,7 @@ namespace PETScWrappers
           }
 
         ierr = MatRestoreRow(*this, row, &ncols, &colnums, &values);
-        AssertThrow (ierr == 0, MatrixBase::ExcPETScError(ierr));
+        AssertThrow (ierr == 0, ExcPETScError(ierr));
       }
 
     AssertThrow (out, ExcIO());
index 9f2af4cbd29eec0e44e9d6234082d3314536cd03..f3027673df76885ca6dbce6c76016b84356fc5ef 100644 (file)
@@ -18,6 +18,8 @@
 
 #ifdef DEAL_II_WITH_PETSC
 
+#include <deal.II/lac/exceptions.h>
+
 DEAL_II_NAMESPACE_OPEN
 
 namespace PETScWrappers
index 7ae908fddd5b67c7e0bba1cdcc378b551d279008..686346a918d9edd017493f5a541614a4113a1b83 100644 (file)
@@ -18,6 +18,7 @@
 #ifdef DEAL_II_WITH_PETSC
 
 #  include <deal.II/base/mpi.h>
+#  include <deal.II/lac/exceptions.h>
 #  include <deal.II/lac/petsc_vector.h>
 #  include <deal.II/lac/sparsity_pattern.h>
 #  include <deal.II/lac/dynamic_sparsity_pattern.h>
index 51162264dea013df7492f97b48f2a0bf0a05f562..7e2c9ca32a97c253f5b61f9e069c3dcd6248ae1b 100644 (file)
@@ -18,7 +18,7 @@
 #ifdef DEAL_II_WITH_PETSC
 
 #  include <deal.II/base/utilities.h>
-#  include <deal.II/lac/petsc_compatibility.h>
+#  include <deal.II/lac/exceptions.h>
 #  include <deal.II/lac/petsc_matrix_base.h>
 #  include <deal.II/lac/petsc_vector_base.h>
 #  include <deal.II/lac/petsc_solver.h>
index c12e7f2af337ce3517c31bde14bf12a9ed6ba71b..2f342d3b9542705c98303d16d6f75d27d9758c4b 100644 (file)
@@ -19,6 +19,7 @@
 
 #ifdef DEAL_II_WITH_PETSC
 
+#  include <deal.II/lac/exceptions.h>
 #  include <deal.II/lac/petsc_matrix_base.h>
 #  include <deal.II/lac/petsc_vector_base.h>
 #  include <deal.II/lac/petsc_precondition.h>
index 750f54db0b6237b710b20cf2ddb4165bfc51f8db..9132bf123de136e978c0c11534cf494bacf5682d 100644 (file)
@@ -17,6 +17,7 @@
 
 #ifdef DEAL_II_WITH_PETSC
 
+#  include <deal.II/lac/exceptions.h>
 #  include <deal.II/lac/petsc_vector.h>
 #  include <deal.II/lac/sparsity_pattern.h>
 #  include <deal.II/lac/dynamic_sparsity_pattern.h>
index 3541efa2d3aa87293b28672222ee8626aef2fc9d..ebcf8bb331655473ddf25bf705e9dcb1172fb05b 100644 (file)
@@ -17,6 +17,8 @@
 
 #ifdef DEAL_II_WITH_PETSC
 
+#include <deal.II/lac/exceptions.h>
+
 #  include <cmath>
 
 DEAL_II_NAMESPACE_OPEN
index e3191cd202d708f06d81267a0e0a90672d503dbb..9528b6aa85581a90dd4b604c85808538291dadd5 100644 (file)
@@ -18,6 +18,7 @@
 #ifdef DEAL_II_WITH_PETSC
 
 #  include <deal.II/base/memory_consumption.h>
+#  include <deal.II/lac/exceptions.h>
 #  include <deal.II/lac/petsc_vector.h>
 #  include <deal.II/lac/petsc_parallel_vector.h>
 #  include <cmath>

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.