Dune Core Modules (2.4.1)

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. More...
 
 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. More...
 
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

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.

References DUNE_THROW.

◆ 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
mthe matrix to be built
rowsthe number of matrix rows
colsthe number of matrix columns
avg_cols_per_rowthe average number of non-zero columns per row
overflow_fractionthe amount of overflow to reserve in the matrix
See also
BCRSMatrix

References DUNE_THROW.


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 13, 23:29, 2024)