]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Doc updates.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 18 May 1998 08:06:49 +0000 (08:06 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 18 May 1998 08:06:49 +0000 (08:06 +0000)
git-svn-id: https://svn.dealii.org/trunk@295 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/dsmatrix.h
deal.II/lac/include/lac/dvector.h

index 92bb195191404ca299b2c8b5dfc098dfab5f31c7..73e874750b8fffd77a32726faf1c5108821f5c3a 100644 (file)
@@ -301,9 +301,7 @@ class dSMatrixStruct
 CLASS
    dSMatrix
 
-   @author Original version by Roland Becker, Guido Kanschat,
-   Franz-Theo Suttmeier; lots of enhancements, reorganisation
-   and documentation by Wolfgang Bangerth
+   @author Original version by Roland Becker, Guido Kanschat, Franz-Theo Suttmeier; lots of enhancements, reorganisation and documentation by Wolfgang Bangerth 1998
    */
 class dSMatrix
 {
@@ -326,10 +324,26 @@ class dSMatrix
                                      */
     dSMatrix ();
     
-                                    //
+                                    /**
+                                     * Constructor. Takes the given matrix
+                                     * sparisty structure to represent the
+                                     * sparsity pattern of this matrix. You
+                                     * can change the sparsity pattern later
+                                     * on by calling the #reinit# function.
+                                     *
+                                     * You have to make sure that the lifetime
+                                     * of the sparsity structure is at least
+                                     * as long as that of this matrix or as
+                                     * long as #reinit# is not called with a
+                                     * new sparsity structure.
+                                     */
     dSMatrix (dSMatrixStruct& c);
     
-                                    //
+                                    /**
+                                     * Destructor. Free all memory, but do not
+                                     * release the memory of the sparsity
+                                     * structure.
+                                     */
     ~dSMatrix ();
     
 
@@ -342,12 +356,27 @@ class dSMatrix
                                      * Release all memory and return to a state
                                      * just like after having called the
                                      * default constructor.
+                                     *
+                                     * You have to make sure that the lifetime
+                                     * of the sparsity structure is at least
+                                     * as long as that of this matrix or as
+                                     * long as #reinit# is not called with a
+                                     * new sparsity structure.
                                      */
     void clear ();
     
-                                    //
+                                    /**
+                                     * Return the dimension of the imga space.
+                                     * To remember: the matrix is of dimension
+                                     * $m \times n$.
+                                     */
     unsigned int m () const;
-                                    //
+    
+                                    /**
+                                     * Return the dimension of the range space.
+                                     * To remember: the matrix is of dimension
+                                     * $m \times n$.
+                                     */
     unsigned int n () const;
 
                                     /**
@@ -446,10 +475,19 @@ class dSMatrix
                                      */
     double & global_entry (const unsigned int i);
 
-                                    //
-    void vmult (dVector& dst,const dVector& src) const;
-                                    //
-    void Tvmult (dVector& dst,const dVector& src) const;
+                                    /**
+                                     * Matrix-vector multiplication: let
+                                     * #dst = M*src# with #M# being this matrix.
+                                     */
+    void vmult (dVector& dst, const dVector& src) const;
+    
+                                    /**
+                                     * Matrix-vector multiplication: let
+                                     * #dst = M^T*src# with #M# being this
+                                     * matrix. This function does the same as
+                                     * #vmult# but takes the transposed matrix.
+                                     */
+    void Tvmult (dVector& dst, const dVector& src) const;
   
 
                                     /**
index 5b5b6d7812df29c03006dc543d0a4519ba2c99af..a248553d62635a1771b7d7447301cacf43c026a1 100644 (file)
@@ -177,17 +177,20 @@ class dVector : public VectorBase
     void reinit (const unsigned int N, const bool fast=false);
     
                                     /**
-                                     * Adjust  Dimension. <p>
-                                     * Set dimension to n(V) <p>
-                                     * ! reserved memory for This remains unchanged ! <p>
-                                     * ! components of V are not copied in any case ! <p>
-                                     * on fast==false vector is filled by 0.
+                                     * Change the dimension to that of the
+                                     * vector #V#. The same applies as for
+                                     * the other #reinit# function.
+                                     *
+                                     * The elements of #V# are not copied.
                                      */
     void reinit (const dVector& V, const bool fast=false);
     
                                     /**
-                                     *  Inquire Dimension. returns Dimension , 
-                                     *             INLINE
+                                     * Return dimension of the vector. This
+                                     * function was formerly called #n()#, but
+                                     * was renamed to get the #dVector# class
+                                     * closer to the C++ standard library's
+                                     * #vector# container.
                                      */
     unsigned int size () const;
 
@@ -253,44 +256,54 @@ class dVector : public VectorBase
     dVector & operator -= (const dVector &V);
 
                                     /**
-                                     *  U(0-DIM)+=s      . Addition of S to all components
+                                     * U(0-DIM)+=s.
+                                     * Addition of #s# to all components. Note
+                                     * that #s# is a scalar and not a vector.
                                      */
     void add (const double s);
     
                                     /**
-                                     *  U+=V             . Simple addition
+                                     * U+=V.
+                                     * Simple vector addition, equal to the
+                                     * #operator +=#.
                                      */
     void add (const dVector& V);
     
                                     /**
-                                     *  U+=a*V           . Simple addition
+                                     * U+=a*V.
+                                     * Simple addition of a scaled vector.
                                      */
     void add (const double a, const dVector& V);
     
                                     /**
-                                     *  U+=a*V+b*W       . Multiple addition
+                                     * U+=a*V+b*W.
+                                     * Multiple addition of scaled vectors.
                                      */
     void add (const double a, const dVector& V,
              const double b, const dVector& W);
     
                                     /**
-                                     *  U=s*U+V          . Scaling + simple addition
+                                     * U=s*U+V.
+                                     * Scaling and simple vector addition.
                                      */
     void sadd (const double s, const dVector& V);
     
                                     /**
-                                     *  U=s*U+a*V        . Scaling + simple addition
+                                     * U=s*U+a*V.
+                                     * Scaling and simple addition.
                                      */
     void sadd (const double s, const double a, const dVector& V);
     
                                     /**
-                                     *  U=s*U+a*V+b*W    . Scaling + multiple addition
+                                     * U=s*U+a*V+b*W.
+                                     * Scaling and multiple addition.
                                      */
     void sadd (const double s, const double a,
               const dVector& V, const double b, const dVector& W);
     
                                     /**
-                                     *  U=s*U+a*V+b*W+c*X. Scaling + multiple addition
+                                     * U=s*U+a*V+b*W+c*X.
+                                     * Scaling and multiple addition.
                                      */
     void sadd (const double s, const double a,
               const dVector& V, const double b, const dVector& W, 
@@ -306,12 +319,13 @@ class dVector : public VectorBase
     void scale (const double factor);
     
                                     /**
-                                     *  U=a*V            . Replacing
+                                     *  U=a*V. Replacing
                                      */
     void equ (const double a, const dVector& V);
     
                                     /**
-                                     *  U=a*V+b*W        . Replacing by sum
+                                     * U=a*V+b*W.
+                                     * Replacing by sum.
                                      */
     void equ (const double a, const dVector& V,
              const double b, const dVector& W);
@@ -358,7 +372,8 @@ class dVector : public VectorBase
               const double b, const unsigned int k);
     
                                     /**
-                                     *  U(i)=a*V(j)+b*V(k)+c*V(l)+d*V(m) . Replacing by sum
+                                     * U(i)=a*V(j)+b*V(k)+c*V(l)+d*V(m).
+                                     * Replacing by sum
                                      */
     void cequ (const unsigned int i, const VectorBase& V,
               const double a, const unsigned int j,
@@ -380,7 +395,8 @@ class dVector : public VectorBase
               const double b, const unsigned int k);
     
                                     /**
-                                     *  U(i)+=a*V(j)+b*V(k)+c*V(l)+d*V(m) . Multiple addition
+                                     * U(i)+=a*V(j)+b*V(k)+c*V(l)+d*V(m).
+                                     * Multiple addition
                                      */
     void cadd (const unsigned int i, const VectorBase& V,
               const double a, const unsigned int j,
@@ -443,6 +459,10 @@ class dVector : public VectorBase
 
 
 
+
+/*----------------------- Inline functions ----------------------------------*/
+
+
 inline unsigned int dVector::size () const
 {
   return dim;

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.