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::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp > Class Template Reference

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

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

Inheritance diagram for Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >:
Inheritance graph

Public Types

typedef DomainSpaceImp DomainSpaceType
 
typedef RangeSpaceImp RangeSpaceType
 
typedef TemporaryLocalMatrixTraits< DomainSpaceType, RangeSpaceTypeTraits
 
typedef Traits::DomainFieldType DomainFieldType
 
typedef Traits::RangeFieldType RangeFieldType
 
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::LittleBlockType LittleBlockType
 
typedef MatrixColumnObject< TraitsMatrixColumnType
 

Public Member Functions

 TemporaryLocalMatrix (const DomainSpaceType &domainSpace, const RangeSpaceType &rangeSpace)
 
template<class DomainEntityType , class RangeEntityType >
 TemporaryLocalMatrix (const DomainSpaceType &domainSpace, const RangeSpaceType &rangeSpace, const DomainEntityType &domainEntity, const RangeEntityType &rangeEntity)
 
template<class DomainEntityType , class RangeEntityType >
void init (const DomainEntityType &domainEntity, const RangeEntityType &rangeEntity)
 initialize the local matrix to 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
 
void clear ()
 set all entries of local matrix to zero More...
 
void clearRow (const int localRow)
 set row to zero values 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
 
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...
 
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

const TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp >::LocalMatrixTypeasImp () const
 
TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp >::LocalMatrixTypeasImp ()
 

Static Protected Member Functions

static const TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp >::LocalMatrixTypeasImp (const ThisType &other)
 
static TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp >::LocalMatrixTypeasImp (ThisType &other)
 

Protected Attributes

Fem::DynamicArray< RangeFieldTypefields_
 
const DomainSpaceTypedomainSpace_
 
const RangeSpaceTyperangeSpace_
 
DomainBasisFunctionSetType domainBaseSet_
 
RangeBasisFunctionSetType rangeBaseSet_
 

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

template<class DomainSpaceImp , class RangeSpaceImp >
typedef Traits :: DomainFieldType Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::DomainFieldType
template<class DomainSpaceImp , class RangeSpaceImp >
typedef DomainSpaceImp Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::DomainSpaceType
typedef Traits :: LittleBlockType Dune::Fem::LocalMatrixInterface< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::LittleBlockType
inherited

type of block (i.e. FieldMatrix for BlockMatrices

typedef ThisType Dune::Fem::LocalMatrixInterface< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::LocalMatrixInterfaceType
inherited

type of this interface

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

type of local matrix implementation

template<class DomainSpaceImp , class RangeSpaceImp >
typedef Traits :: RangeFieldType Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::RangeFieldType
template<class DomainSpaceImp , class RangeSpaceImp >
typedef RangeSpaceImp Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::RangeSpaceType
template<class DomainSpaceImp , class RangeSpaceImp >
typedef TemporaryLocalMatrixTraits< DomainSpaceType, RangeSpaceType > Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::Traits

Constructor & Destructor Documentation

template<class DomainSpaceImp , class RangeSpaceImp >
Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::TemporaryLocalMatrix ( const DomainSpaceType domainSpace,
const RangeSpaceType rangeSpace 
)
inline
template<class DomainSpaceImp , class RangeSpaceImp >
template<class DomainEntityType , class RangeEntityType >
Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::TemporaryLocalMatrix ( const DomainSpaceType domainSpace,
const RangeSpaceType rangeSpace,
const DomainEntityType domainEntity,
const RangeEntityType rangeEntity 
)
inline

Member Function Documentation

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
static const TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp >::LocalMatrixType & Dune::Fem::BartonNackmanInterface< LocalMatrixInterface< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > > , TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp >::LocalMatrixType >::asImp ( const ThisType other)
inlinestaticprotectedinherited
static TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp >::LocalMatrixType & Dune::Fem::BartonNackmanInterface< LocalMatrixInterface< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > > , TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp >::LocalMatrixType >::asImp ( ThisType other)
inlinestaticprotectedinherited
const TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp >::LocalMatrixType & Dune::Fem::BartonNackmanInterface< LocalMatrixInterface< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > > , TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp >::LocalMatrixType >::asImp ( ) const
inlineprotectedinherited
TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp >::LocalMatrixType & Dune::Fem::BartonNackmanInterface< LocalMatrixInterface< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > > , TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp >::LocalMatrixType >::asImp ( )
inlineprotectedinherited
template<class DomainSpaceImp , class RangeSpaceImp >
void Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::clear ( )
inline

set all entries of local matrix to zero

References Dune::Fem::DynamicArray< Element, ArrayAllocator >::assign().

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
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
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
int Dune::Fem::LocalMatrixDefault< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::columns ( ) const
inlineinherited

get number of columns within the matrix

const DomainBasisFunctionSetType& Dune::Fem::LocalMatrixDefault< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::domainBasisFunctionSet ( ) const
inlineinherited

access to the base function set within the domain space

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

access to the domain space

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

finalize local matrix setup and possibly add values to real matrix

template<class DomainSpaceImp , class RangeSpaceImp >
const RangeFieldType Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::get ( const int  localRow,
const int  localCol 
) const
inline
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::DynamicArray< Element, ArrayAllocator >::resize().

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
const RangeBasisFunctionSetType& Dune::Fem::LocalMatrixDefault< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::rangeBasisFunctionSet ( ) const
inlineinherited

access to the base function set within the range space

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

access to the range space

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

resort ordering in global matrix (if possible)

int Dune::Fem::LocalMatrixDefault< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::rows ( ) const
inlineinherited

get number of rows within the matrix

void Dune::Fem::LocalMatrixInterface< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::scale ( const RangeFieldType scalar)
inlineinherited

scale matrix with scalar value

Parameters
[in]scalarscalar value that scales the matrix
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

Member Data Documentation

DomainBasisFunctionSetType Dune::Fem::LocalMatrixDefault< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::domainBaseSet_
protectedinherited
const DomainSpaceType& Dune::Fem::LocalMatrixDefault< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::domainSpace_
protectedinherited
template<class DomainSpaceImp , class RangeSpaceImp >
Fem :: DynamicArray< RangeFieldType > Dune::Fem::TemporaryLocalMatrix< DomainSpaceImp, RangeSpaceImp >::fields_
protected
RangeBasisFunctionSetType Dune::Fem::LocalMatrixDefault< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::rangeBaseSet_
protectedinherited
const RangeSpaceType& Dune::Fem::LocalMatrixDefault< TemporaryLocalMatrixTraits< DomainSpaceImp, RangeSpaceImp > >::rangeSpace_
protectedinherited

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