Feel++  0.91.4
Feel::MatrixValue< T > Class Template Reference

interface to matrix More...

#include <matrixvalue.hpp>

List of all members.

Public Member Functions

Constructors, destructor
 MatrixValue (value_type acc=value_type(0))
 MatrixValue (MatrixValue const &m)
 ~MatrixValue ()
Accessors
unsigned int size1 () const
unsigned int size2 () const
size_type nnz () const
unsigned int rowStart () const
unsigned int rowStop () const
bool isInitialized () const
void close () const
bool closed () const
matrix_type const & mat () const
matrix_type & mat ()
matrix_type const & wmat () const
matrix_type & wmat ()
Methods
void init (const unsigned int, const unsigned int, const unsigned int, const unsigned int, const unsigned int=30, const unsigned int=10)
void clear ()
void zero ()
void zero (size_type, size_type, size_type, size_type)
void add (const unsigned int, const unsigned int, const value_type value)
void set (const unsigned int, const unsigned int, const value_type value)
void printMatlab (const std::string name="NULL") const
void fill (pattern_type const &)
void resize (size_type, size_type, bool=false)
value_type energy (ublas::vector< value_type > const &, ublas::vector< value_type > const &) const
void diagonalize (size_type)

Typedefs

typedef T value_type
typedef value_type matrix_type
typedef std::vector< std::set
< size_type > > 
pattern_type
static const bool is_row_major = true

Detailed Description

template<typename T>
class Feel::MatrixValue< T >

interface to matrix

 MatrixValue<T> m;
Author:
Christophe Prud'homme
See also:

Member Function Documentation

template<typename T >
void Feel::MatrixValue< T >::add ( const unsigned  int,
const unsigned  int,
const value_type  value 
) [inline]

Add value to the value already accumulated

template<typename T >
void Feel::MatrixValue< T >::clear ( ) [inline]

Release all memory and return to a state just like after having called the default constructor.

template<typename T >
void Feel::MatrixValue< T >::close ( ) const

close the gmm matrix, that will copy the content of write optimized matrix into a read optimized matrix

template<typename T >
bool Feel::MatrixValue< T >::closed ( ) const [inline]

see if Gmm matrix has been closed and fully assembled yet

template<typename T >
value_type Feel::MatrixValue< T >::energy ( ublas::vector< value_type > const &  ,
ublas::vector< value_type > const &   
) const [inline]

In this case the energy is the value that has been accumulated

template<typename T >
void Feel::MatrixValue< T >::fill ( pattern_type const &  )

fill sparse matrix with non zero entries

template<typename T >
void Feel::MatrixValue< T >::init ( const unsigned  int,
const unsigned  int,
const unsigned  int,
const unsigned  int,
const unsigned  int = 30,
const unsigned  int = 10 
) [inline]

Initialize a Value matrix that is of global dimension $ m \times n $ with local dimensions $ m_l \times n_l $. nnz is the number of on-processor nonzeros per row (defaults to 30). noz is the number of on-processor nonzeros per row (defaults to 30).

References Feel::MatrixValue< T >::zero().

template<typename T >
bool Feel::MatrixValue< T >::isInitialized ( ) const [inline]
Returns:
true if matrix is initialized/usable, false otherwise
template<typename T >
matrix_type const& Feel::MatrixValue< T >::mat ( ) const [inline]

Returns the read optimized gmm matrix.

template<typename T >
matrix_type& Feel::MatrixValue< T >::mat ( ) [inline]

Returns the read optimized gmm matrix.

template<typename T >
size_type Feel::MatrixValue< T >::nnz ( ) const [inline]
Returns:
the number of non-zeros entries in the matrix
template<typename T >
void Feel::MatrixValue< T >::printMatlab ( const std::string  name = "NULL") const

Print the contents of the matrix in Matlab's sparse matrix format. Optionally prints the matrix to the file named name. If name is not specified it is dumped to the screen.

template<typename T >
unsigned int Feel::MatrixValue< T >::rowStart ( ) const [inline]

return row_start, the index of the first matrix row stored on this processor

template<typename T >
unsigned int Feel::MatrixValue< T >::rowStop ( ) const [inline]

return row_stop, the index of the last matrix row (+1) stored on this processor

template<typename T >
void Feel::MatrixValue< T >::set ( const unsigned  int,
const unsigned  int,
const value_type  value 
) [inline]

set to value

template<typename T >
unsigned int Feel::MatrixValue< T >::size1 ( ) const [inline]
Returns:
m, the row-dimension of the matrix where the marix is $ M \times N $.
template<typename T >
unsigned int Feel::MatrixValue< T >::size2 ( ) const [inline]
Returns:
n, the column-dimension of the matrix where the marix is $ M \times N $.
template<typename T >
matrix_type const& Feel::MatrixValue< T >::wmat ( ) const [inline]

Returns the write optimized gmm matrix.

template<typename T >
matrix_type& Feel::MatrixValue< T >::wmat ( ) [inline]

Returns the write optimized gmm matrix.

template<typename T >
void Feel::MatrixValue< T >::zero ( ) [inline]

Set all entries to 0. This method retains sparsity structure.

Referenced by Feel::MatrixValue< T >::init().