From adc32c9eaeed8b768eceba009f9c093c493a3af5 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 4 May 2011 03:07:19 +0000 Subject: [PATCH] Patch by Martin Genet: Better doxygen markup. git-svn-id: https://svn.dealii.org/trunk@23679 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/deal.II/lac/block_sparse_matrix.h | 73 ++++++---- deal.II/include/deal.II/lac/sparse_matrix.h | 2 +- .../include/deal.II/lac/sparse_matrix_ez.h | 135 +++++++++++------- 3 files changed, 135 insertions(+), 75 deletions(-) diff --git a/deal.II/include/deal.II/lac/block_sparse_matrix.h b/deal.II/include/deal.II/lac/block_sparse_matrix.h index 699557df9a..5b2d311512 100644 --- a/deal.II/include/deal.II/lac/block_sparse_matrix.h +++ b/deal.II/include/deal.II/lac/block_sparse_matrix.h @@ -71,6 +71,10 @@ class BlockSparseMatrix : public BlockMatrixBase > typedef typename BaseClass::iterator iterator; typedef typename BaseClass::const_iterator const_iterator; +/** + * @name Constructors and initalization + */ +//@{ /** * Constructor; initializes the * matrix to be empty, without @@ -182,7 +186,12 @@ class BlockSparseMatrix : public BlockMatrixBase > * set to zero by this function. */ virtual void reinit (const BlockSparsityPattern &sparsity); +//@} +/** + * @name Information on the matrix + */ +//@{ /** * Return whether the object is * empty. It is empty if either @@ -218,6 +227,33 @@ class BlockSparseMatrix : public BlockMatrixBase > */ unsigned int n_actually_nonzero_elements (const double threshold = 0.0) const; + /** + * Return a (constant) reference + * to the underlying sparsity + * pattern of this matrix. + * + * Though the return value is + * declared const, you + * should be aware that it may + * change if you call any + * nonconstant function of + * objects which operate on it. + */ + const BlockSparsityPattern & + get_sparsity_pattern () const; + + /** + * Determine an estimate for the + * memory consumption (in bytes) + * of this object. + */ + std::size_t memory_consumption () const; +//@} + +/** + * @name Multiplications + */ +//@{ /** * Matrix-vector multiplication: * let $dst = M*src$ with $M$ @@ -308,7 +344,12 @@ class BlockSparseMatrix : public BlockMatrixBase > template void Tvmult (Vector &dst, const Vector &src) const; +//@} +/** + * @name Preconditioning methods + */ +//@{ /** * Apply the Jacobi * preconditioner, which @@ -340,7 +381,12 @@ class BlockSparseMatrix : public BlockMatrixBase > void precondition_Jacobi (Vector &dst, const Vector &src, const number omega = 1.) const; +//@} +/** + * @name Input/Output + */ +//@{ /** * Print the matrix in the usual * format, i.e. as a matrix and @@ -388,30 +434,8 @@ class BlockSparseMatrix : public BlockMatrixBase > const unsigned int width = 0, const char *zero_string = " ", const double denominator = 1.) const; - - /** - * Return a (constant) reference - * to the underlying sparsity - * pattern of this matrix. - * - * Though the return value is - * declared const, you - * should be aware that it may - * change if you call any - * nonconstant function of - * objects which operate on it. - */ - const BlockSparsityPattern & - get_sparsity_pattern () const; - - /** - * Determine an estimate for the - * memory consumption (in bytes) - * of this object. - */ - std::size_t memory_consumption () const; - - /** @addtogroup Exceptions +//@} + /** @addtogroup Exceptions * @{ */ /** @@ -419,6 +443,7 @@ class BlockSparseMatrix : public BlockMatrixBase > */ DeclException0 (ExcBlockDimensionMismatch); //@} + private: /** * Pointer to the block sparsity diff --git a/deal.II/include/deal.II/lac/sparse_matrix.h b/deal.II/include/deal.II/lac/sparse_matrix.h index 1912965049..d3ac858b03 100644 --- a/deal.II/include/deal.II/lac/sparse_matrix.h +++ b/deal.II/include/deal.II/lac/sparse_matrix.h @@ -546,7 +546,7 @@ class SparseMatrix : public virtual Subscriptor }; /** - * @name Constructors and initalization. + * @name Constructors and initalization */ //@{ /** diff --git a/deal.II/include/deal.II/lac/sparse_matrix_ez.h b/deal.II/include/deal.II/lac/sparse_matrix_ez.h index 25232fa98f..f9b6077598 100644 --- a/deal.II/include/deal.II/lac/sparse_matrix_ez.h +++ b/deal.II/include/deal.II/lac/sparse_matrix_ez.h @@ -329,7 +329,11 @@ class SparseMatrixEZ : public Subscriptor * the STL container classes. */ typedef number value_type; - + +/** + * @name Constructors and initalization + */ +//@{ /** * Constructor. Initializes an * empty matrix of dimension zero @@ -427,7 +431,11 @@ class SparseMatrixEZ : public Subscriptor * its sparsity pattern. */ void clear (); - +//@} +/** + * @name Information on the matrix + */ +//@{ /** * Return whether the object is * empty. It is empty if @@ -462,8 +470,50 @@ class SparseMatrixEZ : public Subscriptor * elements of this matrix. */ unsigned int n_nonzero_elements () const; - + + /** + * Determine an estimate for the + * memory consumption (in bytes) + * of this object. + */ + std::size_t memory_consumption () const; + + /** + * Print statistics. If @p full + * is @p true, prints a + * histogram of all existing row + * lengths and allocated row + * lengths. Otherwise, just the + * relation of allocated and used + * entries is shown. + */ + template + void print_statistics (STREAM& s, bool full = false); + /** + * Compute numbers of entries. + * + * In the first three arguments, + * this function returns the + * number of entries used, + * allocated and reserved by this + * matrix. + * + * If the final argument is true, + * the number of entries in each + * line is printed as well. + */ + void compute_statistics (unsigned int& used, + unsigned int& allocated, + unsigned int& reserved, + std::vector& used_by_line, + const bool compute_by_line) const; +//@} +/** + * @name Modifying entries + */ +//@{ + /** * Set the element (i,j) to * @p value. Allocates the entry, * if it does not exist and @@ -610,7 +660,7 @@ class SparseMatrixEZ : public Subscriptor template SparseMatrixEZ & copy_from (const MATRIX &source); - + /** * Add @p matrix scaled by * @p factor to this matrix. @@ -625,7 +675,11 @@ class SparseMatrixEZ : public Subscriptor template void add (const number factor, const MATRIX &matrix); - +//@} +/** + * @name Entry Access + */ +//@{ /** * Return the value of the entry * (i,j). This may be an @@ -654,7 +708,11 @@ class SparseMatrixEZ : public Subscriptor */ number el (const unsigned int i, const unsigned int j) const; - +//@} +/** + * @name Multiplications + */ +//@{ /** * Matrix-vector multiplication: * let $dst = M*src$ with $M$ @@ -697,12 +755,20 @@ class SparseMatrixEZ : public Subscriptor template void Tvmult_add (Vector &dst, const Vector &src) const; - +//@} +/** + * @name Matrix norms + */ +//@{ /** * Frobenius-norm of the matrix. */ number l2_norm () const; - +//@} +/** + * @name Preconditioning methods + */ +//@{ /** * Apply the Jacobi * preconditioner, which @@ -766,7 +832,11 @@ class SparseMatrixEZ : public Subscriptor void conjugate_add (const MATRIXA& A, const MATRIXB& B, const bool transpose = false); - +//@} +/** + * @name Iterators + */ +//@{ /** * STL-like iterator with the * first existing entry. @@ -793,7 +863,11 @@ class SparseMatrixEZ : public Subscriptor * different from end()! */ const_iterator end (const unsigned int r) const; - +//@} +/** + * @name Input/Output + */ +//@{ /** * Print the matrix to the given * stream, using the format @@ -876,46 +950,7 @@ class SparseMatrixEZ : public Subscriptor * more. */ void block_read (std::istream &in); - - - /** - * Determine an estimate for the - * memory consumption (in bytes) - * of this object. - */ - std::size_t memory_consumption () const; - - /** - * Print statistics. If @p full - * is @p true, prints a - * histogram of all existing row - * lengths and allocated row - * lengths. Otherwise, just the - * relation of allocated and used - * entries is shown. - */ - template - void print_statistics (STREAM& s, bool full = false); - - /** - * Compute numbers of entries. - * - * In the first three arguments, - * this function returns the - * number of entries used, - * allocated and reserved by this - * matrix. - * - * If the final argument is true, - * the number of entries in each - * line is printed as well. - */ - void compute_statistics (unsigned int& used, - unsigned int& allocated, - unsigned int& reserved, - std::vector& used_by_line, - const bool compute_by_line) const; - +//@} /** @addtogroup Exceptions * @{ */ -- 2.39.5