MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

#include <MueLu_Utilities_kokkos_fwd.hpp>

Inheritance diagram for MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >:
MueLu::UtilitiesBase< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Public Types

using TST = Teuchos::ScalarTraits< SC >
 
using Magnitude = typename TST::magnitudeType
 
using CoordinateType = typename TST::coordinateType
 
using RealValuedMultiVector = Xpetra::MultiVector< CoordinateType, LO, GO, NO >
 
- Public Types inherited from MueLu::UtilitiesBase< Scalar, LocalOrdinal, GlobalOrdinal, Node >
typedef Teuchos::ScalarTraits
< Scalar >::magnitudeType 
Magnitude
 
static RCP< const
Epetra_MultiVector
MV2EpetraMV (RCP< MultiVector > const vec)
 Helper utility to pull out the underlying Epetra objects from an Xpetra object. More...
 
static RCP< Epetra_MultiVectorMV2NonConstEpetraMV (RCP< MultiVector > vec)
 
static const Epetra_MultiVectorMV2EpetraMV (const MultiVector &vec)
 
static Epetra_MultiVectorMV2NonConstEpetraMV (MultiVector &vec)
 
static RCP< const
Epetra_CrsMatrix
Op2EpetraCrs (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. More...
 
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)
 Extract Matrix Diagonal. More...
 
static RCP< VectorGetMatrixDiagonalInverse (const Matrix &A, Magnitude tol=TST::eps()*100, const bool doLumped=false)
 Extract Matrix Diagonal. More...
 
static RCP< VectorGetMatrixOverlappedDiagonal (const Matrix &A)
 Extract Overlapped Matrix Diagonal. More...
 
static Teuchos::RCP< VectorGetInverse (Teuchos::RCP< const Vector > v, Magnitude tol=Teuchos::ScalarTraits< Scalar >::eps()*100, Scalar tolReplacement=Teuchos::ScalarTraits< Scalar >::zero())
 Return vector containing inverse of input vector. More...
 
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. More...
 
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::FancyOStreamMakeFancy (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. More...
 
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)
 Find non-zero values in an ArrayRCP Compares the value to 2 * machine epsilon. More...
 
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. More...
 
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)
 Detects Dirichlet columns & domains from a list of Dirichlet rows. More...
 
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< Scalar >::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. More...
 
static RCP< MatrixTranspose (Matrix &Op, bool optimizeTranspose=false, const std::string &label=std::string())
 Transpose a Xpetra::Matrix. More...
 
static RCP
< Xpetra::MultiVector
< typename
Teuchos::ScalarTraits< Scalar >
::magnitudeType, LocalOrdinal,
GlobalOrdinal, Node > > 
ExtractCoordinatesFromParameterList (ParameterList &paramList)
 
static RCP< Xpetra::Vector
< LocalOrdinal, LocalOrdinal,
GlobalOrdinal, Node > > 
CuthillMcKee (const Matrix &Op)
 
static RCP< Xpetra::Vector
< LocalOrdinal, LocalOrdinal,
GlobalOrdinal, Node > > 
ReverseCuthillMcKee (const Matrix &Op)
 
static void ApplyOAZToMatrixRows (RCP< Matrix > &A, const Kokkos::View< const bool *, typename Node::device_type > &dirichletRows)
 

Additional Inherited Members

- Static Public Member Functions inherited from MueLu::UtilitiesBase< Scalar, LocalOrdinal, GlobalOrdinal, Node >
static RCP< MatrixCrs2Op (RCP< CrsMatrix > Op)
 
static RCP< CrsMatrixWrapGetThresholdedMatrix (const RCP< Matrix > &Ain, const Scalar threshold, const bool keepDiagonal=true, const GlobalOrdinal expectedNNZperRow=-1)
 Threshold a matrix. More...
 
static RCP< Xpetra::CrsGraph
< LocalOrdinal, GlobalOrdinal,
Node > > 
GetThresholdedGraph (const RCP< Matrix > &A, const Magnitude threshold, const GlobalOrdinal expectedNNZperRow=-1)
 Threshold a graph. More...
 
static Teuchos::ArrayRCP< ScalarGetMatrixDiagonal (const Matrix &A)
 Extract Matrix Diagonal. More...
 
static RCP< VectorGetMatrixDiagonalInverse (const Matrix &A, Magnitude tol=Teuchos::ScalarTraits< Scalar >::eps()*100, Scalar valReplacement=Teuchos::ScalarTraits< Scalar >::zero())
 Extract Matrix Diagonal. More...
 
static Teuchos::RCP< VectorGetLumpedMatrixDiagonal (Matrix const &A, const bool doReciprocal=false, Magnitude tol=Teuchos::ScalarTraits< Scalar >::magnitude(Teuchos::ScalarTraits< Scalar >::zero()), Scalar valReplacement=Teuchos::ScalarTraits< Scalar >::zero(), const bool replaceSingleEntryRowWithZero=false, const bool useAverageAbsDiagVal=false)
 Extract Matrix Diagonal of lumped matrix. More...
 
static Teuchos::ArrayRCP
< Magnitude
GetMatrixMaxMinusOffDiagonal (const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)
 Return vector containing: max_{i=k}(-a_ik), for each for i in the matrix. More...
 
static Teuchos::ArrayRCP
< Magnitude
GetMatrixMaxMinusOffDiagonal (const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Xpetra::Vector< LocalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &BlockNumber)
 
static Teuchos::RCP< VectorGetInverse (Teuchos::RCP< const Vector > v, Magnitude tol=Teuchos::ScalarTraits< Scalar >::eps()*100, Scalar valReplacement=Teuchos::ScalarTraits< Scalar >::zero())
 Return vector containing inverse of input vector. More...
 
static RCP< VectorGetMatrixOverlappedDiagonal (const Matrix &A)
 Extract Overlapped Matrix Diagonal. More...
 
static RCP< VectorGetMatrixOverlappedDeletedRowsum (const Matrix &A)
 Extract Overlapped Matrix Deleted Rowsum. More...
 
static RCP< Xpetra::Vector
< Magnitude, LocalOrdinal,
GlobalOrdinal, Node > > 
GetMatrixOverlappedAbsDeletedRowsum (const Matrix &A)
 
static Teuchos::Array< MagnitudeResidualNorm (const Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Op, const MultiVector &X, const MultiVector &RHS)
 
static Teuchos::Array< MagnitudeResidualNorm (const Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Op, const MultiVector &X, const MultiVector &RHS, MultiVector &Resid)
 
static RCP< MultiVectorResidual (const Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Op, const MultiVector &X, const MultiVector &RHS)
 
static void Residual (const Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Op, const MultiVector &X, const MultiVector &RHS, MultiVector &Resid)
 
static Scalar PowerMethod (const Matrix &A, bool scaleByDiag=true, LocalOrdinal niters=10, Magnitude tolerance=1e-2, bool verbose=false, unsigned int seed=123)
 Power method. More...
 
static Scalar PowerMethod (const Matrix &A, const RCP< Vector > &diagInvVec, LocalOrdinal niters=10, Magnitude tolerance=1e-2, bool verbose=false, unsigned int seed=123)
 Power method. More...
 
static RCP< Teuchos::FancyOStreamMakeFancy (std::ostream &os)
 
static Teuchos::ScalarTraits
< Scalar >::magnitudeType 
Distance2 (const Teuchos::Array< Teuchos::ArrayRCP< const Scalar >> &v, LocalOrdinal i0, LocalOrdinal i1)
 Squared distance between two rows in a multivector. More...
 
static Teuchos::ScalarTraits
< Scalar >::magnitudeType 
Distance2 (const Teuchos::ArrayView< double > &weight, const Teuchos::Array< Teuchos::ArrayRCP< const Scalar >> &v, LocalOrdinal i0, LocalOrdinal i1)
 Weighted squared distance between two rows in a multivector. More...
 
static Teuchos::ArrayRCP
< const bool > 
DetectDirichletRows (const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Magnitude &tol=Teuchos::ScalarTraits< Scalar >::zero(), bool count_twos_as_dirichlet=false)
 Detect Dirichlet rows. More...
 
static Teuchos::ArrayRCP
< const bool > 
DetectDirichletRowsExt (const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, bool &bHasZeroDiagonal, const Magnitude &tol=Teuchos::ScalarTraits< Scalar >::zero())
 Detect Dirichlet rows (extended version) More...
 
static void FindNonZeros (const Teuchos::ArrayRCP< const Scalar > vals, Teuchos::ArrayRCP< bool > nonzeros)
 Find non-zero values in an ArrayRCP Compares the value to 2 * machine epsilon. More...
 
static void DetectDirichletColsAndDomains (const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, 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. More...
 
static void ApplyRowSumCriterion (const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Magnitude rowSumTol, Teuchos::ArrayRCP< bool > &dirichletRows)
 Apply Rowsum Criterion. More...
 
static void ApplyRowSumCriterion (const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Xpetra::Vector< LocalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &BlockNumber, const Magnitude rowSumTol, Teuchos::ArrayRCP< bool > &dirichletRows)
 
static Teuchos::ArrayRCP
< const bool > 
DetectDirichletCols (const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Teuchos::ArrayRCP< const bool > &dirichletRows)
 Detect Dirichlet columns based on Dirichlet rows. More...
 
static Scalar Frobenius (const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B)
 Frobenius inner product of two matrices. More...
 
static void SetRandomSeed (const Teuchos::Comm< int > &comm)
 Set seed for random number generator. More...
 
static void FindDirichletRows (Teuchos::RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &A, std::vector< LocalOrdinal > &dirichletRows, bool count_twos_as_dirichlet=false)
 
static void ApplyOAZToMatrixRows (Teuchos::RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &A, const std::vector< LocalOrdinal > &dirichletRows)
 
static void ApplyOAZToMatrixRows (Teuchos::RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &A, const Teuchos::ArrayRCP< const bool > &dirichletRows)
 
static void ZeroDirichletRows (Teuchos::RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &A, const std::vector< LocalOrdinal > &dirichletRows, Scalar replaceWith=Teuchos::ScalarTraits< Scalar >::zero())
 
static void ZeroDirichletRows (Teuchos::RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &A, const Teuchos::ArrayRCP< const bool > &dirichletRows, Scalar replaceWith=Teuchos::ScalarTraits< Scalar >::zero())
 
static void ZeroDirichletRows (Teuchos::RCP< Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &X, const Teuchos::ArrayRCP< const bool > &dirichletRows, Scalar replaceWith=Teuchos::ScalarTraits< Scalar >::zero())
 
static void ZeroDirichletCols (Teuchos::RCP< Matrix > &A, const Teuchos::ArrayRCP< const bool > &dirichletCols, Scalar replaceWith=Teuchos::ScalarTraits< Scalar >::zero())
 
static void FindDirichletRowsAndPropagateToCols (Teuchos::RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &A, Teuchos::RCP< Xpetra::Vector< int, LocalOrdinal, GlobalOrdinal, Node > > &isDirichletRow, Teuchos::RCP< Xpetra::Vector< int, LocalOrdinal, GlobalOrdinal, Node > > &isDirichletCol)
 
static RCP< const
Xpetra::BlockedMap
< LocalOrdinal, GlobalOrdinal,
Node > > 
GeneratedBlockedTargetMap (const Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node > &sourceBlockedMap, const Xpetra::Import< LocalOrdinal, GlobalOrdinal, Node > &Importer)
 
static bool MapsAreNested (const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > &rowMap, const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > &colMap)
 

Detailed Description

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
class MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Definition at line 54 of file MueLu_Utilities_kokkos_fwd.hpp.

Member Typedef Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
using MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::TST = Teuchos::ScalarTraits<SC>

Definition at line 113 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
using MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Magnitude = typename TST::magnitudeType

Definition at line 114 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
using MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::CoordinateType = typename TST::coordinateType

Definition at line 115 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
using MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::RealValuedMultiVector = Xpetra::MultiVector<CoordinateType,LO,GO,NO>

Definition at line 116 of file MueLu_Utilities_kokkos_decl.hpp.

Member Function Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static RCP<const Epetra_MultiVector> MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, 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.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static RCP< Epetra_MultiVector> MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MV2NonConstEpetraMV ( RCP< MultiVector vec)
inlinestatic

Definition at line 122 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static const Epetra_MultiVector& MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MV2EpetraMV ( const MultiVector vec)
inlinestatic

Definition at line 124 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static Epetra_MultiVector& MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MV2NonConstEpetraMV ( MultiVector vec)
inlinestatic

Definition at line 125 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static RCP<const Epetra_CrsMatrix> MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Op2EpetraCrs ( RCP< const Matrix Op)
inlinestatic

Definition at line 127 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static RCP< Epetra_CrsMatrix> MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Op2NonConstEpetraCrs ( RCP< Matrix Op)
inlinestatic

Definition at line 128 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static const Epetra_CrsMatrix& MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Op2EpetraCrs ( const Matrix Op)
inlinestatic

Definition at line 130 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static Epetra_CrsMatrix& MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Op2NonConstEpetraCrs ( Matrix Op)
inlinestatic

Definition at line 131 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static const Epetra_Map& MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Map2EpetraMap ( const Map map)
inlinestatic

Definition at line 133 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static RCP<const Tpetra::MultiVector<SC,LO,GO,NO> > MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, 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.

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

Definition at line 141 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static RCP< Tpetra::MultiVector<SC,LO,GO,NO> > MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MV2NonConstTpetraMV2 ( MultiVector vec)
inlinestatic

Definition at line 142 of file MueLu_Utilities_kokkos_decl.hpp.

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

Definition at line 144 of file MueLu_Utilities_kokkos_decl.hpp.

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

Definition at line 145 of file MueLu_Utilities_kokkos_decl.hpp.

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

Definition at line 147 of file MueLu_Utilities_kokkos_decl.hpp.

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

Definition at line 148 of file MueLu_Utilities_kokkos_decl.hpp.

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

Definition at line 150 of file MueLu_Utilities_kokkos_decl.hpp.

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

Definition at line 151 of file MueLu_Utilities_kokkos_decl.hpp.

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

Definition at line 153 of file MueLu_Utilities_kokkos_decl.hpp.

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

Definition at line 154 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static const RCP<const Tpetra::Map<LO, GO, NO> > MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Map2TpetraMap ( const Map map)
inlinestatic

Definition at line 156 of file MueLu_Utilities_kokkos_decl.hpp.

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

Definition at line 159 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, 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 117 of file MueLu_Utilities_kokkos_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, 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 204 of file MueLu_Utilities_kokkos_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, 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 220 of file MueLu_Utilities_kokkos_def.hpp.

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

Return vector containing inverse of input vector.

Parameters
[in]v,:input vector
[in]tol,:tolerance. 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]tolReplacement,:Value put in for undefined entries in output vector (default: 0.0) : vector containing inverse values of input vector v

Definition at line 195 of file MueLu_Utilities_kokkos_decl.hpp.

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

Definition at line 201 of file MueLu_Utilities_kokkos_decl.hpp.

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

Definition at line 205 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static SC MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, 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 if true, print iteration information

(Shamelessly grabbed from tpetra/examples.)

Definition at line 224 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static SC MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, 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.

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

Definition at line 250 of file MueLu_Utilities_kokkos_def.hpp.

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

Definition at line 290 of file MueLu_Utilities_kokkos_def.hpp.

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

Definition at line 285 of file MueLu_Utilities_kokkos_def.hpp.

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

Definition at line 243 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Kokkos::View< bool *, typename Node::device_type > MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, 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 463 of file MueLu_Utilities_kokkos_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, 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

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 562 of file MueLu_Utilities_kokkos_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Kokkos::View< bool *, typename Node::device_type > MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, 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 529 of file MueLu_Utilities_kokkos_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, 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

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 624 of file MueLu_Utilities_kokkos_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static void MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ZeroDirichletRows ( RCP< Matrix > &  A,
const Kokkos::View< const bool *, typename NO::device_type > &  dirichletRows,
SC  replaceWith = Teuchos::ScalarTraitsSC >::zero() 
)
static
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static void MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ZeroDirichletRows ( RCP< MultiVector > &  X,
const Kokkos::View< const bool *, typename NO::device_type > &  dirichletRows,
SC  replaceWith = Teuchos::ScalarTraitsSC >::zero() 
)
static
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, 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 755 of file MueLu_Utilities_kokkos_def.hpp.

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

Definition at line 806 of file MueLu_Utilities_kokkos_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::RealValuedToScalarMultiVector ( RCP< RealValuedMultiVector X)
static

Definition at line 828 of file MueLu_Utilities_kokkos_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static void MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, 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.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static RCP<Matrix> MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, 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.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
static RCP<Xpetra::MultiVector<typename Teuchos::ScalarTraits<Scalar>::magnitudeType,LocalOrdinal,GlobalOrdinal,Node> > MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractCoordinatesFromParameterList ( ParameterList paramList)
inlinestatic

Definition at line 323 of file MueLu_Utilities_kokkos_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< Xpetra::Vector< LocalOrdinal, LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, 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 932 of file MueLu_Utilities_kokkos_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< Xpetra::Vector< LocalOrdinal, LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ReverseCuthillMcKee ( const Matrix Op)
static

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

Definition at line 920 of file MueLu_Utilities_kokkos_def.hpp.

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

Definition at line 984 of file MueLu_Utilities_kokkos_def.hpp.


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