DUNE-FEM (unstable)

Dune::Fem::LocalMatrixInterface< LocalMatrixTraits > Class Template Reference

Interface for local matrix classes. More...

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

Public Types

typedef LocalMatrixTraits Traits
 type of traits class
 
typedef ThisType LocalMatrixInterfaceType
 type of this interface
 
typedef Traits::LocalMatrixType LocalMatrixType
 type of local matrix implementation
 
typedef Traits::RangeFieldType RangeFieldType
 type of range field
 
typedef Traits::DomainSpaceType DomainSpaceType
 type of domain discrete function space
 
typedef Traits::RangeSpaceType RangeSpaceType
 type of range discrete function space
 
typedef DomainSpaceType::BasisFunctionSetType DomainBasisFunctionSetType
 type of base function sets within domain function space
 
typedef RangeSpaceType::BasisFunctionSetType RangeBasisFunctionSetType
 type of base function sets within range function space
 
typedef Traits::LittleBlockType LittleBlockType
 

Public Member Functions

void init (const DomainEntityType &domainEntity, const RangeEntityType &rangeEntity)
 initialize the local matrix to entities More...
 
void bind (const DomainEntityType &domainEntity, const RangeEntityType &rangeEntity)
 initialize the local matrix to entities More...
 
void unbind ()
 clear local matrix from entities
 
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...
 
void clearRow (const int localRow)
 set row to zero values More...
 
void clearCol (const int localCol)
 ser column entries to zero More...
 
template<class DomainLocalFunctionType , class RangeLocalFunctionType >
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...
 
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...
 
void clear ()
 set all entries of local matrix to zero
 
void resort ()
 resort ordering in global matrix (if possible)
 
int rows () const
 get number of rows within the matrix
 
int columns () const
 get number of columns within the matrix
 
const DomainSpaceTypedomainSpace () const
 access to the domain space
 
const RangeSpaceTyperangeSpace () const
 access to the range space
 
const DomainBasisFunctionSetTypedomainBasisFunctionSet () const
 access to the base function set within the domain space
 
const RangeBasisFunctionSetTyperangeBasisFunctionSet () const
 access to the base function set within the range space
 
MatrixColumnType column (const unsigned int col)
 return column object for local matrix which contains axpy methods for convenience More...
 
void finalize ()
 finalize local matrix setup and possibly add values to real matrix
 

Protected Member Functions

 LocalMatrixInterface ()
 constructor
 

Detailed Description

template<class LocalMatrixTraits>
class Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >

Interface for local matrix classes.

Member Typedef Documentation

◆ LittleBlockType

template<class LocalMatrixTraits >
typedef Traits::LittleBlockType Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::LittleBlockType

type of block (i.e. FieldMatrix for BlockMatrices

Member Function Documentation

◆ add()

template<class LocalMatrixTraits >
void Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::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

References Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::add(), and CHECK_AND_CALL_INTERFACE_IMPLEMENTATION.

Referenced by Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::add().

◆ bind()

template<class LocalMatrixTraits >
void Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::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::LocalMatrixInterface< LocalMatrixTraits >::bind(), and CHECK_AND_CALL_INTERFACE_IMPLEMENTATION.

Referenced by Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::bind().

◆ clearCol()

template<class LocalMatrixTraits >
void Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::clearCol ( const int  localCol)
inline

ser column entries to zero

Parameters
[in]localCollocal column that is set to zero

References CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::clearCol().

Referenced by Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::clearCol().

◆ clearRow()

template<class LocalMatrixTraits >
void Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::clearRow ( const int  localRow)
inline

set row to zero values

Parameters
[in]localRowlocal row that is set to zero

References CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::clearRow().

Referenced by Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::clearRow().

◆ column()

template<class LocalMatrixTraits >
MatrixColumnType Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::column ( const unsigned int  col)
inline

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

Parameters
collocal column number
Returns
object of type MatrixColumnObject

◆ get()

template<class LocalMatrixTraits >
const RangeFieldType Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::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 LocalMatrixTraits >
void Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::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 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::init().

Referenced by Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::init().

◆ multiplyAdd()

template<class LocalMatrixTraits >
template<class DomainLocalFunctionType , class RangeLocalFunctionType >
void Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::multiplyAdd ( const DomainLocalFunctionType &  lhs,
RangeLocalFunctionType &  rhs 
) const
inline

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

References CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::multiplyAdd().

Referenced by Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::multiplyAdd().

◆ scale()

template<class LocalMatrixTraits >
void Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::scale ( const RangeFieldType scalar)
inline

scale matrix with scalar value

Parameters
[in]scalarscalar value that scales the matrix

References CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::scale().

Referenced by Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::scale().

◆ set()

template<class LocalMatrixTraits >
void Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::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

References CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::set().

Referenced by Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::set().


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)