[Trilinos-Users] [EXTERNAL] Belos::LinearProblem: what are valid values of the template parameter MV?

Klinvex, Alicia Marie amklinv at sandia.gov
Tue Jun 20 12:35:41 EDT 2017


Hello Joachim,

Because Belos includes Krylov subspace methods like GMRES, it needs to know how to do operations with blocks of vectors (which we call MultiVectors in Trilinos).  It will happily take an Epetra_MultiVector, a Tpetra::MultiVector, or a Belos::MultiVec.  The compiler error you saw means that the block operations Belos needs were not defined by your class...which makes sense, because Epetra_Vector doesn't define any block operations.  (The compiler error may look more complicated than that, but that's because Belos only touches multivectors through a special interface called MultiVecTraits...so that's where the error shows up.)

If you're asking this question because you're trying to solve a linear system with a single RHS, remember that Epetra_Vector is a subclass of Epetra_MultiVector.  You can always set the template parameter as Epetra_MultiVector, and Belos will accept an Epetra_Vector as the RHS.

Best wishes,
Alicia

-----Original Message-----
From: Trilinos-Users [mailto:trilinos-users-bounces at trilinos.org] On Behalf Of Joachim Wuttke
Sent: Tuesday, June 20, 2017 11:19 AM
To: trilinos-users at trilinos.org
Subject: [EXTERNAL] [Trilinos-Users] Belos::LinearProblem: what are valid values of the template parameter MV?

What are valid values for the template parameter MV of Belos::LinearProblem<ScalarType, MV, OP>?

The Belos Doxygen API doc only says: MV	is The (multi)vector type.

So I would expect MV=Epetra_MultiVector and MV=Epetra_Vector to work equally well. However, my Belos usage example compiles only in the former case. With MV=Epetra_Vector, I get the compile time error
   ‘this_type_is_missing_a_specialization’ is not a member of ‘Epetra_Vector’



More information about the Trilinos-Users mailing list