MueLu
Version of the Day
|
#include <MueLu_UtilitiesBase_fwd.hpp>
Public Types | |
typedef Teuchos::ScalarTraits < Scalar >::magnitudeType | Magnitude |
Static Public Member Functions | |
static RCP< Matrix > | Crs2Op (RCP< CrsMatrix > Op) |
static Teuchos::ArrayRCP< Scalar > | GetMatrixDiagonal (const Matrix &A) |
Extract Matrix Diagonal. More... | |
static RCP< Vector > | GetMatrixDiagonalInverse (const Matrix &A, Magnitude tol=Teuchos::ScalarTraits< Scalar >::eps()*100) |
Extract Matrix Diagonal. More... | |
static Teuchos::ArrayRCP< Scalar > | GetLumpedMatrixDiagonal (const Matrix &A) |
Extract Matrix Diagonal of lumped matrix. More... | |
static Teuchos::RCP< Vector > | GetLumpedMatrixDiagonal (Teuchos::RCP< const Matrix > rcpA) |
Extract Matrix Diagonal of lumped matrix. 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 RCP< Vector > | GetMatrixOverlappedDiagonal (const Matrix &A) |
Extract Overlapped Matrix Diagonal. More... | |
static Teuchos::Array< Magnitude > | ResidualNorm (const Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Op, const MultiVector &X, const MultiVector &RHS) |
static Teuchos::Array< Magnitude > | ResidualNorm (const Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Op, const MultiVector &X, const MultiVector &RHS, MultiVector &Resid) |
static RCP< MultiVector > | Residual (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 void | PauseForDebugger () |
static Scalar | PowerMethod (const Matrix &A, bool scaleByDiag=true, LocalOrdinal niters=10, Magnitude tolerance=1e-2, bool verbose=false, unsigned int seed=123) |
Simple transpose for Tpetra::CrsMatrix types. More... | |
static RCP< Teuchos::FancyOStream > | MakeFancy (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::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 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) |
Private Types | |
typedef Xpetra::CrsMatrixWrap < Scalar, LocalOrdinal, GlobalOrdinal, Node > | CrsMatrixWrap |
typedef Xpetra::CrsMatrix < Scalar, LocalOrdinal, GlobalOrdinal, Node > | CrsMatrix |
typedef Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > | Matrix |
typedef Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > | Vector |
typedef Xpetra::BlockedVector < Scalar, LocalOrdinal, GlobalOrdinal, Node > | BlockedVector |
typedef Xpetra::MultiVector < Scalar, LocalOrdinal, GlobalOrdinal, Node > | MultiVector |
typedef Xpetra::BlockedMultiVector < Scalar, LocalOrdinal, GlobalOrdinal, Node > | BlockedMultiVector |
typedef Xpetra::BlockedMap < LocalOrdinal, GlobalOrdinal, Node > | BlockedMap |
typedef Xpetra::Map < LocalOrdinal, GlobalOrdinal, Node > | Map |
Definition at line 54 of file MueLu_UtilitiesBase_fwd.hpp.
|
private |
Definition at line 113 of file MueLu_UtilitiesBase_decl.hpp.
|
private |
Definition at line 114 of file MueLu_UtilitiesBase_decl.hpp.
|
private |
Definition at line 115 of file MueLu_UtilitiesBase_decl.hpp.
|
private |
Definition at line 116 of file MueLu_UtilitiesBase_decl.hpp.
|
private |
Definition at line 117 of file MueLu_UtilitiesBase_decl.hpp.
|
private |
Definition at line 118 of file MueLu_UtilitiesBase_decl.hpp.
|
private |
Definition at line 119 of file MueLu_UtilitiesBase_decl.hpp.
|
private |
Definition at line 120 of file MueLu_UtilitiesBase_decl.hpp.
|
private |
Definition at line 121 of file MueLu_UtilitiesBase_decl.hpp.
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType MueLu::UtilitiesBase< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Magnitude |
Definition at line 123 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Definition at line 126 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Extract Matrix Diagonal.
Returns Matrix diagonal in ArrayRCP.
NOTE – it's assumed that A has been fillComplete'd.
Definition at line 138 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Extract Matrix Diagonal.
Returns inverse of the Matrix diagonal in ArrayRCP.
NOTE – it's assumed that A has been fillComplete'd.
Definition at line 166 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Extract Matrix Diagonal of lumped matrix.
Returns Matrix diagonal of lumped matrix in ArrayRCP.
NOTE – it's assumed that A has been fillComplete'd.
Definition at line 188 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Extract Matrix Diagonal of lumped matrix.
Returns Matrix diagonal of lumped matrix in ArrayRCP.
NOTE – it's assumed that A has been fillComplete'd.
Definition at line 210 of file MueLu_UtilitiesBase_decl.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 262 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
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 300 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Definition at line 340 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Definition at line 349 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Definition at line 358 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Definition at line 370 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Definition at line 381 of file MueLu_UtilitiesBase_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 423 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Definition at line 481 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Squared distance between two rows in a multivector.
Used for coordinate vectors.
Definition at line 490 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Detect Dirichlet rows.
The routine assumes, that if there is only one nonzero per row, it is on the diagonal and therefore a DBC. This is safe for most of our applications, but one should be aware of that.
There is an alternative routine (see DetectDirichletRowsExt)
[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 512 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Detect Dirichlet rows (extended version)
Look at each matrix row and mark it as Dirichlet if there is only one "not small" nonzero on the diagonal. In determining whether a nonzero is "not small" use abs(A(i,j)) / sqrt(abs(diag[i]*diag[j])) > tol
[in] | A | matrix |
in/out] | bHasZeroDiagonal Reference to boolean variable. Returns true if there is a zero on the diagonal in the local part of the Matrix. Otherwise it is false. Different processors might return a different value. There is no global reduction! | |
[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 564 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
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 606 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Frobenius inner product of two matrices.
Used in energy minimization algorithms
Definition at line 646 of file MueLu_UtilitiesBase_decl.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 713 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Definition at line 740 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Definition at line 762 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Definition at line 788 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Definition at line 816 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Definition at line 832 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Definition at line 850 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Definition at line 863 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Definition at line 879 of file MueLu_UtilitiesBase_decl.hpp.
|
inlinestatic |
Definition at line 922 of file MueLu_UtilitiesBase_decl.hpp.