Belos Version of the Day
Belos::MultiVecTraitsExt< ScalarType, MV > Class Template Reference

An extension of the MultiVecTraits class that adds a new vector length method. More...

#include <BelosMultiVecTraits.hpp>

List of all members.

Static Public Member Functions

New attribute methods
static ptrdiff_t GetGlobalLength (const MV &mv)
 Obtain the vector length of mv.

Detailed Description

template<class ScalarType, class MV>
class Belos::MultiVecTraitsExt< ScalarType, MV >

An extension of the MultiVecTraits class that adds a new vector length method.

This traits class provides a 64-bit compatible method, GetGlobalLength(), that returns the number of rows in a multivector. GetGlobalLength() will replace the GetVecLength() method in MultiVecTraits, which is not 64-bit compatible. GetVecLength() will be deprecated, and will be removed in the next major Trilinos release.

For now, GetGlobalLength() will call the GetVecLength() method by default for any traits implementation that does not specialize this class. If you have written a specialization of MultiVecTraits for your own multivector type MV, and if MV does not support returning the number of rows as a 64-bit integer, then you don't need to do anything. If your MV class does support this, then you should write a specialization of MultiVecTraitsExt that reimplements GetGlobalLength(). Otherwise, you risk overflowing the int return value of GetVecLength().

You do not need to write a specialization of MultiVecTraitsExt if you are using Epetra, Tpetra, or Thyra multivectors. Belos already provides specializations for these types. Just relax and enjoy using the solvers!

Definition at line 395 of file BelosMultiVecTraits.hpp.

Member Function Documentation

template<class ScalarType , class MV >
static ptrdiff_t Belos::MultiVecTraitsExt< ScalarType, MV >::GetGlobalLength ( const MV &  mv) [inline, static]

Obtain the vector length of mv.

This method supersedes GetVecLength, which will be deprecated.

Definition at line 402 of file BelosMultiVecTraits.hpp.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines