From 7023946f368e71a20b503fc4df37ff8b59ebe973 Mon Sep 17 00:00:00 2001 From: guido Date: Thu, 16 Sep 2004 14:28:10 +0000 Subject: [PATCH] Documentation module Exceptions created and applied in base and lac git-svn-id: https://svn.dealii.org/trunk@9623 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/convergence_table.h | 6 +- deal.II/base/include/base/data_out_base.h | 20 ++-- deal.II/base/include/base/exceptions.h | 25 ++++ deal.II/base/include/base/function.h | 6 +- .../base/include/base/function_derivative.h | 7 +- deal.II/base/include/base/function_lib.h | 12 +- deal.II/base/include/base/logstream.h | 4 +- deal.II/base/include/base/parameter_handler.h | 15 ++- deal.II/base/include/base/point.h | 6 +- deal.II/base/include/base/polynomial.h | 7 +- deal.II/base/include/base/polynomial_space.h | 7 -- deal.II/base/include/base/quadrature.h | 6 +- .../base/include/base/quadrature_selector.h | 10 +- deal.II/base/include/base/subscriptor.h | 5 +- deal.II/base/include/base/table_handler.h | 7 +- deal.II/base/include/base/tensor_base.h | 4 + .../include/base/tensor_product_polynomials.h | 21 ---- deal.II/base/include/base/thread_management.h | 10 +- .../base/source/tensor_product_polynomials.cc | 2 +- .../deal.II/include/dofs/dof_constraints.h | 4 - .../include/dofs/dof_constraints.templates.h | 14 +-- .../deal.II/include/grid/grid_refinement.h | 7 -- deal.II/deal.II/include/numerics/matrices.h | 4 - .../deal.II/source/dofs/dof_constraints.cc | 18 +-- .../deal.II/source/grid/grid_refinement.cc | 6 +- deal.II/deal.II/source/numerics/data_out.cc | 2 +- .../numerics/matrices.all_dimensions.cc | 4 +- deal.II/doc/doxygen/options.dox.in | 2 +- deal.II/lac/include/lac/block_matrix_array.h | 6 +- deal.II/lac/include/lac/block_matrix_base.h | 32 ++---- deal.II/lac/include/lac/block_sparse_matrix.h | 10 +- .../lac/include/lac/block_sparsity_pattern.h | 10 +- deal.II/lac/include/lac/block_vector.h | 4 + deal.II/lac/include/lac/block_vector_base.h | 10 +- .../include/lac/compressed_sparsity_pattern.h | 22 +--- deal.II/lac/include/lac/exceptions.h | 48 ++++++++ deal.II/lac/include/lac/full_matrix.h | 20 ++-- .../lac/include/lac/full_matrix.templates.h | 5 +- .../include/lac/petsc_block_sparse_matrix.h | 6 + deal.II/lac/include/lac/petsc_block_vector.h | 8 +- deal.II/lac/include/lac/petsc_full_matrix.h | 2 +- deal.II/lac/include/lac/petsc_matrix_base.h | 13 +-- .../lac/petsc_parallel_block_sparse_matrix.h | 1 + .../include/lac/petsc_parallel_block_vector.h | 2 +- .../lac/petsc_parallel_sparse_matrix.h | 13 +-- .../lac/include/lac/petsc_parallel_vector.h | 4 +- deal.II/lac/include/lac/petsc_precondition.h | 9 +- deal.II/lac/include/lac/petsc_solver.h | 2 +- deal.II/lac/include/lac/petsc_sparse_matrix.h | 2 +- deal.II/lac/include/lac/petsc_vector.h | 2 +- deal.II/lac/include/lac/petsc_vector_base.h | 17 +-- deal.II/lac/include/lac/precondition_block.h | 14 +-- .../lac/precondition_block.templates.h | 4 +- .../lac/include/lac/precondition_selector.h | 8 +- deal.II/lac/include/lac/solver_minres.h | 5 +- .../lac/include/lac/sparse_decomposition.h | 11 +- deal.II/lac/include/lac/sparse_direct.h | 14 ++- deal.II/lac/include/lac/sparse_ilu.h | 19 +-- .../lac/include/lac/sparse_ilu.templates.h | 12 +- deal.II/lac/include/lac/sparse_matrix.h | 51 ++++----- .../lac/include/lac/sparse_matrix.templates.h | 108 +++++++++--------- deal.II/lac/include/lac/sparse_matrix_ez.h | 12 +- .../include/lac/sparse_matrix_ez.templates.h | 8 +- deal.II/lac/include/lac/sparse_mic.h | 17 +-- .../lac/include/lac/sparse_mic.templates.h | 12 +- deal.II/lac/include/lac/sparse_vanka.h | 14 +-- .../lac/include/lac/sparse_vanka.templates.h | 8 +- deal.II/lac/include/lac/sparsity_pattern.h | 12 +- deal.II/lac/include/lac/swappable_vector.h | 6 +- deal.II/lac/include/lac/vector.h | 5 +- deal.II/lac/include/lac/vector_memory.h | 5 + .../lac/source/compressed_sparsity_pattern.cc | 6 +- deal.II/lac/source/petsc_matrix_base.cc | 2 +- .../source/petsc_parallel_sparse_matrix.cc | 2 +- deal.II/lac/source/petsc_vector_base.cc | 4 +- deal.II/lac/source/sparse_direct.cc | 2 +- 76 files changed, 429 insertions(+), 421 deletions(-) create mode 100644 deal.II/lac/include/lac/exceptions.h diff --git a/deal.II/base/include/base/convergence_table.h b/deal.II/base/include/base/convergence_table.h index d743955331..47f7cc07d3 100644 --- a/deal.II/base/include/base/convergence_table.h +++ b/deal.II/base/include/base/convergence_table.h @@ -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."); + //@} }; diff --git a/deal.II/base/include/base/data_out_base.h b/deal.II/base/include/base/data_out_base.h index a83acc95ab..5bcafb71c2 100644 --- a/deal.II/base/include/base/data_out_base.h +++ b/deal.II/base/include/base/data_out_base.h @@ -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 diff --git a/deal.II/base/include/base/exceptions.h b/deal.II/base/include/base/exceptions.h index b01cf5d72e..1b3f06c9de 100644 --- a/deal.II/base/include/base/exceptions.h +++ b/deal.II/base/include/base/exceptions.h @@ -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); + //@} } diff --git a/deal.II/base/include/base/function.h b/deal.II/base/include/base/function.h index bbddaaeb89..2e99dec27e 100644 --- a/deal.II/base/include/base/function.h +++ b/deal.II/base/include/base/function.h @@ -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); + //@} }; diff --git a/deal.II/base/include/base/function_derivative.h b/deal.II/base/include/base/function_derivative.h index be5ca3b36a..bd1bb05198 100644 --- a/deal.II/base/include/base/function_derivative.h +++ b/deal.II/base/include/base/function_derivative.h @@ -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 * value. */ unsigned int memory_consumption () const; + + /** @addtogroup Exceptions + * @{ */ /** * Exception. */ DeclException0(ExcInvalidFormula); - + //@} private: /** * Function for differentiation. diff --git a/deal.II/base/include/base/function_lib.h b/deal.II/base/include/base/function_lib.h index ea5bc65697..98176eeb1a 100644 --- a/deal.II/base/include/base/function_lib.h +++ b/deal.II/base/include/base/function_lib.h @@ -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 &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 &p, const unsigned int component = 0) const; + /** @addtogroup Exceptions + * @{ */ + /** * Exception */ DeclException0 (ExcInvalidArraySize); - + //@} private: /** * Stored Fourier coefficients diff --git a/deal.II/base/include/base/logstream.h b/deal.II/base/include/base/logstream.h index ac60e3ced0..2e3da85f6b 100644 --- a/deal.II/base/include/base/logstream.h +++ b/deal.II/base/include/base/logstream.h @@ -238,9 +238,9 @@ class LogStream unsigned int memory_consumption () const; /** - * Exception + * Exception. */ - DeclException0 (ExcNoFileStreamGiven); + DeclException0(ExcNoFileStreamGiven); private: diff --git a/deal.II/base/include/base/parameter_handler.h b/deal.II/base/include/base/parameter_handler.h index c179b0cc42..f8bfff284e 100644 --- a/deal.II/base/include/base/parameter_handler.h +++ b/deal.II/base/include/base/parameter_handler.h @@ -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: diff --git a/deal.II/base/include/base/point.h b/deal.II/base/include/base/point.h index 5f44f0297e..dba7de6ded 100644 --- a/deal.II/base/include/base/point.h +++ b/deal.II/base/include/base/point.h @@ -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 &p) const; + /** @addtogroup Exceptions + * @{ */ /** * Exception @@ -171,6 +173,8 @@ class Point : public Tensor<1,dim> * Exception */ DeclException0 (ExcInvalidConstructorCalled); + //@} + }; /*------------------------------- Inline functions: Point ---------------------------*/ diff --git a/deal.II/base/include/base/polynomial.h b/deal.II/base/include/base/polynomial.h index 8898d898ce..fad282ff18 100644 --- a/deal.II/base/include/base/polynomial.h +++ b/deal.II/base/include/base/polynomial.h @@ -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: /** diff --git a/deal.II/base/include/base/polynomial_space.h b/deal.II/base/include/base/polynomial_space.h index 1765c19a81..522d8ffda2 100644 --- a/deal.II/base/include/base/polynomial_space.h +++ b/deal.II/base/include/base/polynomial_space.h @@ -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: /** diff --git a/deal.II/base/include/base/quadrature.h b/deal.II/base/include/base/quadrature.h index b01f35ae9a..6c238abe25 100644 --- a/deal.II/base/include/base/quadrature.h +++ b/deal.II/base/include/base/quadrature.h @@ -240,6 +240,10 @@ class QIterated : public Quadrature QIterated (const Quadrature<1> &base_quadrature, const unsigned int n_copies); + /** @addtogroup Exceptions + * @{ */ + + /** * Exception */ @@ -255,7 +259,7 @@ class QIterated : public Quadrature int, << "The numbers of copies (" << arg1 << ") of the quadrature formula is not valid."); - + //@} private: /** * Check whether the given diff --git a/deal.II/base/include/base/quadrature_selector.h b/deal.II/base/include/base/quadrature_selector.h index dd94a8c280..7778980c68 100644 --- a/deal.II/base/include/base/quadrature_selector.h +++ b/deal.II/base/include/base/quadrature_selector.h @@ -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 * details). */ static std::string get_quadrature_names(); - + + /** @addtogroup Exceptions + * @{ */ + + /** * Exception */ @@ -82,7 +86,7 @@ class QuadratureSelector : public Quadrature std::string, << arg1 << " is not a valid quadrature name for a quadrature rule"); - + //@} private: /** * This static function creates a diff --git a/deal.II/base/include/base/subscriptor.h b/deal.II/base/include/base/subscriptor.h index 41abc4a73a..003ad32c78 100644 --- a/deal.II/base/include/base/subscriptor.h +++ b/deal.II/base/include/base/subscriptor.h @@ -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 unsubscribe is called. */ DeclException0(ExcNotUsed); - + //@} private: /** diff --git a/deal.II/base/include/base/table_handler.h b/deal.II/base/include/base/table_handler.h index 42e3ae616c..cb114ef3f1 100644 --- a/deal.II/base/include/base/table_handler.h +++ b/deal.II/base/include/base/table_handler.h @@ -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: /** diff --git a/deal.II/base/include/base/tensor_base.h b/deal.II/base/include/base/tensor_base.h index ddb91e092b..7e04a5cf6b 100644 --- a/deal.II/base/include/base/tensor_base.h +++ b/deal.II/base/include/base/tensor_base.h @@ -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 diff --git a/deal.II/base/include/base/tensor_product_polynomials.h b/deal.II/base/include/base/tensor_product_polynomials.h index 974a726e56..ae7d4b3f73 100644 --- a/deal.II/base/include/base/tensor_product_polynomials.h +++ b/deal.II/base/include/base/tensor_product_polynomials.h @@ -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 pols of diff --git a/deal.II/base/include/base/thread_management.h b/deal.II/base/include/base/thread_management.h index 13c33cd670..be3b8b2c12 100644 --- a/deal.II/base/include/base/thread_management.h +++ b/deal.II/base/include/base/thread_management.h @@ -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 diff --git a/deal.II/base/source/tensor_product_polynomials.cc b/deal.II/base/source/tensor_product_polynomials.cc index 649701542c..6c2ed5da7c 100644 --- a/deal.II/base/source/tensor_product_polynomials.cc +++ b/deal.II/base/source/tensor_product_polynomials.cc @@ -288,7 +288,7 @@ AnisotropicPolynomials(const std::vector 0, ExcMessage ("The number of polynomials must be larger than zero " diff --git a/deal.II/deal.II/include/dofs/dof_constraints.h b/deal.II/deal.II/include/dofs/dof_constraints.h index 0b237a7f06..8e46abc763 100644 --- a/deal.II/deal.II/include/dofs/dof_constraints.h +++ b/deal.II/deal.II/include/dofs/dof_constraints.h @@ -783,10 +783,6 @@ class ConstraintMatrix : public Subscriptor /** * Exception */ - DeclException0 (ExcMatrixNotSquare); - /** - * Exception - */ DeclException0 (ExcWrongDimension); /** * Exception diff --git a/deal.II/deal.II/include/dofs/dof_constraints.templates.h b/deal.II/deal.II/include/dofs/dof_constraints.templates.h index feb6b71efe..6851ded0b6 100644 --- a/deal.II/deal.II/include/dofs/dof_constraints.templates.h +++ b/deal.II/deal.II/include/dofs/dof_constraints.templates.h @@ -37,9 +37,9 @@ ConstraintMatrix::condense (const SparseMatrix &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 &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) 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 &tria, const Vector &criteria); - /** - * Exception - */ - DeclException2 (ExcInvalidVectorSize, - int, int, - << "The given vector has " << arg1 - << " elements, but " << arg2 << " were expected."); /** * Exception */ diff --git a/deal.II/deal.II/include/numerics/matrices.h b/deal.II/deal.II/include/numerics/matrices.h index b484fb4098..247db78250 100644 --- a/deal.II/deal.II/include/numerics/matrices.h +++ b/deal.II/deal.II/include/numerics/matrices.h @@ -866,10 +866,6 @@ class MatrixTools : public MatrixCreator Vector &local_rhs, const bool eliminate_columns); - /** - * Exception - */ - DeclException0 (ExcMatrixNotBlockSquare); /** * Exception */ diff --git a/deal.II/deal.II/source/dofs/dof_constraints.cc b/deal.II/deal.II/source/dofs/dof_constraints.cc index 47a861a5d9..d35ca48ff7 100644 --- a/deal.II/deal.II/source/dofs/dof_constraints.cc +++ b/deal.II/deal.II/source/dofs/dof_constraints.cc @@ -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(); diff --git a/deal.II/deal.II/source/grid/grid_refinement.cc b/deal.II/deal.II/source/grid/grid_refinement.cc index e3a0b37252..1d04476c82 100644 --- a/deal.II/deal.II/source/grid/grid_refinement.cc +++ b/deal.II/deal.II/source/grid/grid_refinement.cc @@ -124,7 +124,7 @@ void GridRefinement::refine (Triangulation &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 &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::active_cell_iterator cell = tria.begin_active(); @@ -309,7 +309,7 @@ GridRefinement::refine_and_coarsen_optimize (Triangulation &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 diff --git a/deal.II/deal.II/source/numerics/data_out.cc b/deal.II/deal.II/source/numerics/data_out.cc index 6f39903eb3..2df2e5d2b9 100644 --- a/deal.II/deal.II/source/numerics/data_out.cc +++ b/deal.II/deal.II/source/numerics/data_out.cc @@ -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())); diff --git a/deal.II/deal.II/source/numerics/matrices.all_dimensions.cc b/deal.II/deal.II/source/numerics/matrices.all_dimensions.cc index 282428e736..34611c424e 100644 --- a/deal.II/deal.II/source/numerics/matrices.all_dimensions.cc +++ b/deal.II/deal.II/source/numerics/matrices.all_dimensions.cc @@ -209,10 +209,10 @@ MatrixTools::apply_boundary_values (const std::map &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 ()); diff --git a/deal.II/doc/doxygen/options.dox.in b/deal.II/doc/doxygen/options.dox.in index 9c590e2d9b..c99a3a7832 100644 --- a/deal.II/doc/doxygen/options.dox.in +++ b/deal.II/doc/doxygen/options.dox.in @@ -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. diff --git a/deal.II/lac/include/lac/block_matrix_array.h b/deal.II/lac/include/lac/block_matrix_array.h index 7668069b8f..b44ec2fea5 100644 --- a/deal.II/lac/include/lac/block_matrix_array.h +++ b/deal.II/lac/include/lac/block_matrix_array.h @@ -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 BlockMatrixArray::Subscriptor::subscribe; BlockMatrixArray::Subscriptor::unsubscribe; + /** @addtogroup Exceptions + * @{ */ /** * Multiple diagonal element. @@ -311,7 +313,7 @@ class BlockTrianglePrecondition : private BlockMatrixArray unsigned int, << "Inverse diagonal entries may not be added in block " << arg1); - + //@} private: /** * Add all off-diagonal diff --git a/deal.II/lac/include/lac/block_matrix_base.h b/deal.II/lac/include/lac/block_matrix_base.h index 995131ccb7..aaf6d2645f 100644 --- a/deal.II/lac/include/lac/block_matrix_base.h +++ b/deal.II/lac/include/lac/block_matrix_base.h @@ -18,6 +18,7 @@ #include #include #include +#include #include @@ -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::value_type BlockMatrixBase::diag_element (const unsigned int i) const { Assert (n_block_rows() == n_block_cols(), - ExcMatrixNotBlockSquare()); + ExcNotQuadratic()); const std::pair index = row_block_indices.global_to_local (i); @@ -1428,8 +1417,8 @@ inline BlockMatrixBase & BlockMatrixBase::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 & BlockMatrixBase::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 typename BlockMatrixBase::value_type BlockMatrixBase::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())); diff --git a/deal.II/lac/include/lac/block_sparse_matrix.h b/deal.II/lac/include/lac/block_sparse_matrix.h index 0f6fa0b19a..faf32258b8 100644 --- a/deal.II/lac/include/lac/block_sparse_matrix.h +++ b/deal.II/lac/include/lac/block_sparse_matrix.h @@ -20,6 +20,8 @@ #include #include #include +#include + #include @@ -400,11 +402,14 @@ class BlockSparseMatrix : public BlockMatrixBase > */ 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(), diff --git a/deal.II/lac/include/lac/block_sparsity_pattern.h b/deal.II/lac/include/lac/block_sparsity_pattern.h index c584da7f48..4b0d308aee 100644 --- a/deal.II/lac/include/lac/block_sparsity_pattern.h +++ b/deal.II/lac/include/lac/block_sparsity_pattern.h @@ -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: diff --git a/deal.II/lac/include/lac/block_vector.h b/deal.II/lac/include/lac/block_vector.h index 1b6646dd4b..96d95005e4 100644 --- a/deal.II/lac/include/lac/block_vector.h +++ b/deal.II/lac/include/lac/block_vector.h @@ -364,10 +364,14 @@ class BlockVector : public BlockVectorBase > */ unsigned int memory_consumption () const; + /** @addtogroup Exceptions + * @{ */ + /** * Exception */ DeclException0 (ExcIteratorRangeDoesNotMatchVectorSize); + //@} }; /*@}*/ diff --git a/deal.II/lac/include/lac/block_vector_base.h b/deal.II/lac/include/lac/block_vector_base.h index c0bd155af4..5ac797a48d 100644 --- a/deal.II/lac/include/lac/block_vector_base.h +++ b/deal.II/lac/include/lac/block_vector_base.h @@ -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. diff --git a/deal.II/lac/include/lac/compressed_sparsity_pattern.h b/deal.II/lac/include/lac/compressed_sparsity_pattern.h index 67e8df9e43..821af834b3 100644 --- a/deal.II/lac/include/lac/compressed_sparsity_pattern.h +++ b/deal.II/lac/include/lac/compressed_sparsity_pattern.h @@ -15,8 +15,8 @@ #include -#include #include +#include template 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 + +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 diff --git a/deal.II/lac/include/lac/full_matrix.h b/deal.II/lac/include/lac/full_matrix.h index 8638e83b76..89bb1adf03 100644 --- a/deal.II/lac/include/lac/full_matrix.h +++ b/deal.II/lac/include/lac/full_matrix.h @@ -17,8 +17,8 @@ /*---------------------------- fullmatrix.h ---------------------------*/ #include -#include #include +#include #include @@ -968,14 +968,14 @@ class FullMatrix : public Table<2,number> Vector &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; }; diff --git a/deal.II/lac/include/lac/full_matrix.templates.h b/deal.II/lac/include/lac/full_matrix.templates.h index 6244b79fe5..253207fb81 100644 --- a/deal.II/lac/include/lac/full_matrix.templates.h +++ b/deal.II/lac/include/lac/full_matrix.templates.h @@ -1184,7 +1184,7 @@ FullMatrix::Tadd (const number s, const FullMatrix& src) val[63] += s * srcval[63]; } else - Assert (false, ExcNotImplemented(n())); + Assert (false, ExcNotImplemented()); } @@ -1228,8 +1228,7 @@ FullMatrix::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; }; } diff --git a/deal.II/lac/include/lac/petsc_block_sparse_matrix.h b/deal.II/lac/include/lac/petsc_block_sparse_matrix.h index d12c1d5b0c..6eb486aaff 100644 --- a/deal.II/lac/include/lac/petsc_block_sparse_matrix.h +++ b/deal.II/lac/include/lac/petsc_block_sparse_matrix.h @@ -19,6 +19,8 @@ #include #include #include +#include + #include @@ -264,6 +266,9 @@ namespace PETScWrappers */ using BlockMatrixBase::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."); + //@} }; diff --git a/deal.II/lac/include/lac/petsc_block_vector.h b/deal.II/lac/include/lac/petsc_block_vector.h index 9c921609a8..4588a1ea69 100644 --- a/deal.II/lac/include/lac/petsc_block_vector.h +++ b/deal.II/lac/include/lac/petsc_block_vector.h @@ -15,11 +15,11 @@ #include -#include #include #include #include #include +#include #ifdef DEAL_II_USE_PETSC @@ -286,11 +286,15 @@ namespace PETScWrappers * to standard functions. */ void swap (BlockVector &v); - + + /** @addtogroup Exceptions + * @{ */ + /** * Exception */ DeclException0 (ExcIteratorRangeDoesNotMatchVectorSize); + //@} }; /*@}*/ diff --git a/deal.II/lac/include/lac/petsc_full_matrix.h b/deal.II/lac/include/lac/petsc_full_matrix.h index 7f4344ba74..5c534bb4ff 100644 --- a/deal.II/lac/include/lac/petsc_full_matrix.h +++ b/deal.II/lac/include/lac/petsc_full_matrix.h @@ -15,7 +15,7 @@ #include -#include +#include #ifdef DEAL_II_USE_PETSC diff --git a/deal.II/lac/include/lac/petsc_matrix_base.h b/deal.II/lac/include/lac/petsc_matrix_base.h index 76e9c95166..b048daf1ca 100644 --- a/deal.II/lac/include/lac/petsc_matrix_base.h +++ b/deal.II/lac/include/lac/petsc_matrix_base.h @@ -15,8 +15,8 @@ #include -#include #include +#include #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: /** diff --git a/deal.II/lac/include/lac/petsc_parallel_block_sparse_matrix.h b/deal.II/lac/include/lac/petsc_parallel_block_sparse_matrix.h index 4cea47c377..4758a7240a 100644 --- a/deal.II/lac/include/lac/petsc_parallel_block_sparse_matrix.h +++ b/deal.II/lac/include/lac/petsc_parallel_block_sparse_matrix.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #ifdef DEAL_II_USE_PETSC diff --git a/deal.II/lac/include/lac/petsc_parallel_block_vector.h b/deal.II/lac/include/lac/petsc_parallel_block_vector.h index 84834506b2..9c5b5e9691 100644 --- a/deal.II/lac/include/lac/petsc_parallel_block_vector.h +++ b/deal.II/lac/include/lac/petsc_parallel_block_vector.h @@ -15,10 +15,10 @@ #include -#include #include #include #include +#include #ifdef DEAL_II_USE_PETSC diff --git a/deal.II/lac/include/lac/petsc_parallel_sparse_matrix.h b/deal.II/lac/include/lac/petsc_parallel_sparse_matrix.h index 38c49463cf..33187c78b7 100644 --- a/deal.II/lac/include/lac/petsc_parallel_sparse_matrix.h +++ b/deal.II/lac/include/lac/petsc_parallel_sparse_matrix.h @@ -15,7 +15,7 @@ #include -#include +#include #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: /** diff --git a/deal.II/lac/include/lac/petsc_parallel_vector.h b/deal.II/lac/include/lac/petsc_parallel_vector.h index 4905fcf282..42ea2b1330 100644 --- a/deal.II/lac/include/lac/petsc_parallel_vector.h +++ b/deal.II/lac/include/lac/petsc_parallel_vector.h @@ -14,8 +14,8 @@ #define __deal2__petsc_parallel_vector_h #include -#include #include +#include #include @@ -438,7 +438,7 @@ namespace PETScWrappers Vector::operator = (const ::Vector &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 diff --git a/deal.II/lac/include/lac/petsc_precondition.h b/deal.II/lac/include/lac/petsc_precondition.h index 24a41a32db..d725c65313 100644 --- a/deal.II/lac/include/lac/petsc_precondition.h +++ b/deal.II/lac/include/lac/petsc_precondition.h @@ -14,7 +14,7 @@ #define __deal2__petsc_precondition_h #include -#include +#include #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: /** diff --git a/deal.II/lac/include/lac/petsc_solver.h b/deal.II/lac/include/lac/petsc_solver.h index f59d4857f0..31230732db 100644 --- a/deal.II/lac/include/lac/petsc_solver.h +++ b/deal.II/lac/include/lac/petsc_solver.h @@ -14,7 +14,7 @@ #define __deal2__petsc_solver_h #include -#include +#include #include #ifdef DEAL_II_USE_PETSC diff --git a/deal.II/lac/include/lac/petsc_sparse_matrix.h b/deal.II/lac/include/lac/petsc_sparse_matrix.h index 6b54011476..45ce728f06 100644 --- a/deal.II/lac/include/lac/petsc_sparse_matrix.h +++ b/deal.II/lac/include/lac/petsc_sparse_matrix.h @@ -15,7 +15,7 @@ #include -#include +#include #ifdef DEAL_II_USE_PETSC diff --git a/deal.II/lac/include/lac/petsc_vector.h b/deal.II/lac/include/lac/petsc_vector.h index e4d1ede1ba..8870305da8 100644 --- a/deal.II/lac/include/lac/petsc_vector.h +++ b/deal.II/lac/include/lac/petsc_vector.h @@ -14,8 +14,8 @@ #define __deal2__petsc_vector_h #include -#include #include +#include #include diff --git a/deal.II/lac/include/lac/petsc_vector_base.h b/deal.II/lac/include/lac/petsc_vector_base.h index eb638d1e02..751efd0ca4 100644 --- a/deal.II/lac/include/lac/petsc_vector_base.h +++ b/deal.II/lac/include/lac/petsc_vector_base.h @@ -15,8 +15,8 @@ #include -#include #include +#include #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 diff --git a/deal.II/lac/include/lac/precondition_block.h b/deal.II/lac/include/lac/precondition_block.h index 7a5b84bfb4..42d50eab96 100644 --- a/deal.II/lac/include/lac/precondition_block.h +++ b/deal.II/lac/include/lac/precondition_block.h @@ -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. diff --git a/deal.II/lac/include/lac/precondition_block.templates.h b/deal.II/lac/include/lac/precondition_block.templates.h index 71cb0c0c50..2dd1bd3c08 100644 --- a/deal.II/lac/include/lac/precondition_block.templates.h +++ b/deal.II/lac/include/lac/precondition_block.templates.h @@ -63,7 +63,7 @@ void PreconditionBlock::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::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())); diff --git a/deal.II/lac/include/lac/precondition_selector.h b/deal.II/lac/include/lac/precondition_selector.h index b158b3dcc3..e1a442416c 100644 --- a/deal.II/lac/include/lac/precondition_selector.h +++ b/deal.II/lac/include/lac/precondition_selector.h @@ -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: /** diff --git a/deal.II/lac/include/lac/solver_minres.h b/deal.II/lac/include/lac/solver_minres.h index fe4a7bbbce..9abdff0bf4 100644 --- a/deal.II/lac/include/lac/solver_minres.h +++ b/deal.II/lac/include/lac/solver_minres.h @@ -91,11 +91,14 @@ class SolverMinRes : public Solver const VECTOR &b, const PRECONDITIONER &precondition); + /** @addtogroup Exceptions + * @{ */ + /** * Exception */ DeclException0 (ExcPreconditionerNotDefinite); - + //@} protected: /** diff --git a/deal.II/lac/include/lac/sparse_decomposition.h b/deal.II/lac/include/lac/sparse_decomposition.h index 3351ca160e..ce6fec5f0d 100644 --- a/deal.II/lac/include/lac/sparse_decomposition.h +++ b/deal.II/lac/include/lac/sparse_decomposition.h @@ -323,6 +323,9 @@ class SparseLUDecomposition : protected SparseMatrix, */ virtual unsigned int memory_consumption () const; + /** @addtogroup Exceptions + * @{ */ + /** * Exception */ @@ -330,13 +333,7 @@ class SparseLUDecomposition : protected SparseMatrix, 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 diff --git a/deal.II/lac/include/lac/sparse_direct.h b/deal.II/lac/include/lac/sparse_direct.h index 98e983f807..3fc0b2b596 100644 --- a/deal.II/lac/include/lac/sparse_direct.h +++ b/deal.II/lac/include/lac/sparse_direct.h @@ -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 &matrix, Vector &rhs_and_solution); - /** - * Exception - */ - DeclException0 (ExcMatrixNotSquare); /** * Exception */ diff --git a/deal.II/lac/include/lac/sparse_ilu.h b/deal.II/lac/include/lac/sparse_ilu.h index b120ee20f4..0d3da2b1d4 100644 --- a/deal.II/lac/include/lac/sparse_ilu.h +++ b/deal.II/lac/include/lac/sparse_ilu.h @@ -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 #include #include - +#include /*! @addtogroup Preconditioners *@{ @@ -172,17 +172,9 @@ class SparseILU : public SparseLUDecomposition */ 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 double, << "The strengthening parameter " << arg1 << " is not greater or equal than zero!"); + //@} }; /*@}*/ diff --git a/deal.II/lac/include/lac/sparse_ilu.templates.h b/deal.II/lac/include/lac/sparse_ilu.templates.h index 15ac84c3f7..55a5bed88d 100644 --- a/deal.II/lac/include/lac/sparse_ilu.templates.h +++ b/deal.II/lac/include/lac/sparse_ilu.templates.h @@ -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::decompose (const SparseMatrix &matrix, const double strengthen_diagonal) { SparseLUDecomposition::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::vmult (Vector &dst, { SparseLUDecomposition::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 diff --git a/deal.II/lac/include/lac/sparse_matrix.h b/deal.II/lac/include/lac/sparse_matrix.h index 578f0253be..f2a83f5d25 100644 --- a/deal.II/lac/include/lac/sparse_matrix.h +++ b/deal.II/lac/include/lac/sparse_matrix.h @@ -15,10 +15,10 @@ #include -#include #include #include #include +#include template class Vector; template 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 inline unsigned int SparseMatrix::m () const { - Assert (cols != 0, ExcMatrixNotInitialized()); + Assert (cols != 0, ExcNotInitialized()); return cols->rows; } @@ -1675,7 +1666,7 @@ template inline unsigned int SparseMatrix::n () const { - Assert (cols != 0, ExcMatrixNotInitialized()); + Assert (cols != 0, ExcNotInitialized()); return cols->cols; } @@ -1686,7 +1677,7 @@ void SparseMatrix::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::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 & SparseMatrix::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 & SparseMatrix::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::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::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 inline number SparseMatrix::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 inline number & SparseMatrix::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 inline number SparseMatrix::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 inline number & SparseMatrix::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())); diff --git a/deal.II/lac/include/lac/sparse_matrix.templates.h b/deal.II/lac/include/lac/sparse_matrix.templates.h index b732c9dc7a..e7a739a606 100644 --- a/deal.II/lac/include/lac/sparse_matrix.templates.h +++ b/deal.II/lac/include/lac/sparse_matrix.templates.h @@ -108,7 +108,7 @@ SparseMatrix::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 unsigned int SparseMatrix::n_nonzero_elements () const { - Assert (cols != 0, ExcMatrixNotInitialized()); + Assert (cols != 0, ExcNotInitialized()); return cols->n_nonzero_elements (); } @@ -187,7 +187,7 @@ template unsigned int SparseMatrix::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(), 0)); } @@ -198,8 +198,8 @@ template void SparseMatrix::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 SparseMatrix & SparseMatrix::copy_from (const SparseMatrix &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::add_scaled (const number factor, const SparseMatrix &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::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::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::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::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 somenumber SparseMatrix::matrix_norm_square (const Vector& 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::matrix_scalar_product (const Vector& u, const Vector& 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 &u, template number SparseMatrix::l1_norm () const { - Assert (cols != 0, ExcMatrixNotInitialized()); - Assert (val != 0, ExcMatrixNotInitialized()); + Assert (cols != 0, ExcNotInitialized()); + Assert (val != 0, ExcNotInitialized()); Vector column_sums(n()); const unsigned int n_rows = m(); @@ -708,8 +708,8 @@ number SparseMatrix::l1_norm () const template number SparseMatrix::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::residual (Vector &dst, const Vector &u, const Vector &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::precondition_Jacobi (Vector &dst, const Vector &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::precondition_SSOR (Vector &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::precondition_SOR (Vector& dst, const Vector& 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::precondition_TSOR (Vector& dst, const Vector& 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::SOR (Vector& 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::TSOR (Vector& 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::PSOR (Vector& dst, const std::vector& 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::TPSOR (Vector& dst, const std::vector& 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::SOR_step (Vector &v, const Vector &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::TSOR_step (Vector &v, const Vector &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::SSOR (Vector& 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 const SparsityPattern & SparseMatrix::get_sparsity_pattern () const { - Assert (cols != 0, ExcMatrixNotInitialized()); + Assert (cols != 0, ExcNotInitialized()); return *cols; } @@ -1275,8 +1275,8 @@ SparseMatrix::get_sparsity_pattern () const template void SparseMatrix::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; irows; ++i) for (unsigned int j=cols->rowstart[i]; jrowstart[i+1]; ++j) @@ -1294,8 +1294,8 @@ void SparseMatrix::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_; diff --git a/deal.II/lac/include/lac/sparse_matrix_ez.h b/deal.II/lac/include/lac/sparse_matrix_ez.h index b7b306ada8..a3497ca429 100644 --- a/deal.II/lac/include/lac/sparse_matrix_ez.h +++ b/deal.II/lac/include/lac/sparse_matrix_ez.h @@ -15,9 +15,9 @@ #include -#include #include #include +#include #include @@ -978,13 +978,10 @@ class SparseMatrixEZ : public Subscriptor std::vector& 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 diff --git a/deal.II/lac/include/lac/sparse_matrix_ez.templates.h b/deal.II/lac/include/lac/sparse_matrix_ez.templates.h index 8fbedad977..253ec934f8 100644 --- a/deal.II/lac/include/lac/sparse_matrix_ez.templates.h +++ b/deal.II/lac/include/lac/sparse_matrix_ez.templates.h @@ -238,7 +238,7 @@ SparseMatrixEZ::precondition_Jacobi (Vector &dst, const Vector &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::precondition_SOR (Vector &dst, const Vector &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::precondition_TSOR (Vector &dst, const Vector &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::precondition_SSOR (Vector &dst, const Vector &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())); diff --git a/deal.II/lac/include/lac/sparse_mic.h b/deal.II/lac/include/lac/sparse_mic.h index bbe5ffc26e..1b0711d6cf 100644 --- a/deal.II/lac/include/lac/sparse_mic.h +++ b/deal.II/lac/include/lac/sparse_mic.h @@ -122,10 +122,9 @@ class SparseMIC : public SparseLUDecomposition */ unsigned int memory_consumption () const; - /** - * Exception - */ - DeclException0 (ExcMatrixNotSquare); + /** @addtogroup Exceptions + * @{ */ + /** * Exception */ @@ -133,13 +132,6 @@ class SparseMIC : public SparseLUDecomposition /** * 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 DeclException2(ExcDecompositionNotStable, int, double, << "The diagonal element (" <::decompose (const SparseMatrix &matrix, SparseLUDecomposition::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 inline number SparseMIC::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::vmult (Vector &dst, const Vector &src) const { SparseLUDecomposition::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(); diff --git a/deal.II/lac/include/lac/sparse_vanka.h b/deal.II/lac/include/lac/sparse_vanka.h index 2cb07593de..db227ea421 100644 --- a/deal.II/lac/include/lac/sparse_vanka.h +++ b/deal.II/lac/include/lac/sparse_vanka.h @@ -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 &dst, const Vector &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 diff --git a/deal.II/lac/include/lac/sparse_vanka.templates.h b/deal.II/lac/include/lac/sparse_vanka.templates.h index 296b30c9b9..032e381ec7 100644 --- a/deal.II/lac/include/lac/sparse_vanka.templates.h +++ b/deal.II/lac/include/lac/sparse_vanka.templates.h @@ -37,8 +37,8 @@ SparseVanka::SparseVanka(const SparseMatrix &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::apply_preconditioner (Vector &dst, const std::vector *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 diff --git a/deal.II/lac/include/lac/sparsity_pattern.h b/deal.II/lac/include/lac/sparsity_pattern.h index 419e5ffe85..d3552b6aac 100644 --- a/deal.II/lac/include/lac/sparsity_pattern.h +++ b/deal.II/lac/include/lac/sparsity_pattern.h @@ -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 diff --git a/deal.II/lac/include/lac/swappable_vector.h b/deal.II/lac/include/lac/swappable_vector.h index 06865ba8dc..ada5695993 100644 --- a/deal.II/lac/include/lac/swappable_vector.h +++ b/deal.II/lac/include/lac/swappable_vector.h @@ -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 */ unsigned int memory_consumption () const; + /** @addtogroup Exceptions + * @{ */ /** * Exception. */ @@ -250,7 +252,7 @@ class SwappableVector : public Vector * Exception. */ DeclException0 (ExcInvalidCopyOperation); - + //@} private: /** * Name of the file to which data diff --git a/deal.II/lac/include/lac/vector.h b/deal.II/lac/include/lac/vector.h index 194fcc5ae2..9bd143ed07 100644 --- a/deal.II/lac/include/lac/vector.h +++ b/deal.II/lac/include/lac/vector.h @@ -710,11 +710,14 @@ class Vector unsigned int memory_consumption () const; //@} + /** @addtogroup Exceptions + * @{ */ + /** * Exception */ DeclException0 (ExcEmptyVector); - + //@} protected: /** diff --git a/deal.II/lac/include/lac/vector_memory.h b/deal.II/lac/include/lac/vector_memory.h index c97de70f48..f72e771782 100644 --- a/deal.II/lac/include/lac/vector_memory.h +++ b/deal.II/lac/include/lac/vector_memory.h @@ -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. diff --git a/deal.II/lac/source/compressed_sparsity_pattern.cc b/deal.II/lac/source/compressed_sparsity_pattern.cc index 806316172c..e3f1702241 100644 --- a/deal.II/lac/source/compressed_sparsity_pattern.cc +++ b/deal.II/lac/source/compressed_sparsity_pattern.cc @@ -128,8 +128,8 @@ bool CompressedSparsityPattern::exists (const unsigned int i, const unsigned int j) const { - Assert (i &matrix) { - Assert (matrix.m() == matrix.n(), ExcMatrixNotSquare()) + Assert (matrix.m() == matrix.n(), ExcNotQuadratic()) clear (); -- 2.39.5