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) |
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) |
Private Attributes | |
Epetra_LocalMap | map |
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.
TrilinosWrappers::Vector::Vector | ( | ) |
Default constructor that generates an empty (zero size) vector. The function reinit()
will have to give the vector the correct size.
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.
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.
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.
Vector& TrilinosWrappers::Vector::operator= | ( | const ::::Vector< Number > & | V | ) | [inline] |
Sets the left hand argument to the deal.II vector.
Copy operator. Copies both the dimension and the content in the right hand argument.
Reimplemented from TrilinosWrappers::VectorBase.
Epetra_LocalMap TrilinosWrappers::Vector::map [private] |
A map indicating the size of the vector.