DUNE-FEM (unstable)

Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp > Class Template Reference

A local matrix with a small array as storage. More...

#include <dune/fem/operator/common/temporarylocalmatrix.hh>

Public Types

typedef std::vector< TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp > > RowType
 remember the value type
 
typedef ThisType LocalMatrixInterfaceType
 type of this interface
 
typedef Traits::LocalMatrixType LocalMatrixType
 type of local matrix implementation
 
typedef Traits::LittleBlockType LittleBlockType
 

Public Member Functions

template<class DomainEntityType , class RangeEntityType >
void init (const DomainEntityType &domainEntity, const RangeEntityType &rangeEntity)
 initialize the local matrix to entities More...
 
template<class DomainEntityType , class RangeEntityType >
void bind (const DomainEntityType &domainEntity, const RangeEntityType &rangeEntity)
 initialize the local matrix to entities More...
 
void unbind ()
 clear local matrix from entities 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 &value)
 scale matrix with scalar value More...
 
void clear ()
 set all entries of local matrix to zero More...
 
void clearRow (const int localRow)
 set row to zero values 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 multiply_AT_A (const DenseMatrix &A)
 this = A^T * A
 
void scale (const TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp > &val)
 scale matrix with scalar
 
DenseMatrix< TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp > > & operator+= (const DenseMatrix &org)
 add matrix
 
DenseMatrix< TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp > > & operator-= (const DenseMatrix &org)
 substract matrix
 
void resort ()
 resort ordering in global matrix (if possible) 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...
 
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 clearCol (const int localCol)
 ser column entries to zero More...
 
MatrixColumnType column (const unsigned int col)
 return column object for local matrix which contains axpy methods for convenience More...
 

Detailed Description

template<class DomainSpaceImp, class RangeSpaceImp>
class Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >

A local matrix with a small array as storage.

A TemporaryLocalMatrix is an implementation of the LocalMatrixInterface storing the matrix values in an array. It is useful when generating multiple local matrices that shall then be added together.

Note
Due to the backing array, accesses to the matrix should be very fast.
Parameters
DomainSpaceImpDiscreteFunctionSpace modelling the domain
RangeSpaceImpDiscreteFunctionSpace modelling the range

Member Typedef Documentation

◆ LittleBlockType

typedef Traits::LittleBlockType Dune::Fem::LocalMatrixInterface< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::LittleBlockType
inherited

type of block (i.e. FieldMatrix for BlockMatrices

Member Function Documentation

◆ add()

template<class DomainSpaceImp , class RangeSpaceImp >
void Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::add ( const int  localRow,
const int  localCol,
const RangeFieldType &  value 
)
inline

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()

template<class DomainSpaceImp , class RangeSpaceImp >
template<class DomainEntityType , class RangeEntityType >
void Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::bind ( const DomainEntityType &  domainEntity,
const RangeEntityType &  rangeEntity 
)
inline

initialize the local matrix to entities

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

References Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::bind().

Referenced by Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::init().

◆ clear()

template<class DomainSpaceImp , class RangeSpaceImp >
void Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::clear ( )
inline

set all entries of local matrix to zero

◆ clearCol()

void Dune::Fem::LocalMatrixDefault< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::clearCol ( const int  localCol)
inlineinherited

ser column entries to zero

Parameters
[in]localCollocal column that is set to zero

◆ clearRow()

template<class DomainSpaceImp , class RangeSpaceImp >
void Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::clearRow ( const int  localRow)
inline

set row to zero values

Parameters
[in]localRowlocal row that is set to zero

◆ column()

MatrixColumnType Dune::Fem::LocalMatrixInterface< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::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()

template<class DomainSpaceImp , class RangeSpaceImp >
const DomainBasisFunctionSetType & Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::domainBasisFunctionSet ( ) const
inline

access to the base function set within the domain space

◆ domainSpace()

const DomainSpaceType & Dune::Fem::LocalMatrixDefault< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::domainSpace ( ) const
inlineinherited

access to the domain space

◆ finalize()

void Dune::Fem::LocalMatrixDefault< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::finalize ( )
inlineinherited

finalize local matrix setup and possibly add values to real matrix

◆ get()

template<class DomainSpaceImp , class RangeSpaceImp >
const RangeFieldType Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::get ( const int  localRow,
const int  localCol 
) const
inline

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

◆ init()

template<class DomainSpaceImp , class RangeSpaceImp >
template<class DomainEntityType , class RangeEntityType >
void Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::init ( const DomainEntityType &  domainEntity,
const RangeEntityType &  rangeEntity 
)
inline

initialize the local matrix to entities

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

References Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::bind().

◆ multiplyAdd()

void Dune::Fem::LocalMatrixDefault< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::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()

template<class DomainSpaceImp , class RangeSpaceImp >
const RangeBasisFunctionSetType & Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::rangeBasisFunctionSet ( ) const
inline

access to the base function set within the range space

◆ rangeSpace()

const RangeSpaceType & Dune::Fem::LocalMatrixDefault< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::rangeSpace ( ) const
inlineinherited

access to the range space

◆ resort()

void Dune::Fem::LocalMatrixDefault< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::resort ( )
inlineinherited

resort ordering in global matrix (if possible)

◆ scale()

template<class DomainSpaceImp , class RangeSpaceImp >
void Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::scale ( const RangeFieldType &  value)
inline

scale matrix with scalar value

Parameters
[in]scalarscalar value that scales the matrix

References Dune::size().

◆ set()

template<class DomainSpaceImp , class RangeSpaceImp >
void Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::set ( const int  localRow,
const int  localCol,
const RangeFieldType &  value 
)
inline

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()

template<class DomainSpaceImp , class RangeSpaceImp >
void Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::unbind ( )
inline

clear local matrix from entities

References Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::unbind().


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)