DUNE-FEM (unstable)

Dune::Fem::SparseRowMatrixObject< DomainSpace, RangeSpace, Matrix >::LocalMatrix< MatrixObject > Class Template Reference

LocalMatrix. More...

#include <dune/fem/operator/matrix/spmatrix.hh>

Public Types

typedef MatrixObject MatrixObjectType
 type of matrix object
 
typedef LocalMatrixTraits< MatrixObjectTypeTraits
 type of the traits
 
typedef MatrixObjectType::MatrixType MatrixType
 type of matrix
 
typedef Traits::RangeFieldType RangeFieldType
 type of entries of little blocks
 
typedef RangeFieldType DofType
 type of the DoFs
 
typedef Traits::LittleBlockType LittleBlockType
 type of little blocks
 
typedef Traits::DomainMapperType DomainMapperType
 type of nonblocked domain mapper
 
typedef Traits::RangeMapperType RangeMapperType
 type of nonblocked domain mapper
 
typedef ThisType LocalMatrixInterfaceType
 type of this interface
 
typedef Traits::LocalMatrixType LocalMatrixType
 type of local matrix implementation
 

Public Member Functions

 LocalMatrix (const MatrixObjectType &matrixObject, const DomainSpaceType &domainSpace, const RangeSpaceType &rangeSpace, const DomainMapperType &domainMapper, const RangeMapperType &rangeMapper)
 constructor
 
size_type rows () const
 return number of rows
 
size_type columns () const
 return number of columns
 
void add (size_type localRow, size_type localCol, DofType value)
 add value to matrix entry
 
DofType get (size_type localRow, size_type localCol) const
 get matrix entry
 
void set (size_type localRow, size_type localCol, DofType value)
 set matrix entry to value
 
void unitRow (size_type localRow)
 set matrix row to zero except diagonla entry
 
void clearRow (size_type localRow)
 set matrix row to zero
 
void clearCol (size_type localCol)
 set matrix column to zero
 
void clear ()
 clear all entries belonging to local matrix
 
void resort ()
 resort all global rows of matrix to have ascending numbering
 
void scale (const DofType &value)
 scale local matrix with a certain value
 
void bind (const DomainEntityType &domainEntity, const RangeEntityType &rangeEntity)
 initialize the local matrix to entities More...
 
void unbind ()
 clear local matrix from entities More...
 
void finalize ()
 finalize local matrix setup and possibly add values to real matrix More...
 
const DomainSpaceType & domainSpace () const
 access to the domain space More...
 
const RangeSpaceType & rangeSpace () const
 access to the range space More...
 
const DomainBasisFunctionSetTypedomainBasisFunctionSet () const
 access to the base function set within the domain space More...
 
const RangeBasisFunctionSetTyperangeBasisFunctionSet () const
 access to the base function set within the range space More...
 
void multiplyAdd (const DomainLocalFunctionType &lhs, RangeLocalFunctionType &rhs) const
 multiply left hand side with local matrix and add to right hand side rhs += Matrix * lhs More...
 
void clearRow (const int localRow)
 set row to zero values More...
 
void clearCol (const int localCol)
 ser column entries to zero More...
 
void add (const int localRow, const int localCol, const RangeFieldType &value)
 add value to matrix entry (row,col) where row and col are local row and local column More...
 
void set (const int localRow, const int localCol, const RangeFieldType &value)
 set value of matrix entry (row,col) where row and col are local row and local column More...
 
const RangeFieldType get (const int localRow, const int localCol) const
 get value of matrix entry (row,col) where row and col are local row and local column More...
 
void scale (const RangeFieldType &scalar)
 scale matrix with scalar value More...
 
MatrixColumnType column (const unsigned int col)
 return column object for local matrix which contains axpy methods for convenience More...
 

Protected Member Functions

void scale (size_type localRow, size_type localCol, DofType value)
 scale matrix entry with value
 

Detailed Description

template<class DomainSpace, class RangeSpace, class Matrix = SparseRowMatrix< typename DomainSpace::RangeFieldType >>
template<class MatrixObject>
class Dune::Fem::SparseRowMatrixObject< DomainSpace, RangeSpace, Matrix >::LocalMatrix< MatrixObject >

LocalMatrix.

Member Function Documentation

◆ add()

void Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::add ( const int  localRow,
const int  localCol,
const RangeFieldType value 
)
inlineinherited

add value to matrix entry (row,col) where row and col are local row and local column

Parameters
[in]localRowlocal row
[in]localCollocal column
[in]valuevalue to add

◆ bind()

void Dune::Fem::LocalMatrixDefault< LocalMatrixTraits< MatrixObject > >::bind ( const DomainEntityType &  domainEntity,
const RangeEntityType &  rangeEntity 
)
inlineinherited

initialize the local matrix to entities

Parameters
[in]domainEntityentity within grid of domain space,
[in]rangeEntityentity within grid of range space

◆ clearCol()

void Dune::Fem::LocalMatrixDefault< LocalMatrixTraits< MatrixObject > >::clearCol ( const int  localCol)
inlineinherited

ser column entries to zero

Parameters
[in]localCollocal column that is set to zero

◆ clearRow()

void Dune::Fem::LocalMatrixDefault< LocalMatrixTraits< MatrixObject > >::clearRow ( const int  localRow)
inlineinherited

set row to zero values

Parameters
[in]localRowlocal row that is set to zero

◆ column()

MatrixColumnType Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::column ( const unsigned int  col)
inlineinherited

return column object for local matrix which contains axpy methods for convenience

Parameters
collocal column number
Returns
object of type MatrixColumnObject

◆ domainBasisFunctionSet()

const DomainBasisFunctionSetType & Dune::Fem::LocalMatrixDefault< LocalMatrixTraits< MatrixObject > >::domainBasisFunctionSet ( ) const
inlineinherited

access to the base function set within the domain space

◆ domainSpace()

const DomainSpaceType & Dune::Fem::LocalMatrixDefault< LocalMatrixTraits< MatrixObject > >::domainSpace ( ) const
inlineinherited

access to the domain space

◆ finalize()

void Dune::Fem::LocalMatrixDefault< LocalMatrixTraits< MatrixObject > >::finalize ( )
inlineinherited

finalize local matrix setup and possibly add values to real matrix

◆ get()

const RangeFieldType Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::get ( const int  localRow,
const int  localCol 
) const
inlineinherited

get value of matrix entry (row,col) where row and col are local row and local column

Parameters
[in]localRowlocal row
[in]localCollocal column
Returns
value of matrix entry

◆ multiplyAdd()

void Dune::Fem::LocalMatrixDefault< LocalMatrixTraits< MatrixObject > >::multiplyAdd ( const DomainLocalFunctionType &  lhs,
RangeLocalFunctionType &  rhs 
) const
inlineinherited

multiply left hand side with local matrix and add to right hand side rhs += Matrix * lhs

Parameters
[in]lhsleft hand side
[out]rhsright hand side

◆ rangeBasisFunctionSet()

const RangeBasisFunctionSetType & Dune::Fem::LocalMatrixDefault< LocalMatrixTraits< MatrixObject > >::rangeBasisFunctionSet ( ) const
inlineinherited

access to the base function set within the range space

◆ rangeSpace()

const RangeSpaceType & Dune::Fem::LocalMatrixDefault< LocalMatrixTraits< MatrixObject > >::rangeSpace ( ) const
inlineinherited

access to the range space

◆ scale()

void Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::scale ( const RangeFieldType scalar)
inlineinherited

scale matrix with scalar value

Parameters
[in]scalarscalar value that scales the matrix

◆ set()

void Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::set ( const int  localRow,
const int  localCol,
const RangeFieldType value 
)
inlineinherited

set value of matrix entry (row,col) where row and col are local row and local column

Parameters
[in]localRowlocal row
[in]localCollocal column
[in]valuevalue to set

◆ unbind()

void Dune::Fem::LocalMatrixDefault< LocalMatrixTraits< MatrixObject > >::unbind ( )
inlineinherited

clear local matrix from entities


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 21, 23:30, 2024)