1#ifndef DUNE_FEM_LOCALMATRIXWRAPPER_HH
2#define DUNE_FEM_LOCALMATRIXWRAPPER_HH
15 template<
class LocalMatrixStack >
16 class LocalMatrixWrapper;
23 template<
class LocalMatrixStack >
45 template<
class LocalMatrixStack >
74 typedef typename LocalMatrixStackType::PointerType WrappedLocalMatrixPtrType;
78 WrappedLocalMatrixPtrType localMatrixPtr_;
86 : localMatrixPtr_( stack.getObject() ),
87 localMatrix_( *localMatrixPtr_ )
91 template<
class DomainEntityType,
class RangeEntityType >
95 : localMatrixPtr_( stack.getObject() ),
96 localMatrix_( *localMatrixPtr_ )
107 : localMatrixPtr_( other.localMatrixPtr_ ),
108 localMatrix_( *localMatrixPtr_ )
153 const int localCol )
const
189 template <
class DomainLocalFunctionImp,
190 class RangeLocalFunctionImp>
192 RangeLocalFunctionImp& rLf)
Definition: bindguard.hh:11
Interface for local matrix classes.
Definition: localmatrix.hh:32
Traits::DomainSpaceType DomainSpaceType
type of domain discrete function space
Definition: localmatrix.hh:52
Traits::RangeSpaceType RangeSpaceType
type of range discrete function space
Definition: localmatrix.hh:55
RangeSpaceType::EntityType RangeEntityType
Definition: localmatrix.hh:66
RangeSpaceType::BasisFunctionSetType RangeBasisFunctionSetType
type of base function sets within range function space
Definition: localmatrix.hh:63
DomainSpaceType::BasisFunctionSetType DomainBasisFunctionSetType
type of base function sets within domain function space
Definition: localmatrix.hh:59
DomainSpaceType::EntityType DomainEntityType
Definition: localmatrix.hh:65
Definition: localmatrixwrapper.hh:48
void add(int localRow, int localCol, const RangeFieldType &value)
add value to matrix entry (row,col) where row and col are local row and local column
Definition: localmatrixwrapper.hh:128
void multiplyAdd(const DomainLocalFunctionImp &dLf, RangeLocalFunctionImp &rLf)
multiply left hand side with local matrix and add to right hand side rhs += Matrix * lhs
Definition: localmatrixwrapper.hh:191
const RangeSpaceType & rangeSpace() const
access to the range space
Definition: localmatrixwrapper.hh:204
BaseType::DomainSpaceType DomainSpaceType
Definition: localmatrixwrapper.hh:64
LocalMatrixWrapperTraits< LocalMatrixStackType > Traits
type of the traits
Definition: localmatrixwrapper.hh:57
void clearCol(const int localCol)
set row to zero values
Definition: localmatrixwrapper.hh:146
const DomainEntityType & domainEntity() const
Definition: localmatrixwrapper.hh:209
const DomainBasisFunctionSetType & domainBasisFunctionSet() const
access to the base function set within the domain space
Definition: localmatrixwrapper.hh:213
const RangeBasisFunctionSetType & rangeBasisFunctionSet() const
access to the base function set within the range space
Definition: localmatrixwrapper.hh:219
void clearRow(const int localRow)
set row to zero values
Definition: localmatrixwrapper.hh:140
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
Definition: localmatrixwrapper.hh:152
const RangeEntityType & rangeEntity() const
Definition: localmatrixwrapper.hh:210
void scale(const RangeFieldType &scalar)
scale matrix with scalar value
Definition: localmatrixwrapper.hh:159
LocalMatrixWrapper(LocalMatrixStackType &stack)
constructor creating an uninitialized local matrix
Definition: localmatrixwrapper.hh:85
LocalMatrixWrapper(const ThisType &other)
copy constructor
Definition: localmatrixwrapper.hh:106
void clear()
set all entries of local matrix to zero
Definition: localmatrixwrapper.hh:165
WrappedLocalMatrixType & localMatrix()
Definition: localmatrixwrapper.hh:226
BaseType::RangeEntityType RangeEntityType
Definition: localmatrixwrapper.hh:71
Traits::RangeFieldType RangeFieldType
Definition: localmatrixwrapper.hh:62
~LocalMatrixWrapper()
destructor
Definition: localmatrixwrapper.hh:112
int columns() const
get number of columns within the matrix
Definition: localmatrixwrapper.hh:183
void init(const DomainEntityType &domainEntity, const RangeEntityType &rangeEntity)
initialize the local matrix to entities
Definition: localmatrixwrapper.hh:122
BaseType::DomainBasisFunctionSetType DomainBasisFunctionSetType
Definition: localmatrixwrapper.hh:67
const DomainSpaceType & domainSpace() const
access to the domain space
Definition: localmatrixwrapper.hh:198
int rows() const
get number of rows within the matrix
Definition: localmatrixwrapper.hh:177
void resort()
resort ordering in global matrix (if possible)
Definition: localmatrixwrapper.hh:171
void set(int localRow, int localCol, const RangeFieldType &value)
set value of matrix entry (row,col) where row and col are local row and local column
Definition: localmatrixwrapper.hh:134
BaseType::RangeSpaceType RangeSpaceType
Definition: localmatrixwrapper.hh:65
LocalMatrixStack LocalMatrixStackType
type of the local matrix stack
Definition: localmatrixwrapper.hh:54
BaseType::DomainEntityType DomainEntityType
Definition: localmatrixwrapper.hh:70
ThisType & operator=(const ThisType &)=delete
Traits::WrappedLocalMatrixType WrappedLocalMatrixType
type of the wrapped local matrix
Definition: localmatrixwrapper.hh:60
LocalMatrixWrapper(LocalMatrixStackType &stack, const DomainEntityType &domainEntity, const RangeEntityType &rangeEntity)
constructor initializing the wrapped local matrix
Definition: localmatrixwrapper.hh:92
const WrappedLocalMatrixType & localMatrix() const
Definition: localmatrixwrapper.hh:225
BaseType::RangeBasisFunctionSetType RangeBasisFunctionSetType
Definition: localmatrixwrapper.hh:68
Definition: localmatrixwrapper.hh:25
LocalMatrixStack::ObjectType WrappedLocalMatrixType
Definition: localmatrixwrapper.hh:28
LocalMatrixWrapper< LocalMatrixStackType > LocalMatrixType
Definition: localmatrixwrapper.hh:30
WrappedLocalMatrixType::DomainSpaceType DomainSpaceType
Definition: localmatrixwrapper.hh:34
LocalMatrixStack LocalMatrixStackType
Definition: localmatrixwrapper.hh:26
WrappedLocalMatrixType::RangeFieldType RangeFieldType
Definition: localmatrixwrapper.hh:32
WrappedLocalMatrixType::RangeSpaceType RangeSpaceType
Definition: localmatrixwrapper.hh:35
WrappedLocalMatrixType::LittleBlockType LittleBlockType
Definition: localmatrixwrapper.hh:37