MultiVector< T > Class Template Reference

Template data structure for representation of multidimensional grid functions. More...

#include <MultiVector.hpp>

Inheritance diagram for MultiVector< T >:

Inheritance graph
[legend]
Collaboration diagram for MultiVector< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

MultiVector< T > & operator= (const MultiArray< T > &src)
 Standard assignment.
MultiVector< T > & operator= (T value)
 Sets constant values to all the elements.
MultiVector< T > & operator *= (T a)
 Multiplies 'this' vector by a scalar.
MultiVector< T > & operator+= (const MultiVector< T > &y)
 Adds a given vector to 'this' one.
MultiVector< T > & operator+= (T a)
 Adds 'a' to every comp. of 'this'.
MultiVector< T > & operator-= (const MultiVector< T > &vector)
 Subtracts a given vector from 'this'.
MultiVector< T > & AddScaled (T a, const MultiVector< T > &y)
 Adds $a \cdot y$ to 'this'.
MultiVector< T > & LinComb (T a, const MultiVector< T > &x, T b, const MultiVector< T > &y)
 Sets 'this' to $a \cdot x + b \cdot y$.
MultiVector< T > & LinComb (const MultiVector< T > &x, T b, const MultiVector< T > &y)
 sets 'this' to $x + b \cdot y$ (i.e. $a = 1$).
operator & (const MultiVector< T > &y)
 The Eucleadean scalar product.
double sc_square () const
 The square of the Eucleadean norm.
double norm_2 () const
 The Eucleadean norm.
ave () const
 The arithmetic average of the components.
void InterpolateVertexCentered (const Array< double > &coord, T *val)
 Compute the value at a point.
 MultiVector ()
 zero sizes, no memory
 MultiVector (const MultiVector< T > &mv)
 duplication
 MultiVector (const Array< int > &len)
 MultiVector by given sizes.
 MultiVector (const Array< int > &len, int block_sz)
 MultiVector by given sizes and block size.
 MultiVector (int len)
 1d grid function

Detailed Description

template<typename T>
class MultiVector< T >

Template data structure for representation of multidimensional grid functions.

This class implements the algebraic operations for grid functions represented by objects of MultiArray<T>. These algebraic operations introduce the algebraic structure of the Euclidean space. Besides that, some interpolation procedures are implemented.

The templates depend on a type T. This type should satisfy the conditions listed in small_matrix.hpp for small matrices.


Constructor & Destructor Documentation

template<typename T>
MultiVector< T >::MultiVector (  )  [inline]

zero sizes, no memory

template<typename T>
MultiVector< T >::MultiVector ( const MultiVector< T > &  mv  )  [inline]

duplication

template<typename T>
MultiVector< T >::MultiVector ( const Array< int > &  len  )  [inline]

MultiVector by given sizes.

Parameters:
[in] len The sizes

template<typename T>
MultiVector< T >::MultiVector ( const Array< int > &  len,
int  block_sz 
) [inline]

MultiVector by given sizes and block size.

Parameters:
[in] len The sizes.
[in] block_sz The additional dimension.

template<typename T>
MultiVector< T >::MultiVector ( int  len  )  [inline]

1d grid function

Parameters:
[in] len The grid size


Member Function Documentation

template<typename T>
MultiVector<T>& MultiVector< T >::operator= ( const MultiArray< T > &  src  )  [inline]

Standard assignment.

'this' and 'src' may have different sizes.

Parameters:
[in] src Source-array.

Reimplemented from MultiArray< T >.

template<typename T>
MultiVector<T>& MultiVector< T >::operator= ( value  )  [inline]

Sets constant values to all the elements.

template<typename T>
MultiVector< T > & MultiVector< T >::operator *= ( a  )  [inline]

Multiplies 'this' vector by a scalar.

Parameters:
[in] a The scalar.

template<typename T>
MultiVector< T > & MultiVector< T >::operator+= ( const MultiVector< T > &  y  )  [inline]

Adds a given vector to 'this' one.

template<typename T>
MultiVector< T > & MultiVector< T >::operator+= ( a  )  [inline]

Adds 'a' to every comp. of 'this'.

Parameters:
[in] a The scalar.

template<typename T>
MultiVector< T > & MultiVector< T >::operator-= ( const MultiVector< T > &  vector  )  [inline]

Subtracts a given vector from 'this'.

template<typename T>
MultiVector< T > & MultiVector< T >::AddScaled ( a,
const MultiVector< T > &  y 
) [inline]

Adds $a \cdot y$ to 'this'.

Parameters:
[in] a The factor for y.
[in] y The vector.

template<typename T>
MultiVector< T > & MultiVector< T >::LinComb ( a,
const MultiVector< T > &  x,
b,
const MultiVector< T > &  y 
) [inline]

Sets 'this' to $a \cdot x + b \cdot y$.

template<typename T>
MultiVector< T > & MultiVector< T >::LinComb ( const MultiVector< T > &  x,
b,
const MultiVector< T > &  y 
) [inline]

sets 'this' to $x + b \cdot y$ (i.e. $a = 1$).

template<typename T>
T MultiVector< T >::operator & ( const MultiVector< T > &  y  )  [inline]

The Eucleadean scalar product.

template<typename T>
double MultiVector< T >::sc_square (  )  const [inline]

The square of the Eucleadean norm.

template<typename T>
double MultiVector< T >::norm_2 (  )  const [inline]

The Eucleadean norm.

template<typename T>
T MultiVector< T >::ave (  )  const [inline]

The arithmetic average of the components.

template<typename T>
void MultiVector< T >::InterpolateVertexCentered ( const Array< double > &  coord,
T *  val 
) [inline]

Compute the value at a point.

Computes the interpolated value of a vertex-centered grid function. The position of the value is specified by the index scaled to 1.

Parameters:
[in] coord The scaled index.
[out] val For the result.


The documentation for this class was generated from the following files:
Generated on Fri Sep 21 12:34:22 2007 for SG2 by  doxygen 1.5.2