From: Wolfgang Bangerth Date: Mon, 18 May 1998 08:06:49 +0000 (+0000) Subject: Doc updates. X-Git-Tag: v8.0.0~22959 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a913dac0e9ddee5a0464adc0bc8d1bf9e53f1fc3;p=dealii.git Doc updates. git-svn-id: https://svn.dealii.org/trunk@295 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/dsmatrix.h b/deal.II/lac/include/lac/dsmatrix.h index 92bb195191..73e874750b 100644 --- a/deal.II/lac/include/lac/dsmatrix.h +++ b/deal.II/lac/include/lac/dsmatrix.h @@ -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; /** diff --git a/deal.II/lac/include/lac/dvector.h b/deal.II/lac/include/lac/dvector.h index 5b5b6d7812..a248553d62 100644 --- a/deal.II/lac/include/lac/dvector.h +++ b/deal.II/lac/include/lac/dvector.h @@ -177,17 +177,20 @@ class dVector : public VectorBase void reinit (const unsigned int N, const bool fast=false); /** - * Adjust Dimension.

- * Set dimension to n(V)

- * ! reserved memory for This remains unchanged !

- * ! components of V are not copied in any case !

- * 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;