dune-fem  2.4.1-rc
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Dune::Fem::LocalMatrixDefault< LocalMatrixTraits > Class Template Reference

Default implementation for local matrix classes. More...

#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/operator/common/localmatrix.hh>

Inheritance diagram for Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >:
Inheritance graph

Public Types

typedef LocalMatrixTraits Traits
 
typedef BaseType::DomainSpaceType DomainSpaceType
 
typedef BaseType::RangeSpaceType RangeSpaceType
 
typedef BaseType::DomainBasisFunctionSetType DomainBasisFunctionSetType
 
typedef BaseType::RangeBasisFunctionSetType RangeBasisFunctionSetType
 
typedef BaseType::DomainEntityType DomainEntityType
 
typedef BaseType::RangeEntityType RangeEntityType
 
typedef ThisType LocalMatrixInterfaceType
 type of this interface More...
 
typedef Traits::LocalMatrixType LocalMatrixType
 type of local matrix implementation More...
 
typedef Traits::RangeFieldType RangeFieldType
 type of range field More...
 
typedef Traits::LittleBlockType LittleBlockType
 
typedef MatrixColumnObject< TraitsMatrixColumnType
 

Public Member Functions

void init (const DomainEntityType &domainEntity, const RangeEntityType &rangeEntity)
 initialize the local matrix to entities More...
 
void resort ()
 resort ordering in global matrix (if possible) More...
 
void finalize ()
 finalize local matrix setup and possibly add values to real matrix More...
 
int rows () const
 get number of rows within the matrix More...
 
int columns () const
 get number of columns within the matrix More...
 
const DomainSpaceTypedomainSpace () const
 access to the domain space More...
 
const RangeSpaceTyperangeSpace () 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...
 
const DomainEntityTypedomainEntity () const
 
const RangeEntityTyperangeEntity () const
 
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...
 
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...
 
void clear ()
 set all entries of local matrix to zero More...
 
MatrixColumnType column (const unsigned int col)
 return column object for local matrix which contains axpy methods for convenience More...
 

Protected Member Functions

 LocalMatrixDefault (const DomainSpaceType &domainSpace, const RangeSpaceType &rangeSpace)
 
template<class DomainEntityType , class RangeEntityType >
 LocalMatrixDefault (const DomainSpaceType &domainSpace, const RangeSpaceType &rangeSpace, const DomainEntityType &domainEntity, const RangeEntityType &rangeEntity)
 
 LocalMatrixDefault (const LocalMatrixDefault &org)
 
const LocalMatrixTraits::LocalMatrixType & asImp () const
 
LocalMatrixTraits::LocalMatrixType & asImp ()
 

Static Protected Member Functions

static const LocalMatrixTraits::LocalMatrixType & asImp (const ThisType &other)
 
static LocalMatrixTraits::LocalMatrixType & asImp (ThisType &other)
 

Protected Attributes

const DomainSpaceTypedomainSpace_
 
const RangeSpaceTyperangeSpace_
 
DomainBasisFunctionSetType domainBaseSet_
 
RangeBasisFunctionSetType rangeBaseSet_
 

Detailed Description

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

Default implementation for local matrix classes.

Member Typedef Documentation

template<class LocalMatrixTraits>
typedef BaseType::DomainBasisFunctionSetType Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::DomainBasisFunctionSetType
template<class LocalMatrixTraits>
typedef BaseType::DomainEntityType Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::DomainEntityType
template<class LocalMatrixTraits>
typedef BaseType::DomainSpaceType Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::DomainSpaceType
template<class LocalMatrixTraits>
typedef Traits :: LittleBlockType Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::LittleBlockType
inherited

type of block (i.e. FieldMatrix for BlockMatrices

template<class LocalMatrixTraits>
typedef ThisType Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::LocalMatrixInterfaceType
inherited

type of this interface

template<class LocalMatrixTraits>
typedef Traits :: LocalMatrixType Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::LocalMatrixType
inherited

type of local matrix implementation

template<class LocalMatrixTraits>
typedef MatrixColumnObject< Traits > Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::MatrixColumnType
inherited
template<class LocalMatrixTraits>
typedef BaseType::RangeBasisFunctionSetType Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::RangeBasisFunctionSetType
template<class LocalMatrixTraits>
typedef BaseType::RangeEntityType Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::RangeEntityType
template<class LocalMatrixTraits>
typedef Traits :: RangeFieldType Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::RangeFieldType
inherited

type of range field

template<class LocalMatrixTraits>
typedef BaseType::RangeSpaceType Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::RangeSpaceType
template<class LocalMatrixTraits>
typedef LocalMatrixTraits Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::Traits

Constructor & Destructor Documentation

template<class LocalMatrixTraits>
Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::LocalMatrixDefault ( const DomainSpaceType domainSpace,
const RangeSpaceType rangeSpace 
)
inlineprotected
template<class LocalMatrixTraits>
template<class DomainEntityType , class RangeEntityType >
Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::LocalMatrixDefault ( const DomainSpaceType domainSpace,
const RangeSpaceType rangeSpace,
const DomainEntityType domainEntity,
const RangeEntityType rangeEntity 
)
inlineprotected
template<class LocalMatrixTraits>
Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::LocalMatrixDefault ( const LocalMatrixDefault< LocalMatrixTraits > &  org)
inlineprotected

Member Function Documentation

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

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

static const LocalMatrixTraits::LocalMatrixType & Dune::Fem::BartonNackmanInterface< LocalMatrixInterface< LocalMatrixTraits > , LocalMatrixTraits::LocalMatrixType >::asImp ( const ThisType other)
inlinestaticprotectedinherited
static LocalMatrixTraits::LocalMatrixType & Dune::Fem::BartonNackmanInterface< LocalMatrixInterface< LocalMatrixTraits > , LocalMatrixTraits::LocalMatrixType >::asImp ( ThisType other)
inlinestaticprotectedinherited
const LocalMatrixTraits::LocalMatrixType & Dune::Fem::BartonNackmanInterface< LocalMatrixInterface< LocalMatrixTraits > , LocalMatrixTraits::LocalMatrixType >::asImp ( ) const
inlineprotectedinherited

Referenced by Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::add(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::clear(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::clearCol(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::clearRow(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::column(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::columns(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::domainBasisFunctionSet(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::domainEntity(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::domainSpace(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::finalize(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::get(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::init(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::multiplyAdd(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::rangeBasisFunctionSet(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::rangeEntity(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::rangeSpace(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::resort(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::rows(), Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::scale(), and Dune::Fem::LocalMatrixInterface< LocalMatrixTraits< MatrixObject > >::set().

LocalMatrixTraits::LocalMatrixType & Dune::Fem::BartonNackmanInterface< LocalMatrixInterface< LocalMatrixTraits > , LocalMatrixTraits::LocalMatrixType >::asImp ( )
inlineprotectedinherited
template<class LocalMatrixTraits>
void Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::clear ( )
inlineinherited

set all entries of local matrix to zero

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

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

ser column entries to zero

Parameters
[in]localCollocal column that is set to zero
template<class LocalMatrixTraits>
void Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::clearRow ( const int  localRow)
inline

set row to zero values

Parameters
[in]localRowlocal row that is set to zero
template<class LocalMatrixTraits>
MatrixColumnType Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::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
template<class LocalMatrixTraits>
int Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::columns ( ) const
inline

get number of columns within the matrix

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

access to the base function set within the domain space

template<class LocalMatrixTraits>
const DomainEntityType& Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::domainEntity ( ) const
inline
template<class LocalMatrixTraits>
const DomainSpaceType& Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::domainSpace ( ) const
inline

access to the domain space

template<class LocalMatrixTraits>
void Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::finalize ( )
inline

finalize local matrix setup and possibly add values to real matrix

template<class LocalMatrixTraits>
const RangeFieldType Dune::Fem::LocalMatrixInterface< LocalMatrixTraits >::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
template<class LocalMatrixTraits>
void Dune::Fem::LocalMatrixDefault< 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
template<class LocalMatrixTraits>
template<class DomainLocalFunctionType , class RangeLocalFunctionType >
void Dune::Fem::LocalMatrixDefault< 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
template<class LocalMatrixTraits>
const RangeBasisFunctionSetType& Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::rangeBasisFunctionSet ( ) const
inline

access to the base function set within the range space

template<class LocalMatrixTraits>
const RangeEntityType& Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::rangeEntity ( ) const
inline
template<class LocalMatrixTraits>
const RangeSpaceType& Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::rangeSpace ( ) const
inline

access to the range space

template<class LocalMatrixTraits>
void Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::resort ( )
inline

resort ordering in global matrix (if possible)

template<class LocalMatrixTraits>
int Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::rows ( ) const
inline

get number of rows within the matrix

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

scale matrix with scalar value

Parameters
[in]scalarscalar value that scales the matrix

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

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

Member Data Documentation

template<class LocalMatrixTraits>
DomainBasisFunctionSetType Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::domainBaseSet_
protected
template<class LocalMatrixTraits>
const DomainSpaceType& Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::domainSpace_
protected
template<class LocalMatrixTraits>
RangeBasisFunctionSetType Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::rangeBaseSet_
protected
template<class LocalMatrixTraits>
const RangeSpaceType& Dune::Fem::LocalMatrixDefault< LocalMatrixTraits >::rangeSpace_
protected

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