]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix spelling. Doc updates.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 24 Sep 2001 08:16:00 +0000 (08:16 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 24 Sep 2001 08:16:00 +0000 (08:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@5032 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/block_sparse_matrix.h
deal.II/lac/include/lac/filtered_matrix.h
deal.II/lac/include/lac/full_matrix.h
deal.II/lac/include/lac/sparse_matrix.h
deal.II/lac/include/lac/sparse_vanka.templates.h
deal.II/lac/include/lac/vector.templates.h

index 786bf61fafce47b8763147c48f3a2c7546fe020e..bc43eb0b1b82af7cc5f81926d374e3526dd9b422 100644 (file)
@@ -37,7 +37,7 @@ template <typename Number> class BlockVector;
  * preconditioners, where each block belongs to a specific component
  * of the equation you are presently discretizing.
  *
- * Note that the number of blocks and rows are implicitely determined
+ * Note that the number of blocks and rows are implicitly determined
  * by the sparsity pattern objects used.
  *
  *
index 621b3c2d804be95fe8b4c4eb525dbdb3c3bbd57d..95ade6b7fb660cd7732b211aaeab5513f99d3fe7 100644 (file)
@@ -77,7 +77,7 @@ template <typename number> class Vector;
  * unconstrained nodes, the latter on the constrained ones).
  *
  * In iterative solvers, it is not actually necessary to compute $A_X$
- * explicitely, since only matrix-vector operations need to be
+ * explicitly, since only matrix-vector operations need to be
  * performed. This can be done in a three-step procedure that first
  * clears all elements in the incoming vector that belong to
  * constrained nodes, then performs the product with the matrix $A$,
index de5ac4995bd8714cff32b2c58f144cefc071b135..f1b0b0627b7a475cf31b0cc5c0123d58f6eba617 100644 (file)
@@ -64,28 +64,46 @@ class FullMatrix : public vector2d<number>
 {
   public:
                                     /**
-                                     * Constructor. Initialize the matrix as
-                                     * a square matrix with dimension @p{n}.
+                                     * Constructor. Initialize the
+                                     * matrix as a square matrix with
+                                     * dimension @p{n}.
                                      *
                                      * In order to avoid the implicit
-                                     * conversion of integers and other types
-                                     * to a matrix, this constructor is
-                                     * declared @p{explicit}.
+                                     * conversion of integers and
+                                     * other types to a matrix, this
+                                     * constructor is declared
+                                     * @p{explicit}.
                                      *
-                                     * By default, no memory is allocated.
+                                     * By default, no memory is
+                                     * allocated.
                                      */
     explicit FullMatrix (const unsigned int n = 0);
     
                                     /**
-                                     * Constructor. Initialize the matrix as
-                                     * a rectangular matrix.
+                                     * Constructor. Initialize the
+                                     * matrix as a rectangular
+                                     * matrix.
                                      */
     FullMatrix (const unsigned int rows, const unsigned int cols);
     
                                     /** 
-                                     * Copy constructor. This constructor does
-                                     * a deep copy of the matrix. Therefore,
-                                     * it poses an efficiency problem.
+                                     * Copy constructor. This
+                                     * constructor does a deep copy
+                                     * of the matrix. Therefore, it
+                                     * poses a possible efficiency
+                                     * problem, if for example,
+                                     * function arguments are passed
+                                     * by value rather than by
+                                     * reference. Unfortunately, we
+                                     * can't mark this copy
+                                     * constructor @p{explicit},
+                                     * since that prevents the use of
+                                     * this class in containers, such
+                                     * as @p{std::vector}. The
+                                     * responsibility to check
+                                     * performance of programs must
+                                     * therefore remains with the
+                                     * user of this class.
                                      */
     FullMatrix (const FullMatrix&);
 
@@ -101,11 +119,13 @@ class FullMatrix : public vector2d<number>
 
     
                                     /**
-                                     * Comparison operator. Be careful with
-                                     * this thing, it may eat up huge amounts
-                                     * of computing time! It is most commonly
-                                     * used for internal consistency checks
-                                     * of programs.
+                                     * Comparison operator. Be
+                                     * careful with this thing, it
+                                     * may eat up huge amounts of
+                                     * computing time! It is most
+                                     * commonly used for internal
+                                     * consistency checks of
+                                     * programs.
                                      */
     bool operator == (const FullMatrix<number> &) const;
 
@@ -114,14 +134,16 @@ class FullMatrix : public vector2d<number>
                                      *
                                      * The matrix @p{src} is copied
                                      * into the target. The optional
-                                     * values @p{i} and @p{j} determine the
-                                     * upper left corner of the image
-                                     * of @p{src}.
+                                     * values @p{i} and @p{j}
+                                     * determine the upper left
+                                     * corner of the image of
+                                     * @p{src}.
                                      *
                                      * This function requires that
                                      * @p{i+src.m()<=m()} and
-                                     * @p{j+src.n()<=n()}, that is, the
-                                     * image fits into the space of @p{this}.
+                                     * @p{j+src.n()<=n()}, that is,
+                                     * the image fits into the space
+                                     * of @p{this}.
                                      */
     template<typename number2>
     void fill (const FullMatrix<number2> &src,
@@ -130,7 +152,8 @@ class FullMatrix : public vector2d<number>
     
 
                                     /**
-                                     * Make function of base class available.
+                                     * Make function of base class
+                                     * available.
                                      */
     template<typename number2>
     void fill (const number2*);
@@ -278,7 +301,8 @@ class FullMatrix : public vector2d<number>
                const bool             adding=false) const;
     
                                     /**
-                                     * Transpose matrix-vector-multiplication.
+                                     * Transpose
+                                     * matrix-vector-multiplication.
                                      * See @p{vmult} above.
                                      */
     template<typename number2>
@@ -476,43 +500,87 @@ class FullMatrix : public vector2d<number>
                                      * Swap  A(i,1-n) <-> A(j,1-n).
                                      * Swap rows i and j of this
                                      */
-    void swap_row (const unsigned int i, const unsigned int j);
+    void swap_row (const unsigned int i,
+                  const unsigned int j);
 
                                     /**
                                      *  Swap  A(1-n,i) <-> A(1-n,j).
                                      *  Swap columns i and j of this
                                      */
-    void swap_col (const unsigned int i, const unsigned int j);
+    void swap_col (const unsigned int i,
+                  const unsigned int j);
+
+                                    /**
+                                     *  A(i,i)+=B(i,1-n). Addition of complete
+                                     *  rows of B to diagonal-elements of this ; <p>
+                                     *  ( i = 1 ... m )
+                                     */
+    template<typename number2>
+    void add_diag (const number               s,
+                  const FullMatrix<number2> &B);
+
+                                    /**
+                                     * Add constant to diagonal
+                                     * elements of this, i.e. add a
+                                     * multiple of the identity
+                                     * matrix.
+                                     */
+    void diagadd (const number s);
 
                                     /**
                                      * $w=b-A*v$.
                                      * Residual calculation , returns
-                                     * the $l_2$-norm $|w|$
+                                     * the $l_2$-norm $|w|$.
                                      */
     template<typename number2, typename number3>
-    double residual (Vector<number2>      w,
-                    const Vector<number2>v,
-                    const Vector<number3>b) const;
+    double residual (Vector<number2>       &w,
+                    const Vector<number2> &v,
+                    const Vector<number3> &b) const;
 
                                     /**
                                      * Forward elimination of lower
                                      * triangle.  Inverts the lower
-                                     * triangle of a quadratic
-                                     * matrix.
+                                     * triangle of a quadratic matrix
+                                     * for a given right hand side.
                                      *
                                      * If the matrix has more columns
                                      * than rows, this function only
                                      * operates on the left square
                                      * submatrix. If there are more
                                      * rows, the upper square part of
-                                     * the matrix is considered
+                                     * the matrix is considered.
+                                     *
+                                     * Note that this function does
+                                     * not fit into this class at
+                                     * all, since it assumes that the
+                                     * elements of this object do not
+                                     * represent a matrix, but rather
+                                     * a decomposition into two
+                                     * factors. Therefore, if this
+                                     * assumption holds, all
+                                     * functions like multiplication
+                                     * by matrices or vectors, norms,
+                                     * etc, have no meaning any
+                                     * more. Conversely, if these
+                                     * functions have a meaning on
+                                     * this object, then the
+                                     * @p{forward} function has no
+                                     * meaning. This bifacial
+                                     * property of this class is
+                                     * probably a design mistake and
+                                     * may once go away by separating
+                                     * the @p{forward} and
+                                     * @p{backward} functions into a
+                                     * class of their own.
                                      */
     template<typename number2>
     void forward (Vector<number2>       &dst,
                  const Vector<number2> &src) const;
 
                                     /**
-                                     * Backward elimination of upper triangle.
+                                     * Backward elimination of upper
+                                     * triangle.
+                                     *
                                      * @see forward
                                      */
     template<typename number2>
@@ -543,21 +611,6 @@ class FullMatrix : public vector2d<number>
     double least_squares (Vector<number2> &dst,
                          Vector<number2> &src);
 
-                                    /**
-                                     *  A(i,i)+=B(i,1-n). Addition of complete
-                                     *  rows of B to diagonal-elements of this ; <p>
-                                     *  ( i = 1 ... m )
-                                     */
-    template<typename number2>
-    void add_diag (const number               s,
-                  const FullMatrix<number2> &B);
-
-                                    /**
-                                     *  A(i,i)+=s  i=1-m.
-                                     * Add constant to diagonal elements of this
-                                     */
-    void diagadd (const number s);
-
                                     /**
                                      * Output of the matrix in
                                      * user-defined format.
@@ -574,7 +627,7 @@ class FullMatrix : public vector2d<number>
                                      * readability, elements not in
                                      * the matrix are displayed as
                                      * empty space, while matrix
-                                     * elements which are explicitely
+                                     * elements which are explicitly
                                      * set to zero are displayed as
                                      * such.
                                      *
index 6133d3602f63fc988de02450b6b15456f340ff0f..09d903db841b6e2d95c109e4ee07d7b7041f892c 100644 (file)
@@ -266,7 +266,7 @@ class SparseMatrix : public Subscriptor
                                      * case, then the result of this
                                      * operation will not be a
                                      * symmetric matrix, since it
-                                     * only explicitely symmetrizes
+                                     * only explicitly symmetrizes
                                      * by looping over the lower left
                                      * triangular part for efficiency
                                      * reasons; if there are entries
@@ -724,7 +724,7 @@ class SparseMatrix : public Subscriptor
                                      * readability, elements not in
                                      * the matrix are displayed as
                                      * empty space, while matrix
-                                     * elements which are explicitely
+                                     * elements which are explicitly
                                      * set to zero are displayed as
                                      * such.
                                      *
index b90cf419022f35ac07b7f86f976e223da80301ce..410a8856c48f029154d3549f71e40433fe203694 100644 (file)
@@ -278,7 +278,7 @@ SparseVanka<number>::apply_preconditioner (Vector<number2>         &dst,
                                         //   row (as stored in the
                                         //   SparsityPattern object
                                         //
-                                        // since we do not explicitely
+                                        // since we do not explicitly
                                         // consider nonsysmmetric sparsity
                                         // patterns, the first element
                                         // of each entry simply denotes
index 644bc76402e2e7a478303a80683f1516a76fa437..3ce808a5ba391b612c88500d6bc4058f88b81a9d 100644 (file)
 #include <algorithm>
 
 
+/*
+  Note that in this file, we use std::fabs, std::sqrt, etc
+  everywhere. The reason is that we want to use those version of these
+  functions that take a variable of the template type "Number", rather
+  than the C standard function which accepts and returns a double. The
+  C++ standard library therefore offers overloaded versions of these
+  functions taking floats, or long doubles, with the importance on the
+  additional accuracy when using long doubles.
+ */
 
 template <typename Number>
 static inline Number sqr (const Number x)

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.