|
bool | isLocallyIndexed () const |
| Checks whether this multivector is local to the calling node.
|
|
bool | isGloballyIndexed () const |
|
Teuchos::RCP< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > | getMap () const |
|
Teuchos::RCP< const Teuchos::Comm< int > > | getComm () const |
| Returns the Teuchos::Comm object associated with this multi-vector.
|
|
size_t | getLocalLength () const |
| Get the length of vectors local to the calling node.
|
|
size_t | getLocalNumVectors () const |
| Get the number of vectors on this node.
|
|
global_size_t | getGlobalLength () const |
| Get the length of vectors in the global space.
|
|
global_size_t | getGlobalNumVectors () const |
| Get the number of global vectors.
|
|
size_t | getStride () const |
| Return the stride between vectors on this node.
|
|
bool | isConstantStride () const |
| Return true if this MV has constant stride between vectors on this node.
|
|
Teuchos::RCP< const Tpetra::Vector< scalar_t, local_ordinal_t, global_ordinal_t, node_t > > | getVector (size_t j) const |
| Const vector access.
|
|
Teuchos::RCP< Tpetra::Vector< scalar_t, local_ordinal_t, global_ordinal_t, node_t > > | getVectorNonConst (size_t j) |
| Nonconst vector access.
|
|
multivec_t::impl_scalar_type * | getMVPointer_impl () const |
| Return pointer to vector when number of vectors == 1 and single MPI process.
|
|
void | get1dCopy (const Teuchos::ArrayView< scalar_t > &A, size_t lda, Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > distribution_map, EDistribution distribution) const |
| Copies the multivector's data into the user-provided vector. More...
|
|
Teuchos::ArrayRCP< scalar_t > | get1dViewNonConst (bool local=false) |
| Extracts a 1 dimensional view of this MultiVector's data. More...
|
|
void | put1dData (const Teuchos::ArrayView< const scalar_t > &new_data, size_t lda, Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > source_map, EDistribution distribution) |
| Export data into the global MultiVector space. More...
|
|
std::string | description () const |
| Get a short description of this adapter class.
|
|
void | describe (Teuchos::FancyOStream &os, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const |
| Print a description of this adapter to the given output stream.
|
|
template<typename Scalar, typename LocalOrdinal, typename GlobalOrdinal, class Node>
class Amesos2::MultiVecAdapter< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > >
Amesos2 adapter for the Tpetra::MultiVector class.
template<typename Scalar , typename LocalOrdinal , typename GlobalOrdinal , class Node >
void Amesos2::MultiVecAdapter< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > >::get1dCopy |
( |
const Teuchos::ArrayView< scalar_t > & |
A, |
|
|
size_t |
lda, |
|
|
Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > |
distribution_map, |
|
|
EDistribution |
distribution |
|
) |
| const |
Copies the multivector's data into the user-provided vector.
Each vector of the multivector is placed lda
apart in the given ArrayView. Giving a distribution map is useful in the case where the data needs to end up on different processors than it currently resides. For example, the SuperLU_DIST interface may receive a B multivector that is distributed across 13 processors, but only 12 of those 13 processors are in SuperLU_DIST's processor grid. The rows of the multivector need to then be distributed amongst the 12 that are in the grid.
- Parameters
-
| [in/out] | A user-supplied storage for multi-vector data |
[in] | lda | user-supplied spacing for consecutive vectors in A |
[in] | distribution_map | is a Tpetra::Map that describes the desired distribution of the multivector's data accross the calling processors. The map describes where the 'rows' of the multivector will end up. |
[in] | distribution | |
- Exceptions
-
std::runtime_error | Thrown if the space available in A is not large enough given lda , the value of global_copy , and the number of vectors in this . |
template<typename Scalar , typename LocalOrdinal , typename GlobalOrdinal , class Node >
Teuchos::ArrayRCP<scalar_t> Amesos2::MultiVecAdapter< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > >::get1dViewNonConst |
( |
bool |
local = false | ) |
|
Extracts a 1 dimensional view of this MultiVector's data.
Guarantees that the view returned will reside in contiguous storage.
- Warning
- It is recommended to use the
get1dCopy
function, from a data-hiding perspective. Use if you know what you are doing.
- Parameters
-
local | if true , each node will get a view of the vectors it is in possession of. The default, false , will give each calling node a view of the global multivector. |
template<typename Scalar , typename LocalOrdinal , typename GlobalOrdinal , class Node >
Used for data redistribution from the user's input MultiVector to the solver's input MultiVector.
This is an Export, because the user's input data need not necessarily be one-to-one, but the solver's input data must (presumably) always be one-to-one.
template<typename Scalar , typename LocalOrdinal , typename GlobalOrdinal , class Node >
Used for data redistribution from the solver's output MultiVector to the user's output MultiVector.
This is an Import, because the user's output data need not necessarily be one-to-one, but the solver's output data must (presumably) always be one-to-one.