Amesos2 - Direct Sparse Solver Interfaces Version of the Day
Amesos2::MultiVecAdapter< MV > Struct Template Reference

A templated MultiVector class adapter for Amesos2. More...

#include <Amesos2_MultiVecAdapter_decl.hpp>

Inheritance diagram for Amesos2::MultiVecAdapter< MV >:

(Note that these are not member symbols.)

template<class MV>
Teuchos::RCP< MultiVecAdapter< MV > > createMultiVecAdapter (Teuchos::RCP< MV > mv)
 Factory creation method for MultiVecAdapters.

Detailed Description

template<class MV>
struct Amesos2::MultiVecAdapter< MV >

A templated MultiVector class adapter for Amesos2.

Specializations of this templated class provide a unified interface to MultiVector types for Amesos2. Any specializations are expected to implement the following methods:


Implementation Requirements:

  • Wrapper constructor

    MultiVecAdapter<MultiVecType>(const Teuchos::RCP<MultiVecType>& mat);
    A templated MultiVector class adapter for Amesos2.
    Definition Amesos2_MultiVecAdapter_decl.hpp:142

  • Method to get locality of multivec, either globally or locally indexed.

    bool isLocallyIndexed() const;
    bool isGloballyIndexed() const;
    Teuchos::RCP<Tpetra::Map<LO,GO,Node> > getMap() const;

  • Method to get multi-vector communicator.

    const Teuchos::RCP<const Teuchos::Comm<int> >& getComm() const;

  • Methods to get the local and global length of vectors and number of vectors.

    size_t getLocalLength();
    size_t getLocalNumVectors();
    global_size_type getGlobalLength();
    global_size_type getGlobalNumVectors();

  • Get access to multi-vector stride

    size_t getStride() const;

  • Ask whether this multi-vector has constant stride between vectors on this node.

    bool isConstantStride() const;

  • Vector access methods.

    Teuchos::RCP<const Tpetra::Vector<Scalar,LO,GO,Node> >
    getVector( size_t j ) const;
    Teuchos::RCP<Tpetra::Vector<Scalar,LO,GO,Node> >
    getVectorNonConst( size_t j );

  • Data access methods

    void get1dCopy( const Teuchos::ArrayView<scalar_type>& A, size_t lda) const;
    void get2dCopy( Teuchos::ArrayView<const Teuchos::ArrayView<scalar_type> > A ) const;

  • Method to export an array of new values into the global multi-vector.

    template<typename Value_t>
    void globalize( const Teuchos::ArrayView<Value_t>& newVals )

  • Get a description of this adapter.

    std::string description() const;

  • Print the multivec to the os output stream.

    void describe(
    Teuchos::FancyOStream& os,
    const Teuchos::EVerbosityLevel verblevel) const;

◆ createMultiVecAdapter()

template<class MV>
Teuchos::RCP< MultiVecAdapter< MV > > createMultiVecAdapter ( Teuchos::RCP< MV > mv)
related

Factory creation method for MultiVecAdapters.

Developers should favor this method for creating Amesos2 MultiVector adapters over using the constructors.


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