Loading...
Searching...
No Matches
Dune::ImplicitMatrixBuilder< M_ > Class Template Reference
Iterative Solvers Template Library (ISTL) » Sparse Matrix and Vector classes

A wrapper for uniform access to the BCRSMatrix during and after the build stage in implicit build mode. More...

`#include <dune/istl/bcrsmatrix.hh>`

## Classes

class | row_object
| Proxy row object for entry access. More...

## Public Types

typedef M_ | Matrix
| The underlying matrix.
typedef Matrix::block_type | block_type
| The block_type of the underlying matrix.
typedef Matrix::size_type | size_type
| The size_type of the underlying matrix.

## Public Member Functions

| ImplicitMatrixBuilder (Matrix &m)
| Creates an ImplicitMatrixBuilder for matrix m.
| ImplicitMatrixBuilder (Matrix &m, size_type rows, size_type cols, size_type avg_cols_per_row, double overflow_fraction)
| Sets up matrix m for implicit construction using the given parameters and creates an ImplicitBmatrixuilder for it.
row_object | operator[] (size_type i) const
| Returns a proxy for entries in row i.
size_type | N () const
| The number of rows in the matrix.
size_type | M () const
| The number of columns in the matrix.

## Detailed Description

template<class M_>
class Dune::ImplicitMatrixBuilder< M_ >

A wrapper for uniform access to the BCRSMatrix during and after the build stage in implicit build mode.

The implicit build mode of Dune::BCRSMatrix handles matrices differently during assembly and afterwards. Using this class, one can wrap a BCRSMatrix to allow use with code that is not written for the new build mode specifically. The wrapper forwards any calls to operator[][] to the entry() method.The assembly code does not even necessarily need to know that the underlying matrix is sparse. Dune::AMG uses this to reassemble an existing matrix without code duplication. The compress() method of Dune::BCRSMatrix still has to be called from outside this wrapper after the pattern assembly is finished.

Template Parameters

  M_ | the matrix type

## Member Typedef Documentation

## block_type

template<class M_>

typedef Matrix::block_type Dune::ImplicitMatrixBuilder< M_ >::block_type

The block_type of the underlying matrix.

## Matrix

template<class M_>

typedef M_ Dune::ImplicitMatrixBuilder< M_ >::Matrix

The underlying matrix.

## size_type

template<class M_>

typedef Matrix::size_type Dune::ImplicitMatrixBuilder< M_ >::size_type

The size_type of the underlying matrix.

## Constructor & Destructor Documentation

## ImplicitMatrixBuilder() [1/2]

template<class M_>

Dune::ImplicitMatrixBuilder< M_ >::ImplicitMatrixBuilder | ( | Matrix & | m | ) |

inline

Creates an ImplicitMatrixBuilder for matrix m.

Note
  You can only pass a completely set up matrix to this constructor: All of setBuildMode(), setImplicitBuildModeParameters() and setSize() must have been called with the correct values.

## ImplicitMatrixBuilder() [2/2]

template<class M_>

Dune::ImplicitMatrixBuilder< M_ >::ImplicitMatrixBuilder | ( | Matrix & | m,
|  | size_type | rows,
|  | size_type | cols,
|  | size_type | avg_cols_per_row,
|  | double | overflow_fraction )

inline

Sets up matrix m for implicit construction using the given parameters and creates an ImplicitBmatrixuilder for it.

Using this constructor, you can perform the necessary matrix setup and the creation of the ImplicitMatrixBuilder in a single step. The matrix must still be in the build stage notAllocated, otherwise a BCRSMatrixError will be thrown. For a detailed explanation of the matrix parameters, see BCRSMatrix.

Parameters

  m | the matrix to be built
  rows | the number of matrix rows
  cols | the number of matrix columns
  avg_cols_per_row | the average number of non-zero columns per row
  overflow_fraction | the amount of overflow to reserve in the matrix

See also
  BCRSMatrix

## Member Function Documentation

## M()

template<class M_>

size_type Dune::ImplicitMatrixBuilder< M_ >::M | ( |  | ) | const

inline

The number of columns in the matrix.

## N()

template<class M_>

size_type Dune::ImplicitMatrixBuilder< M_ >::N | ( |  | ) | const

inline

The number of rows in the matrix.

## operator[]()

template<class M_>

row_object Dune::ImplicitMatrixBuilder< M_ >::operator[] | ( | size_type | i | ) | const

inline

Returns a proxy for entries in row i.

The documentation for this class was generated from the following file:

- bcrsmatrix.hh