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::ArrayWrapperVector< FieldImp > Class Template Reference

An implementation of VectorInterface wrapping a standard C++ array. More...

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

Inheritance diagram for Dune::Fem::ArrayWrapperVector< FieldImp >:
Inheritance graph

Public Types

typedef FieldImp FieldType
 field type of vector More...
 
typedef BaseType::VectorInterfaceType VectorInterfaceType
 
typedef BaseType::VectorType VectorType
 
typedef BaseType::ConstIteratorType ConstIteratorType
 
typedef BaseType::IteratorType IteratorType
 
typedef VectorDefaultTraits< FieldImp, ArrayWrapperVector< FieldImp > > 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

 ArrayWrapperVector (const unsigned int size, FieldType *const fields)
 Constructor setting up the vector (without initializing the fields) More...
 
 ArrayWrapperVector (const unsigned int size, FieldType *const fields, const FieldType s)
 Constructor setting up the vector and initializing the fields to a constant value. More...
 
template<class T >
 ArrayWrapperVector (const unsigned int size, FieldType *const fields, const VectorInterface< T > &v)
 Copy constructor setting up a vector with the data of another one. More...
 
template<class T >
ThisTypeoperator= (const VectorInterface< T > &v)
 Assign another vector to this one. More...
 
ThisTypeoperator= (const ThisType &v)
 Assign another vector 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)
 
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 VectorInterface< T > &v)
 copy 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< FieldImp, ArrayWrapperVector< FieldImp > > >::ArrayTypeasImp () const
 
VectorInterfaceArrayTraits< VectorDefaultTraits< FieldImp, ArrayWrapperVector< FieldImp > > >::ArrayTypeasImp ()
 

Static Protected Member Functions

static const VectorInterfaceArrayTraits< VectorDefaultTraits< FieldImp, ArrayWrapperVector< FieldImp > > >::ArrayTypeasImp (const ThisType &other)
 
static VectorInterfaceArrayTraits< VectorDefaultTraits< FieldImp, ArrayWrapperVector< FieldImp > > >::ArrayTypeasImp (ThisType &other)
 

Protected Attributes

const unsigned int size_
 
FieldType *const fields_
 

Detailed Description

template<class FieldImp>
class Dune::Fem::ArrayWrapperVector< FieldImp >

An implementation of VectorInterface wrapping a standard C++ array.

Member Typedef Documentation

type of this interface

type of the implementation (Barton-Nackman)

type of constant iterator

type of the array elements

template<class FieldImp >
typedef FieldImp Dune::Fem::ArrayWrapperVector< FieldImp >::FieldType

field type of vector

type of (non-constant) iterator

typedef BaseType :: IteratorType Dune::Fem::VectorDefault< FieldImp , ArrayWrapperVector< FieldImp > >::IteratorType
inherited
typedef unsigned int Dune::Fem::ArrayInterface< VectorInterfaceArrayTraits< VectorDefaultTraits< FieldImp, ArrayWrapperVector< FieldImp > > > >::size_type
inherited

type of unsigned integral type of indexing

typedef VectorDefaultTraits< FieldImp, ArrayWrapperVector< FieldImp > > Dune::Fem::VectorInterface< VectorDefaultTraits< FieldImp, ArrayWrapperVector< FieldImp > > >::Traits
inherited
typedef BaseType :: VectorType Dune::Fem::VectorDefault< FieldImp , ArrayWrapperVector< FieldImp > >::VectorType
inherited

Constructor & Destructor Documentation

template<class FieldImp >
Dune::Fem::ArrayWrapperVector< FieldImp >::ArrayWrapperVector ( const unsigned int  size,
FieldType *const  fields 
)
inline

Constructor setting up the vector (without initializing the fields)

template<class FieldImp >
Dune::Fem::ArrayWrapperVector< FieldImp >::ArrayWrapperVector ( const unsigned int  size,
FieldType *const  fields,
const FieldType  s 
)
inline

Constructor setting up the vector and initializing the fields to a constant value.

template<class FieldImp >
template<class T >
Dune::Fem::ArrayWrapperVector< FieldImp >::ArrayWrapperVector ( const unsigned int  size,
FieldType *const  fields,
const VectorInterface< T > &  v 
)
inline

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

Member Function Documentation

VectorType& Dune::Fem::VectorDefault< FieldImp , ArrayWrapperVector< FieldImp > >::addScaled ( const FieldType  s,
const VectorInterface< T > &  v 
)
inlineinherited

Add a multiple of another vector to this one.

static const VectorInterfaceArrayTraits< VectorDefaultTraits< FieldImp, ArrayWrapperVector< FieldImp > > >::ArrayType & Dune::Fem::BartonNackmanInterface< ArrayInterface< VectorInterfaceArrayTraits< VectorDefaultTraits< FieldImp, ArrayWrapperVector< FieldImp > > > > , VectorInterfaceArrayTraits< VectorDefaultTraits< FieldImp, ArrayWrapperVector< FieldImp > > >::ArrayType >::asImp ( const ThisType other)
inlinestaticprotectedinherited
void Dune::Fem::ArrayInterface< VectorInterfaceArrayTraits< VectorDefaultTraits< FieldImp, ArrayWrapperVector< FieldImp > > > >::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< FieldImp, ArrayWrapperVector< FieldImp > > > >::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< FieldImp , ArrayWrapperVector< FieldImp > >::assign ( const VectorInterface< T > &  v)
inlineinherited

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
void Dune::Fem::VectorDefault< FieldImp , ArrayWrapperVector< FieldImp > >::assign ( const FieldType  s)
inlineinherited

Initialize all fields of this vector with a scalar.

ConstIteratorType Dune::Fem::VectorDefault< FieldImp , ArrayWrapperVector< FieldImp > >::begin ( ) const
inlineinherited

obtain begin iterator

IteratorType Dune::Fem::VectorDefault< FieldImp , ArrayWrapperVector< FieldImp > >::begin ( )
inlineinherited

obtain begin iterator

void Dune::Fem::VectorDefault< FieldImp , ArrayWrapperVector< FieldImp > >::clear ( )
inlineinherited

initialize the vector to 0

ConstIteratorType Dune::Fem::VectorDefault< FieldImp , ArrayWrapperVector< FieldImp > >::end ( ) const
inlineinherited

obtain end iterator

IteratorType Dune::Fem::VectorDefault< FieldImp , ArrayWrapperVector< FieldImp > >::end ( )
inlineinherited

obtain end iterator

VectorType& Dune::Fem::VectorDefault< FieldImp , ArrayWrapperVector< FieldImp > >::operator*= ( const FieldType  s)
inlineinherited

Multiply this vector by a scalar.

VectorType& Dune::Fem::VectorDefault< FieldImp , ArrayWrapperVector< FieldImp > >::operator+= ( const VectorInterface< T > &  v)
inlineinherited

Add another vector to this one.

VectorType& Dune::Fem::VectorDefault< FieldImp , ArrayWrapperVector< FieldImp > >::operator-= ( const VectorInterface< T > &  v)
inlineinherited

Subtract another vector from this one.

template<class FieldImp >
template<class T >
ThisType& Dune::Fem::ArrayWrapperVector< FieldImp >::operator= ( const VectorInterface< T > &  v)
inline

Assign another vector to this one.

template<class FieldImp >
ThisType& Dune::Fem::ArrayWrapperVector< FieldImp >::operator= ( const ThisType v)
inline

Assign another vector to this one.

template<class FieldImp >
ThisType& Dune::Fem::ArrayWrapperVector< FieldImp >::operator= ( const FieldType  s)
inline

Initialize all fields of this vector with a scalar.

template<class FieldImp >
const FieldType& Dune::Fem::ArrayWrapperVector< FieldImp >::operator[] ( unsigned int  index) const
inline
template<class FieldImp >
FieldType& Dune::Fem::ArrayWrapperVector< FieldImp >::operator[] ( unsigned int  index)
inline
template<class FieldImp >
unsigned int Dune::Fem::ArrayWrapperVector< FieldImp >::size ( ) const
inline

Member Data Documentation

template<class FieldImp >
FieldType* const Dune::Fem::ArrayWrapperVector< FieldImp >::fields_
protected
template<class FieldImp >
const unsigned int Dune::Fem::ArrayWrapperVector< FieldImp >::size_
protected

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