TrilinosWrappers::Vector Class Reference
[TrilinosWrappersVector classes]

Inheritance diagram for TrilinosWrappers::Vector:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Vector ()
 Vector (const unsigned int n)
 Vector (const Epetra_Map &InputMap)
 Vector (const VectorBase &V)
template<typename Number >
 Vector (const ::Vector< Number > &v)
void reinit (const unsigned int n, const bool fast=false)
void reinit (const Epetra_Map &input_map, const bool fast=false)
void reinit (const VectorBase &V, const bool fast=false, const bool allow_different_maps=false)
Vectoroperator= (const TrilinosScalar s)
Vectoroperator= (const MPI::Vector &V)
template<typename Number >
Vectoroperator= (const ::::Vector< Number > &V)
Vectoroperator= (const Vector &V)

Private Attributes

Epetra_LocalMap map

Detailed Description

This class is a specialization of a Trilinos vector to a localized version. The purpose of this class is to provide a copy interface from the possibly parallel Vector class to a local vector on each processor, in order to be able to access all elements in the vector or to apply certain deal.II functions.

See also:
Trilinos
Author:
Martin Kronbichler, 2008

Constructor & Destructor Documentation

TrilinosWrappers::Vector::Vector (  ) 

Default constructor that generates an empty (zero size) vector. The function reinit() will have to give the vector the correct size.

TrilinosWrappers::Vector::Vector ( const unsigned int  n  ) 

This constructor takes as input the number of elements in the vector.

TrilinosWrappers::Vector::Vector ( const Epetra_Map &  InputMap  ) 

This constructor takes as input the number of elements in the vector. If the map is not localized, i.e., if there are some elements that are not present on all processes, only the global size of the map will be taken and a localized map will be generated internally.

TrilinosWrappers::Vector::Vector ( const VectorBase V  )  [explicit]

This constructor takes a (possibly parallel) Trilinos Vector and generates a localized version of the whole content on each processor.

template<typename Number >
TrilinosWrappers::Vector::Vector ( const ::Vector< Number > &  v  )  [inline, explicit]

Copy-constructor from deal.II vectors. Sets the dimension to that of the given vector, and copies all elements.


Member Function Documentation

void TrilinosWrappers::Vector::reinit ( const unsigned int  n,
const bool  fast = false 
)

Reinit function that resizes the vector to the size specified by n.

void TrilinosWrappers::Vector::reinit ( const Epetra_Map &  input_map,
const bool  fast = false 
)

Initialization with an Epetra_Map. Similar to the call in the other class MPI::Vector, with the only difference that now a copy on all processes is generated. The variable fast determines whether the vector should be filled with zero or left untouched.

void TrilinosWrappers::Vector::reinit ( const VectorBase V,
const bool  fast = false,
const bool  allow_different_maps = false 
)

Reinit function. Takes the information of a Vector and copies everything to the calling vector, now also allowing different maps.

Vector& TrilinosWrappers::Vector::operator= ( const TrilinosScalar  s  ) 

Set all components of the vector to the given number s. Simply pass this down to the base class, but we still need to declare this function to make the example given in the discussion about making the constructor explicit work.

Reimplemented from TrilinosWrappers::VectorBase.

Vector& TrilinosWrappers::Vector::operator= ( const MPI::Vector V  ) 

Sets the left hand argument to the (parallel) Trilinos Vector. Equivalent to the reinit function.

template<typename Number >
Vector& TrilinosWrappers::Vector::operator= ( const ::::Vector< Number > &  V  )  [inline]

Sets the left hand argument to the deal.II vector.

Vector& TrilinosWrappers::Vector::operator= ( const Vector V  ) 

Copy operator. Copies both the dimension and the content in the right hand argument.

Reimplemented from TrilinosWrappers::VectorBase.


Member Data Documentation

Epetra_LocalMap TrilinosWrappers::Vector::map [private]

A map indicating the size of the vector.


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

deal.II documentation generated on Mon Nov 23 22:58:40 2009 by doxygen 1.6.1