Feel++  0.91.0
Public Member Functions
Feel::VectorPetscMPI< T > Class Template Reference
Inheritance diagram for Feel::VectorPetscMPI< T >:
Feel::VectorPetsc< T > Feel::Vector< T >

List of all members.

Public Member Functions

 VectorPetscMPI (Vec v, DataMap const &dm)
 VectorPetscMPI (DataMap const &dm)
void init (const size_type N, const size_type n_local, const bool fast=false)
value_type operator() (const size_type i) const
void set (size_type i, const value_type &value)
void add (const size_type i, const value_type &value)
void addVector (int *i, int n, value_type *v)
void clear ()
void localize ()
void close ()
size_type firstLocalIndex () const
size_type lastLocalIndex () const

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


Constructor & Destructor Documentation

template<typename T >
Feel::VectorPetscMPI< T >::VectorPetscMPI ( Vec  v,
DataMap const &  dm 
)

Member Function Documentation

template<typename T >
void Feel::VectorPetscMPI< T >::add ( const size_type  i,
const value_type &  value 
) [virtual]

v(i) += value

Reimplemented from Feel::VectorPetsc< T >.

template<typename T >
void Feel::VectorPetscMPI< T >::addVector ( int *  i,
int  n,
value_type *  v 
) [virtual]

v([i1,i2,...,in]) += [value1,...,valuen]

Reimplemented from Feel::VectorPetsc< T >.

template<typename T >
void Feel::VectorPetscMPI< T >::clear ( ) [virtual]
Returns:
the VectorPetsc<T> to a pristine state.

Reimplemented from Feel::VectorPetsc< T >.

template<typename T >
void Feel::VectorPetscMPI< T >::close ( ) [virtual]

Call the assemble functions

Reimplemented from Feel::VectorPetsc< T >.

Referenced by Feel::VectorPetscMPI< T >::VectorPetscMPI(), and Feel::MatrixPetscMPI< T >::zeroRows().

template<typename T >
size_type Feel::VectorPetscMPI< T >::firstLocalIndex ( ) const [virtual]
Returns:
the index of the first vector element actually stored on this processor

Reimplemented from Feel::VectorPetsc< T >.

template<typename T >
void Feel::VectorPetscMPI< T >::init ( const size_type  N,
const size_type  n_local,
const bool  fast = false 
) [virtual]

Change the dimension of the vector to N. The reserved memory for this vector remains unchanged if possible, to make things faster, but this may waste some memory, so take this in the back of your head. However, if N==0 all memory is freed, i.e. if you want to resize the vector and release the memory not needed, you have to first call init(0) and then init(N). This cited behaviour is analogous to that of the STL containers.

On fast==false, the vector is filled by zeros.

Reimplemented from Feel::VectorPetsc< T >.

template<typename T >
size_type Feel::VectorPetscMPI< T >::lastLocalIndex ( ) const [virtual]
Returns:
the index of the last vector element actually stored on this processor

Reimplemented from Feel::VectorPetsc< T >.

template<typename T >
VectorPetscMPI< T >::value_type Feel::VectorPetscMPI< T >::operator() ( const size_type  i) const [virtual]

Access components, returns U(i).

Reimplemented from Feel::VectorPetsc< T >.

template<typename T >
void Feel::VectorPetscMPI< T >::set ( size_type  i,
const value_type &  value 
) [virtual]

v(i) = value

Reimplemented from Feel::VectorPetsc< T >.