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::DynamicVector< Field, ArrayAllocator > Class Template Reference

A vector using a DynamicArray as storage. More...

#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/storage/vector.hh>

Inheritance diagram for Dune::Fem::DynamicVector< Field, ArrayAllocator >:
Inheritance graph

Public Types

typedef Field FieldType
 field type of the vector More...
 
typedef BaseType::VectorInterfaceType VectorInterfaceType
 
typedef BaseType::VectorType VectorType
 
typedef BaseType::ConstIteratorType ConstIteratorType
 
typedef BaseType::IteratorType IteratorType
 
typedef VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > Traits
 
typedef FieldType value_type
 
typedef Traits::ArrayType ArrayType
 type of the implementation (Barton-Nackman) More...
 
typedef ThisType ArrayInterfaceType
 type of this interface More...
 
typedef Traits::ElementType ElementType
 type of the array elements More...
 
typedef ConstIteratorType const_iterator
 type of constant iterator More...
 
typedef IteratorType iterator
 type of (non-constant) iterator More...
 
typedef unsigned int size_type
 type of unsigned integral type of indexing More...
 

Public Member Functions

 DynamicVector (unsigned int size=0)
 Constructor setting up a vector of a specified size. More...
 
 DynamicVector (unsigned int size, const FieldType s)
 Constructor setting up a vector iniitialized with a constant value. More...
 
template<class T >
 DynamicVector (const VectorInterface< T > &v)
 Copy constructor setting up a vector with the data of another one. More...
 
 DynamicVector (const ThisType &v)
 Copy constructor setting up a vector with the data of another one (of the same type) More...
 
template<class T >
ThisTypeoperator= (const VectorInterface< T > &v)
 Assign another vector to this one. More...
 
ThisTypeoperator= (const ThisType &v)
 Assign another vector (of the same type) to this one. More...
 
ThisTypeoperator= (const FieldType s)
 Initialize all fields of this vector with a scalar. More...
 
const FieldTypeoperator[] (unsigned int index) const
 
FieldTypeoperator[] (unsigned int index)
 
template<class T >
void assign (const VectorInterface< T > &v)
 copy another vector to this one More...
 
const FieldTypeleakPointer () const
 
FieldTypeleakPointer ()
 
void reserve (unsigned int newSize)
 
void resize (unsigned int newSize)
 
void resize (unsigned int newSize, const FieldType defaultValue)
 
unsigned int size () const
 
VectorTypeoperator+= (const VectorInterface< T > &v)
 Add another vector to this one. More...
 
VectorTypeoperator-= (const VectorInterface< T > &v)
 Subtract another vector from this one. More...
 
VectorTypeoperator*= (const FieldType s)
 Multiply this vector by a scalar. More...
 
VectorTypeaddScaled (const FieldType s, const VectorInterface< T > &v)
 Add a multiple of another vector to this one. More...
 
void assign (const FieldType s)
 Initialize all fields of this vector with a scalar. More...
 
void assign (const ElementType &element)
 fill the array with copies of an element More...
 
void assign (const ArrayInterface< T > &other)
 copy another array to this one More...
 
void clear ()
 initialize the vector to 0 More...
 
ConstIteratorType begin () const
 obtain begin iterator More...
 
IteratorType begin ()
 obtain begin iterator More...
 
ConstIteratorType end () const
 obtain end iterator More...
 
IteratorType end ()
 obtain end iterator More...
 

Protected Member Functions

const VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > >::ArrayTypeasImp () const
 
VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > >::ArrayTypeasImp ()
 

Static Protected Member Functions

static const VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > >::ArrayTypeasImp (const ThisType &other)
 
static VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > >::ArrayTypeasImp (ThisType &other)
 

Protected Attributes

DynamicArray< FieldType, ArrayAllocator > fields_
 

Detailed Description

template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
class Dune::Fem::DynamicVector< Field, ArrayAllocator >

A vector using a DynamicArray as storage.

An implementation of VectorInterface using a DynamicArray to provide the fields.

Member Typedef Documentation

type of this interface

type of the implementation (Barton-Nackman)

type of constant iterator

typedef BaseType :: ConstIteratorType Dune::Fem::VectorDefault< Field, DynamicVector< Field, ArrayAllocator > >::ConstIteratorType
inherited

type of the array elements

template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
typedef Field Dune::Fem::DynamicVector< Field, ArrayAllocator >::FieldType

field type of the vector

type of (non-constant) iterator

typedef BaseType :: IteratorType Dune::Fem::VectorDefault< Field, DynamicVector< Field, ArrayAllocator > >::IteratorType
inherited
typedef unsigned int Dune::Fem::ArrayInterface< VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > > >::size_type
inherited

type of unsigned integral type of indexing

typedef VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > Dune::Fem::VectorInterface< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > >::Traits
inherited
typedef FieldType Dune::Fem::VectorInterface< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > >::value_type
inherited
typedef BaseType :: VectorInterfaceType Dune::Fem::VectorDefault< Field, DynamicVector< Field, ArrayAllocator > >::VectorInterfaceType
inherited
typedef BaseType :: VectorType Dune::Fem::VectorDefault< Field, DynamicVector< Field, ArrayAllocator > >::VectorType
inherited

Constructor & Destructor Documentation

template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
Dune::Fem::DynamicVector< Field, ArrayAllocator >::DynamicVector ( unsigned int  size = 0)
inlineexplicit

Constructor setting up a vector of a specified size.

template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
Dune::Fem::DynamicVector< Field, ArrayAllocator >::DynamicVector ( unsigned int  size,
const FieldType  s 
)
inline

Constructor setting up a vector iniitialized with a constant value.

template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
template<class T >
Dune::Fem::DynamicVector< Field, ArrayAllocator >::DynamicVector ( const VectorInterface< T > &  v)
inline

Copy constructor setting up a vector with the data of another one.

template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
Dune::Fem::DynamicVector< Field, ArrayAllocator >::DynamicVector ( const ThisType v)
inline

Copy constructor setting up a vector with the data of another one (of the same type)

Member Function Documentation

VectorType& Dune::Fem::VectorDefault< Field, DynamicVector< Field, ArrayAllocator > >::addScaled ( const FieldType  s,
const VectorInterface< T > &  v 
)
inlineinherited

Add a multiple of another vector to this one.

static const VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > >::ArrayType & Dune::Fem::BartonNackmanInterface< ArrayInterface< VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > > > , VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > >::ArrayType >::asImp ( const ThisType other)
inlinestaticprotectedinherited
static VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > >::ArrayType & Dune::Fem::BartonNackmanInterface< ArrayInterface< VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > > > , VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > >::ArrayType >::asImp ( ThisType other)
inlinestaticprotectedinherited
const VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > >::ArrayType & Dune::Fem::BartonNackmanInterface< ArrayInterface< VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > > > , VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > >::ArrayType >::asImp ( ) const
inlineprotectedinherited
VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > >::ArrayType & Dune::Fem::BartonNackmanInterface< ArrayInterface< VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > > > , VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > >::ArrayType >::asImp ( )
inlineprotectedinherited
void Dune::Fem::ArrayInterface< VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > > >::assign ( const ElementType element)
inlineinherited

fill the array with copies of an element

Parameters
[in]elementelement wich shall be copied into every array entry
void Dune::Fem::ArrayInterface< VectorInterfaceArrayTraits< VectorDefaultTraits< Field, DynamicVector< Field, ArrayAllocator > > > >::assign ( const ArrayInterface< T > &  other)
inlineinherited

copy another array to this one

Copies the data from another array to this one. Both arrays must be of the same size.

Parameters
[in]otherarray to copy
void Dune::Fem::VectorDefault< Field, DynamicVector< Field, ArrayAllocator > >::assign ( const FieldType  s)
inlineinherited

Initialize all fields of this vector with a scalar.

template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
template<class T >
void Dune::Fem::DynamicVector< Field, ArrayAllocator >::assign ( const VectorInterface< T > &  v)
inline

copy another vector to this one

Copies the data from another vector to this one. Both vectors must be of the same size.

Parameters
[in]vvector to copy

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

ConstIteratorType Dune::Fem::VectorDefault< Field, DynamicVector< Field, ArrayAllocator > >::begin ( ) const
inlineinherited

obtain begin iterator

IteratorType Dune::Fem::VectorDefault< Field, DynamicVector< Field, ArrayAllocator > >::begin ( )
inlineinherited

obtain begin iterator

void Dune::Fem::VectorDefault< Field, DynamicVector< Field, ArrayAllocator > >::clear ( )
inlineinherited

initialize the vector to 0

ConstIteratorType Dune::Fem::VectorDefault< Field, DynamicVector< Field, ArrayAllocator > >::end ( ) const
inlineinherited

obtain end iterator

IteratorType Dune::Fem::VectorDefault< Field, DynamicVector< Field, ArrayAllocator > >::end ( )
inlineinherited

obtain end iterator

template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
const FieldType* Dune::Fem::DynamicVector< Field, ArrayAllocator >::leakPointer ( ) const
inline
template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
FieldType* Dune::Fem::DynamicVector< Field, ArrayAllocator >::leakPointer ( )
inline
VectorType& Dune::Fem::VectorDefault< Field, DynamicVector< Field, ArrayAllocator > >::operator*= ( const FieldType  s)
inlineinherited

Multiply this vector by a scalar.

VectorType& Dune::Fem::VectorDefault< Field, DynamicVector< Field, ArrayAllocator > >::operator+= ( const VectorInterface< T > &  v)
inlineinherited

Add another vector to this one.

VectorType& Dune::Fem::VectorDefault< Field, DynamicVector< Field, ArrayAllocator > >::operator-= ( const VectorInterface< T > &  v)
inlineinherited

Subtract another vector from this one.

template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
template<class T >
ThisType& Dune::Fem::DynamicVector< Field, ArrayAllocator >::operator= ( const VectorInterface< T > &  v)
inline

Assign another vector to this one.

template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
ThisType& Dune::Fem::DynamicVector< Field, ArrayAllocator >::operator= ( const ThisType v)
inline

Assign another vector (of the same type) to this one.

template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
ThisType& Dune::Fem::DynamicVector< Field, ArrayAllocator >::operator= ( const FieldType  s)
inline

Initialize all fields of this vector with a scalar.

template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
const FieldType& Dune::Fem::DynamicVector< Field, ArrayAllocator >::operator[] ( unsigned int  index) const
inline
template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
FieldType& Dune::Fem::DynamicVector< Field, ArrayAllocator >::operator[] ( unsigned int  index)
inline
template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
void Dune::Fem::DynamicVector< Field, ArrayAllocator >::reserve ( unsigned int  newSize)
inline
template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
void Dune::Fem::DynamicVector< Field, ArrayAllocator >::resize ( unsigned int  newSize)
inline
template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
void Dune::Fem::DynamicVector< Field, ArrayAllocator >::resize ( unsigned int  newSize,
const FieldType  defaultValue 
)
inline
template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
unsigned int Dune::Fem::DynamicVector< Field, ArrayAllocator >::size ( ) const
inline

Member Data Documentation

template<class Field, template< class > class ArrayAllocator = DefaultArrayAllocator>
DynamicArray< FieldType, ArrayAllocator > Dune::Fem::DynamicVector< Field, ArrayAllocator >::fields_
protected

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