MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu::Utilities_kokkos< double, int, int, Node > Class Template Reference

#include <MueLu_Utilities_kokkos_decl.hpp>

Inheritance diagram for MueLu::Utilities_kokkos< double, int, int, Node >:
MueLu::UtilitiesBase< double, int, int, Node > MueLu::UtilitiesBase< double, int, int, Node >

Public Types

typedef double Scalar
 
typedef int LocalOrdinal
 
typedef int GlobalOrdinal
 
typedef Teuchos::ScalarTraits< Scalar >::magnitudeType Magnitude
 
using CoordinateType = typename Teuchos::ScalarTraits<Scalar>::coordinateType
 
using RealValuedMultiVector = Xpetra::MultiVector<CoordinateType,LocalOrdinal,GlobalOrdinal,Node>
 
using TST
 
using Magnitude
 
using CoordinateType
 
using RealValuedMultiVector
 
- Public Types inherited from MueLu::UtilitiesBase< double, int, int, Node >
typedef Teuchos::ScalarTraits< double >::magnitudeType Magnitude
 

Static Public Member Functions

static RCP< const Epetra_MultiVectorMV2EpetraMV (RCP< MultiVector > const vec)
 Helper utility to pull out the underlying Epetra objects from an Xpetra object.
 
static RCP< Epetra_MultiVectorMV2NonConstEpetraMV (RCP< MultiVector > vec)
 
static const Epetra_MultiVectorMV2EpetraMV (const MultiVector &vec)
 
static Epetra_MultiVectorMV2NonConstEpetraMV (MultiVector &vec)
 
static RCP< const Epetra_CrsMatrixOp2EpetraCrs (RCP< const Matrix > Op)
 
static RCP< Epetra_CrsMatrixOp2NonConstEpetraCrs (RCP< Matrix > Op)
 
static const Epetra_CrsMatrixOp2EpetraCrs (const Matrix &Op)
 
static Epetra_CrsMatrixOp2NonConstEpetraCrs (Matrix &Op)
 
static const Epetra_MapMap2EpetraMap (const Map &map)
 
static RCP< const Tpetra::MultiVector< SC, LO, GO, NO > > MV2TpetraMV (RCP< MultiVector > const vec)
 Helper utility to pull out the underlying Tpetra objects from an Xpetra object.
 
static RCP< Tpetra::MultiVector< SC, LO, GO, NO > > MV2NonConstTpetraMV (RCP< MultiVector > vec)
 
static RCP< Tpetra::MultiVector< SC, LO, GO, NO > > MV2NonConstTpetraMV2 (MultiVector &vec)
 
static const Tpetra::MultiVector< SC, LO, GO, NO > & MV2TpetraMV (const MultiVector &vec)
 
static Tpetra::MultiVector< SC, LO, GO, NO > & MV2NonConstTpetraMV (MultiVector &vec)
 
static RCP< const Tpetra::CrsMatrix< SC, LO, GO, NO > > Op2TpetraCrs (RCP< const Matrix > Op)
 
static RCP< Tpetra::CrsMatrix< SC, LO, GO, NO > > Op2NonConstTpetraCrs (RCP< Matrix > Op)
 
static const Tpetra::CrsMatrix< SC, LO, GO, NO > & Op2TpetraCrs (const Matrix &Op)
 
static Tpetra::CrsMatrix< SC, LO, GO, NO > & Op2NonConstTpetraCrs (Matrix &Op)
 
static RCP< const Tpetra::RowMatrix< SC, LO, GO, NO > > Op2TpetraRow (RCP< const Matrix > Op)
 
static RCP< Tpetra::RowMatrix< SC, LO, GO, NO > > Op2NonConstTpetraRow (RCP< Matrix > Op)
 
static const RCP< const Tpetra::Map< LO, GO, NO > > Map2TpetraMap (const Map &map)
 
static RCP< Xpetra::Matrix< SC, LO, GO, NO > > Crs2Op (RCP< CrsMatrix > Op)
 
static RCP< VectorGetMatrixDiagonal (const Matrix &A)
 
static RCP< VectorGetMatrixDiagonalInverse (const Matrix &A, Magnitude tol=Teuchos::ScalarTraits< SC >::eps() *100, const bool doLumped=false)
 
static RCP< VectorGetLumpedMatrixDiagonal (Matrix const &A, const bool doReciprocal=false, Magnitude tol=Teuchos::ScalarTraits< Scalar >::eps() *100, Scalar tolReplacement=Teuchos::ScalarTraits< Scalar >::zero(), const bool replaceSingleEntryRowWithZero=false, const bool useAverageAbsDiagVal=false)
 
static RCP< VectorGetMatrixOverlappedDiagonal (const Matrix &A)
 
static RCP< VectorGetInverse (RCP< const Vector > v, Magnitude tol=Teuchos::ScalarTraits< SC >::eps() *100, SC tolReplacement=Teuchos::ScalarTraits< SC >::zero())
 
static Teuchos::Array< MagnitudeResidualNorm (const Operator &Op, const MultiVector &X, const MultiVector &RHS)
 
static RCP< MultiVectorResidual (const Operator &Op, const MultiVector &X, const MultiVector &RHS)
 
static RCP< Teuchos::FancyOStream > MakeFancy (std::ostream &os)
 
static void SetRandomSeed (const Teuchos::Comm< int > &comm)
 
static Kokkos::View< bool *, typename Node::device_type > DetectDirichletRows (const Matrix &A, const Magnitude &tol=Teuchos::ScalarTraits< SC >::zero(), const bool count_twos_as_dirichlet=false)
 
static Kokkos::View< bool *, typename Node::device_type > DetectDirichletCols (const Matrix &A, const Kokkos::View< const bool *, typename Node::device_type > &dirichletRows)
 
static void FindNonZeros (const typename Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::dual_view_type::t_dev_const_um vals, Kokkos::View< bool *, typename Node::device_type > nonzeros)
 
static void DetectDirichletColsAndDomains (const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Kokkos::View< bool *, typename Node::device_type > &dirichletRows, Kokkos::View< bool *, typename Node::device_type > dirichletCols, Kokkos::View< bool *, typename Node::device_type > dirichletDomain)
 
static void ZeroDirichletRows (RCP< Matrix > &A, const Kokkos::View< const bool *, typename Node::device_type > &dirichletRows, SC replaceWith=Teuchos::ScalarTraits< SC >::zero())
 
static void ZeroDirichletRows (RCP< MultiVector > &X, const Kokkos::View< const bool *, typename Node::device_type > &dirichletRows, SC replaceWith=Teuchos::ScalarTraits< SC >::zero())
 
static void ZeroDirichletCols (RCP< Matrix > &A, const Kokkos::View< const bool *, typename Node::device_type > &dirichletCols, SC replaceWith=Teuchos::ScalarTraits< SC >::zero())
 
static void ApplyRowSumCriterion (const Matrix &A, const typename Teuchos::ScalarTraits< Scalar >::magnitudeType rowSumTol, Kokkos::View< bool *, typename NO::device_type > &dirichletRows)
 
static RCP< MultiVectorRealValuedToScalarMultiVector (RCP< RealValuedMultiVector > X)
 
static Scalar PowerMethod (const Matrix &A, bool scaleByDiag=true, LO niters=10, Magnitude tolerance=1e-2, bool verbose=false, unsigned int seed=123)
 
static Scalar PowerMethod (const Matrix &A, const Teuchos::RCP< Vector > &invDiag, LO niters=10, Magnitude tolerance=1e-2, bool verbose=false, unsigned int seed=123)
 
static void MyOldScaleMatrix (Matrix &Op, const Teuchos::ArrayRCP< const SC > &scalingVector, bool doInverse=true, bool doFillComplete=true, bool doOptimizeStorage=true)
 
static void MyOldScaleMatrix_Tpetra (Matrix &Op, const Teuchos::ArrayRCP< Scalar > &scalingVector, bool doFillComplete, bool doOptimizeStorage)
 
static void MyOldScaleMatrix_Epetra (Matrix &Op, const Teuchos::ArrayRCP< Scalar > &scalingVector, bool doFillComplete, bool doOptimizeStorage)
 
static RCP< MatrixTranspose (Matrix &Op, bool=false, const std::string &label=std::string(), const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Transpose a Xpetra::Matrix.
 
static RCP< Xpetra::MultiVector< typename Teuchos::ScalarTraits< Scalar >::magnitudeType, LO, GO, NO > > ExtractCoordinatesFromParameterList (ParameterList &paramList)
 Extract coordinates from parameter list and return them in a Xpetra::MultiVector.
 
static RCP< Xpetra::Vector< LocalOrdinal, LocalOrdinal, GlobalOrdinal, Node > > ReverseCuthillMcKee (const Matrix &Op)
 
static RCP< Xpetra::Vector< LocalOrdinal, LocalOrdinal, GlobalOrdinal, Node > > CuthillMcKee (const Matrix &Op)
 
static void ApplyOAZToMatrixRows (RCP< Matrix > &A, const Kokkos::View< const bool *, typename Node::device_type > &dirichletRows)
 
static RCP< const Epetra_MultiVectorMV2EpetraMV (RCP< MultiVector > const vec)
 Helper utility to pull out the underlying Epetra objects from an Xpetra object.
 
static const Epetra_MultiVectorMV2EpetraMV (const MultiVector &vec)
 
static RCP< Epetra_MultiVectorMV2NonConstEpetraMV (RCP< MultiVector > vec)
 
static Epetra_MultiVectorMV2NonConstEpetraMV (MultiVector &vec)
 
static RCP< const Epetra_CrsMatrixOp2EpetraCrs (RCP< const Matrix > Op)
 
static const Epetra_CrsMatrixOp2EpetraCrs (const Matrix &Op)
 
static RCP< Epetra_CrsMatrixOp2NonConstEpetraCrs (RCP< Matrix > Op)
 
static Epetra_CrsMatrixOp2NonConstEpetraCrs (Matrix &Op)
 
static const Epetra_MapMap2EpetraMap (const Map &map)
 
static RCP< const Tpetra::MultiVector< SC, LO, GO, NO > > MV2TpetraMV (RCP< MultiVector > const vec)
 Helper utility to pull out the underlying Tpetra objects from an Xpetra object.
 
static const Tpetra::MultiVector< SC, LO, GO, NO > & MV2TpetraMV (const MultiVector &vec)
 
static RCP< Tpetra::MultiVector< SC, LO, GO, NO > > MV2NonConstTpetraMV (RCP< MultiVector > vec)
 
static Tpetra::MultiVector< SC, LO, GO, NO > & MV2NonConstTpetraMV (MultiVector &vec)
 
static RCP< Tpetra::MultiVector< SC, LO, GO, NO > > MV2NonConstTpetraMV2 (MultiVector &vec)
 
static RCP< const Tpetra::CrsMatrix< SC, LO, GO, NO > > Op2TpetraCrs (RCP< const Matrix > Op)
 
static const Tpetra::CrsMatrix< SC, LO, GO, NO > & Op2TpetraCrs (const Matrix &Op)
 
static RCP< Tpetra::CrsMatrix< SC, LO, GO, NO > > Op2NonConstTpetraCrs (RCP< Matrix > Op)
 
static Tpetra::CrsMatrix< SC, LO, GO, NO > & Op2NonConstTpetraCrs (Matrix &Op)
 
static RCP< const Tpetra::RowMatrix< SC, LO, GO, NO > > Op2TpetraRow (RCP< const Matrix > Op)
 
static RCP< Tpetra::RowMatrix< SC, LO, GO, NO > > Op2NonConstTpetraRow (RCP< Matrix > Op)
 
static const RCP< const Tpetra::Map< LO, GO, NO > > Map2TpetraMap (const Map &map)
 
static RCP< Xpetra::Matrix< SC, LO, GO, NO > > Crs2Op (RCP< CrsMatrix > Op)
 
static RCP< VectorGetMatrixDiagonal (const Matrix &A)
 Extract Matrix Diagonal.
 
static RCP< VectorGetMatrixDiagonalInverse (const Matrix &A, Magnitude tol=TST::eps() *100, const bool doLumped=false)
 Extract Matrix Diagonal.
 
static RCP< VectorGetMatrixOverlappedDiagonal (const Matrix &A)
 Extract Overlapped Matrix Diagonal.
 
static Teuchos::RCP< VectorGetInverse (Teuchos::RCP< const Vector > v, Magnitude tol=Teuchos::ScalarTraits< double >::eps() *100, double tolReplacement=Teuchos::ScalarTraits< double >::zero())
 Return vector containing inverse of input vector.
 
static Teuchos::Array< MagnitudeResidualNorm (const Operator &Op, const MultiVector &X, const MultiVector &RHS)
 
static RCP< MultiVectorResidual (const Operator &Op, const MultiVector &X, const MultiVector &RHS)
 
static SC PowerMethod (const Matrix &A, bool scaleByDiag=true, LO niters=10, Magnitude tolerance=1e-2, bool verbose=false, unsigned int seed=123)
 Simple transpose for Tpetra::CrsMatrix types.
 
static SC PowerMethod (const Matrix &A, const Teuchos::RCP< Vector > &invDiag, LO niters=10, Magnitude tolerance=1e-2, bool verbose=false, unsigned int seed=123)
 
static void MyOldScaleMatrix (Matrix &Op, const Teuchos::ArrayRCP< const SC > &scalingVector, bool doInverse=true, bool doFillComplete=true, bool doOptimizeStorage=true)
 
static void MyOldScaleMatrix_Tpetra (Matrix &Op, const Teuchos::ArrayRCP< SC > &scalingVector, bool doFillComplete, bool doOptimizeStorage)
 
static void MyOldScaleMatrix_Epetra (Matrix &Op, const Teuchos::ArrayRCP< SC > &scalingVector, bool doFillComplete, bool doOptimizeStorage)
 
static RCP< Teuchos::FancyOStream > MakeFancy (std::ostream &os)
 
static Kokkos::View< bool *, typename NO::device_type > DetectDirichletRows (const Matrix &A, const Magnitude &tol=Teuchos::ScalarTraits< typename Teuchos::ScalarTraits< SC >::magnitudeType >::zero(), const bool count_twos_as_dirichlet=false)
 Detect Dirichlet rows.
 
static void FindNonZeros (const typename Xpetra::MultiVector< double, int, int, Node >::dual_view_type::t_dev_const_um vals, Kokkos::View< bool *, typename Node::device_type > nonzeros)
 Find non-zero values in an ArrayRCP Compares the value to 2 * machine epsilon.
 
static Kokkos::View< bool *, typename NO::device_type > DetectDirichletCols (const Matrix &A, const Kokkos::View< const bool *, typename NO::device_type > &dirichletRows)
 Detect Dirichlet columns based on Dirichlet rows.
 
static void DetectDirichletColsAndDomains (const Xpetra::Matrix< double, int, int, Node > &A, const Kokkos::View< bool *, typename Node::device_type > &dirichletRows, Kokkos::View< bool *, typename Node::device_type > dirichletCols, Kokkos::View< bool *, typename Node::device_type > dirichletDomain)
 Detects Dirichlet columns & domains from a list of Dirichlet rows.
 
static void ZeroDirichletRows (RCP< Matrix > &A, const Kokkos::View< const bool *, typename NO::device_type > &dirichletRows, SC replaceWith=Teuchos::ScalarTraits< SC >::zero())
 
static void ZeroDirichletRows (RCP< MultiVector > &X, const Kokkos::View< const bool *, typename NO::device_type > &dirichletRows, SC replaceWith=Teuchos::ScalarTraits< SC >::zero())
 
static void ZeroDirichletCols (RCP< Matrix > &A, const Kokkos::View< const bool *, typename NO::device_type > &dirichletCols, SC replaceWith=Teuchos::ScalarTraits< SC >::zero())
 
static void ApplyRowSumCriterion (const Matrix &A, const typename Teuchos::ScalarTraits< double >::magnitudeType rowSumTol, Kokkos::View< bool *, typename NO::device_type > &dirichletRows)
 
static RCP< MultiVectorRealValuedToScalarMultiVector (RCP< RealValuedMultiVector > X)
 
static void SetRandomSeed (const Teuchos::Comm< int > &comm)
 Set seed for random number generator.
 
static RCP< MatrixTranspose (Matrix &Op, bool optimizeTranspose=false, const std::string &label=std::string())
 Transpose a Xpetra::Matrix.
 
static RCP< Xpetra::MultiVector< typename Teuchos::ScalarTraits< double >::magnitudeType, int, int, Node > > ExtractCoordinatesFromParameterList (ParameterList &paramList)
 
static RCP< Xpetra::Vector< int, int, int, Node > > CuthillMcKee (const Matrix &Op)
 
static RCP< Xpetra::Vector< int, int, int, Node > > ReverseCuthillMcKee (const Matrix &Op)
 
static void ApplyOAZToMatrixRows (RCP< Matrix > &A, const Kokkos::View< const bool *, typename Node::device_type > &dirichletRows)
 
- Static Public Member Functions inherited from MueLu::UtilitiesBase< double, int, int, Node >
static RCP< MatrixCrs2Op (RCP< CrsMatrix > Op)
 
static RCP< CrsMatrixWrapGetThresholdedMatrix (const RCP< Matrix > &Ain, const double threshold, const bool keepDiagonal=true, const int expectedNNZperRow=-1)
 Threshold a matrix.
 
static RCP< Xpetra::CrsGraph< int, int, Node > > GetThresholdedGraph (const RCP< Matrix > &A, const Magnitude threshold, const int expectedNNZperRow=-1)
 Threshold a graph.
 
static Teuchos::ArrayRCP< double > GetMatrixDiagonal (const Matrix &A)
 Extract Matrix Diagonal.
 
static RCP< VectorGetMatrixDiagonalInverse (const Matrix &A, Magnitude tol=Teuchos::ScalarTraits< double >::eps() *100, double valReplacement=Teuchos::ScalarTraits< double >::zero())
 Extract Matrix Diagonal.
 
static Teuchos::RCP< VectorGetLumpedMatrixDiagonal (Matrix const &A, const bool doReciprocal=false, Magnitude tol=Teuchos::ScalarTraits< double >::magnitude(Teuchos::ScalarTraits< double >::zero()), double valReplacement=Teuchos::ScalarTraits< double >::zero(), const bool replaceSingleEntryRowWithZero=false, const bool useAverageAbsDiagVal=false)
 Extract Matrix Diagonal of lumped matrix.
 
static Teuchos::ArrayRCP< MagnitudeGetMatrixMaxMinusOffDiagonal (const Xpetra::Matrix< double, int, int, Node > &A)
 Return vector containing: max_{i\not=k}(-a_ik), for each for i in the matrix.
 
static Teuchos::ArrayRCP< MagnitudeGetMatrixMaxMinusOffDiagonal (const Xpetra::Matrix< double, int, int, Node > &A, const Xpetra::Vector< int, int, int, Node > &BlockNumber)
 
static Teuchos::RCP< VectorGetInverse (Teuchos::RCP< const Vector > v, Magnitude tol=Teuchos::ScalarTraits< double >::eps() *100, double valReplacement=Teuchos::ScalarTraits< double >::zero())
 Return vector containing inverse of input vector.
 
static RCP< VectorGetMatrixOverlappedDiagonal (const Matrix &A)
 Extract Overlapped Matrix Diagonal.
 
static RCP< VectorGetMatrixOverlappedDeletedRowsum (const Matrix &A)
 Extract Overlapped Matrix Deleted Rowsum.
 
static RCP< Xpetra::Vector< Magnitude, int, int, Node > > GetMatrixOverlappedAbsDeletedRowsum (const Matrix &A)
 
static Teuchos::Array< MagnitudeResidualNorm (const Xpetra::Operator< double, int, int, Node > &Op, const MultiVector &X, const MultiVector &RHS)
 
static Teuchos::Array< MagnitudeResidualNorm (const Xpetra::Operator< double, int, int, Node > &Op, const MultiVector &X, const MultiVector &RHS, MultiVector &Resid)
 
static RCP< MultiVectorResidual (const Xpetra::Operator< double, int, int, Node > &Op, const MultiVector &X, const MultiVector &RHS)
 
static void Residual (const Xpetra::Operator< double, int, int, Node > &Op, const MultiVector &X, const MultiVector &RHS, MultiVector &Resid)
 
static double PowerMethod (const Matrix &A, bool scaleByDiag=true, int niters=10, Magnitude tolerance=1e-2, bool verbose=false, unsigned int seed=123)
 Power method.
 
static double PowerMethod (const Matrix &A, const RCP< Vector > &diagInvVec, int niters=10, Magnitude tolerance=1e-2, bool verbose=false, unsigned int seed=123)
 Power method.
 
static RCP< Teuchos::FancyOStream > MakeFancy (std::ostream &os)
 
static Teuchos::ScalarTraits< double >::magnitudeType Distance2 (const Teuchos::Array< Teuchos::ArrayRCP< const double > > &v, int i0, int i1)
 Squared distance between two rows in a multivector.
 
static Teuchos::ScalarTraits< double >::magnitudeType Distance2 (const Teuchos::ArrayView< double > &weight, const Teuchos::Array< Teuchos::ArrayRCP< const double > > &v, int i0, int i1)
 Weighted squared distance between two rows in a multivector.
 
static Teuchos::ArrayRCP< const bool > DetectDirichletRows (const Xpetra::Matrix< double, int, int, Node > &A, const Magnitude &tol=Teuchos::ScalarTraits< double >::zero(), bool count_twos_as_dirichlet=false)
 Detect Dirichlet rows.
 
static Teuchos::ArrayRCP< const bool > DetectDirichletRowsExt (const Xpetra::Matrix< double, int, int, Node > &A, bool &bHasZeroDiagonal, const Magnitude &tol=Teuchos::ScalarTraits< double >::zero())
 Detect Dirichlet rows (extended version)
 
static void FindNonZeros (const Teuchos::ArrayRCP< const double > vals, Teuchos::ArrayRCP< bool > nonzeros)
 Find non-zero values in an ArrayRCP Compares the value to 2 * machine epsilon.
 
static void DetectDirichletColsAndDomains (const Xpetra::Matrix< double, int, int, Node > &A, const Teuchos::ArrayRCP< bool > &dirichletRows, Teuchos::ArrayRCP< bool > dirichletCols, Teuchos::ArrayRCP< bool > dirichletDomain)
 Detects Dirichlet columns & domains from a list of Dirichlet rows.
 
static void ApplyRowSumCriterion (const Xpetra::Matrix< double, int, int, Node > &A, const Magnitude rowSumTol, Teuchos::ArrayRCP< bool > &dirichletRows)
 Apply Rowsum Criterion.
 
static void ApplyRowSumCriterion (const Xpetra::Matrix< double, int, int, Node > &A, const Xpetra::Vector< int, int, int, Node > &BlockNumber, const Magnitude rowSumTol, Teuchos::ArrayRCP< bool > &dirichletRows)
 
static Teuchos::ArrayRCP< const bool > DetectDirichletCols (const Xpetra::Matrix< double, int, int, Node > &A, const Teuchos::ArrayRCP< const bool > &dirichletRows)
 Detect Dirichlet columns based on Dirichlet rows.
 
static double Frobenius (const Xpetra::Matrix< double, int, int, Node > &A, const Xpetra::Matrix< double, int, int, Node > &B)
 Frobenius inner product of two matrices.
 
static void SetRandomSeed (const Teuchos::Comm< int > &comm)
 Set seed for random number generator.
 
static void FindDirichletRows (Teuchos::RCP< Xpetra::Matrix< double, int, int, Node > > &A, std::vector< int > &dirichletRows, bool count_twos_as_dirichlet=false)
 
static void ApplyOAZToMatrixRows (Teuchos::RCP< Xpetra::Matrix< double, int, int, Node > > &A, const std::vector< int > &dirichletRows)
 
static void ApplyOAZToMatrixRows (Teuchos::RCP< Xpetra::Matrix< double, int, int, Node > > &A, const Teuchos::ArrayRCP< const bool > &dirichletRows)
 
static void ZeroDirichletRows (Teuchos::RCP< Xpetra::Matrix< double, int, int, Node > > &A, const std::vector< int > &dirichletRows, double replaceWith=Teuchos::ScalarTraits< double >::zero())
 
static void ZeroDirichletRows (Teuchos::RCP< Xpetra::Matrix< double, int, int, Node > > &A, const Teuchos::ArrayRCP< const bool > &dirichletRows, double replaceWith=Teuchos::ScalarTraits< double >::zero())
 
static void ZeroDirichletRows (Teuchos::RCP< Xpetra::MultiVector< double, int, int, Node > > &X, const Teuchos::ArrayRCP< const bool > &dirichletRows, double replaceWith=Teuchos::ScalarTraits< double >::zero())
 
static void ZeroDirichletCols (Teuchos::RCP< Matrix > &A, const Teuchos::ArrayRCP< const bool > &dirichletCols, double replaceWith=Teuchos::ScalarTraits< double >::zero())
 
static void FindDirichletRowsAndPropagateToCols (Teuchos::RCP< Xpetra::Matrix< double, int, int, Node > > &A, Teuchos::RCP< Xpetra::Vector< int, int, int, Node > > &isDirichletRow, Teuchos::RCP< Xpetra::Vector< int, int, int, Node > > &isDirichletCol)
 
static RCP< const Xpetra::BlockedMap< int, int, Node > > GeneratedBlockedTargetMap (const Xpetra::BlockedMap< int, int, Node > &sourceBlockedMap, const Xpetra::Import< int, int, Node > &Importer)
 
static bool MapsAreNested (const Xpetra::Map< int, int, Node > &rowMap, const Xpetra::Map< int, int, Node > &colMap)
 

Detailed Description

template<class Node>
class MueLu::Utilities_kokkos< double, int, int, Node >

Definition at line 351 of file MueLu_Utilities_kokkos_decl.hpp.

Member Typedef Documentation

◆ Scalar

template<class Node>
typedef double MueLu::Utilities_kokkos< double, int, int, Node >::Scalar

Definition at line 353 of file MueLu_Utilities_kokkos_decl.hpp.

◆ LocalOrdinal

template<class Node>
typedef int MueLu::Utilities_kokkos< double, int, int, Node >::LocalOrdinal

Definition at line 354 of file MueLu_Utilities_kokkos_decl.hpp.

◆ GlobalOrdinal

template<class Node>
typedef int MueLu::Utilities_kokkos< double, int, int, Node >::GlobalOrdinal

Definition at line 355 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Magnitude [1/2]

template<class Node>
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType MueLu::Utilities_kokkos< double, int, int, Node >::Magnitude

Definition at line 356 of file MueLu_Utilities_kokkos_decl.hpp.

◆ CoordinateType [1/2]

template<class Node>
using MueLu::Utilities_kokkos< double, int, int, Node >::CoordinateType = typename Teuchos::ScalarTraits<Scalar>::coordinateType

Definition at line 357 of file MueLu_Utilities_kokkos_decl.hpp.

◆ RealValuedMultiVector [1/2]

template<class Node>
using MueLu::Utilities_kokkos< double, int, int, Node >::RealValuedMultiVector = Xpetra::MultiVector<CoordinateType,LocalOrdinal,GlobalOrdinal,Node>

Definition at line 358 of file MueLu_Utilities_kokkos_decl.hpp.

◆ TST

using MueLu::Utilities_kokkos< double, int, int, Node >::TST

Definition at line 113 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Magnitude [2/2]

using MueLu::Utilities_kokkos< double, int, int, Node >::Magnitude

Definition at line 114 of file MueLu_Utilities_kokkos_decl.hpp.

◆ CoordinateType [2/2]

using MueLu::Utilities_kokkos< double, int, int, Node >::CoordinateType

Definition at line 115 of file MueLu_Utilities_kokkos_decl.hpp.

◆ RealValuedMultiVector [2/2]

using MueLu::Utilities_kokkos< double, int, int, Node >::RealValuedMultiVector

Definition at line 116 of file MueLu_Utilities_kokkos_decl.hpp.

Member Function Documentation

◆ MV2EpetraMV() [1/4]

template<class Node>
static RCP< const Epetra_MultiVector > MueLu::Utilities_kokkos< double, int, int, Node >::MV2EpetraMV ( RCP< MultiVector > const vec)
inlinestatic

Helper utility to pull out the underlying Epetra objects from an Xpetra object.

Definition at line 369 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MV2NonConstEpetraMV() [1/4]

template<class Node>
static RCP< Epetra_MultiVector > MueLu::Utilities_kokkos< double, int, int, Node >::MV2NonConstEpetraMV ( RCP< MultiVector > vec)
inlinestatic

Definition at line 370 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MV2EpetraMV() [2/4]

template<class Node>
static const Epetra_MultiVector & MueLu::Utilities_kokkos< double, int, int, Node >::MV2EpetraMV ( const MultiVector & vec)
inlinestatic

Definition at line 372 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MV2NonConstEpetraMV() [2/4]

template<class Node>
static Epetra_MultiVector & MueLu::Utilities_kokkos< double, int, int, Node >::MV2NonConstEpetraMV ( MultiVector & vec)
inlinestatic

Definition at line 373 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2EpetraCrs() [1/4]

template<class Node>
static RCP< const Epetra_CrsMatrix > MueLu::Utilities_kokkos< double, int, int, Node >::Op2EpetraCrs ( RCP< const Matrix > Op)
inlinestatic

Definition at line 375 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2NonConstEpetraCrs() [1/4]

template<class Node>
static RCP< Epetra_CrsMatrix > MueLu::Utilities_kokkos< double, int, int, Node >::Op2NonConstEpetraCrs ( RCP< Matrix > Op)
inlinestatic

Definition at line 376 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2EpetraCrs() [2/4]

template<class Node>
static const Epetra_CrsMatrix & MueLu::Utilities_kokkos< double, int, int, Node >::Op2EpetraCrs ( const Matrix & Op)
inlinestatic

Definition at line 378 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2NonConstEpetraCrs() [2/4]

template<class Node>
static Epetra_CrsMatrix & MueLu::Utilities_kokkos< double, int, int, Node >::Op2NonConstEpetraCrs ( Matrix & Op)
inlinestatic

Definition at line 379 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Map2EpetraMap() [1/2]

template<class Node>
static const Epetra_Map & MueLu::Utilities_kokkos< double, int, int, Node >::Map2EpetraMap ( const Map & map)
inlinestatic

Definition at line 381 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MV2TpetraMV() [1/4]

template<class Node>
static RCP< const Tpetra::MultiVector< SC, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::MV2TpetraMV ( RCP< MultiVector > const vec)
inlinestatic

Helper utility to pull out the underlying Tpetra objects from an Xpetra object.

Definition at line 388 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MV2NonConstTpetraMV() [1/4]

template<class Node>
static RCP< Tpetra::MultiVector< SC, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::MV2NonConstTpetraMV ( RCP< MultiVector > vec)
inlinestatic

Definition at line 389 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MV2NonConstTpetraMV2() [1/2]

template<class Node>
static RCP< Tpetra::MultiVector< SC, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::MV2NonConstTpetraMV2 ( MultiVector & vec)
inlinestatic

Definition at line 390 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MV2TpetraMV() [2/4]

template<class Node>
static const Tpetra::MultiVector< SC, LO, GO, NO > & MueLu::Utilities_kokkos< double, int, int, Node >::MV2TpetraMV ( const MultiVector & vec)
inlinestatic

Definition at line 392 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MV2NonConstTpetraMV() [2/4]

template<class Node>
static Tpetra::MultiVector< SC, LO, GO, NO > & MueLu::Utilities_kokkos< double, int, int, Node >::MV2NonConstTpetraMV ( MultiVector & vec)
inlinestatic

Definition at line 393 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2TpetraCrs() [1/4]

template<class Node>
static RCP< const Tpetra::CrsMatrix< SC, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::Op2TpetraCrs ( RCP< const Matrix > Op)
inlinestatic

Definition at line 395 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2NonConstTpetraCrs() [1/4]

template<class Node>
static RCP< Tpetra::CrsMatrix< SC, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::Op2NonConstTpetraCrs ( RCP< Matrix > Op)
inlinestatic

Definition at line 396 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2TpetraCrs() [2/4]

template<class Node>
static const Tpetra::CrsMatrix< SC, LO, GO, NO > & MueLu::Utilities_kokkos< double, int, int, Node >::Op2TpetraCrs ( const Matrix & Op)
inlinestatic

Definition at line 398 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2NonConstTpetraCrs() [2/4]

template<class Node>
static Tpetra::CrsMatrix< SC, LO, GO, NO > & MueLu::Utilities_kokkos< double, int, int, Node >::Op2NonConstTpetraCrs ( Matrix & Op)
inlinestatic

Definition at line 399 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2TpetraRow() [1/2]

template<class Node>
static RCP< const Tpetra::RowMatrix< SC, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::Op2TpetraRow ( RCP< const Matrix > Op)
inlinestatic

Definition at line 401 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2NonConstTpetraRow() [1/2]

template<class Node>
static RCP< Tpetra::RowMatrix< SC, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::Op2NonConstTpetraRow ( RCP< Matrix > Op)
inlinestatic

Definition at line 402 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Map2TpetraMap() [1/2]

template<class Node>
static const RCP< const Tpetra::Map< LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::Map2TpetraMap ( const Map & map)
inlinestatic

Definition at line 404 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Crs2Op() [1/2]

template<class Node>
static RCP< Xpetra::Matrix< SC, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::Crs2Op ( RCP< CrsMatrix > Op)
inlinestatic

Definition at line 406 of file MueLu_Utilities_kokkos_decl.hpp.

◆ GetMatrixDiagonal() [1/2]

template<class Node>
static RCP< Vector > MueLu::Utilities_kokkos< double, int, int, Node >::GetMatrixDiagonal ( const Matrix & A)
inlinestatic

Definition at line 408 of file MueLu_Utilities_kokkos_decl.hpp.

◆ GetMatrixDiagonalInverse() [1/2]

template<class Node>
Teuchos::RCP< Xpetra::Vector< double, int, int, Node > > MueLu::Utilities_kokkos< double, int, int, Node >::GetMatrixDiagonalInverse ( const Matrix & A,
Magnitude tol = Teuchos::ScalarTraits<SC>::eps()*100,
const bool doLumped = false )
static

Definition at line 211 of file MueLu_Utilities_kokkos_def.hpp.

◆ GetLumpedMatrixDiagonal()

template<class Node>
static RCP< Vector > MueLu::Utilities_kokkos< double, int, int, Node >::GetLumpedMatrixDiagonal ( Matrix const & A,
const bool doReciprocal = false,
Magnitude tol = Teuchos::ScalarTraits<Scalar>::eps()*100,
Scalar tolReplacement = Teuchos::ScalarTraits<Scalar>::zero(),
const bool replaceSingleEntryRowWithZero = false,
const bool useAverageAbsDiagVal = false )
inlinestatic

Definition at line 418 of file MueLu_Utilities_kokkos_decl.hpp.

◆ GetMatrixOverlappedDiagonal() [1/2]

template<class Node>
static RCP< Vector > MueLu::Utilities_kokkos< double, int, int, Node >::GetMatrixOverlappedDiagonal ( const Matrix & A)
inlinestatic

Definition at line 421 of file MueLu_Utilities_kokkos_decl.hpp.

◆ GetInverse() [1/2]

template<class Node>
static RCP< Vector > MueLu::Utilities_kokkos< double, int, int, Node >::GetInverse ( RCP< const Vector > v,
Magnitude tol = Teuchos::ScalarTraits<SC>::eps()*100,
SC tolReplacement = Teuchos::ScalarTraits<SC>::zero() )
inlinestatic

Definition at line 424 of file MueLu_Utilities_kokkos_decl.hpp.

◆ ResidualNorm() [1/2]

template<class Node>
static Teuchos::Array< Magnitude > MueLu::Utilities_kokkos< double, int, int, Node >::ResidualNorm ( const Operator & Op,
const MultiVector & X,
const MultiVector & RHS )
inlinestatic

Definition at line 427 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Residual() [1/2]

template<class Node>
static RCP< MultiVector > MueLu::Utilities_kokkos< double, int, int, Node >::Residual ( const Operator & Op,
const MultiVector & X,
const MultiVector & RHS )
inlinestatic

Definition at line 430 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MakeFancy() [1/2]

template<class Node>
static RCP< Teuchos::FancyOStream > MueLu::Utilities_kokkos< double, int, int, Node >::MakeFancy ( std::ostream & os)
inlinestatic

Definition at line 433 of file MueLu_Utilities_kokkos_decl.hpp.

◆ SetRandomSeed() [1/2]

template<class Node>
static void MueLu::Utilities_kokkos< double, int, int, Node >::SetRandomSeed ( const Teuchos::Comm< int > & comm)
inlinestatic

Definition at line 436 of file MueLu_Utilities_kokkos_decl.hpp.

◆ DetectDirichletRows() [1/2]

template<class Node>
Kokkos::View< bool *, typename Node::device_type > MueLu::Utilities_kokkos< double, int, int, Node >::DetectDirichletRows ( const Matrix & A,
const Magnitude & tol = Teuchos::ScalarTraits<SC>::zero(),
const bool count_twos_as_dirichlet = false )
static

Definition at line 469 of file MueLu_Utilities_kokkos_def.hpp.

◆ DetectDirichletCols() [1/2]

template<class Node>
Kokkos::View< bool *, typename Node::device_type > MueLu::Utilities_kokkos< double, int, int, Node >::DetectDirichletCols ( const Matrix & A,
const Kokkos::View< const bool *, typename Node::device_type > & dirichletRows )
static

Definition at line 536 of file MueLu_Utilities_kokkos_def.hpp.

◆ FindNonZeros() [1/2]

template<class Node>
void MueLu::Utilities_kokkos< double, int, int, Node >::FindNonZeros ( const typename Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::dual_view_type::t_dev_const_um vals,
Kokkos::View< bool *, typename Node::device_type > nonzeros )
static

Definition at line 569 of file MueLu_Utilities_kokkos_def.hpp.

◆ DetectDirichletColsAndDomains() [1/2]

template<class Node>
void MueLu::Utilities_kokkos< double, int, int, Node >::DetectDirichletColsAndDomains ( const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > & A,
const Kokkos::View< bool *, typename Node::device_type > & dirichletRows,
Kokkos::View< bool *, typename Node::device_type > dirichletCols,
Kokkos::View< bool *, typename Node::device_type > dirichletDomain )
static

Definition at line 633 of file MueLu_Utilities_kokkos_def.hpp.

◆ ZeroDirichletRows() [1/4]

template<class Node>
static void MueLu::Utilities_kokkos< double, int, int, Node >::ZeroDirichletRows ( RCP< Matrix > & A,
const Kokkos::View< const bool *, typename Node::device_type > & dirichletRows,
SC replaceWith = Teuchos::ScalarTraits< SC >::zero() )
static

◆ ZeroDirichletRows() [2/4]

template<class Node>
static void MueLu::Utilities_kokkos< double, int, int, Node >::ZeroDirichletRows ( RCP< MultiVector > & X,
const Kokkos::View< const bool *, typename Node::device_type > & dirichletRows,
SC replaceWith = Teuchos::ScalarTraits< SC >::zero() )
static

◆ ZeroDirichletCols() [1/2]

template<class Node>
void MueLu::Utilities_kokkos< double, int, int, Node >::ZeroDirichletCols ( RCP< Matrix > & A,
const Kokkos::View< const bool *, typename Node::device_type > & dirichletCols,
SC replaceWith = Teuchos::ScalarTraits<SC>::zero() )
static

Definition at line 763 of file MueLu_Utilities_kokkos_def.hpp.

◆ ApplyRowSumCriterion() [1/2]

template<class Node>
void MueLu::Utilities_kokkos< double, int, int, Node >::ApplyRowSumCriterion ( const Matrix & A,
const typename Teuchos::ScalarTraits< Scalar >::magnitudeType rowSumTol,
Kokkos::View< bool *, typename NO::device_type > & dirichletRows )
static

Definition at line 816 of file MueLu_Utilities_kokkos_def.hpp.

◆ RealValuedToScalarMultiVector() [1/2]

template<class Node>
RCP< Xpetra::MultiVector< double, int, int, Node > > MueLu::Utilities_kokkos< double, int, int, Node >::RealValuedToScalarMultiVector ( RCP< RealValuedMultiVector > X)
static

Definition at line 854 of file MueLu_Utilities_kokkos_def.hpp.

◆ PowerMethod() [1/4]

template<class Node>
static Scalar MueLu::Utilities_kokkos< double, int, int, Node >::PowerMethod ( const Matrix & A,
bool scaleByDiag = true,
LO niters = 10,
Magnitude tolerance = 1e-2,
bool verbose = false,
unsigned int seed = 123 )
inlinestatic

Definition at line 465 of file MueLu_Utilities_kokkos_decl.hpp.

◆ PowerMethod() [2/4]

template<class Node>
static Scalar MueLu::Utilities_kokkos< double, int, int, Node >::PowerMethod ( const Matrix & A,
const Teuchos::RCP< Vector > & invDiag,
LO niters = 10,
Magnitude tolerance = 1e-2,
bool verbose = false,
unsigned int seed = 123 )
inlinestatic

Definition at line 469 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MyOldScaleMatrix() [1/2]

template<class Node>
static void MueLu::Utilities_kokkos< double, int, int, Node >::MyOldScaleMatrix ( Matrix & Op,
const Teuchos::ArrayRCP< const SC > & scalingVector,
bool doInverse = true,
bool doFillComplete = true,
bool doOptimizeStorage = true )
inlinestatic

Definition at line 473 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MyOldScaleMatrix_Tpetra() [1/2]

template<class Node>
static void MueLu::Utilities_kokkos< double, int, int, Node >::MyOldScaleMatrix_Tpetra ( Matrix & Op,
const Teuchos::ArrayRCP< Scalar > & scalingVector,
bool doFillComplete,
bool doOptimizeStorage )
inlinestatic

Definition at line 503 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MyOldScaleMatrix_Epetra() [1/2]

template<class Node>
static void MueLu::Utilities_kokkos< double, int, int, Node >::MyOldScaleMatrix_Epetra ( Matrix & Op,
const Teuchos::ArrayRCP< Scalar > & scalingVector,
bool doFillComplete,
bool doOptimizeStorage )
inlinestatic

Definition at line 587 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Transpose() [1/2]

template<class Node>
static RCP< Matrix > MueLu::Utilities_kokkos< double, int, int, Node >::Transpose ( Matrix & Op,
bool = false,
const std::string & label = std::string(),
const Teuchos::RCP< Teuchos::ParameterList > & params = Teuchos::null )
inlinestatic

Transpose a Xpetra::Matrix.

Note: Currently, an error is thrown if the matrix isn't a Tpetra::CrsMatrix or Epetra_CrsMatrix. In principle, however, we could allow any Epetra_RowMatrix because the Epetra transposer does.

Definition at line 617 of file MueLu_Utilities_kokkos_decl.hpp.

◆ ExtractCoordinatesFromParameterList() [1/2]

template<class Node>
static RCP< Xpetra::MultiVector< typename Teuchos::ScalarTraits< Scalar >::magnitudeType, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::ExtractCoordinatesFromParameterList ( ParameterList & paramList)
inlinestatic

Extract coordinates from parameter list and return them in a Xpetra::MultiVector.

Definition at line 697 of file MueLu_Utilities_kokkos_decl.hpp.

◆ ReverseCuthillMcKee() [1/2]

template<class Node>
Teuchos::RCP< Xpetra::Vector< int, int, int, Node > > MueLu::Utilities_kokkos< double, int, int, Node >::ReverseCuthillMcKee ( const Matrix & Op)
static

Perform a Cuthill-McKee (CM) or Reverse Cuthill-McKee (RCM) ordering of the local component of the matrix Kokkos-Kernels has an RCM implementation, so we reverse that here if we call CM.

Definition at line 926 of file MueLu_Utilities_kokkos_def.hpp.

◆ CuthillMcKee() [1/2]

template<class Node>
Teuchos::RCP< Xpetra::Vector< int, int, int, Node > > MueLu::Utilities_kokkos< double, int, int, Node >::CuthillMcKee ( const Matrix & Op)
static

Perform a Cuthill-McKee (CM) or Reverse Cuthill-McKee (RCM) ordering of the local component of the matrix Kokkos-Kernels has an RCM implementation, so we reverse that here if we call CM.

Definition at line 938 of file MueLu_Utilities_kokkos_def.hpp.

◆ ApplyOAZToMatrixRows() [1/2]

template<class Node>
void MueLu::Utilities_kokkos< double, int, int, Node >::ApplyOAZToMatrixRows ( RCP< Matrix > & A,
const Kokkos::View< const bool *, typename Node::device_type > & dirichletRows )
static

Definition at line 991 of file MueLu_Utilities_kokkos_def.hpp.

◆ MV2EpetraMV() [3/4]

static RCP< const Epetra_MultiVector > MueLu::Utilities_kokkos< double, int, int, Node >::MV2EpetraMV ( RCP< MultiVector > const vec)
inlinestatic

Helper utility to pull out the underlying Epetra objects from an Xpetra object.

Definition at line 121 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MV2EpetraMV() [4/4]

static const Epetra_MultiVector & MueLu::Utilities_kokkos< double, int, int, Node >::MV2EpetraMV ( const MultiVector & vec)
inlinestatic

Definition at line 124 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MV2NonConstEpetraMV() [3/4]

static RCP< Epetra_MultiVector > MueLu::Utilities_kokkos< double, int, int, Node >::MV2NonConstEpetraMV ( RCP< MultiVector > vec)
inlinestatic

Definition at line 122 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MV2NonConstEpetraMV() [4/4]

static Epetra_MultiVector & MueLu::Utilities_kokkos< double, int, int, Node >::MV2NonConstEpetraMV ( MultiVector & vec)
inlinestatic

Definition at line 125 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2EpetraCrs() [3/4]

static RCP< const Epetra_CrsMatrix > MueLu::Utilities_kokkos< double, int, int, Node >::Op2EpetraCrs ( RCP< const Matrix > Op)
inlinestatic

Definition at line 127 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2EpetraCrs() [4/4]

static const Epetra_CrsMatrix & MueLu::Utilities_kokkos< double, int, int, Node >::Op2EpetraCrs ( const Matrix & Op)
inlinestatic

Definition at line 130 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2NonConstEpetraCrs() [3/4]

static RCP< Epetra_CrsMatrix > MueLu::Utilities_kokkos< double, int, int, Node >::Op2NonConstEpetraCrs ( RCP< Matrix > Op)
inlinestatic

Definition at line 128 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2NonConstEpetraCrs() [4/4]

static Epetra_CrsMatrix & MueLu::Utilities_kokkos< double, int, int, Node >::Op2NonConstEpetraCrs ( Matrix & Op)
inlinestatic

Definition at line 131 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Map2EpetraMap() [2/2]

static const Epetra_Map & MueLu::Utilities_kokkos< double, int, int, Node >::Map2EpetraMap ( const Map & map)
inlinestatic

Definition at line 133 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MV2TpetraMV() [3/4]

static RCP< const Tpetra::MultiVector< SC, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::MV2TpetraMV ( RCP< MultiVector > const vec)
inlinestatic

Helper utility to pull out the underlying Tpetra objects from an Xpetra object.

Definition at line 140 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MV2TpetraMV() [4/4]

static const Tpetra::MultiVector< SC, LO, GO, NO > & MueLu::Utilities_kokkos< double, int, int, Node >::MV2TpetraMV ( const MultiVector & vec)
inlinestatic

Definition at line 144 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MV2NonConstTpetraMV() [3/4]

static RCP< Tpetra::MultiVector< SC, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::MV2NonConstTpetraMV ( RCP< MultiVector > vec)
inlinestatic

Definition at line 141 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MV2NonConstTpetraMV() [4/4]

static Tpetra::MultiVector< SC, LO, GO, NO > & MueLu::Utilities_kokkos< double, int, int, Node >::MV2NonConstTpetraMV ( MultiVector & vec)
inlinestatic

Definition at line 145 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MV2NonConstTpetraMV2() [2/2]

static RCP< Tpetra::MultiVector< SC, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::MV2NonConstTpetraMV2 ( MultiVector & vec)
inlinestatic

Definition at line 142 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2TpetraCrs() [3/4]

static RCP< const Tpetra::CrsMatrix< SC, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::Op2TpetraCrs ( RCP< const Matrix > Op)
inlinestatic

Definition at line 147 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2TpetraCrs() [4/4]

static const Tpetra::CrsMatrix< SC, LO, GO, NO > & MueLu::Utilities_kokkos< double, int, int, Node >::Op2TpetraCrs ( const Matrix & Op)
inlinestatic

Definition at line 150 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2NonConstTpetraCrs() [3/4]

static RCP< Tpetra::CrsMatrix< SC, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::Op2NonConstTpetraCrs ( RCP< Matrix > Op)
inlinestatic

Definition at line 148 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2NonConstTpetraCrs() [4/4]

static Tpetra::CrsMatrix< SC, LO, GO, NO > & MueLu::Utilities_kokkos< double, int, int, Node >::Op2NonConstTpetraCrs ( Matrix & Op)
inlinestatic

Definition at line 151 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2TpetraRow() [2/2]

static RCP< const Tpetra::RowMatrix< SC, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::Op2TpetraRow ( RCP< const Matrix > Op)
inlinestatic

Definition at line 153 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Op2NonConstTpetraRow() [2/2]

static RCP< Tpetra::RowMatrix< SC, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::Op2NonConstTpetraRow ( RCP< Matrix > Op)
inlinestatic

Definition at line 154 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Map2TpetraMap() [2/2]

static const RCP< const Tpetra::Map< LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::Map2TpetraMap ( const Map & map)
inlinestatic

Definition at line 156 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Crs2Op() [2/2]

static RCP< Xpetra::Matrix< SC, LO, GO, NO > > MueLu::Utilities_kokkos< double, int, int, Node >::Crs2Op ( RCP< CrsMatrix > Op)
inlinestatic

Definition at line 159 of file MueLu_Utilities_kokkos_decl.hpp.

◆ GetMatrixDiagonal() [2/2]

Teuchos::RCP< Xpetra::Vector< double, int, int, Node > > MueLu::Utilities_kokkos< double, int, int, Node >::GetMatrixDiagonal ( const Matrix & A)
static

Extract Matrix Diagonal.

Returns Matrix diagonal in RCP<Vector>.

NOTE – it's assumed that A has been fillComplete'd.

Definition at line 167 of file MueLu_Utilities_kokkos_def.hpp.

◆ GetMatrixDiagonalInverse() [2/2]

Teuchos::RCP< Xpetra::Vector< double, int, int, Node > > MueLu::Utilities_kokkos< double, int, int, Node >::GetMatrixDiagonalInverse ( const Matrix & A,
Magnitude tol = TST::eps()*100,
const bool doLumped = false )
static

Extract Matrix Diagonal.

Returns inverse of the Matrix diagonal in RCP<Vector>.

NOTE – it's assumed that A has been fillComplete'd.

Definition at line 175 of file MueLu_Utilities_kokkos_def.hpp.

◆ GetMatrixOverlappedDiagonal() [2/2]

RCP< Xpetra::Vector< double, int, int, Node > > MueLu::Utilities_kokkos< double, int, int, Node >::GetMatrixOverlappedDiagonal ( const Matrix & A)
static

Extract Overlapped Matrix Diagonal.

Returns overlapped Matrix diagonal in ArrayRCP.

The local overlapped diagonal has an entry for each index in A's column map. NOTE – it's assumed that A has been fillComplete'd.

Definition at line 186 of file MueLu_Utilities_kokkos_def.hpp.

◆ GetInverse() [2/2]

static Teuchos::RCP< Vector > MueLu::Utilities_kokkos< double, int, int, Node >::GetInverse ( Teuchos::RCP< const Vector > v,
Magnitude tol = Teuchos::ScalarTraits<Scalar>::eps()*100,
double tolReplacement = Teuchos::ScalarTraits<Scalar>::zero() )
inlinestatic

Return vector containing inverse of input vector.

Parameters
[in]vinput vector
[in]toltolerance. If entries of input vector are smaller than tolerance they are replaced by tolReplacement (see below). The default value for tol is 100*eps (machine precision)
[in]tolReplacementValue put in for undefined entries in output vector (default: 0.0) @ret: vector containing inverse values of input vector v

Definition at line 195 of file MueLu_Utilities_kokkos_decl.hpp.

◆ ResidualNorm() [2/2]

static Teuchos::Array< Magnitude > MueLu::Utilities_kokkos< double, int, int, Node >::ResidualNorm ( const Operator & Op,
const MultiVector & X,
const MultiVector & RHS )
inlinestatic

Definition at line 201 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Residual() [2/2]

static RCP< MultiVector > MueLu::Utilities_kokkos< double, int, int, Node >::Residual ( const Operator & Op,
const MultiVector & X,
const MultiVector & RHS )
inlinestatic

Definition at line 205 of file MueLu_Utilities_kokkos_decl.hpp.

◆ PowerMethod() [3/4]

static SC MueLu::Utilities_kokkos< double, int, int, Node >::PowerMethod ( const Matrix & A,
bool scaleByDiag = true,
LO niters = 10,
Magnitude tolerance = 1e-2,
bool verbose = false,
unsigned int seed = 123 )
inlinestatic

Simple transpose for Tpetra::CrsMatrix types.

Note: This is very inefficient, as it inserts one entry at a time.

Power method.

Parameters
Amatrix
scaleByDiagif true, estimate the largest eigenvalue of \( D^; A \).
nitersmaximum number of iterations
tolerancestopping tolerance @verbose if true, print iteration information

(Shamelessly grabbed from tpetra/examples.)

Definition at line 224 of file MueLu_Utilities_kokkos_decl.hpp.

◆ PowerMethod() [4/4]

static SC MueLu::Utilities_kokkos< double, int, int, Node >::PowerMethod ( const Matrix & A,
const Teuchos::RCP< Vector > & invDiag,
LO niters = 10,
Magnitude tolerance = 1e-2,
bool verbose = false,
unsigned int seed = 123 )
inlinestatic

Definition at line 229 of file MueLu_Utilities_kokkos_decl.hpp.

◆ MyOldScaleMatrix() [2/2]

void MueLu::Utilities_kokkos< double, int, int, Node >::MyOldScaleMatrix ( Matrix & Op,
const Teuchos::ArrayRCP< const SC > & scalingVector,
bool doInverse = true,
bool doFillComplete = true,
bool doOptimizeStorage = true )
static

Definition at line 234 of file MueLu_Utilities_kokkos_def.hpp.

◆ MyOldScaleMatrix_Tpetra() [2/2]

void MueLu::Utilities_kokkos< double, int, int, Node >::MyOldScaleMatrix_Tpetra ( Matrix & Op,
const Teuchos::ArrayRCP< SC > & scalingVector,
bool doFillComplete,
bool doOptimizeStorage )
static

Definition at line 237 of file MueLu_Utilities_kokkos_def.hpp.

◆ MyOldScaleMatrix_Epetra() [2/2]

void MueLu::Utilities_kokkos< double, int, int, Node >::MyOldScaleMatrix_Epetra ( Matrix & Op,
const Teuchos::ArrayRCP< SC > & scalingVector,
bool doFillComplete,
bool doOptimizeStorage )
static

Definition at line 240 of file MueLu_Utilities_kokkos_def.hpp.

◆ MakeFancy() [2/2]

static RCP< Teuchos::FancyOStream > MueLu::Utilities_kokkos< double, int, int, Node >::MakeFancy ( std::ostream & os)
inlinestatic

Definition at line 243 of file MueLu_Utilities_kokkos_decl.hpp.

◆ DetectDirichletRows() [2/2]

Kokkos::View< bool *, typename Node::device_type > MueLu::Utilities_kokkos< double, int, int, Node >::DetectDirichletRows ( const Matrix & A,
const Magnitude & tol = Teuchos::ScalarTraits<typename Teuchos::ScalarTraits<SC>::magnitudeType>::zero(),
const bool count_twos_as_dirichlet = false )
static

Detect Dirichlet rows.

Parameters
[in]Amatrix
[in]tolIf a row entry's magnitude is less than or equal to this tolerance, the entry is treated as zero.
Returns
boolean array. The ith entry is true iff row i is a Dirichlet row.

Definition at line 252 of file MueLu_Utilities_kokkos_def.hpp.

◆ FindNonZeros() [2/2]

void MueLu::Utilities_kokkos< double, int, int, Node >::FindNonZeros ( const typename Xpetra::MultiVector< double, int, int, Node >::dual_view_type::t_dev_const_um vals,
Kokkos::View< bool *, typename Node::device_type > nonzeros )
static

Find non-zero values in an ArrayRCP Compares the value to 2 * machine epsilon.

Parameters
[in]vals- ArrayRCP<const Scalar> of values to be tested
[out]nonzeros- ArrayRCP<bool> of true/false values for whether each entry in vals is nonzero

Definition at line 261 of file MueLu_Utilities_kokkos_def.hpp.

◆ DetectDirichletCols() [2/2]

Kokkos::View< bool *, typename Node::device_type > MueLu::Utilities_kokkos< double, int, int, Node >::DetectDirichletCols ( const Matrix & A,
const Kokkos::View< const bool *, typename NO::device_type > & dirichletRows )
static

Detect Dirichlet columns based on Dirichlet rows.

The routine finds all column indices that are in Dirichlet rows, where Dirichlet rows are described by dirichletRows, as returned by DetectDirichletRows.

Parameters
[in]Amatrix
[in]dirichletRowsarray of Dirichlet rows.
Returns
boolean array. The ith entry is true iff row i is a Dirichlet column.

Definition at line 275 of file MueLu_Utilities_kokkos_def.hpp.

◆ DetectDirichletColsAndDomains() [2/2]

void MueLu::Utilities_kokkos< double, int, int, Node >::DetectDirichletColsAndDomains ( const Xpetra::Matrix< double, int, int, Node > & A,
const Kokkos::View< bool *, typename Node::device_type > & dirichletRows,
Kokkos::View< bool *, typename Node::device_type > dirichletCols,
Kokkos::View< bool *, typename Node::device_type > dirichletDomain )
static

Detects Dirichlet columns & domains from a list of Dirichlet rows.

Parameters
[in]A- Matrix on which to apply Dirichlet column detection
[in]dirichletRows- View<bool> of indicators as to which rows are Dirichlet
[out]dirichletCols- View<bool> of indicators as to which cols are Dirichlet
[out]dirichletDomain- View<bool> of indicators as to which domains are Dirichlet

Definition at line 285 of file MueLu_Utilities_kokkos_def.hpp.

◆ ZeroDirichletRows() [3/4]

static void MueLu::Utilities_kokkos< double, int, int, Node >::ZeroDirichletRows ( RCP< Matrix > & A,
const Kokkos::View< const bool *, typename NO::device_type > & dirichletRows,
SC replaceWith = Teuchos::ScalarTraits<SC>::zero() )
static

◆ ZeroDirichletRows() [4/4]

static void MueLu::Utilities_kokkos< double, int, int, Node >::ZeroDirichletRows ( RCP< MultiVector > & X,
const Kokkos::View< const bool *, typename NO::device_type > & dirichletRows,
SC replaceWith = Teuchos::ScalarTraits<SC>::zero() )
static

◆ ZeroDirichletCols() [2/2]

void MueLu::Utilities_kokkos< double, int, int, Node >::ZeroDirichletCols ( RCP< Matrix > & A,
const Kokkos::View< const bool *, typename NO::device_type > & dirichletCols,
SC replaceWith = Teuchos::ScalarTraits<SC>::zero() )
static

Definition at line 295 of file MueLu_Utilities_kokkos_def.hpp.

◆ ApplyRowSumCriterion() [2/2]

void MueLu::Utilities_kokkos< double, int, int, Node >::ApplyRowSumCriterion ( const Matrix & A,
const typename Teuchos::ScalarTraits< double >::magnitudeType rowSumTol,
Kokkos::View< bool *, typename NO::device_type > & dirichletRows )
static

Definition at line 297 of file MueLu_Utilities_kokkos_def.hpp.

◆ RealValuedToScalarMultiVector() [2/2]

RCP< Xpetra::MultiVector< double, int, int, Node > > MueLu::Utilities_kokkos< double, int, int, Node >::RealValuedToScalarMultiVector ( RCP< RealValuedMultiVector > X)
static

Definition at line 301 of file MueLu_Utilities_kokkos_def.hpp.

◆ SetRandomSeed() [2/2]

static void MueLu::Utilities_kokkos< double, int, int, Node >::SetRandomSeed ( const Teuchos::Comm< int > & comm)
inlinestatic

Set seed for random number generator.

Distribute the seeds evenly in [1,INT_MAX-1]. This guarantees nothing about where random number streams on difference processes will intersect. This does avoid overflow situations in parallel when multiplying by a PID. It also avoids the pathological case of having the same random number stream on each process.

Definition at line 312 of file MueLu_Utilities_kokkos_decl.hpp.

◆ Transpose() [2/2]

static RCP< Matrix > MueLu::Utilities_kokkos< double, int, int, Node >::Transpose ( Matrix & Op,
bool optimizeTranspose = false,
const std::string & label = std::string() )
inlinestatic

Transpose a Xpetra::Matrix.

Note: Currently, an error is thrown if the matrix isn't a Tpetra::CrsMatrix or Epetra_CrsMatrix. In principle, however, we could allow any Epetra_RowMatrix because the Epetra transposer does.

Definition at line 319 of file MueLu_Utilities_kokkos_decl.hpp.

◆ ExtractCoordinatesFromParameterList() [2/2]

static RCP< Xpetra::MultiVector< typename Teuchos::ScalarTraits< double >::magnitudeType, int, int, Node > > MueLu::Utilities_kokkos< double, int, int, Node >::ExtractCoordinatesFromParameterList ( ParameterList & paramList)
inlinestatic

Definition at line 323 of file MueLu_Utilities_kokkos_decl.hpp.

◆ CuthillMcKee() [2/2]

Teuchos::RCP< Xpetra::Vector< int, int, int, Node > > MueLu::Utilities_kokkos< double, int, int, Node >::CuthillMcKee ( const Matrix & Op)
static

Perform a Cuthill-McKee (CM) or Reverse Cuthill-McKee (RCM) ordering of the local component of the matrix. Kokkos-Kernels has an RCM implementation, so we reverse that here if we call CM.

Definition at line 330 of file MueLu_Utilities_kokkos_def.hpp.

◆ ReverseCuthillMcKee() [2/2]

Teuchos::RCP< Xpetra::Vector< int, int, int, Node > > MueLu::Utilities_kokkos< double, int, int, Node >::ReverseCuthillMcKee ( const Matrix & Op)
static

Perform a Reverse Cuthill-McKee (RCM) ordering of the local component of the matrix.

Definition at line 334 of file MueLu_Utilities_kokkos_def.hpp.

◆ ApplyOAZToMatrixRows() [2/2]

void MueLu::Utilities_kokkos< double, int, int, Node >::ApplyOAZToMatrixRows ( RCP< Matrix > & A,
const Kokkos::View< const bool *, typename Node::device_type > & dirichletRows )
static

Definition at line 336 of file MueLu_Utilities_kokkos_def.hpp.


The documentation for this class was generated from the following files: