]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Documentation module Exceptions created and applied in base and lac
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 16 Sep 2004 14:28:10 +0000 (14:28 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 16 Sep 2004 14:28:10 +0000 (14:28 +0000)
git-svn-id: https://svn.dealii.org/trunk@9623 0785d39b-7218-0410-832d-ea1e28bc413d

76 files changed:
deal.II/base/include/base/convergence_table.h
deal.II/base/include/base/data_out_base.h
deal.II/base/include/base/exceptions.h
deal.II/base/include/base/function.h
deal.II/base/include/base/function_derivative.h
deal.II/base/include/base/function_lib.h
deal.II/base/include/base/logstream.h
deal.II/base/include/base/parameter_handler.h
deal.II/base/include/base/point.h
deal.II/base/include/base/polynomial.h
deal.II/base/include/base/polynomial_space.h
deal.II/base/include/base/quadrature.h
deal.II/base/include/base/quadrature_selector.h
deal.II/base/include/base/subscriptor.h
deal.II/base/include/base/table_handler.h
deal.II/base/include/base/tensor_base.h
deal.II/base/include/base/tensor_product_polynomials.h
deal.II/base/include/base/thread_management.h
deal.II/base/source/tensor_product_polynomials.cc
deal.II/deal.II/include/dofs/dof_constraints.h
deal.II/deal.II/include/dofs/dof_constraints.templates.h
deal.II/deal.II/include/grid/grid_refinement.h
deal.II/deal.II/include/numerics/matrices.h
deal.II/deal.II/source/dofs/dof_constraints.cc
deal.II/deal.II/source/grid/grid_refinement.cc
deal.II/deal.II/source/numerics/data_out.cc
deal.II/deal.II/source/numerics/matrices.all_dimensions.cc
deal.II/doc/doxygen/options.dox.in
deal.II/lac/include/lac/block_matrix_array.h
deal.II/lac/include/lac/block_matrix_base.h
deal.II/lac/include/lac/block_sparse_matrix.h
deal.II/lac/include/lac/block_sparsity_pattern.h
deal.II/lac/include/lac/block_vector.h
deal.II/lac/include/lac/block_vector_base.h
deal.II/lac/include/lac/compressed_sparsity_pattern.h
deal.II/lac/include/lac/exceptions.h [new file with mode: 0644]
deal.II/lac/include/lac/full_matrix.h
deal.II/lac/include/lac/full_matrix.templates.h
deal.II/lac/include/lac/petsc_block_sparse_matrix.h
deal.II/lac/include/lac/petsc_block_vector.h
deal.II/lac/include/lac/petsc_full_matrix.h
deal.II/lac/include/lac/petsc_matrix_base.h
deal.II/lac/include/lac/petsc_parallel_block_sparse_matrix.h
deal.II/lac/include/lac/petsc_parallel_block_vector.h
deal.II/lac/include/lac/petsc_parallel_sparse_matrix.h
deal.II/lac/include/lac/petsc_parallel_vector.h
deal.II/lac/include/lac/petsc_precondition.h
deal.II/lac/include/lac/petsc_solver.h
deal.II/lac/include/lac/petsc_sparse_matrix.h
deal.II/lac/include/lac/petsc_vector.h
deal.II/lac/include/lac/petsc_vector_base.h
deal.II/lac/include/lac/precondition_block.h
deal.II/lac/include/lac/precondition_block.templates.h
deal.II/lac/include/lac/precondition_selector.h
deal.II/lac/include/lac/solver_minres.h
deal.II/lac/include/lac/sparse_decomposition.h
deal.II/lac/include/lac/sparse_direct.h
deal.II/lac/include/lac/sparse_ilu.h
deal.II/lac/include/lac/sparse_ilu.templates.h
deal.II/lac/include/lac/sparse_matrix.h
deal.II/lac/include/lac/sparse_matrix.templates.h
deal.II/lac/include/lac/sparse_matrix_ez.h
deal.II/lac/include/lac/sparse_matrix_ez.templates.h
deal.II/lac/include/lac/sparse_mic.h
deal.II/lac/include/lac/sparse_mic.templates.h
deal.II/lac/include/lac/sparse_vanka.h
deal.II/lac/include/lac/sparse_vanka.templates.h
deal.II/lac/include/lac/sparsity_pattern.h
deal.II/lac/include/lac/swappable_vector.h
deal.II/lac/include/lac/vector.h
deal.II/lac/include/lac/vector_memory.h
deal.II/lac/source/compressed_sparsity_pattern.cc
deal.II/lac/source/petsc_matrix_base.cc
deal.II/lac/source/petsc_parallel_sparse_matrix.cc
deal.II/lac/source/petsc_vector_base.cc
deal.II/lac/source/sparse_direct.cc

index d74395533162c755334c12de294576340ea0e938..47f7cc07d3b99a75ac8adb436d0f45c7c6ec3b92 100644 (file)
@@ -200,7 +200,10 @@ class ConvergenceTable: public TableHandler
                                      */
     void
     evaluate_all_convergence_rates(const RateMode rate_mode);
-
+    
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+    
                                     /**
                                      * Exception
                                      */
@@ -212,6 +215,7 @@ class ConvergenceTable: public TableHandler
     DeclException1 (ExcRateColumnAlreadyExists,
                    std::string,
                    << "Rate column <" << arg1 << "> does already exist.");
+                                    //@}
 };
 
 
index a83acc95abc25bd7bee9f93407343f5221c680be..5bcafb71c2199d49c50eebb09d9866b513dd6ffc 100644 (file)
@@ -521,6 +521,8 @@ class DataOutBase
                                          * Value for no neighbor.
                                          */
        static const unsigned int no_neighbor = deal_II_numbers::invalid_unsigned_int;
+                                        /** @addtogroup Exceptions
+                                         * @{ */
        
                                         /**
                                          * Exception
@@ -530,9 +532,9 @@ class DataOutBase
                        << "It is not possible to have a structural dimension of " << arg1
                        << " to be larger than the space dimension of the surrounding"
                        << " space " << arg2);
+                                        //@}
     };
 
-
                                     /**
                                      * Flags describing the details of
                                      * output in OpenDX format. At
@@ -1430,7 +1432,10 @@ class DataOutBase
                                      * value.
                                      */
     static unsigned int memory_consumption ();
-
+    
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+    
                                     /**
                                      * Exception
                                      */
@@ -1465,10 +1470,6 @@ class DataOutBase
                                      * Exception
                                      */
     DeclException0 (ExcNoPatches);
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcIO);
                                     /**
                                       * Exception
                                       */
@@ -1481,7 +1482,7 @@ class DataOutBase
                    << "There was an error opening Tecplot file " << arg1
                    << " for output");
     
-      
+                                    //@}  
   private:
                                     /**
                                      * Class holding the data of one
@@ -1993,11 +1994,6 @@ class DataOutInterface : private DataOutBase
                                      */
     unsigned int memory_consumption () const;
 
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcInvalidState);
-    
   protected:
                                     /**
                                      * This is the abstract function
index b01cf5d72eeed64eae307a7c098b4e602338d164..1b3f06c9de0341d7ca204e4ff1a77c79314c119f 100644 (file)
@@ -748,6 +748,11 @@ class Exception5 : public ExceptionBase {                             \
  */
 namespace StandardExceptions 
 {
+                                  /**
+                                   * @addtogroup Exceptions
+                                   */
+                                  //@{
+  
                                   /**
                                    * Exception denoting a division by
                                    * zero.
@@ -878,6 +883,11 @@ namespace StandardExceptions
                                    */
   DeclException0 (ExcNotInitialized);
 
+                                    /**
+                                     * Exception
+                                     */
+    DeclException0 (ExcInvalidState);
+    
                                   /**
                                    * This exception is raised if a
                                    * functionality is not possible in
@@ -906,6 +916,13 @@ namespace StandardExceptions
                  int, int,
                  << "Dimension " << arg1 << " not equal to " << arg2);
 
+                                    /**
+                                     * Exception.
+                                     */
+    DeclException3 (ExcDimensionMismatch2,
+                   int, int, int,
+                   << "Dimension " << arg1 << " neither equal to " << arg2 << " nor to " << arg3);
+
                                   /**
                                    * This exception is one of the
                                    * most often used ones, and
@@ -927,6 +944,13 @@ namespace StandardExceptions
                  << "Index " << arg1 << " is not in ["
                  << arg2 << "," << arg3 << "[");
 
+                                  /**
+                                   * A number is too small.
+                                   */
+  DeclException2 (ExcLowerRange, int, int,
+                 << "Number " << arg1
+                 << " must be larger or equal " << arg2);
+  
                                   /**
                                    * This exception indicates that
                                    * the first argument should be an
@@ -992,6 +1016,7 @@ namespace StandardExceptions
                                    * cases, this exception is thrown.
                                    */
   DeclException0 (ExcScalarAssignmentOnlyForZeroValue);
+                                  //@}
 }
 
 
index bbddaaeb89b3759fe9703b0a6218ab1051bc65a6..2e99dec27e110ac9d803a3704d2e66bc46decced 100644 (file)
@@ -334,8 +334,11 @@ class Function : public FunctionTime,
                                      */
     unsigned int memory_consumption () const;
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
                                      /**
-                                      * Exception
+                                      * Number of components does not match.
                                       */
     DeclException2 (ExcNumberOfComponents,
                     int, int,
@@ -350,6 +353,7 @@ class Function : public FunctionTime,
                     int,
                     << "The number of components of a function object must "
                     << "at least be one, but you gave " << arg1);
+                                    //@}
 };
 
 
index be5ca3b36aa1540ba1622072c22077c585ffd4e3..bd1bb05198c4f85514c696d3a8cfa9523ae6c5b5 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -130,12 +130,15 @@ class FunctionDerivative : public Function<dim>
                                      * value.
                                      */
     unsigned int memory_consumption () const;
+    
+                                    /** @addtogroup Exceptions
+                                     * @{ */
 
                                     /**
                                      * Exception.
                                      */
     DeclException0(ExcInvalidFormula);
-    
+                                    //@}
   private:
                                     /**
                                      * Function for differentiation.
index ea5bc656973ce8bcde247efb2d8df7c6f10c78d5..98176eeb1a350e8a001608ad9e7a2e157bb2b20e 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -752,11 +752,14 @@ namespace Functions
       virtual double laplacian (const Point<dim>   &p,
                                const unsigned int  component = 0) const;
 
+                                      /** @addtogroup Exceptions
+                                       * @{ */
+      
                                       /**
                                        * Exception
                                        */
       DeclException0 (ExcInvalidArraySize);
-      
+                                      //@}
     private:
                                       /**
                                        * Stored Fourier coefficients
@@ -818,11 +821,14 @@ namespace Functions
       virtual double laplacian (const Point<dim>   &p,
                                const unsigned int  component = 0) const;
 
+                                      /** @addtogroup Exceptions
+                                       * @{ */
+
                                       /**
                                        * Exception
                                        */
       DeclException0 (ExcInvalidArraySize);
-      
+                                      //@}
     private:
                                       /**
                                        * Stored Fourier coefficients
index ac60e3ced01702a89d8c77db572434f691d661b5..2e3da85f6ba33bd9b908f5f8563cd71f579ff62a 100644 (file)
@@ -238,9 +238,9 @@ class LogStream
     unsigned int memory_consumption () const;
 
                                     /**
-                                     * Exception
+                                     * Exception.
                                      */
-    DeclException0 (ExcNoFileStreamGiven);
+    DeclException0(ExcNoFileStreamGiven);
 
   private:
     
index c179b0cc42738d5b2895bfe711498b1fa6ba5ab6..f8bfff284ee8a6f1577b02f95f62e14576dbfbb7 100644 (file)
@@ -551,6 +551,9 @@ namespace Patterns
                                        */
       unsigned int memory_consumption () const;
 
+                                      /** @addtogroup Exceptions
+                                       * @{ */
+      
                                        /**
                                         * Exception.
                                         */
@@ -558,7 +561,7 @@ namespace Patterns
                       int, int,
                       << "The values " << arg1 << " and " << arg2
                       << " do not form a valid range.");
-
+                                      //@}
     private:
                                       /**
                                        * Copy of the pattern that
@@ -649,6 +652,9 @@ namespace Patterns
                                        */
       unsigned int memory_consumption () const;
 
+                                      /** @addtogroup Exceptions
+                                       * @{ */
+
                                       /**
                                        * Exception.
                                        */
@@ -656,7 +662,7 @@ namespace Patterns
                      int,
                      << "A comma was found at position " << arg1
                      << " of your input string, but commas are not allowed here.");
-       
+                                      //@}
     private:
                                       /**
                                        * List of valid strings as
@@ -1465,6 +1471,9 @@ class ParameterHandler
                                      * object.
                                      */
     unsigned int memory_consumption () const;
+    
+                                    /** @addtogroup Exceptions
+                                     * @{ */
 
                                     /**
                                      * Exception
@@ -1495,7 +1504,7 @@ class ParameterHandler
     DeclException1 (ExcConversionError,
                    std::string,
                    << "Error when trying to convert the following string: " << arg1);
-    
+                                    //@}
   private:
                                     /**
                                      * Whatever is in a section:
index 5f44f0297e986ba26ed62a536b4d944b201bd70f..dba7de6ded6182152d8e061d7d35c803461ba9cc 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -160,6 +160,8 @@ class Point : public Tensor<1,dim>
                                      */
     double distance (const Point<dim> &p) const;
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
 
                                     /**
                                      *  Exception
@@ -171,6 +173,8 @@ class Point : public Tensor<1,dim>
                                      * Exception
                                      */
     DeclException0 (ExcInvalidConstructorCalled);
+                                    //@}
+
 };
 
 /*------------------------------- Inline functions: Point ---------------------------*/
index 8898d898ce2c9b44df66b834b9e2a650abb39728..fad282ff184679bc6835e6b36e18bec96e9f6208 100644 (file)
@@ -177,7 +177,10 @@ namespace Polynomials
                                         * Print coefficients.
                                         */
       void print(std::ostream& out) const;
-                                     
+
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
                                        /**
                                         * Exception
                                         */
@@ -187,7 +190,7 @@ namespace Polynomials
                                         * Exception
                                         */
       DeclException0 (ExcVoidPolynomial);
-    
+                                      //@}
     protected:
 
                                        /**
index 1765c19a818b9c5cdbb49e873b08e9230d26cd1f..522d8ffda2a5c326f1ddd429c963121e3c0665d2 100644 (file)
@@ -168,13 +168,6 @@ class PolynomialSpace
                                      */
     unsigned int degree () const;
     
-                                    /**
-                                     * Exception.
-                                     */
-    DeclException3 (ExcDimensionMismatch2,
-                   int, int, int,
-                   << "Dimension " << arg1 << " not equal to " << arg2 << " nor to " << arg3);
-
   protected:
     
                                     /**
index b01f35ae9acd67e54adba52b587a73a754b7f36c..6c238abe250d9bc588ff004c37d5124876526037 100644 (file)
@@ -240,6 +240,10 @@ class QIterated : public Quadrature<dim>
     QIterated (const Quadrature<1> &base_quadrature,
               const unsigned int   n_copies);
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
+
                                     /**
                                      * Exception
                                      */
@@ -255,7 +259,7 @@ class QIterated : public Quadrature<dim>
                    int,
                    << "The numbers of copies (" << arg1
                    << ") of the quadrature formula is not valid.");
-    
+                                    //@}    
   private:
                                     /**
                                      * Check whether the given
index dd94a8c2809a6e81b81f533b53297ed744d87fdb..7778980c6819bf9eeed99dbe80c938d5f9271aaa 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2003 by the deal authors
+//    Copyright (C) 2003, 2004 by the deal authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -58,7 +58,11 @@ class QuadratureSelector : public Quadrature<dim>
                                      * details).
                                      */
     static std::string get_quadrature_names();
-    
+
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
+
                                     /**
                                      * Exception
                                      */
@@ -82,7 +86,7 @@ class QuadratureSelector : public Quadrature<dim>
                    std::string,
                    << arg1
                    << " is not a valid quadrature name for a quadrature rule");
-
+                                    //@}
   private:
                                     /**
                                      * This static function creates a
index 41abc4a73aff16b9b1c1d8730335083678484f9a..003ad32c7843859cbdd7658e0ee739c328e1e97f 100644 (file)
@@ -164,6 +164,9 @@ class Subscriptor
                                      */
     unsigned int n_subscriptions () const;
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+    
                                     /**
                                      * Exception:
                                      * Object may not be deleted, since
@@ -179,7 +182,7 @@ class Subscriptor
                                      * when <tt>unsubscribe</tt> is called.
                                      */
     DeclException0(ExcNotUsed);
-
+                                    //@}
 
   private:
                                     /**
index 42e3ae616c806ddb7d6022708ec7fa13d79e019a..cb114ef3f17a2daecc0dc7b1981bdc0c7301ba99 100644 (file)
@@ -312,7 +312,10 @@ class TableHandler
                                       * Write table as a tex file.
                                       */
     void write_tex (std::ofstream &file) const;
-   
+
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
                                      /**
                                       * Exception
                                       */
@@ -348,7 +351,7 @@ class TableHandler
     DeclException1 (ExcUndefinedTexFormat,
                     std::string,
                     << "<" << arg1 << "> is not a tex column format. Use l,c,r.");
-
+                                    //@}
   protected:
 
                                      /**
index ddb91e092beb59dd13ad5cb66823f39e5be2bf8a..7e04a5cf6b226849888b87bb9f8c26ee066809fd 100644 (file)
@@ -249,6 +249,9 @@ class Tensor<1,dim>
                                      */
     static unsigned int memory_consumption ();
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+    
                                      /**
                                       * Exception
                                       */
@@ -256,6 +259,7 @@ class Tensor<1,dim>
                     int,
                     << "Given dimensions must be >= 1, but was " << arg1);
 
+                                    //@}
   private:
                                     /**
                                      * Store the values in a simple
index 974a726e56ec140abbb7fa011ead2e3322fcf1ff..ae7d4b3f73a83460dbd82088971948ec53462620 100644 (file)
@@ -212,13 +212,6 @@ class TensorProductPolynomials
                                      */
     unsigned int n () const;
 
-                                    /**
-                                     * Exception.
-                                     */
-    DeclException3 (ExcDimensionMismatch2,
-                   int, int, int,
-                   << "Dimension " << arg1 << " not equal to " << arg2 << " nor to " << arg3);
-
            
   private:
                                     /**
@@ -451,20 +444,6 @@ class AnisotropicPolynomials
                                      */
     unsigned int n () const;
 
-                                    /**
-                                     * Exception.
-                                     */
-    DeclException3 (ExcDimensionMismatch2,
-                   int, int, int,
-                   << "Dimension " << arg1 << " not equal to " << arg2 << " nor to " << arg3);
-                                     /**
-                                      * Exception
-                                      */
-    DeclException1 (ExcInvalidDim,
-                    int,
-                    << "The number of rows in this table must be equal to the "
-                    << "space dimension, but is " << arg1);
-           
   private:
                                     /**
                                      * Copy of the vector <tt>pols</tt> of
index 13c33cd67013f77ed795cc03fc6cc8e9e1225c8c..be3b8b2c12e09aa0d41a80ec8f687e036b8e5b37 100644 (file)
@@ -239,6 +239,9 @@ namespace Threads
                                        */
       void dump () {};
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+      
                                       /**
                                        * Exception.
                                        */
@@ -246,6 +249,8 @@ namespace Threads
                      int,
                      << "In single-thread mode, other barrier sizes than 1 are not "
                      << "useful. You gave " << arg1);
+
+                                      //@}
   };
   
   
@@ -3005,11 +3010,14 @@ namespace Threads
         return thread_descriptor == t.thread_descriptor;
       };
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+      
                                        /**
                                         * Exception
                                         */
       DeclException0 (ExcNoThread);
-      
+                                      //@}
     private:
                                        /**
                                         * Shared pointer to the object
index 649701542c2b396a9cb0ca732a5483c06de0974c..6c2ed5da7cd5806bcaff8b381d5493ad561b018f 100644 (file)
@@ -288,7 +288,7 @@ AnisotropicPolynomials(const std::vector<std::vector<Polynomials::Polynomial<dou
                polynomials (pols),
                n_tensor_pols(get_n_tensor_pols(pols))
 {
-  Assert (pols.size() == dim, ExcInvalidDim(pols.size()));
+  Assert (pols.size() == dim, ExcDimensionMismatch(pols.size(), dim));
   for (unsigned int d=0; d<dim; ++d)
     Assert (pols[d].size() > 0,
             ExcMessage ("The number of polynomials must be larger than zero "
index 0b237a7f0682cf512b7403fd3c3cb740e4bb9862..8e46abc76324f01d4c0a1e560c5db132cd5aa2d5 100644 (file)
@@ -783,10 +783,6 @@ class ConstraintMatrix : public Subscriptor
                                     /**
                                      * Exception
                                      */
-    DeclException0 (ExcMatrixNotSquare);
-                                    /**
-                                     * Exception
-                                     */
     DeclException0 (ExcWrongDimension);
                                     /**
                                      * Exception
index feb6b71efeb13b3137f8c5bba2eb71a68f0b3420..6851ded0b6ca1f48d4414e3d99fd0a09b719cd94 100644 (file)
@@ -37,9 +37,9 @@ ConstraintMatrix::condense (const SparseMatrix<number> &uncondensed,
   Assert (uncondensed_struct.is_compressed() == true, ExcMatrixNotClosed());
   Assert (condensed.get_sparsity_pattern().is_compressed() == true, ExcMatrixNotClosed());
   Assert (uncondensed_struct.n_rows() == uncondensed_struct.n_cols(),
-         ExcMatrixNotSquare());
+         ExcNotQuadratic());
   Assert (condensed.n() == condensed.m(),
-         ExcMatrixNotSquare());
+         ExcNotQuadratic());
   Assert (condensed.n()+n_constraints() == uncondensed.n(),
          ExcWrongDimension());
 
@@ -161,7 +161,7 @@ ConstraintMatrix::condense (SparseMatrix<number> &uncondensed) const
   Assert (sorted == true, ExcMatrixNotClosed());
   Assert (sparsity.is_compressed() == true, ExcMatrixNotClosed());
   Assert (sparsity.n_rows() == sparsity.n_cols(),
-         ExcMatrixNotSquare());
+         ExcNotQuadratic());
 
   double average_diagonal = 0;
   for (unsigned int i=0; i<uncondensed.m(); ++i)
@@ -295,13 +295,13 @@ ConstraintMatrix::condense (BlockSparseMatrix<number> &uncondensed) const
   Assert (sorted == true, ExcMatrixNotClosed());
   Assert (sparsity.is_compressed() == true, ExcMatrixNotClosed());
   Assert (sparsity.n_rows() == sparsity.n_cols(),
-         ExcMatrixNotSquare());
+         ExcNotQuadratic());
   Assert (sparsity.n_block_rows() == sparsity.n_block_cols(),
-         ExcMatrixNotSquare());
+         ExcNotQuadratic());
   Assert (sparsity.n_block_rows() == sparsity.n_block_cols(),
-         ExcMatrixNotSquare());
+         ExcNotQuadratic());
   Assert (sparsity.get_column_indices() == sparsity.get_row_indices(),
-         ExcMatrixNotSquare());
+         ExcNotQuadratic());
 
   double average_diagonal = 0;
   for (unsigned int b=0; b<uncondensed.n_block_rows(); ++b)
index b287e5f489337fb89aa639bae748267d381c51d0..35facc742e3f9673f2927c5a6d2cee6c0c9065c3 100644 (file)
@@ -259,13 +259,6 @@ class GridRefinement
     refine_and_coarsen_optimize (Triangulation<dim> &tria,
                                  const Vector       &criteria);
 
-                                    /**
-                                     * Exception
-                                     */
-    DeclException2 (ExcInvalidVectorSize,
-                   int, int,
-                   << "The given vector has " << arg1
-                   << " elements, but " << arg2 << " were expected.");
                                     /**
                                      * Exception
                                      */
index b484fb4098b10b80f5f66e31f681497be4ab9c9f..247db78250ecb6155fee4a20399efa8c3355200a 100644 (file)
@@ -866,10 +866,6 @@ class MatrixTools : public MatrixCreator
                                  Vector<double>     &local_rhs,
                                  const bool          eliminate_columns);
     
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcMatrixNotBlockSquare);
                                     /**
                                      * Exception
                                      */
index 47a861a5d9d2d28d3e6853f14cc4851f2c9e817c..d35ca48ff7b3a1bedd18236db311db317ed037fe 100644 (file)
@@ -527,7 +527,7 @@ void ConstraintMatrix::condense (const SparsityPattern &uncondensed,
   Assert (sorted == true, ExcMatrixNotClosed());
   Assert (uncondensed.is_compressed() == true, ExcMatrixNotClosed());
   Assert (uncondensed.n_rows() == uncondensed.n_cols(),
-         ExcMatrixNotSquare());
+         ExcNotQuadratic());
 
 
                                   // store for each line of the matrix
@@ -636,7 +636,7 @@ void ConstraintMatrix::condense (SparsityPattern &sparsity) const
   Assert (sorted == true, ExcMatrixNotClosed());
   Assert (sparsity.is_compressed() == false, ExcMatrixIsClosed());
   Assert (sparsity.n_rows() == sparsity.n_cols(),
-         ExcMatrixNotSquare());
+         ExcNotQuadratic());
   
                                   // store for each index whether it must be
                                   // distributed or not. If entry is
@@ -740,7 +740,7 @@ void ConstraintMatrix::condense (CompressedSparsityPattern &sparsity) const
 {
   Assert (sorted == true, ExcMatrixNotClosed());
   Assert (sparsity.n_rows() == sparsity.n_cols(),
-         ExcMatrixNotSquare());
+         ExcNotQuadratic());
   
                                   // store for each index whether it must be
                                   // distributed or not. If entry is
@@ -876,11 +876,11 @@ void ConstraintMatrix::condense (BlockSparsityPattern &sparsity) const
   Assert (sorted == true, ExcMatrixNotClosed());
   Assert (sparsity.is_compressed() == false, ExcMatrixIsClosed());
   Assert (sparsity.n_rows() == sparsity.n_cols(),
-         ExcMatrixNotSquare());
+         ExcNotQuadratic());
   Assert (sparsity.n_block_rows() == sparsity.n_block_cols(),
-         ExcMatrixNotSquare());
+         ExcNotQuadratic());
   Assert (sparsity.get_column_indices() == sparsity.get_row_indices(),
-         ExcMatrixNotSquare());
+         ExcNotQuadratic());
   
   const BlockIndices &
     index_mapping = sparsity.get_column_indices();
@@ -1002,11 +1002,11 @@ void ConstraintMatrix::condense (CompressedBlockSparsityPattern &sparsity) const
 {
   Assert (sorted == true, ExcMatrixNotClosed());
   Assert (sparsity.n_rows() == sparsity.n_cols(),
-         ExcMatrixNotSquare());
+         ExcNotQuadratic());
   Assert (sparsity.n_block_rows() == sparsity.n_block_cols(),
-         ExcMatrixNotSquare());
+         ExcNotQuadratic());
   Assert (sparsity.get_column_indices() == sparsity.get_row_indices(),
-         ExcMatrixNotSquare());
+         ExcNotQuadratic());
   
   const BlockIndices &
     index_mapping = sparsity.get_column_indices();
index e3a0b3725280ae2228487424f78b11abd0e42c6b..1d04476c82b5894787f7aa1ce0c67677293a1270 100644 (file)
@@ -124,7 +124,7 @@ void GridRefinement::refine (Triangulation<dim> &tria,
                             const double        threshold)
 {
   Assert (criteria.size() == tria.n_active_cells(),
-         ExcInvalidVectorSize(criteria.size(), tria.n_active_cells()));
+         ExcDimensionMismatch(criteria.size(), tria.n_active_cells()));
   Assert (criteria.is_non_negative (), ExcInvalidParameterValue());
 
                                   // when all indicators are zero we
@@ -162,7 +162,7 @@ void GridRefinement::coarsen (Triangulation<dim> &tria,
                              const double        threshold)
 {
   Assert (criteria.size() == tria.n_active_cells(),
-         ExcInvalidVectorSize(criteria.size(), tria.n_active_cells()));
+         ExcDimensionMismatch(criteria.size(), tria.n_active_cells()));
   Assert (criteria.is_non_negative (), ExcInvalidParameterValue());
 
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active();
@@ -309,7 +309,7 @@ GridRefinement::refine_and_coarsen_optimize (Triangulation<dim> &tria,
                                             const Vector       &criteria)
 {
   Assert (criteria.size() == tria.n_active_cells(),
-         ExcInvalidVectorSize(criteria.size(), tria.n_active_cells()));
+         ExcDimensionMismatch(criteria.size(), tria.n_active_cells()));
   Assert (criteria.is_non_negative (), ExcInvalidParameterValue());
   
                                   // get an increasing order on
index 6f39903eb3f34687867fd8553c9bad364c575d2d..2df2e5d2b9fe8d110fe383db9a7d344d11800a37 100644 (file)
@@ -176,7 +176,7 @@ add_data_vector (const VECTOR                   &vec,
                                   // vectors
   Assert ((vec.size() == dofs->get_tria().n_active_cells()) ||
          (vec.size() == dofs->n_dofs()),
-         ExcInvalidVectorSize(vec.size(),
+         ExcDimensionMismatch(vec.size(),
                               dofs->n_dofs(),
                               dofs->get_tria().n_active_cells()));
   
index 282428e73658d9ee0dc811bb7dad95454949f460..34611c424e9000241efdefcc088c783a3fd95fc9 100644 (file)
@@ -209,10 +209,10 @@ MatrixTools::apply_boundary_values (const std::map<unsigned int,double> &boundar
   Assert (matrix.n() == solution.size(),
          ExcDimensionMismatch(matrix.n(), solution.size()));
   Assert (matrix.n_block_rows() == matrix.n_block_cols(),
-         ExcMatrixNotBlockSquare());
+         ExcNotQuadratic());
   Assert (matrix.get_sparsity_pattern().get_row_indices() == 
          matrix.get_sparsity_pattern().get_column_indices(),
-         ExcMatrixNotBlockSquare());
+         ExcNotQuadratic());
   Assert (matrix.get_sparsity_pattern().get_column_indices() ==
          solution.get_block_indices (),
          ExcBlocksDontMatch ());
index 9c590e2d9bb8dc6d7671e7487e8113199de0529b..c99a3a7832d391b4aca6aba05dc1fc0e3e9b93a4 100644 (file)
@@ -265,7 +265,7 @@ HIDE_SCOPE_NAMES       = NO
 # will put a list of the files that are included by a file in the documentation 
 # of that file.
 
-SHOW_INCLUDE_FILES     = YES
+SHOW_INCLUDE_FILES     = NO
 
 # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
 # is inserted in the documentation for inline members.
index 7668069b8f82143bfe1845d8961bc6046ae3f85c..b44ec2fea5cb00e6c931d6b79eb5ba5b7d74df94 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -303,6 +303,8 @@ class BlockTrianglePrecondition : private BlockMatrixArray<MATRIX>
     BlockMatrixArray<MATRIX>::Subscriptor::subscribe;
     BlockMatrixArray<MATRIX>::Subscriptor::unsubscribe;
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
 
                                     /**
                                      * Multiple diagonal element.
@@ -311,7 +313,7 @@ class BlockTrianglePrecondition : private BlockMatrixArray<MATRIX>
                   unsigned int,
                   << "Inverse diagonal entries may not be added in block "
                   << arg1);
-    
+                                    //@}    
   private:
                                     /**
                                      * Add all off-diagonal
index 995131ccb74fd6f2c86d216fee08694e4acdbf24..aaf6d2645f2d61291fa66baf70160a8bedccf421 100644 (file)
@@ -18,6 +18,7 @@
 #include <base/table.h>
 #include <base/smartpointer.h>
 #include <lac/block_indices.h>
+#include <lac/exceptions.h>
 
 #include <cmath>
 
@@ -100,11 +101,6 @@ namespace internal
                                          * this object.
                                          */
        unsigned int block_column() const;
-
-                                         /**
-                                          * Exception
-                                          */
-        DeclException0 (ExcDereferenceEndIterator);
         
       protected:
                                         /**
@@ -601,16 +597,9 @@ class BlockMatrixBase : public Subscriptor
                                      */
     const_iterator end (const unsigned int r) const;
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
 
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcMatrixNotBlockSquare);
-
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcMatrixNotInitialized);
                                      /**
                                       * Exception
                                       */
@@ -625,7 +614,7 @@ class BlockMatrixBase : public Subscriptor
                     int, int, int, int,
                     << "The blocks [" << arg1 << ',' << arg2 << "] and ["
                     << arg3 << ',' << arg4 << "] have differing column numbers.");
-
+                                    //@}
   protected:
                                     /**
                                      * Release all memory and return
@@ -1402,7 +1391,7 @@ typename BlockMatrixBase<MatrixType>::value_type
 BlockMatrixBase<MatrixType>::diag_element (const unsigned int i) const
 {
   Assert (n_block_rows() == n_block_cols(),
-          ExcMatrixNotBlockSquare());
+          ExcNotQuadratic());
 
   const std::pair<unsigned int,unsigned int>
     index = row_block_indices.global_to_local (i);
@@ -1428,8 +1417,8 @@ inline
 BlockMatrixBase<MatrixType> &
 BlockMatrixBase<MatrixType>::operator *= (const value_type factor)
 {
-  Assert (n_block_cols() != 0, ExcMatrixNotInitialized());
-  Assert (n_block_rows() != 0, ExcMatrixNotInitialized());
+  Assert (n_block_cols() != 0, ExcNotInitialized());
+  Assert (n_block_rows() != 0, ExcNotInitialized());
 
   for (unsigned int r=0; r<n_block_rows(); ++r)
     for (unsigned int c=0; c<n_block_cols(); ++c)
@@ -1445,8 +1434,8 @@ inline
 BlockMatrixBase<MatrixType> &
 BlockMatrixBase<MatrixType>::operator /= (const value_type factor)
 {
-  Assert (n_block_cols() != 0, ExcMatrixNotInitialized());
-  Assert (n_block_rows() != 0, ExcMatrixNotInitialized());
+  Assert (n_block_cols() != 0, ExcNotInitialized());
+  Assert (n_block_rows() != 0, ExcNotInitialized());
   Assert (factor !=0, ExcDivideByZero());
 
   const value_type factor_inv = 1. / factor;
@@ -1689,8 +1678,7 @@ template <class BlockVectorType>
 typename BlockMatrixBase<MatrixType>::value_type
 BlockMatrixBase<MatrixType>::matrix_norm_square (const BlockVectorType &v) const
 {
-  Assert (n_block_rows() == n_block_cols(),
-          ExcMatrixNotBlockSquare());
+  Assert (n_block_rows() == n_block_cols(), ExcNotQuadratic());
   Assert (v.n_blocks() == n_block_rows(),
          ExcDimensionMismatch(v.n_blocks(), n_block_rows()));
 
index 0f6fa0b19aed62ca6faa8513754474a0cdd7a73e..faf32258b8743bd6d160d25083cf2bb7e5c11689 100644 (file)
@@ -20,6 +20,8 @@
 #include <lac/block_vector.h>
 #include <lac/sparse_matrix.h>
 #include <lac/block_sparsity_pattern.h>
+#include <lac/exceptions.h>
+
 #include <cmath>
 
 
@@ -400,11 +402,14 @@ class BlockSparseMatrix : public BlockMatrixBase<SparseMatrix<number> >
                                      */
     unsigned int memory_consumption () const;
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+    
                                      /**
                                       * Exception
                                       */
     DeclException0 (ExcBlockDimensionMismatch);
-    
+                                    //@}    
   private:
                                     /**
                                      * Pointer to the block sparsity
@@ -531,8 +536,7 @@ precondition_Jacobi (BlockVectorType       &dst,
                     const BlockVectorType &src,
                     const number           omega) const
 {
-  Assert (this->n_block_rows() == this->n_block_cols(),
-          typename BaseClass::ExcMatrixNotBlockSquare());
+  Assert (this->n_block_rows() == this->n_block_cols(), ExcNotQuadratic());
   Assert (dst.n_blocks() == this->n_block_rows(),
          ExcDimensionMismatch(dst.n_blocks(), this->n_block_rows()));
   Assert (src.n_blocks() == this->n_block_cols(),
index c584da7f48964d20a886e563409fa37f32989f12..4b0d308aee53089e2daca3c249d455052e8fdbec 100644 (file)
@@ -327,14 +327,9 @@ class BlockSparsityPatternBase : public Subscriptor
                                      */
     void print (std::ostream &out) const;
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
 
-                                    /**
-                                     * Exception
-                                     */
-    DeclException1 (ExcInvalidSize,
-                   int,
-                   << "The number of blocks must be greater or equal to one, "
-                   << "but is " << arg1);
                                     /**
                                      * Exception
                                      */
@@ -360,6 +355,7 @@ class BlockSparsityPatternBase : public Subscriptor
                                      * Exception
                                      */
     DeclException0 (ExcInvalidConstructorCall);
+                                    //@}
     
   protected:
 
index 1b6646dd4be1766a6c1b66354a6ceb8e8a0aecee..96d95005e42c507c3e91afdea06e0ccbb174e9d5 100644 (file)
@@ -364,10 +364,14 @@ class BlockVector : public BlockVectorBase<Vector<Number> >
                                      */
     unsigned int memory_consumption () const;
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+    
                                     /**
                                      * Exception
                                      */
     DeclException0 (ExcIteratorRangeDoesNotMatchVectorSize);
+                                    //@}
 };
 
 /*@}*/
index c0bd155af4313219af04459b11cd1e4d6b639b09..5ac797a48d8cfe00c6bce6e3c7db024c594f88c7 100644 (file)
@@ -515,6 +515,9 @@ namespace internal
                                           */
         Iterator & operator -= (const difference_type &d);
       
+                                        /** @addtogroup Exceptions
+                                         * @{ */
+       
                                          /**
                                           * Exception.
                                           */
@@ -523,7 +526,7 @@ namespace internal
                                           * Exception.
                                           */
         DeclException0 (ExcCastingAwayConstness);
-       
+                                        //@}   
       private:
                                          /**
                                           * Pointer to the block
@@ -967,11 +970,6 @@ class BlockVectorBase
     void equ (const value_type a, const BlockVectorBase& V,
              const value_type b, const BlockVectorBase& W);
 
-                                     /**
-                                      * Exception
-                                      */
-    DeclException0 (ExcNotmatchingBlockSizes);
-    
   protected:
                                     /**
                                      * Pointer to the array of components.
index 67e8df9e4375309003b705605914f949e3085a49..821af834b3921f5cec9424bae941b4401ae2194a 100644 (file)
@@ -15,8 +15,8 @@
 
 
 #include <base/config.h>
-#include <base/exceptions.h>
 #include <base/subscriptor.h>
+#include <lac/exceptions.h>
 
 template <typename number> class SparseMatrix;
 
@@ -318,22 +318,6 @@ class CompressedSparsityPattern : public Subscriptor
                                      */
     unsigned int n_nonzero_elements () const;
 
-                                    /**
-                                     * Exception
-                                     */
-    DeclException2 (ExcInvalidIndex,
-                   int, int,
-                   << "The given index " << arg1
-                   << " should be less than " << arg2 << ".");
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcInvalidConstructorCall);
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcNotSquare);
-    
   private:
                                     /**
                                      * Number of rows that this sparsity
@@ -647,8 +631,8 @@ void
 CompressedSparsityPattern::add (const unsigned int i,
                                const unsigned int j)
 {
-  Assert (i<rows, ExcInvalidIndex(i,rows));
-  Assert (j<cols, ExcInvalidIndex(j,cols));
+  Assert (i<rows, ExcIndexRange(i, 0, rows));
+  Assert (j<cols, ExcIndexRange(j, 0, cols));
 
   lines[i].add (j);
 }
diff --git a/deal.II/lac/include/lac/exceptions.h b/deal.II/lac/include/lac/exceptions.h
new file mode 100644 (file)
index 0000000..6f4b79f
--- /dev/null
@@ -0,0 +1,48 @@
+//----------------------------  exceptions.h  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------  exceptions.h  ---------------------------
+#ifndef __deal2__lac_exceptions_h
+#define __deal2__lac_exceptions_h
+
+#include <base/exceptions.h>
+
+namespace LACExceptions 
+{
+                                  /**
+                                   * @addtogroup Exceptions
+                                   */
+                                  //@{
+
+                                  /**
+                                   * This function only works for
+                                   * quadratic matrices.
+                                   */
+  DeclException0 (ExcNotQuadratic);
+
+                                  /**
+                                   * An error of a PETSc function was
+                                   * encountered. Check the PETSc
+                                   * documentation for details.
+                                   */
+  DeclException1 (ExcPETScError,
+                 int,
+                 << "An error with error number " << arg1
+                 << " occured while calling a PETSc function");
+  
+                                  //@}
+}
+
+
+using namespace LACExceptions;
+
+
+#endif
index 8638e83b7657206378f9ea9cbd260fe78408730d..89bb1adf03451e5a7cc15630121a00d898c6aa85 100644 (file)
@@ -17,8 +17,8 @@
 /*----------------------------   fullmatrix.h     ---------------------------*/
 
 #include <base/config.h>
-#include <base/exceptions.h>
 #include <base/table.h>
+#include <lac/exceptions.h>
 
 #include <vector>
 
@@ -968,14 +968,14 @@ class FullMatrix : public Table<2,number>
                          Vector<number2> &src);
 //@}
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
                                     /**
                                      * Exception
                                      */
     DeclException0 (ExcEmptyMatrix);
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcNotQuadratic);
+
                                     /**
                                      * Exception
                                      */
@@ -991,18 +991,12 @@ class FullMatrix : public Table<2,number>
                    << "Target region not in matrix: size in this direction="
                    << arg1 << ", size of new matrix=" << arg2
                    << ", offset=" << arg3);
-                                    /**
-                                     * Exception
-                                     */
-    DeclException1 (ExcNotImplemented,
-                   int,
-                   << "This function is not implemented for the given"
-                   << " matrix dimension " << arg1);
                                      /**
                                       * Exception
                                       */
     DeclException0 (ExcSourceEqualsDestination);
-
+                                    //@}
+    
     friend class Accessor;
 };
 
index 6244b79fe5374206041d8596f5176ea0216f972a..253207fb81cef9026cb66d1b12c719b003f96a76 100644 (file)
@@ -1184,7 +1184,7 @@ FullMatrix<number>::Tadd (const number s, const FullMatrix<number2>& src)
     val[63] += s * srcval[63];
   }
   else
-    Assert (false, ExcNotImplemented(n()));
+    Assert (false, ExcNotImplemented());
 }
 
 
@@ -1228,8 +1228,7 @@ FullMatrix<number>::determinant () const
                      +this->el(2,0)*this->el(0,1)*this->el(1,2)
                      -this->el(2,0)*this->el(0,2)*this->el(1,1));
       default:
-            Assert (false,
-                    ExcNotImplemented(this->n_cols()));
+            Assert (false, ExcNotImplemented());
             return 0;
     };
 }
index d12c1d5b0cd73ed197cebf336d9db7ee7d387a26..6eb486aafffb5e5f550ba2a1daa190582d8df17f 100644 (file)
@@ -19,6 +19,8 @@
 #include <lac/block_matrix_base.h>
 #include <lac/petsc_sparse_matrix.h>
 #include <lac/petsc_block_vector.h>
+#include <lac/exceptions.h>
+
 #include <cmath>
 
 
@@ -264,6 +266,9 @@ namespace PETScWrappers
                                         */
       using BlockMatrixBase<SparseMatrix>::clear;
       
+                                      /** @addtogroup Exceptions
+                                       * @{ */
+      
                                        /**
                                         * Exception
                                         */
@@ -278,6 +283,7 @@ namespace PETScWrappers
                       int, int, int, int,
                       << "The blocks [" << arg1 << ',' << arg2 << "] and ["
                       << arg3 << ',' << arg4 << "] have differing column numbers.");
+                                      //@}
   };
 
 
index 9c921609a8b3ad4a1f3e02981d06f1fd8edec395..4588a1ea6917d4aa37bc6033f7f74cb96f9a706d 100644 (file)
 
 
 #include <base/config.h>
-#include <base/exceptions.h>
 #include <lac/petsc_vector.h>
 #include <lac/petsc_parallel_block_vector.h>
 #include <lac/block_indices.h>
 #include <lac/block_vector_base.h>
+#include <lac/exceptions.h>
 
 #ifdef DEAL_II_USE_PETSC
 
@@ -286,11 +286,15 @@ namespace PETScWrappers
                                         * to standard functions.
                                         */
       void swap (BlockVector &v);    
-    
+
+                                      /** @addtogroup Exceptions
+                                       * @{ */
+
                                        /**
                                         * Exception
                                         */
       DeclException0 (ExcIteratorRangeDoesNotMatchVectorSize);
+                                      //@}
   };
 
 /*@}*/
index 7f4344ba74f80045e114ee8fd12518ec9fe007b9..5c534bb4ff2bbecaeac57f94b9c08682b4af528b 100644 (file)
@@ -15,7 +15,7 @@
 
 
 #include <base/config.h>
-#include <base/exceptions.h>
+#include <lac/exceptions.h>
 
 #ifdef DEAL_II_USE_PETSC
 
index 76e9c951666730f48676b281e50e075eb84da4d6..b048daf1ca89454b86fbd3bed0b59ad452141201 100644 (file)
@@ -15,8 +15,8 @@
 
 
 #include <base/config.h>
-#include <base/exceptions.h>
 #include <base/subscriptor.h>
+#include <lac/exceptions.h>
 
 #ifdef DEAL_II_USE_PETSC
 
@@ -98,13 +98,6 @@ namespace PETScWrappers
                                              /**
                                               * Exception
                                               */
-            DeclException1 (ExcPETScError,
-                            int,
-                            << "An error with error number " << arg1
-                            << " occured while calling a PETSc function");
-                                             /**
-                                              * Exception
-                                              */
             DeclException3 (ExcAccessToNonlocalRow,
                             int, int, int,
                             << "You tried to access row " << arg1
@@ -695,10 +688,6 @@ namespace PETScWrappers
                                         * Exception
                                         */
       DeclException0 (ExcSourceEqualsDestination);
-                                       /**
-                                        * Exception
-                                        */
-      DeclException0 (ExcMatrixNotSquare);
       
     protected:
                                        /**
index 4cea47c377b24cce9ac761005f9cadeb53629c0b..4758a7240a243b9ee284d7accaeb728b24178522 100644 (file)
@@ -19,6 +19,7 @@
 #include <lac/block_matrix_base.h>
 #include <lac/petsc_parallel_sparse_matrix.h>
 #include <lac/petsc_parallel_block_vector.h>
+#include <lac/exceptions.h>
 #include <cmath>
 
 #ifdef DEAL_II_USE_PETSC
index 84834506b29a6eb826fa8e29ea9df0d591c15dbe..9c5b5e96912873ebabb2149d0878b26144587709 100644 (file)
 
 
 #include <base/config.h>
-#include <base/exceptions.h>
 #include <lac/petsc_parallel_vector.h>
 #include <lac/block_indices.h>
 #include <lac/block_vector_base.h>
+#include <lac/exceptions.h>
 
 #ifdef DEAL_II_USE_PETSC
 
index 38c49463cfe78c20fd89b69fe1d6df7d97bac184..33187c78b7a5d0acbf4feae943b57e2091c516c8 100644 (file)
@@ -15,7 +15,7 @@
 
 
 #include <base/config.h>
-#include <base/exceptions.h>
+#include <lac/exceptions.h>
 
 #ifdef DEAL_II_USE_PETSC
 
@@ -399,6 +399,8 @@ namespace PETScWrappers
                                           */
         const MPI_Comm & get_mpi_communicator () const;
         
+                                    /** @addtogroup Exceptions
+                                     * @{ */
                                         /**
                                          * Exception
                                          */
@@ -406,14 +408,7 @@ namespace PETScWrappers
                        int, int,
                        << "The number of local rows " << arg1
                        << " must be larger than the total number of rows " << arg2);
-                                         /**
-                                          * Exception
-                                          */
-        DeclException2 (ExcInvalidSizes,
-                        int, int,
-                        << "The sizes " << arg1 << " and " << arg2
-                        << " are supposed to match, but don't.");
-        
+                                        //@}        
       private:
 
                                          /**
index 4905fcf2825c0b0dbc875cfded614e100b59b275..42ea2b13306277c60b9968796f9139721dbd2f6d 100644 (file)
@@ -14,8 +14,8 @@
 #define __deal2__petsc_parallel_vector_h
 
 #include <base/config.h>
-#include <base/exceptions.h>
 #include <base/subscriptor.h>
+#include <lac/exceptions.h>
 
 #include <lac/vector.h>
 
@@ -438,7 +438,7 @@ namespace PETScWrappers
     Vector::operator = (const ::Vector<number> &v) 
     {
       Assert (size() == v.size(),
-              ExcNonMatchingSizes (size(), v.size()));
+              ExcDimensionMismatch (size(), v.size()));
 
                                        // the following isn't necessarily fast,
                                        // but this is due to the fact that PETSc
index 24a41a32dbc868df523e3f94ce5a47a5822f0ba3..d725c653138f085cf11bbae6b9e24772ab1f1cf6 100644 (file)
@@ -14,7 +14,7 @@
 #define __deal2__petsc_precondition_h
 
 #include <base/config.h>
-#include <base/exceptions.h>
+#include <lac/exceptions.h>
 
 #ifdef DEAL_II_USE_PETSC
 
@@ -55,13 +55,6 @@ namespace PETScWrappers
                                         */
       virtual ~PreconditionerBase ();
 
-                                       /**
-                                        * Exception
-                                        */
-      DeclException1 (ExcPETScError,
-                      int,
-                      << "An error with error number " << arg1
-                      << " occured while calling a PETSc function");
 
     protected:
                                        /**
index f59d4857f03537b8f12f24f69787db95a2c92c82..31230732db809f82d6fae596bd2484f6431dc6c7 100644 (file)
@@ -14,7 +14,7 @@
 #define __deal2__petsc_solver_h
 
 #include <base/config.h>
-#include <base/exceptions.h>
+#include <lac/exceptions.h>
 #include <lac/solver_control.h>
 
 #ifdef DEAL_II_USE_PETSC
index 6b54011476801422e82f66b7c59eb4f795a8c7c2..45ce728f061194413671419c687558cf8a1c673a 100644 (file)
@@ -15,7 +15,7 @@
 
 
 #include <base/config.h>
-#include <base/exceptions.h>
+#include <lac/exceptions.h>
 
 #ifdef DEAL_II_USE_PETSC
 
index e4d1ede1ba84fbafb88f43de1c972a0ede57c12a..8870305da8ce149ee72da6525c7102ed1f5d1529 100644 (file)
@@ -14,8 +14,8 @@
 #define __deal2__petsc_vector_h
 
 #include <base/config.h>
-#include <base/exceptions.h>
 #include <base/subscriptor.h>
+#include <lac/exceptions.h>
 
 #include <lac/vector.h>
 
index eb638d1e02989869e3df828f0a9effb14e917934..751efd0ca4f4ebee95869ca56d5e0f91779af631 100644 (file)
@@ -15,8 +15,8 @@
 
 
 #include <base/config.h>
-#include <base/exceptions.h>
 #include <base/subscriptor.h>
+#include <lac/exceptions.h>
 
 #ifdef DEAL_II_USE_PETSC
 
@@ -601,21 +601,6 @@ namespace PETScWrappers
                                         */
       operator const Vec & () const;
       
-                                       /**
-                                        * Exception
-                                        */
-      DeclException1 (ExcPETScError,
-                      int,
-                      << "An error with error number " << arg1
-                      << " occured while calling a PETSc function");
-                                       /**
-                                        * Exception
-                                        */
-      DeclException2 (ExcNonMatchingSizes,
-                      int, int,
-                      << "The sizes " << arg1 << " and " << arg2
-                      << " are supposed to be equal, but are not.");
-      
     protected:
                                        /**
                                         * A generic vector object in
index 7a5b84bfb4f11d863ecbe456085d01732e9b0606..42d50eab96719a2439feedc7db8559106a259528 100644 (file)
@@ -296,7 +296,10 @@ class PreconditionBlock : public virtual Subscriptor
                                      * have been computed.
                                      */
     bool inverses_ready () const;
-    
+
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
                                     /**
                                      * Exception
                                      */
@@ -320,16 +323,13 @@ class PreconditionBlock : public virtual Subscriptor
                                      */
     DeclException0 (ExcInverseMatricesAlreadyExist);
 
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcMatrixNotSquare);
-
                                     /**
                                      * Exception
                                      */
     DeclException0 (ExcDiagonalsNotStored);
-   
+
+                                    //@}
+    
                                     /**
                                      * Access to the inverse diagonal
                                      * blocks.
index 71cb0c0c50d6351657a550b2e9f01bcb40f486a9..2dd1bd3c0809b3eb2a77b1c4719f07882fbd14c3 100644 (file)
@@ -63,7 +63,7 @@ void PreconditionBlock<MATRIX,inverse_type>::initialize (
   const unsigned int bsize = parameters.block_size;
   
   clear();
-  Assert (M.m() == M.n(), ExcMatrixNotSquare());
+  Assert (M.m() == M.n(), ExcNotQuadratic());
   A = &M;
   Assert (bsize>0, ExcIndexRange(bsize, 1, M.m()));
   Assert (A->m()%bsize==0, ExcWrongBlockSize(bsize, A->m()));
@@ -87,7 +87,7 @@ void PreconditionBlock<MATRIX,inverse_type>::initialize (
   const unsigned int bsize = parameters.block_size;
   
   clear();
-  Assert (M.m() == M.n(), ExcMatrixNotSquare());
+  Assert (M.m() == M.n(), ExcNotQuadratic());
   A = &M;
   Assert (bsize>0, ExcIndexRange(bsize, 1, M.m()));
   Assert (A->m()%bsize==0, ExcWrongBlockSize(bsize, A->m()));
index b158b3dcc3fda4279e2e1adab02a8c179228db88..e1a442416c1846674bf7ba526932120bf9e03c2e 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -127,12 +127,16 @@ class PreconditionSelector : public Subscriptor
                                      */
     static std::string get_precondition_names();
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
+
                                     /**
                                      * Exception.
                                      */
     DeclException0 (ExcNoMatrixGivenToUse);
 
-
+                                    //@}
   protected:
     
                                     /**
index fe4a7bbbce9f3c18a94bfcde9c501aa5adaa19a9..9abdff0bf42f1314192c5308ea97ff2c9e2d4f2e 100644 (file)
@@ -91,11 +91,14 @@ class SolverMinRes : public Solver<VECTOR>
           const VECTOR         &b,
           const PRECONDITIONER &precondition);
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
                                     /**
                                      * Exception
                                      */
     DeclException0 (ExcPreconditionerNotDefinite);
-    
+                                    //@}
 
   protected:
                                     /**
index 3351ca160e70589eb15087c809d967ac6f22cf02..ce6fec5f0d3b2ba1209462f0380dc6db0279ce44 100644 (file)
@@ -323,6 +323,9 @@ class SparseLUDecomposition : protected SparseMatrix<number>,
                                      */
     virtual unsigned int memory_consumption () const;
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
                                      /**
                                       * Exception
                                       */
@@ -330,13 +333,7 @@ class SparseLUDecomposition : protected SparseMatrix<number>,
                    double,
                    << "The strengthening parameter " << arg1
                    << " is not greater or equal than zero!");
-
-                                     /**
-                                      * Exception. Indicates violation
-                                      * of a state rule().
-                                      */
-    DeclException0 (ExcInvalidState);
-
+                                    //@}
   protected:
                                      /**
                                       * Copies the passed SparseMatrix
index 98e983f8077e9ec519bf77180cc168e62698a24c..3fc0b2b596b0ca9f21756ad97490146f96f1e1ac 100644 (file)
@@ -329,6 +329,9 @@ class SparseDirectMA27 : public Subscriptor
                                      */
     Threads::ThreadMutex & get_synchronisation_lock () const;
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
                                     /**
                                      * Exception.
                                      */
@@ -371,7 +374,7 @@ class SparseDirectMA27 : public Subscriptor
                                       * Exception
                                       */
     DeclException0 (ExcMatrixNotSymmetric);
-    
+                                    //@}    
   private:
                                      /**
                                       * Declare a local type which
@@ -788,6 +791,9 @@ class SparseDirectMA47 : public Subscriptor
                                      */
     Threads::ThreadMutex & get_synchronisation_lock () const;
     
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
                                     /**
                                      * Exception.
                                      */
@@ -826,7 +832,7 @@ class SparseDirectMA47 : public Subscriptor
                                       * Exception
                                       */
     DeclException0 (ExcMatrixNotSymmetric);
-    
+                                    //@}    
   private:
                                      /**
                                       * Store in the constructor
@@ -1100,10 +1106,6 @@ class SparseDirectUMFPACK : public Subscriptor
     void solve (const SparseMatrix<double> &matrix,
                Vector<double>             &rhs_and_solution);
 
-                                     /**
-                                      * Exception
-                                      */
-    DeclException0 (ExcMatrixNotSquare);
                                      /**
                                       * Exception
                                       */
index b120ee20f49ae2cd7f56e6ff482bda549be7cdf0..0d3da2b1d4e0bd51c8682fe438d35b04702474b5 100644 (file)
@@ -1,5 +1,5 @@
 //----------------------------  sparse_ilu.h  ---------------------------
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
 //    by the deal.II authors and Stephen "Cheffo" Kolaroff
 //
 //    This file is subject to QPL and may not be  distributed
@@ -16,7 +16,7 @@
 #include <base/config.h>
 #include <lac/sparse_matrix.h>
 #include <lac/sparse_decomposition.h>
-
+#include <lac/exceptions.h>
 
 /*! @addtogroup Preconditioners
  *@{
@@ -172,17 +172,9 @@ class SparseILU : public SparseLUDecomposition<number>
                                      */
     unsigned int memory_consumption () const;
 
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcMatrixNotSquare);
-                                    /**
-                                     * Exception
-                                     */
-    DeclException2 (ExcSizeMismatch,
-                   int, int,
-                   << "The sizes " << arg1 << " and " << arg2
-                   << " of the given objects do not match.");
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
                                     /**
                                      * Exception
                                      */
@@ -190,6 +182,7 @@ class SparseILU : public SparseLUDecomposition<number>
                    double,
                    << "The strengthening parameter " << arg1
                    << " is not greater or equal than zero!");
+                                    //@}
 };
 
 /*@}*/
index 15ac84c3f74929cffdb9e716da42fde08f51e9fa..55a5bed88d3791bd76d092c6b67fbed34a70b027 100644 (file)
@@ -1,5 +1,5 @@
 //----------------------------  sparse_ilu.templates.h  ---------------------------
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004
 //    by the deal.II authors and Stephen "Cheffo" Kolaroff
 //
 //    This file is subject to QPL and may not be  distributed
@@ -53,9 +53,9 @@ void SparseILU<number>::decompose (const SparseMatrix<somenumber> &matrix,
                                   const double strengthen_diagonal)
 {
   SparseLUDecomposition<number>::decompose (matrix, strengthen_diagonal);
-  Assert (matrix.m()==matrix.n(), ExcMatrixNotSquare ());
-  Assert (this->m()==this->n(),   ExcMatrixNotSquare ());
-  Assert (matrix.m()==this->m(),  ExcSizeMismatch(matrix.m(), this->m()));
+  Assert (matrix.m()==matrix.n(), ExcNotQuadratic ());
+  Assert (this->m()==this->n(),   ExcNotQuadratic ());
+  Assert (matrix.m()==this->m(),  ExcDimensionMismatch(matrix.m(), this->m()));
   
   Assert (strengthen_diagonal>=0,
          ExcInvalidStrengthening (strengthen_diagonal));
@@ -171,8 +171,8 @@ void SparseILU<number>::vmult (Vector<somenumber>       &dst,
 {
   SparseLUDecomposition<number>::vmult (dst, src);
 
-  Assert (dst.size() == src.size(), ExcSizeMismatch(dst.size(), src.size()));
-  Assert (dst.size() == this->m(), ExcSizeMismatch(dst.size(), this->m()));
+  Assert (dst.size() == src.size(), ExcDimensionMismatch(dst.size(), src.size()));
+  Assert (dst.size() == this->m(), ExcDimensionMismatch(dst.size(), this->m()));
   
   const unsigned int N=dst.size();
   const unsigned int * const rowstart_indices
index 578f0253be1149b1f6fce8f22d06863c894a97ec..f2a83f5d25adc5aa0d5b11d6a83ae11825fd7506 100644 (file)
 
 
 #include <base/config.h>
-#include <base/exceptions.h>
 #include <base/subscriptor.h>
 #include <base/smartpointer.h>
 #include <lac/sparsity_pattern.h>
+#include <lac/exceptions.h>
 
 template<typename number> class Vector;
 template<typename number> class FullMatrix;
@@ -1497,6 +1497,9 @@ class SparseMatrix : public virtual Subscriptor
                                      */
     unsigned int memory_consumption () const;
     
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
                                     /**
                                      * Exception
                                      */
@@ -1504,10 +1507,6 @@ class SparseMatrix : public virtual Subscriptor
                                     /**
                                      * Exception
                                      */
-    DeclException0 (ExcMatrixNotInitialized);
-                                    /**
-                                     * Exception
-                                     */
     DeclException2 (ExcInvalidIndex,
                    int, int,
                    << "The entry with index <" << arg1 << ',' << arg2
@@ -1521,18 +1520,10 @@ class SparseMatrix : public virtual Subscriptor
                                     /**
                                      * Exception
                                      */
-    DeclException0 (ExcMatrixNotSquare);
-                                    /**
-                                     * Exception
-                                     */
     DeclException0 (ExcDifferentSparsityPatterns);
                                     /**
                                      * Exception
                                      */
-    DeclException0 (ExcInvalidConstructorCall);
-                                    /**
-                                     * Exception
-                                     */
     DeclException2 (ExcIteratorRange,
                    int, int,
                    << "The iterators denote a range of " << arg1
@@ -1541,7 +1532,7 @@ class SparseMatrix : public virtual Subscriptor
                                       * Exception
                                       */
     DeclException0 (ExcSourceEqualsDestination);
-    
+                                    //@}    
   private:
                                     /**
                                      * Pointer to the sparsity
@@ -1666,7 +1657,7 @@ template <typename number>
 inline
 unsigned int SparseMatrix<number>::m () const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
   return cols->rows;
 }
 
@@ -1675,7 +1666,7 @@ template <typename number>
 inline
 unsigned int SparseMatrix<number>::n () const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
   return cols->cols;
 }
 
@@ -1686,7 +1677,7 @@ void SparseMatrix<number>::set (const unsigned int i,
                                const unsigned int j,
                                const number value)
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
                                   // it is allowed to set elements of
                                   // the matrix that are not part of
                                   // the sparsity pattern, if the
@@ -1708,7 +1699,7 @@ void SparseMatrix<number>::add (const unsigned int i,
                                const unsigned int j,
                                const number value)
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
 
   const unsigned int index = cols->operator()(i,j);
   Assert ((index != SparsityPattern::invalid_entry) ||
@@ -1726,8 +1717,8 @@ inline
 SparseMatrix<number> &
 SparseMatrix<number>::operator *= (const number factor)
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
 
   number             *val_ptr    = &val[0];
   const number *const end_ptr    = &val[cols->n_nonzero_elements()];
@@ -1745,8 +1736,8 @@ inline
 SparseMatrix<number> &
 SparseMatrix<number>::operator /= (const number factor)
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert (factor !=0, ExcDivideByZero());
 
   const number factor_inv = 1. / factor;
@@ -1767,7 +1758,7 @@ inline
 number SparseMatrix<number>::operator () (const unsigned int i,
                                          const unsigned int j) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
   AssertThrow (cols->operator()(i,j) != SparsityPattern::invalid_entry,
                ExcInvalidIndex(i,j));
   return val[cols->operator()(i,j)];
@@ -1780,7 +1771,7 @@ inline
 number SparseMatrix<number>::el (const unsigned int i,
                                 const unsigned int j) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
   const unsigned int index = cols->operator()(i,j);
 
   if (index != SparsityPattern::invalid_entry)
@@ -1795,8 +1786,8 @@ template <typename number>
 inline
 number SparseMatrix<number>::diag_element (const unsigned int i) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (cols->optimize_diagonal(),  ExcMatrixNotSquare());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (cols->optimize_diagonal(),  ExcNotQuadratic());
   Assert (i<m(), ExcInvalidIndex1(i));
   
                                   // Use that the first element in each
@@ -1811,8 +1802,8 @@ template <typename number>
 inline
 number & SparseMatrix<number>::diag_element (const unsigned int i)
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (cols->optimize_diagonal(),  ExcMatrixNotSquare());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (cols->optimize_diagonal(),  ExcNotQuadratic());
   Assert (i<m(), ExcInvalidIndex1(i));
   
                                   // Use that the first element in each
@@ -1842,7 +1833,7 @@ template <typename number>
 inline
 number SparseMatrix<number>::global_entry (const unsigned int j) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
   Assert (j < cols->n_nonzero_elements(),
          ExcIndexRange (j, 0, cols->n_nonzero_elements()));
   
@@ -1855,7 +1846,7 @@ template <typename number>
 inline
 number & SparseMatrix<number>::global_entry (const unsigned int j)
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
   Assert (j < cols->n_nonzero_elements(),
          ExcIndexRange (j, 0, cols->n_nonzero_elements()));
 
index b732c9dc7aa373ea806f327cdd264697b88c17af..e7a739a6060d9b2560ce8d8f52848a6c3262413d 100644 (file)
@@ -108,7 +108,7 @@ SparseMatrix<number>::operator = (const double d)
 {
   Assert (d==0, ExcScalarAssignmentOnlyForZeroValue());
   
-  Assert (cols != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
   Assert (cols->compressed || cols->empty(), ExcNotCompressed());
 
   if (val)
@@ -177,7 +177,7 @@ template <typename number>
 unsigned int
 SparseMatrix<number>::n_nonzero_elements () const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
   return cols->n_nonzero_elements ();
 }
 
@@ -187,7 +187,7 @@ template <typename number>
 unsigned int
 SparseMatrix<number>::n_actually_nonzero_elements () const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
   return std::count_if(&val[0], &val[n_nonzero_elements ()],
                       std::bind2nd(std::not_equal_to<double>(), 0));
 }
@@ -198,8 +198,8 @@ template <typename number>
 void
 SparseMatrix<number>::symmetrize ()
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (cols->rows == cols->cols, ExcMatrixNotSquare());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (cols->rows == cols->cols, ExcNotQuadratic());
   
   const unsigned int n_rows = m();
   for (unsigned int row=0; row<n_rows; ++row)
@@ -238,8 +238,8 @@ template <typename somenumber>
 SparseMatrix<number> &
 SparseMatrix<number>::copy_from (const SparseMatrix<somenumber> &matrix)
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert (cols == matrix.cols, ExcDifferentSparsityPatterns());
 
   std::copy (&matrix.val[0], &matrix.val[cols->n_nonzero_elements()],
@@ -273,8 +273,8 @@ void
 SparseMatrix<number>::add_scaled (const number factor,
                                  const SparseMatrix<somenumber> &matrix)
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert (cols == matrix.cols, ExcDifferentSparsityPatterns());
 
   number             *val_ptr    = &val[0];
@@ -292,8 +292,8 @@ void
 SparseMatrix<number>::vmult (OutVector& dst,
                             const InVector& src) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert(m() == dst.size(), ExcDimensionMismatch(m(),dst.size()));
   Assert(n() == src.size(), ExcDimensionMismatch(n(),src.size()));
 
@@ -391,8 +391,8 @@ void
 SparseMatrix<number>::Tvmult (OutVector& dst,
                               const InVector& src) const
 {
-  Assert (val != 0, ExcMatrixNotInitialized());
-  Assert (cols != 0, ExcMatrixNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
   Assert(n() == dst.size(), ExcDimensionMismatch(n(),dst.size()));
   Assert(m() == src.size(), ExcDimensionMismatch(m(),src.size()));
 
@@ -417,8 +417,8 @@ void
 SparseMatrix<number>::vmult_add (OutVector& dst,
                                  const InVector& src) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert(m() == dst.size(), ExcDimensionMismatch(m(),dst.size()));
   Assert(n() == src.size(), ExcDimensionMismatch(n(),src.size()));
 
@@ -445,8 +445,8 @@ void
 SparseMatrix<number>::Tvmult_add (OutVector& dst,
                                   const InVector& src) const
 {
-  Assert (val != 0, ExcMatrixNotInitialized());
-  Assert (cols != 0, ExcMatrixNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
   Assert(n() == dst.size(), ExcDimensionMismatch(n(),dst.size()));
   Assert(m() == src.size(), ExcDimensionMismatch(m(),src.size()));
 
@@ -466,8 +466,8 @@ template <typename somenumber>
 somenumber
 SparseMatrix<number>::matrix_norm_square (const Vector<somenumber>& v) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert(m() == v.size(), ExcDimensionMismatch(m(),v.size()));
   Assert(n() == v.size(), ExcDimensionMismatch(n(),v.size()));
 
@@ -578,8 +578,8 @@ somenumber
 SparseMatrix<number>::matrix_scalar_product (const Vector<somenumber>& u,
                                             const Vector<somenumber>& v) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert(m() == u.size(), ExcDimensionMismatch(m(),u.size()));
   Assert(n() == v.size(), ExcDimensionMismatch(n(),v.size()));
 
@@ -691,8 +691,8 @@ threaded_matrix_scalar_product (const Vector<somenumber> &u,
 template <typename number>
 number SparseMatrix<number>::l1_norm () const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
 
   Vector<number> column_sums(n());
   const unsigned int n_rows = m();
@@ -708,8 +708,8 @@ number SparseMatrix<number>::l1_norm () const
 template <typename number>
 number SparseMatrix<number>::linfty_norm () const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
 
   const number *val_ptr = &val[cols->rowstart[0]];
 
@@ -753,8 +753,8 @@ SparseMatrix<number>::residual (Vector<somenumber>       &dst,
                                const Vector<somenumber> &u,
                                const Vector<somenumber> &b) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert(m() == dst.size(), ExcDimensionMismatch(m(),dst.size()));
   Assert(m() == b.size(), ExcDimensionMismatch(m(),b.size()));
   Assert(n() == u.size(), ExcDimensionMismatch(n(),u.size()));
@@ -873,8 +873,8 @@ SparseMatrix<number>::precondition_Jacobi (Vector<somenumber>       &dst,
                                           const Vector<somenumber> &src,
                                           const number              om) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert (cols->optimize_diagonal(),
          typename SparsityPattern::ExcDiagonalNotOptimized());
   
@@ -918,8 +918,8 @@ SparseMatrix<number>::precondition_SSOR (Vector<somenumber>       &dst,
                                   // you may want to take a look at the CVS
                                   // archives to see the original version
                                   // which is much clearer...
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert (cols->optimize_diagonal(),
          typename SparsityPattern::ExcDiagonalNotOptimized());
   
@@ -986,8 +986,8 @@ SparseMatrix<number>::precondition_SOR (Vector<somenumber>& dst,
                                         const Vector<somenumber>& src,
                                         const number om) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert (cols->optimize_diagonal(),
          typename SparsityPattern::ExcDiagonalNotOptimized());
   
@@ -1004,8 +1004,8 @@ SparseMatrix<number>::precondition_TSOR (Vector<somenumber>& dst,
                                          const Vector<somenumber>& src,
                                          const number om) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert (cols->optimize_diagonal(),
          typename SparsityPattern::ExcDiagonalNotOptimized());
   
@@ -1021,8 +1021,8 @@ void
 SparseMatrix<number>::SOR (Vector<somenumber>& dst,
                            const number om) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert (cols->optimize_diagonal(),
          typename SparsityPattern::ExcDiagonalNotOptimized());
   
@@ -1049,8 +1049,8 @@ void
 SparseMatrix<number>::TSOR (Vector<somenumber>& dst,
                             const number om) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert (cols->optimize_diagonal(),
          typename SparsityPattern::ExcDiagonalNotOptimized());
   
@@ -1077,8 +1077,8 @@ SparseMatrix<number>::PSOR (Vector<somenumber>& dst,
                             const std::vector<unsigned int>& inverse_permutation,
                             const number om) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert (cols->optimize_diagonal(),
          typename SparsityPattern::ExcDiagonalNotOptimized());
   
@@ -1115,8 +1115,8 @@ SparseMatrix<number>::TPSOR (Vector<somenumber>& dst,
                              const std::vector<unsigned int>& inverse_permutation,
                              const number om) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert (cols->optimize_diagonal(),
          typename SparsityPattern::ExcDiagonalNotOptimized());
   
@@ -1151,8 +1151,8 @@ SparseMatrix<number>::SOR_step (Vector<somenumber> &v,
                                 const Vector<somenumber> &b,
                                 const number        om) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert (cols->optimize_diagonal(),
          typename SparsityPattern::ExcDiagonalNotOptimized());
   
@@ -1179,8 +1179,8 @@ SparseMatrix<number>::TSOR_step (Vector<somenumber> &v,
                                  const Vector<somenumber> &b,
                                  const number        om) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert (cols->optimize_diagonal(),
          typename SparsityPattern::ExcDiagonalNotOptimized());
   
@@ -1219,8 +1219,8 @@ void
 SparseMatrix<number>::SSOR (Vector<somenumber>& dst,
                             const number om) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
   Assert (cols->optimize_diagonal(),
          typename SparsityPattern::ExcDiagonalNotOptimized());
   
@@ -1266,7 +1266,7 @@ template <typename number>
 const SparsityPattern &
 SparseMatrix<number>::get_sparsity_pattern () const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
   return *cols;
 }
 
@@ -1275,8 +1275,8 @@ SparseMatrix<number>::get_sparsity_pattern () const
 template <typename number>
 void SparseMatrix<number>::print (std::ostream &out) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
 
   for (unsigned int i=0; i<cols->rows; ++i)
     for (unsigned int j=cols->rowstart[i]; j<cols->rowstart[i+1]; ++j)
@@ -1294,8 +1294,8 @@ void SparseMatrix<number>::print_formatted (std::ostream &out,
                                            const char* zero_string,
                                            const double denominator) const
 {
-  Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (val != 0, ExcMatrixNotInitialized());
+  Assert (cols != 0, ExcNotInitialized());
+  Assert (val != 0, ExcNotInitialized());
 
   unsigned int width = width_;
   
index b7b306ada8767f335890e7526999b0f6b9f4f2bc..a3497ca429c8f50e488ba9cbbe5572f5b7a602b6 100644 (file)
@@ -15,9 +15,9 @@
 
 
 #include <base/config.h>
-#include <base/exceptions.h>
 #include <base/subscriptor.h>
 #include <base/smartpointer.h>
+#include <lac/exceptions.h>
 
 #include <vector>
 
@@ -978,13 +978,10 @@ class SparseMatrixEZ : public Subscriptor
                             std::vector<unsigned int>& used_by_line,
                             const bool compute_by_line) const;
                             
-                                    /**
-                                     * Exception for applying
-                                     * inverse-type operators to
-                                     * rectangular matrices.
-                                     */
-    DeclException0(ExcNoSquareMatrix);
     
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
                                     /**
                                      * Exception for missing diagonal entry.
                                      */
@@ -1002,6 +999,7 @@ class SparseMatrixEZ : public Subscriptor
                   int, int,
                   << "An entry with index (" << arg1 << ',' << arg2
                   << ") cannot be allocated.");
+                                    //@}
   private:
                                     /**
                                      * Find an entry and return a
index 8fbedad977117cef5066d91f142b5026389e43bf..253ec934f8fea557c886a0ff5df359df251c3e8f 100644 (file)
@@ -238,7 +238,7 @@ SparseMatrixEZ<number>::precondition_Jacobi (Vector<somenumber>       &dst,
                                             const Vector<somenumber> &src,
                                             const number              om) const
 {
-  Assert (m() == n(), ExcNoSquareMatrix());
+  Assert (m() == n(), ExcNotQuadratic());
   Assert (dst.size() == n(), ExcDimensionMismatch (dst.size(), n()));
   Assert (src.size() == n(), ExcDimensionMismatch (src.size(), n()));
 
@@ -263,7 +263,7 @@ SparseMatrixEZ<number>::precondition_SOR (Vector<somenumber>       &dst,
                                          const Vector<somenumber> &src,
                                          const number              om) const
 {
-  Assert (m() == n(), ExcNoSquareMatrix());
+  Assert (m() == n(), ExcNotQuadratic());
   Assert (dst.size() == n(), ExcDimensionMismatch (dst.size(), n()));
   Assert (src.size() == n(), ExcDimensionMismatch (src.size(), n()));
 
@@ -293,7 +293,7 @@ SparseMatrixEZ<number>::precondition_TSOR (Vector<somenumber>       &dst,
                                          const Vector<somenumber> &src,
                                          const number              om) const
 {
-  Assert (m() == n(), ExcNoSquareMatrix());
+  Assert (m() == n(), ExcNotQuadratic());
   Assert (dst.size() == n(), ExcDimensionMismatch (dst.size(), n()));
   Assert (src.size() == n(), ExcDimensionMismatch (src.size(), n()));
 
@@ -325,7 +325,7 @@ SparseMatrixEZ<number>::precondition_SSOR (Vector<somenumber>       &dst,
                                           const Vector<somenumber> &src,
                                           const number              om) const
 {
-  Assert (m() == n(), ExcNoSquareMatrix());
+  Assert (m() == n(), ExcNotQuadratic());
   Assert (dst.size() == n(), ExcDimensionMismatch (dst.size(), n()));
   Assert (src.size() == n(), ExcDimensionMismatch (src.size(), n()));
 
index bbe5ffc26ede4510717b4079620a859c500acd39..1b0711d6cfa26019bb77e825b0544def1e44f6a2 100644 (file)
@@ -122,10 +122,9 @@ class SparseMIC : public SparseLUDecomposition<number>
                                      */
     unsigned int memory_consumption () const;
 
-                                     /**
-                                      * Exception
-                                      */
-    DeclException0 (ExcMatrixNotSquare);
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
                                      /**
                                       * Exception
                                       */
@@ -133,13 +132,6 @@ class SparseMIC : public SparseLUDecomposition<number>
                                      /**
                                       * Exception
                                       */
-    DeclException2 (ExcSizeMismatch,
-                   int, int,
-                   << "The sizes " << arg1 << " and " << arg2
-                   << " of the given objects do not match.");
-                                     /**
-                                      * Exception
-                                      */
     DeclException1 (ExcInvalidStrengthening,
                    double,
                    << "The strengthening parameter " << arg1
@@ -150,7 +142,8 @@ class SparseMIC : public SparseLUDecomposition<number>
     DeclException2(ExcDecompositionNotStable, int, double,
                   << "The diagonal element (" <<arg1<<","<<arg1<<") is "
                   << arg2 <<", but must be positive");
-    
+
+                                    //@}
   private:
                                      /**
                                       * Values of the computed
index f51f45300e01775139da0acab275227ad5d6488c..26600077246abb7c218710fd98118df4090101f6 100644 (file)
@@ -111,9 +111,9 @@ void SparseMIC<number>::decompose (const SparseMatrix<somenumber> &matrix,
 
   SparseLUDecomposition<number>::decompose(matrix, strengthen_diagonal);
 
-  Assert (matrix.m()==matrix.n(), ExcMatrixNotSquare ());
-  Assert (this->m()==this->n(),   ExcMatrixNotSquare ());
-  Assert (matrix.m()==this->m(),  ExcSizeMismatch(matrix.m(), this->m()));
+  Assert (matrix.m()==matrix.n(), ExcNotQuadratic ());
+  Assert (this->m()==this->n(),   ExcNotQuadratic ());
+  Assert (matrix.m()==this->m(),  ExcDimensionMismatch(matrix.m(), this->m()));
 
   Assert (strengthen_diagonal>=0, ExcInvalidStrengthening (strengthen_diagonal));
 
@@ -166,7 +166,7 @@ template <typename number>
 inline number
 SparseMIC<number>::get_rowsum (const unsigned int row) const
 {
-  Assert(this->m()==this->n(), ExcMatrixNotSquare());
+  Assert(this->m()==this->n(), ExcNotQuadratic());
                                    // get start of this row. skip the
                                    // diagonal element
   const unsigned int * const column_numbers = this->get_sparsity_pattern().get_column_numbers();
@@ -192,8 +192,8 @@ SparseMIC<number>::vmult (Vector<somenumber>       &dst,
                           const Vector<somenumber> &src) const
 {
   SparseLUDecomposition<number>::vmult (dst, src);
-  Assert (dst.size() == src.size(), ExcSizeMismatch(dst.size(), src.size()));
-  Assert (dst.size() == this->m(), ExcSizeMismatch(dst.size(), this->m()));
+  Assert (dst.size() == src.size(), ExcDimensionMismatch(dst.size(), src.size()));
+  Assert (dst.size() == this->m(), ExcDimensionMismatch(dst.size(), this->m()));
 
   const unsigned int N=dst.size();
   const unsigned int * const rowstart_indices = this->get_sparsity_pattern().get_rowstart_indices();
index 2cb07593dee0f84feaffb353960595c5bac149ea..db227ea42131b73be8a6988fe7a96fa4a2e606d1 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -212,18 +212,6 @@ class SparseVanka
     void vmult (Vector<number2>       &dst,
                const Vector<number2> &src) const;
 
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcMatrixNotSquare);
-                                    /**
-                                     * Exception
-                                     */
-    DeclException2 (ExcInvalidVectorSize,
-                   unsigned int, unsigned int,
-                   << "The dimensions of vectors and matrices, "
-                   << arg1 << " and " << arg2 << " do not match.");
-
   protected:
                                     /**
                                      * Apply the inverses
index 296b30c9b9f7560336a66cbd796d4ac7df358128..032e381ec7dd527f32d4baa56745bf9a31a28567 100644 (file)
@@ -37,8 +37,8 @@ SparseVanka<number>::SparseVanka(const SparseMatrix<number> &M,
                n_threads (n_threads),
                inverses (M.m(), 0)
 {
-  Assert (M.m() == M.n(), ExcMatrixNotSquare ());
-  Assert (M.m() == selected.size(), ExcInvalidVectorSize(M.m(), selected.size()));
+  Assert (M.m() == M.n(), ExcNotQuadratic ());
+  Assert (M.m() == selected.size(), ExcDimensionMismatch(M.m(), selected.size()));
 
   if (conserve_mem == false)
     compute_inverses ();
@@ -211,9 +211,9 @@ SparseVanka<number>::apply_preconditioner (Vector<number2>         &dst,
                                           const std::vector<bool> *const dof_mask) const
 {
   Assert (dst.size() == src.size(),
-         ExcInvalidVectorSize(dst.size(), src.size()));
+         ExcDimensionMismatch(dst.size(), src.size()));
   Assert (dst.size() == matrix->m(),
-         ExcInvalidVectorSize(dst.size(), src.size()));
+         ExcDimensionMismatch(dst.size(), src.size()));
   
                                   // first define an alias to the sparsity
                                   // pattern of the matrix, since this
index 419e5ffe85c71d61bfaac275f93fc01c2f06bee2..d3552b6aac37c2a216457adbfb927034ac12622b 100644 (file)
@@ -153,11 +153,14 @@ namespace internals
                                           */
         void advance ();
 
+                                        /** @addtogroup Exceptions
+                                         * @{ */
+       
                                          /**
                                           * Exception
                                           */
         DeclException0 (ExcInvalidIterator);
-        
+                                        //@}        
       protected:
                                          /**
                                           * The sparsity pattern we operate on
@@ -1273,6 +1276,8 @@ class SparsityPattern : public Subscriptor
                                      */
     inline const unsigned int * get_column_numbers () const;
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
                                     /**
                                      * Exception
                                      */
@@ -1311,10 +1316,6 @@ class SparsityPattern : public Subscriptor
                                      * Exception
                                      */
     DeclException0 (ExcInvalidConstructorCall);
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcNotQuadratic);
                                     /**
                                      * This exception is thrown if
                                      * the matrix does not follow the
@@ -1350,6 +1351,7 @@ class SparsityPattern : public Subscriptor
                     int, int,
                     << "The array has size " << arg1 << " but should have size "
                     << arg2);
+                                    //@}
   private:
                                     /**
                                      * Maximum number of rows that can
index 06865ba8dcc940021d475cf735700527b9479dbc..ada5695993919678b4426e440545103c3dbcdf82 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1999, 2000, 2001, 2002, 2003 by the deal.II authors
+//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -231,6 +231,8 @@ class SwappableVector : public Vector<number>
                                      */
     unsigned int memory_consumption () const;
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
                                     /**
                                      * Exception.
                                      */ 
@@ -250,7 +252,7 @@ class SwappableVector : public Vector<number>
                                      * Exception.
                                      */ 
     DeclException0 (ExcInvalidCopyOperation);
-    
+                                    //@}
   private:
                                     /**
                                      * Name of the file to which data
index 194fcc5ae2f4f5cea0cdc2c492b25fc8b134ff64..9bd143ed07f733ea9178c4b709e951b9fb99d4ed 100644 (file)
@@ -710,11 +710,14 @@ class Vector
     unsigned int memory_consumption () const;
                                     //@}
 
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+
                                     /**
                                      * Exception
                                      */
     DeclException0 (ExcEmptyVector);
-
+                                    //@}
   protected:
 
                                     /**
index c97de70f487292f70c698a25c8fb16b30ff95b39..f72e77178282550aca351f3542625fadced630bc 100644 (file)
@@ -62,6 +62,10 @@ class VectorMemory : public Subscriptor
                                      * for later use.
                                      */
     virtual void free (const VECTOR * const) = 0;
+
+                                    /** @addtogroup Exceptions
+                                     * @{ */
+    
                                     /**
                                      * No more available vectors.
                                      */
@@ -71,6 +75,7 @@ class VectorMemory : public Subscriptor
                                      * this memory pool.
                                      */
     DeclException0(ExcNotAllocatedHere);
+                                    //@}
 };
 
 //! Sample implementation using system memory management.
index 806316172c0dd24032a9c667df34ee87178b3900..e3f1702241713cd5154d8ad695d90bc10d582b06 100644 (file)
@@ -128,8 +128,8 @@ bool
 CompressedSparsityPattern::exists (const unsigned int i,
                                   const unsigned int j) const
 {
-  Assert (i<rows, ExcInvalidIndex(i,rows));
-  Assert (j<cols, ExcInvalidIndex(j,cols));
+  Assert (i<rows, ExcIndexRange(i, 0, rows));
+  Assert (j<cols, ExcIndexRange(j, 0, cols));
 
   lines[i].flush_cache();
   return std::binary_search (lines[i].entries.begin(),
@@ -142,7 +142,7 @@ CompressedSparsityPattern::exists (const unsigned int i,
 void
 CompressedSparsityPattern::symmetrize ()
 {
-  Assert (rows==cols, ExcNotSquare());
+  Assert (rows==cols, ExcNotQuadratic());
 
                                   // loop over all elements presently
                                   // in the sparsity pattern and add
index 95d4344ef923b3158a474cf3b0fb5fa5d462f8a3..0397a1e84851c78aca5262fca68c5534b179f418 100644 (file)
@@ -197,7 +197,7 @@ namespace PETScWrappers
   PetscScalar
   MatrixBase::diag_element (const unsigned int i) const
   {
-    Assert (m() == n(), ExcMatrixNotSquare());
+    Assert (m() == n(), ExcNotQuadratic());
     
                                      // this doesn't seem to work any
                                      // different than any other element
index 0fd01bcdd857db2e72806b31f0a79f0fd3e7379c..f74c23b41fd4cfa52008d849fd76660f5128dfc6 100644 (file)
@@ -257,7 +257,7 @@ namespace PETScWrappers
     {
 //TODO[WB]: The next PETSc release should contain a function  MatMPI[B]AIJSetPreallocationCSR that we will want to use here. it may also be worthwhile to look at the functions MatPreallocateXXX in include/petscmat.h
       Assert (local_rows_per_process.size() == local_columns_per_process.size(),
-              ExcInvalidSizes (local_rows_per_process.size(),
+              ExcDimensionMismatch (local_rows_per_process.size(),
                                local_columns_per_process.size()));
       Assert (this_process < local_rows_per_process.size(),
               ExcInternalError());
index 1ddfb78601d178649b7f0254fd47c5499977b700..83a2ea5765bcf7f2ed62835469cff15d58af8bfa 100644 (file)
@@ -612,7 +612,7 @@ namespace PETScWrappers
                    const VectorBase     &v)
   {
     Assert (size() == v.size(),
-            ExcNonMatchingSizes (size(), v.size()));
+            ExcDimensionMismatch (size(), v.size()));
 
                                      // there is no simple operation for this
                                      // in PETSc. there are multiple ways to
@@ -632,7 +632,7 @@ namespace PETScWrappers
                    const VectorBase     &w)
   {
     Assert (size() == v.size(),
-            ExcNonMatchingSizes (size(), v.size()));
+            ExcDimensionMismatch (size(), v.size()));
 
                                      // there is no simple operation for this
                                      // in PETSc. there are multiple ways to
index fe616cbb72175933fc1bfec37aece8c4b1a6cf8a..46b0d5f4ccc40c2eb85b416a99de6128421232e9 100644 (file)
@@ -1648,7 +1648,7 @@ void
 SparseDirectUMFPACK::
 factorize (const SparseMatrix<double> &matrix)
 {
-  Assert (matrix.m() == matrix.n(), ExcMatrixNotSquare())
+  Assert (matrix.m() == matrix.n(), ExcNotQuadratic())
   
   clear ();
 

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.