Amesos2 - Direct Sparse Solver Interfaces
Version of the Day
|
A generic helper class for getting a CCS representation of a Matrix. More...
#include <Amesos2_Util.hpp>
Inherits Amesos2::Util::get_cxs_helper_kokkos_view< Matrix, KV_S, KV_GO, KV_GS, Op >.
Static Public Member Functions | |
static void | do_get (const Teuchos::Ptr< const Matrix > mat, KV_S &nzvals, KV_GO &indices, KV_GS &pointers, typename KV_GS::value_type &nnz, EDistribution distribution, EStorage_Ordering ordering=ARBITRARY, typename KV_GO::value_type indexBase=0) |
static void | do_get (const Teuchos::Ptr< const Matrix > mat, KV_S &nzvals, KV_GO &indices, KV_GS &pointers, typename KV_GS::value_type &nnz, EDistribution distribution, EStorage_Ordering ordering=ARBITRARY) |
static void | do_get (const Teuchos::Ptr< const Matrix > mat, KV_S &nzvals, KV_GO &indices, KV_GS &pointers, typename KV_GS::value_type &nnz, const Teuchos::Ptr< const Tpetra::Map< typename Matrix::local_ordinal_t, typename Matrix::global_ordinal_t, typename Matrix::node_t > > map, EDistribution distribution, EStorage_Ordering ordering=ARBITRARY) |
A generic helper class for getting a CCS representation of a Matrix.
The template types S
, GO
, and GS
(scalar, global ordinal, and global size type, respectively) are the types that you would like to get from the Matrix, regardless of what types are actually housed in the matrix. Type conversions will be performed when necessary.
Say for example that you have a matrix that has complex<double>
scalar values, int
global ordinals, and unsigned long size type, but your solver has a special complex data type that it defines and has size type int
. As long as the Teuchos::ValueTypeConversionTraits class is specialized for conversion between the complex<double>
and the solver's complex double type, then you can use this helper to help with this conversion. We assume that we want the global matrix representation at the root processor (Rooted
), and the row indices can be in an arbitrary order (Arbitrary
):
|
inlinestaticinherited |
Basic function overload that uses the matrix's row/col map as returned by Op::getMap().
|
inlinestaticinherited |
Function overload that takes an explicit map to use for the representation's distribution.