[Trilinos-Users] Request for tpetra::RowMatrix<>::scalar_type as used by Ifpack2

Holger Brandsmeier holger.brandsmeier at sam.math.ethz.ch
Thu Jul 7 12:03:15 MDT 2011

Dear Trilinos team,

when I use Ifpack2 Preconditioners such as ILUT for
Tpetra::CrsMatrix<ScalarType, Ordinal> everything works nicely;
however, when I try to use it for Tpetra::RowMatrix, I get the
following error:

Ifpack2_ILUT_decl.hpp:74:73: error: no type named 'scalar_type' in
'Tpetra::RowMatrix<double, int, int, Kokkos::TPINode>'
class ILUT: virtual public Ifpack2::Preconditioner<typename
MatrixType::global_ordinal_type,typename MatrixType::node_type> {

Similarly to MatrixType::scalar_type also apply to
MatrixType::local_ordinal_type, MatrixType::global_ordinal_type,

I wonder:
1) if it would be possible to providie the required typedefs not only
in Tpetra::CrsMatrix but already in Tpetra::RowMatrix. In my opinion
those typedefs actually belong to Tpetra::RowMatrix much more than to
Tpetra::CrsMatrix, or what is the reason of having it only in

2) why does Ifpack2 follow the style of having a base class with four
template parameters:
template<class Scalar, class LocalOrdinal = int, class GlobalOrdinal =
LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
class Preconditioner
but then creates derived classes with only one template parameter:
template<class MatrixType> class ILUT: [...]
Wouldn't it be better to already have 4 template parameters in ILUT?

Best regards,
Holger Brandsmeier

Holger Brandsmeier, SAM, ETH Zürich

More information about the Trilinos-Users mailing list