Public Member Functions | Related Functions
TrilinosWrappers::Vector Class Reference
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 &partitioning)
 Vector (const IndexSet &partitioning, const MPI_Comm &communicator=MPI_COMM_WORLD)
 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 IndexSet &input_map, const MPI_Comm &communicator=MPI_COMM_WORLD, const bool fast=false)
void reinit (const VectorBase &V, const bool fast=false, const bool allow_different_maps=false)
Vector & operator= (const TrilinosScalar s)
Vector & operator= (const MPI::Vector &V)
template<typename Number >
Vector & operator= (const ::Vector< Number > &V)
Vector & operator= (const Vector &V)

Related Functions

(Note that these are not member functions.)

void swap (Vector &u, Vector &v)

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.

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 &  partitioning)

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 IndexSet &  partitioning,
const MPI_Comm &  communicator = MPI_COMM_WORLD 
)

This constructor takes as input the number of elements in the vector. If the index set is not localized, i.e., if there are some elements that are not present on all processes, only the global size of the index set will be taken and a localized version 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) [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 difference that now a copy on all processes is generated. This initialization function is appropriate when the data in the localized vector should be imported from a distributed vector that has been initialized with the same communicator. The variable fast determines whether the vector should be filled with zero or left untouched.

void TrilinosWrappers::Vector::reinit ( const IndexSet &  input_map,
const MPI_Comm &  communicator = MPI_COMM_WORLD,
const bool  fast = false 
)

Initialization with an IndexSet. Similar to the call in the other class MPI::Vector, with the difference that now a copy on all processes is generated. This initialization function is appropriate in case the data in the localized vector should be imported from a distributed vector that has been initialized with the same communicator. 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)

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

Reimplemented from TrilinosWrappers::VectorBase.

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

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


Friends And Related Function Documentation

void swap ( Vector &  u,
Vector &  v 
) [related]

Global function swap which overloads the default implementation of the C++ standard library which uses a temporary object. The function simply exchanges the data of the two vectors.

Author:
Martin Kronbichler, Wolfgang Bangerth, 2008

References swap().

Referenced by swap().


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

deal.II documentation generated on Fri Aug 12 2011 15:01:11 by doxygen 1.7.4