dune-fem 2.8.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
Dune::Fem::StaticArray< T > Class Template Reference

An implementation of DenseVector which uses a C-array of fixed size as storage. More...

#include <dune/fem/storage/dynamicarray.hh>

Inheritance diagram for Dune::Fem::StaticArray< T >:
Inheritance graph

Public Types

typedef BaseType::size_type size_type
 
typedef BaseType::value_type value_type
 
typedef value_type FieldType
 
typedef DenseMatVecTraits< ThisType >::container_type DofStorageType
 

Public Member Functions

 StaticArray (const ThisType &)=delete
 
 StaticArray (size_type size, const value_type *vec)
 create array of length size and store vec as pointer to memory
 
size_type size () const
 return size of array
 
value_typeoperator[] (size_type i)
 random access operator
 
const value_typeoperator[] (size_type i) const
 random access operator
 
ThisTypeoperator= (const ThisType &org)
 copy assignament
 
void clear ()
 set all entries to 0
 
void memmove (size_type length, size_type oldStartIdx, size_type newStartIdx)
 move memory from old to new destination
 
bool operator== (const ThisType &other) const
 
value_typedata ()
 return pointer to data
 
const value_typedata () const
 return pointer to data
 

Protected Attributes

DofStorageType vec_
 
size_type size_
 

Detailed Description

template<class T>
class Dune::Fem::StaticArray< T >

An implementation of DenseVector which uses a C-array of fixed size as storage.

Template Parameters
Tis the field type (use float, double, complex, etc)

Member Typedef Documentation

◆ DofStorageType

template<class T >
typedef DenseMatVecTraits<ThisType>::container_type Dune::Fem::StaticArray< T >::DofStorageType

◆ FieldType

template<class T >
typedef value_type Dune::Fem::StaticArray< T >::FieldType

◆ size_type

template<class T >
typedef BaseType::size_type Dune::Fem::StaticArray< T >::size_type

◆ value_type

template<class T >
typedef BaseType::value_type Dune::Fem::StaticArray< T >::value_type

Constructor & Destructor Documentation

◆ StaticArray() [1/2]

template<class T >
Dune::Fem::StaticArray< T >::StaticArray ( const ThisType )
delete

◆ StaticArray() [2/2]

template<class T >
Dune::Fem::StaticArray< T >::StaticArray ( size_type  size,
const value_type vec 
)
inlineexplicit

create array of length size and store vec as pointer to memory

Member Function Documentation

◆ clear()

template<class T >
void Dune::Fem::StaticArray< T >::clear ( )
inline

set all entries to 0

◆ data() [1/2]

template<class T >
value_type * Dune::Fem::StaticArray< T >::data ( )
inline

return pointer to data

◆ data() [2/2]

template<class T >
const value_type * Dune::Fem::StaticArray< T >::data ( ) const
inline

return pointer to data

◆ memmove()

template<class T >
void Dune::Fem::StaticArray< T >::memmove ( size_type  length,
size_type  oldStartIdx,
size_type  newStartIdx 
)
inline

move memory from old to new destination

◆ operator=()

template<class T >
ThisType & Dune::Fem::StaticArray< T >::operator= ( const ThisType org)
inline

copy assignament

◆ operator==()

template<class T >
bool Dune::Fem::StaticArray< T >::operator== ( const ThisType other) const
inline

comparison operator: checks for object identity, i.e. if this and other are the same objects in memory rather than containing the same data

◆ operator[]() [1/2]

template<class T >
value_type & Dune::Fem::StaticArray< T >::operator[] ( size_type  i)
inline

random access operator

◆ operator[]() [2/2]

template<class T >
const value_type & Dune::Fem::StaticArray< T >::operator[] ( size_type  i) const
inline

random access operator

◆ size()

template<class T >
size_type Dune::Fem::StaticArray< T >::size ( ) const
inline

return size of array

Member Data Documentation

◆ size_

template<class T >
size_type Dune::Fem::StaticArray< T >::size_
protected

◆ vec_

template<class T >
DofStorageType Dune::Fem::StaticArray< T >::vec_
protected

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