
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) |
| void | update_ghost_values () const |
Related Functions | |
(Note that these are not member functions.) | |
| void | swap (Vector &u, Vector &v) |
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.
Definition at line 566 of file trilinos_vector.h.
| 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.
| 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.
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.
| Vector& TrilinosWrappers::Vector::operator= | ( | const ::Vector< Number > & | V ) |
Sets the left hand argument to the deal.II vector.
Reimplemented from TrilinosWrappers::VectorBase.
Copy operator. Copies both the dimension and the content in the right hand argument.
| void TrilinosWrappers::Vector::update_ghost_values | ( | ) | const |
This function does nothing but is there for compatibility with the PETScWrappers::Vector class.
For the PETSc vector wrapper class, this function updates the ghost values of the PETSc vector. This is necessary after any modification before reading ghost values.
However, for the implementation of this class, it is immaterial and thus an empty function.
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.
Definition at line 758 of file trilinos_vector.h.
References swap().
Referenced by swap().
documentation generated on Fri Feb 3 2012 06:04:18 by
doxygen
1.7.2