dune-fem
2.4.1-rc
|
Static Array Wrapper for simple C Vectors like double* and int*. This also works as base class for the MutableArray which is used to store the degrees of freedom. More...
#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/space/common/arrays.hh>
Public Types | |
typedef T | FieldType |
typedef T | value_type |
definition conforming to STL More... | |
typedef T | block_type |
definition conforming to ISTL More... | |
typedef GenericIterator< ThisType, T > | DofIteratorType |
DofIterator. More... | |
typedef DofIteratorType | iterator |
make compatible with std::vector More... | |
typedef GenericIterator< const ThisType, const T > | ConstDofIteratorType |
Const DofIterator. More... | |
typedef ConstDofIteratorType | const_iterator |
make compatible with std::vector More... | |
typedef size_t | size_type |
type of unsigned integral type of indexing More... | |
Public Member Functions | |
StaticArray (const size_t size, T *vec) | |
create array of length size and store vec as pointer to memory More... | |
StaticArray (const size_t size, const T *vec) | |
create array of length size and store vec as pointer to memory More... | |
DofIteratorType | begin () |
iterator pointing to begin of array More... | |
ConstDofIteratorType | begin () const |
const iterator pointing to begin of array More... | |
DofIteratorType | end () |
iterator pointing to end of array More... | |
ConstDofIteratorType | end () const |
const iterator pointing to end of array More... | |
size_t | size () const |
return number of enties of array More... | |
T & | operator[] (const size_t i) |
return reference to entry i More... | |
const T & | operator[] (const size_t i) const |
return reference to const entry i More... | |
ThisType & | operator= (const ThisType &org) |
assign arrays More... | |
ThisType & | operator+= (const ThisType &org) |
operator += More... | |
ThisType & | operator-= (const ThisType &org) |
operator -= More... | |
ThisType & | operator*= (const T scalar) |
operator *= multiplies array with a scalar More... | |
ThisType & | operator/= (const T scalar) |
operator /= divides array with a scalar More... | |
ThisType & | operator= (const T scalar) |
operator = assign all entrys to given scalar value More... | |
void | axpy (const ThisType &org, const T scalar) |
axpy operation More... | |
void | clear () |
set all entries to zero More... | |
void | memmove (const int length, const int oldStartIdx, const int newStartIdx) |
move memory from old to new destination More... | |
bool | operator== (const ThisType &other) const |
T * | leakPointer () |
return leak pointer for usage in BLAS routines More... | |
const T * | leakPointer () const |
return leak pointer for usage in BLAS routines More... | |
T * | data () |
return leak pointer for usage in BLAS routines More... | |
const T * | data () const |
return leak pointer for usage in BLAS routines More... | |
template<class StreamTraits > | |
bool | write (OutStreamInterface< StreamTraits > &out) const |
write to stream More... | |
template<class StreamTraits > | |
bool | read (InStreamInterface< StreamTraits > &in) |
write to stream More... | |
void | print (std::ostream &s) const |
print array More... | |
template<> | |
void | axpy (const ThisType &org, const double scalar) |
template<> | |
void | clear () |
template<> | |
void | clear () |
Protected Types | |
typedef StaticArray< T > | ThisType |
Protected Member Functions | |
StaticArray (const StaticArray &) | |
Protected Attributes | |
T * | vec_ |
size_t | size_ |
Static Array Wrapper for simple C Vectors like double* and int*. This also works as base class for the MutableArray which is used to store the degrees of freedom.
typedef T Dune::Fem::StaticArray< T >::block_type |
definition conforming to ISTL
typedef ConstDofIteratorType Dune::Fem::StaticArray< T >::const_iterator |
make compatible with std::vector
typedef GenericIterator<const ThisType, const T> Dune::Fem::StaticArray< T >::ConstDofIteratorType |
Const DofIterator.
typedef GenericIterator<ThisType, T> Dune::Fem::StaticArray< T >::DofIteratorType |
DofIterator.
typedef T Dune::Fem::StaticArray< T >::FieldType |
typedef DofIteratorType Dune::Fem::StaticArray< T >::iterator |
make compatible with std::vector
typedef size_t Dune::Fem::StaticArray< T >::size_type |
type of unsigned integral type of indexing
|
protected |
typedef T Dune::Fem::StaticArray< T >::value_type |
definition conforming to STL
|
protected |
|
inlineexplicit |
create array of length size and store vec as pointer to memory
|
inlineexplicit |
create array of length size and store vec as pointer to memory
|
inline |
axpy operation
|
inline |
References Dune::Fem::StaticArray< T >::vec_.
|
inline |
iterator pointing to begin of array
Referenced by Dune::Fem::CodimIndexSet< GridImp >::read(), and Dune::Fem::CodimIndexSet< GridImp >::resetUsed().
|
inline |
const iterator pointing to begin of array
|
inline |
set all entries to zero
|
inline |
|
inline |
|
inline |
return leak pointer for usage in BLAS routines
|
inline |
return leak pointer for usage in BLAS routines
|
inline |
iterator pointing to end of array
Referenced by Dune::Fem::CodimIndexSet< GridImp >::read(), and Dune::Fem::CodimIndexSet< GridImp >::resetUsed().
|
inline |
const iterator pointing to end of array
|
inline |
return leak pointer for usage in BLAS routines
|
inline |
return leak pointer for usage in BLAS routines
|
inline |
move memory from old to new destination
|
inline |
operator *= multiplies array with a scalar
|
inline |
operator +=
|
inline |
operator -=
|
inline |
operator /= divides array with a scalar
|
inline |
assign arrays
|
inline |
operator = assign all entrys to given scalar value
|
inline |
Comparison operator The comparison operator checks for object identity, i.e. if this and other are the same objects in memory rather than containing the same data
|
inline |
return reference to entry i
|
inline |
return reference to const entry i
|
inline |
print array
|
inline |
write to stream
|
inline |
return number of enties of array
Referenced by Dune::Fem::CodimIndexSet< GridImp >::additionalSizeEstimate(), Dune::Fem::LocalDGPass< DiscreteModelImp, PreviousPassImp >::applyLocal(), Dune::Fem::LocalDGPass< DiscreteModelImp, PreviousPassImp >::applyLocalNeighbor(), Dune::Fem::CodimIndexSet< GridImp >::clearHoles(), Dune::Fem::CodimIndexSet< GridImp >::compress(), Dune::Fem::CodimIndexSet< GridImp >::consecutive(), Dune::Fem::LocalDGPass< DiscreteModelImp, PreviousPassImp >::evalVolumetricPartBoth(), Dune::Fem::LocalDGPass< DiscreteModelImp, PreviousPassImp >::evalVolumetricPartFlux(), Dune::Fem::CodimIndexSet< GridImp >::exists(), Dune::Fem::CommunicationIndexMap::insert(), Dune::Fem::CodimIndexSet< GridImp >::insertIdx(), Dune::Fem::SpecialArrayFeatures< MutableArray< ValueType > >::memMoveBackward(), Dune::Fem::CodimIndexSet< GridImp >::newIndex(), Dune::Fem::CodimIndexSet< GridImp >::oldIndex(), Dune::Fem::StaticArray< JacobianRangeType >::operator-=(), Dune::Fem::LocalDGPass< DiscreteModelImp, PreviousPassImp >::prepare(), Dune::Fem::CommunicationIndexMap::size(), Dune::Fem::CodimIndexSet< GridImp >::size(), Dune::Fem::ThreadIterator< GridPart, ptype >::thread(), Dune::Fem::ThreadIterator< GridPart, ptype >::update(), Dune::Fem::CodimIndexSet< GridImp >::write(), and Dune::Fem::CommunicationIndexMap::writeToBuffer().
|
inline |
write to stream
|
protected |
|
protected |
Referenced by Dune::Fem::StaticArray< JacobianRangeType >::axpy(), Dune::Fem::StaticArray< T >::axpy(), Dune::Fem::StaticArray< JacobianRangeType >::operator+=(), Dune::Fem::StaticArray< JacobianRangeType >::operator-=(), Dune::Fem::StaticArray< JacobianRangeType >::operator=(), Dune::Fem::MutableArray< JacobianRangeType >::operator=(), and Dune::Fem::StaticArray< JacobianRangeType >::operator==().