MueLu
Version of the Day
|
#include <MueLu_Utilities_kokkos_fwd.hpp>
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_MultiVector > | MV2NonConstEpetraMV (RCP< MultiVector > vec) |
static const Epetra_MultiVector & | MV2EpetraMV (const MultiVector &vec) |
static Epetra_MultiVector & | MV2NonConstEpetraMV (MultiVector &vec) |
static RCP< const Epetra_CrsMatrix > | Op2EpetraCrs (RCP< const Matrix > Op) |
static RCP< Epetra_CrsMatrix > | Op2NonConstEpetraCrs (RCP< Matrix > Op) |
static const Epetra_CrsMatrix & | Op2EpetraCrs (const Matrix &Op) |
static Epetra_CrsMatrix & | Op2NonConstEpetraCrs (Matrix &Op) |
static const Epetra_Map & | Map2EpetraMap (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< Vector > | GetMatrixDiagonal (const Matrix &A) |
Extract Matrix Diagonal. More... | |
static RCP< Vector > | GetMatrixDiagonalInverse (const Matrix &A, Magnitude tol=TST::eps()*100, const bool doLumped=false) |
Extract Matrix Diagonal. More... | |
static RCP< Vector > | GetMatrixOverlappedDiagonal (const Matrix &A) |
Extract Overlapped Matrix Diagonal. More... | |
static Teuchos::RCP< Vector > | GetInverse (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< Magnitude > | ResidualNorm (const Operator &Op, const MultiVector &X, const MultiVector &RHS) |
static RCP< MultiVector > | Residual (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::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. 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< MultiVector > | RealValuedToScalarMultiVector (RCP< RealValuedMultiVector > X) |
static void | SetRandomSeed (const Teuchos::Comm< int > &comm) |
Set seed for random number generator. More... | |
static RCP< Matrix > | Transpose (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 ¶mList) |
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) |
Definition at line 54 of file MueLu_Utilities_kokkos_fwd.hpp.
using MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::TST = Teuchos::ScalarTraits<SC> |
Definition at line 113 of file MueLu_Utilities_kokkos_decl.hpp.
using MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Magnitude = typename TST::magnitudeType |
Definition at line 114 of file MueLu_Utilities_kokkos_decl.hpp.
using MueLu::Utilities_kokkos< Scalar, LocalOrdinal, GlobalOrdinal, Node >::CoordinateType = typename TST::coordinateType |
Definition at line 115 of file MueLu_Utilities_kokkos_decl.hpp.
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.
|
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.
|
inlinestatic |
Definition at line 122 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 124 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 125 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 127 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 128 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 130 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 131 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 133 of file MueLu_Utilities_kokkos_decl.hpp.
|
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.
|
inlinestatic |
Definition at line 141 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 142 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 144 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 145 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 147 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 148 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 150 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 151 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 153 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 154 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 156 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 159 of file MueLu_Utilities_kokkos_decl.hpp.
|
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.
|
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.
|
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.
|
inlinestatic |
Return vector containing inverse of input vector.
[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.
|
inlinestatic |
Definition at line 201 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 205 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Simple transpose for Tpetra::CrsMatrix types.
Note: This is very inefficient, as it inserts one entry at a time.
Power method.
A | matrix |
scaleByDiag | if true, estimate the largest eigenvalue of \( D^; A \). |
niters | maximum number of iterations |
tolerance | stopping tolerance if true, print iteration information |
(Shamelessly grabbed from tpetra/examples.)
Definition at line 224 of file MueLu_Utilities_kokkos_decl.hpp.
|
inlinestatic |
Definition at line 229 of file MueLu_Utilities_kokkos_decl.hpp.
|
static |
Definition at line 250 of file MueLu_Utilities_kokkos_def.hpp.
|
static |
Definition at line 290 of file MueLu_Utilities_kokkos_def.hpp.
|
static |
Definition at line 285 of file MueLu_Utilities_kokkos_def.hpp.
|
inlinestatic |
Definition at line 243 of file MueLu_Utilities_kokkos_decl.hpp.
|
static |
Detect Dirichlet rows.
[in] | A | matrix |
[in] | tol | If a row entry's magnitude is less than or equal to this tolerance, the entry is treated as zero. |
Definition at line 463 of file MueLu_Utilities_kokkos_def.hpp.
|
static |
Find non-zero values in an ArrayRCP Compares the value to 2 * machine epsilon.
[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.
|
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.
[in] | A | matrix |
[in] | dirichletRows | array of Dirichlet rows. |
Definition at line 529 of file MueLu_Utilities_kokkos_def.hpp.
|
static |
Detects Dirichlet columns & domains from a list of Dirichlet rows.
[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.
|
static |
|
static |
|
static |
Definition at line 755 of file MueLu_Utilities_kokkos_def.hpp.
|
static |
Definition at line 806 of file MueLu_Utilities_kokkos_def.hpp.
|
static |
Definition at line 828 of file MueLu_Utilities_kokkos_def.hpp.
|
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.
|
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.
|
inlinestatic |
Definition at line 323 of file MueLu_Utilities_kokkos_decl.hpp.
|
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.
|
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.
|
static |
Definition at line 984 of file MueLu_Utilities_kokkos_def.hpp.