From: Guido Kanschat Date: Wed, 21 Feb 2001 09:56:11 +0000 (+0000) Subject: indented X-Git-Tag: v8.0.0~19706 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e34263b0477ccafdad2e21358d7bef7bfddaca35;p=dealii.git indented git-svn-id: https://svn.dealii.org/trunk@3995 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/block_matrix_array.h b/deal.II/lac/include/lac/block_matrix_array.h index 24dde67dee..145fe0c7f9 100644 --- a/deal.II/lac/include/lac/block_matrix_array.h +++ b/deal.II/lac/include/lac/block_matrix_array.h @@ -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 class BlockVector; * @p{BlockVector}. @ref{SparseMatrix} is a possible entry * type. * - * @author Guido Kanschat, 2000, 2001 */ + * @author Guido Kanschat, 2000, 2001 + */ template -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 - void vmult (BlockVector& dst, - const BlockVector& src) const; - /** - * Matrix-vector multiplication - * adding to @p{dst}. - */ - template - void vmult_add (BlockVector& dst, - const BlockVector& src) const; - /** - * Transposed matrix-vector - * multiplication. - */ - template - void Tvmult (BlockVector& dst, - const BlockVector& src) const; - /** - * Transposed matrix-vector - * multiplication adding to - * @p{dst}. - */ - template - void Tvmult_add (BlockVector& dst, - const BlockVector& 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 + void vmult (BlockVector& dst, + const BlockVector& src) const; + + /** + * Matrix-vector multiplication + * adding to @p{dst}. + */ + template + void vmult_add (BlockVector& dst, + const BlockVector& src) const; + + /** + * Transposed matrix-vector * multiplication. */ - bool transpose; - + template + void Tvmult (BlockVector& dst, + const BlockVector& src) const; + /** - * The matrix block itself. + * Transposed matrix-vector + * multiplication adding to + * @p{dst}. */ - SmartPointer matrix; - }; + template + void Tvmult_add (BlockVector& dst, + const BlockVector& src) const; - /** - * Array of block entries in the - * matrix. - */ - vector 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 matrix; + }; + + /** + * Array of block entries in the + * matrix. + */ + vector 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::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 inline BlockMatrixArray::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) {}