]> https://gitweb.dealii.org/ - dealii.git/commitdiff
indented
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Wed, 21 Feb 2001 09:56:11 +0000 (09:56 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Wed, 21 Feb 2001 09:56:11 +0000 (09:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@3995 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/block_matrix_array.h

index 24dde67dee93af7a38663e421a06cdf6b8d7f8ba..145fe0c7f98143a4d8fa6c630cc81b91e0fbd7de 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -40,138 +40,141 @@ template <typename> class BlockVector;
  * @p{BlockVector<VECTOR>}. @ref{SparseMatrix} is a possible entry
  * type.
  *
- * @author Guido Kanschat, 2000, 2001 */
+ * @author Guido Kanschat, 2000, 2001
+ */
 template <class MATRIX>
-class BlockMatrixArray :
-  public Subscriptor
+class BlockMatrixArray : public Subscriptor
 {
-public:
-                                  /**
-                                   * Constructor fixing the
-                                   * dimensions.
-                                   */
-  BlockMatrixArray (const unsigned int n_block_rows,
-                   const unsigned int n_block_cols);
-
-                                  /**
-                                   * Add a block matrix entry.
-                                   */
-  void enter (const MATRIX& matrix,
-             unsigned row,
-             unsigned int col,
-             double prefix = 1.,
-             bool transpose = false);
-
-                                  /**
-                                   * Number of block-entries per
-                                   * column.
-                                   */
-  unsigned int n_block_rows () const;
-
-                                  /**
-                                   * Number of block-entries per
-                                   * row.
-                                   */
-  unsigned int n_block_cols () const;
-
-                                  /**
-                                   * Matrix-vector multiplication.
-                                   */
-  template <class VECTOR>
-  void vmult (BlockVector<VECTOR>& dst,
-             const BlockVector<VECTOR>& src) const;
-                                  /**
-                                   * Matrix-vector multiplication
-                                   * adding to @p{dst}.
-                                   */
-  template <class VECTOR>
-  void vmult_add (BlockVector<VECTOR>& dst,
-                 const BlockVector<VECTOR>& src) const;
-                                  /**
-                                   * Transposed matrix-vector
-                                   * multiplication.
-                                   */
-  template <class VECTOR>
-  void Tvmult (BlockVector<VECTOR>& dst,
-              const BlockVector<VECTOR>& src) const;
-                                  /**
-                                   * Transposed matrix-vector
-                                   * multiplication adding to
-                                   * @p{dst}.
-                                   */
-  template <class VECTOR>
-  void Tvmult_add (BlockVector<VECTOR>& dst,
-                  const BlockVector<VECTOR>& src) const;
-  
-private:
-                                  /**
-                                   * Internal data structure.
-                                   *
-                                   * For each entry of a
-                                   * @p{BlockMatrixArray}, its
-                                   * position, matrix, prefix and
-                                   * optional transposition must be
-                                   * stored. This structure
-                                   * encapsulates all of them.
-                                   *
-                                   * @author Guido Kanschat, 2000, 2001
-                                   */
-  class Entry
-  {
   public:
                                     /**
-                                     * Constructor initializing all
-                                     * data fields.
+                                     * Constructor fixing the
+                                     * dimensions.
                                      */
-    Entry (const MATRIX& matrix,
-          unsigned row, unsigned int col,
-          double prefix, bool transpose);
-    
+    BlockMatrixArray (const unsigned int n_block_rows,
+                     const unsigned int n_block_cols);
+
                                     /**
-                                     * Row number in the block
-                                     * matrix.
+                                     * Add a block matrix entry.
                                      */
-    unsigned int row;
+    void enter (const MATRIX& matrix,
+               unsigned row,
+               unsigned int col,
+               double prefix = 1.,
+               bool transpose = false);
 
                                     /**
-                                     * Column number in the block
-                                     * matrix.
+                                     * Number of block-entries per
+                                     * column.
                                      */
-    unsigned int col;
+    unsigned int n_block_rows () const;
 
                                     /**
-                                     * Factor in front of the matrix
-                                     * block.
+                                     * Number of block-entries per
+                                     * row.
                                      */
-    double prefix;
+    unsigned int n_block_cols () const;
 
                                     /**
-                                     * Indicates that matrix block
-                                     * must be transposed for
+                                     * Matrix-vector multiplication.
+                                     */
+    template <class VECTOR>
+    void vmult (BlockVector<VECTOR>& dst,
+               const BlockVector<VECTOR>& src) const;
+  
+                                    /**
+                                     * Matrix-vector multiplication
+                                     * adding to @p{dst}.
+                                     */
+    template <class VECTOR>
+    void vmult_add (BlockVector<VECTOR>& dst,
+                   const BlockVector<VECTOR>& src) const;
+  
+                                    /**
+                                     * Transposed matrix-vector
                                      * multiplication.
                                      */
-    bool transpose;
-
+    template <class VECTOR>
+    void Tvmult (BlockVector<VECTOR>& dst,
+                const BlockVector<VECTOR>& src) const;
+  
                                     /**
-                                     * The matrix block itself.
+                                     * Transposed matrix-vector
+                                     * multiplication adding to
+                                     * @p{dst}.
                                      */
-    SmartPointer<const MATRIX> matrix;
-  };
+    template <class VECTOR>
+    void Tvmult_add (BlockVector<VECTOR>& dst,
+                    const BlockVector<VECTOR>& src) const;
   
-                                  /**
-                                   * Array of block entries in the
-                                   * matrix.
-                                   */
-  vector<Entry> entries;
-
-                                  /**
-                                   * Number of blocks per column.
-                                   */
-  unsigned int block_rows;
-                                  /**
-                                   * number of blocks per row.
-                                   */
-  unsigned int block_cols;
+  private:
+                                    /**
+                                     * Internal data structure.
+                                     *
+                                     * For each entry of a
+                                     * @p{BlockMatrixArray}, its
+                                     * position, matrix, prefix and
+                                     * optional transposition must be
+                                     * stored. This structure
+                                     * encapsulates all of them.
+                                     *
+                                     * @author Guido Kanschat, 2000, 2001
+                                     */
+    class Entry
+    {
+      public:
+                                        /**
+                                         * Constructor initializing all
+                                         * data fields.
+                                         */
+       Entry (const MATRIX& matrix,
+              unsigned row, unsigned int col,
+              double prefix, bool transpose);
+    
+                                        /**
+                                         * Row number in the block
+                                         * matrix.
+                                         */
+       unsigned int row;
+
+                                        /**
+                                         * Column number in the block
+                                         * matrix.
+                                         */
+       unsigned int col;
+
+                                        /**
+                                         * Factor in front of the matrix
+                                         * block.
+                                         */
+       double prefix;
+
+                                        /**
+                                         * Indicates that matrix block
+                                         * must be transposed for
+                                         * multiplication.
+                                         */
+       bool transpose;
+
+                                        /**
+                                         * The matrix block itself.
+                                         */
+       SmartPointer<const MATRIX> matrix;
+    };
+  
+                                    /**
+                                     * Array of block entries in the
+                                     * matrix.
+                                     */
+    vector<Entry> entries;
+
+                                    /**
+                                     * Number of blocks per column.
+                                     */
+    unsigned int block_rows;
+                                    /**
+                                     * number of blocks per row.
+                                     */
+    unsigned int block_cols;
 };
 
 
@@ -180,12 +183,12 @@ inline
 BlockMatrixArray<MATRIX>::Entry::Entry (const MATRIX& matrix,
                                        unsigned row, unsigned int col,
                                        double prefix, bool transpose)
-  :
-  row (row),
-  col (col),
-  prefix (prefix),
-  transpose (transpose),
-  matrix (&matrix)
+               :
+               row (row),
+               col (col),
+               prefix (prefix),
+               transpose (transpose),
+               matrix (&matrix)
 {}
 
 
@@ -194,8 +197,8 @@ template <class MATRIX>
 inline
 BlockMatrixArray<MATRIX>::BlockMatrixArray (const unsigned int n_block_rows,
                                            const unsigned int n_block_cols)
-  : block_rows (n_block_rows),
-    block_cols (n_block_cols)
+               : block_rows (n_block_rows),
+                 block_cols (n_block_cols)
 {}
 
 

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.