]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
more documentation on optimize_diagonals
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 15 Mar 2004 23:34:19 +0000 (23:34 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 15 Mar 2004 23:34:19 +0000 (23:34 +0000)
git-svn-id: https://svn.dealii.org/trunk@8758 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/sparsity_pattern.h

index 0e1253df48612ebea3e3b707eea8ded48e43b40e..7e3d751e9732a20791c7487f9be3857df7827389 100644 (file)
@@ -109,7 +109,7 @@ class CompressedSparsityPattern;
  * 3</tt>.
  *
  *
- * @author Wolfgang Bangerth and others
+ * @author Wolfgang Bangerth, Guido Kanschat and others
  */
 class SparsityPattern : public Subscriptor
 {
@@ -187,18 +187,18 @@ class SparsityPattern : public Subscriptor
 
                                     /**
                                      * Initialize a rectangular
-                                     * matrix with <tt>m</tt> rows
-                                     * and <tt>n</tt> columns.  The
-                                     * matrix may contain at most
-                                     * <tt>max_per_row</tt> nonzero
-                                     * entries per row.
+                                     * matrix.
                                      *
-                                     * If the matrix is quadratic,
-                                     * then the last parameter
-                                     * controls optimized storage of
-                                     * diagonal elements for
-                                     * relaxation methods of
-                                     * SparseMatrix.
+                                     * @arg m number of rows
+                                     * @arg n number of columns
+                                     * @arg max_per_row maximum
+                                     * number of nonzero entries per row
+                                     *
+                                     * @arg optimize_diagonal store
+                                     * diagonal entries first in row;
+                                     * see optimize_diagonal(). This
+                                     * takes effect for quadratic
+                                     * matrices only.
                                      */
     SparsityPattern (const unsigned int m,
                     const unsigned int n,
@@ -207,12 +207,21 @@ class SparsityPattern : public Subscriptor
 
                                     /**
                                      * Initialize a rectangular
-                                     * matrix with <tt>m</tt> rows
-                                     * and <tt>n</tt> columns.  The
-                                     * maximal number of nonzero
-                                     * entries for each row is given
-                                     * by the <tt>row_lengths</tt>
-                                     * array.
+                                     * matrix.
+                                     *
+                                     * @arg m number of rows
+                                     * @arg n number of columns
+                                     *
+                                     * @arg row_lengths possible
+                                     * number of nonzero entries for
+                                     * each row.  This vector must
+                                     * have one entry for each row.
+                                     *
+                                     * @arg optimize_diagonal store
+                                     * diagonal entries first in row;
+                                     * see optimize_diagonal(). This
+                                     * takes effect for quadratic
+                                     * matrices only.
                                      */
     SparsityPattern (const unsigned int               m,
                     const unsigned int               n,
@@ -220,8 +229,9 @@ class SparsityPattern : public Subscriptor
                     const bool optimize_diagonal = true);
     
                                     /**
-                                     * Initialize a quadratic matrix of dimension
-                                     * <tt>n</tt> with at most <tt>max_per_row</tt>
+                                     * Initialize a quadratic matrix
+                                     * of dimension <tt>n</tt> with
+                                     * at most <tt>max_per_row</tt>
                                      * nonzero entries per row.
                                      *
                                      * This constructor automatically
@@ -235,13 +245,18 @@ class SparsityPattern : public Subscriptor
                     const unsigned int max_per_row);
 
                                     /**
-                                     * Initialize a quadratic matrix
-                                     * with <tt>m</tt> rows and
-                                     * <tt>m</tt> columns.  The
-                                     * maximal number of nonzero
-                                     * entries for each row is given
-                                     * by the <tt>row_lengths</tt>
-                                     * array.
+                                     * Initialize a quadratic matrix.
+                                     *
+                                     * @arg m number of rows and columns
+                                     *
+                                     * @arg row_lengths possible
+                                     * number of nonzero entries for
+                                     * each row.  This vector must
+                                     * have one entry for each row.
+                                     *
+                                     * @arg optimize_diagonal store
+                                     * diagonal entries first in row;
+                                     * see optimize_diagonal().
                                      */
     SparsityPattern (const unsigned int               m,
                     const std::vector<unsigned int> &row_lengths,
@@ -674,7 +689,7 @@ class SparsityPattern : public Subscriptor
                                      * Access to column number field.
                                      * Return the column number of
                                      * the <tt>index</tt>th entry in
-                                     * <tt>row</tt>. Note that the if
+                                     * <tt>row</tt>. Note that if
                                      * diagonal elements are
                                      * optimized, the first element
                                      * in each row is the diagonal
@@ -725,10 +740,25 @@ class SparsityPattern : public Subscriptor
                                     /**
                                      * Determine whether the matrix
                                      * uses special convention for
-                                     * quadratic matrices,
-                                     * i.e. diagonal element first in
-                                     * row.
-                                     */
+                                     * quadratic matrices.
+                                     *
+                                     * A return value <tt>true</tt>
+                                     * means that diagonal elements
+                                     * are stored first in each
+                                     * row. This is required by
+                                     * relaxation methods like
+                                     * Jacobi() and SOR(). A side
+                                     * effect of this scheme is that
+                                     * each row contains at least one
+                                     * element.
+                                     *
+                                     * A return value <tt>false</tt>
+                                     * means that diagonal elements
+                                     * are stored anywhere in the
+                                     * row. In particular, a row or
+                                     * even the whole matrix may be
+                                     * empty.
+                                    */
     bool optimize_diagonal () const;
     
                                      /**
@@ -977,7 +1007,13 @@ class SparsityPattern : public Subscriptor
                                      */
     DeclException0 (ExcNotQuadratic);
                                     /**
-                                     * Exception
+                                     * This exception is thrown if
+                                     * the matrix does not follow the
+                                     * convention of storing diagonal
+                                     * elements first in row. Refer
+                                     * to
+                                     * SparityPattern::optimize_diagonal()
+                                     * for more information.
                                      */
     DeclException0 (ExcDiagonalNotOptimized);
                                     /**

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.