MueLu
Version of the Day
|
#include <MueLu_Utilities_decl.hpp>
Public Types | |
typedef double | Scalar |
typedef int | LocalOrdinal |
typedef int | GlobalOrdinal |
typedef Xpetra::EpetraNode | Node |
typedef Teuchos::ScalarTraits < Scalar >::magnitudeType | Magnitude |
![]() | |
typedef Teuchos::ScalarTraits < double >::magnitudeType | Magnitude |
Static Public Member Functions | |
static RCP< const Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > | Op2TpetraRow (RCP< const Operator > Op) |
Helper utility to pull out the underlying Tpetra objects from an Xpetra object. More... | |
static RCP< Tpetra::RowMatrix < Scalar, LocalOrdinal, GlobalOrdinal, Node > > | Op2NonConstTpetraRow (RCP< Operator > Op) |
static void | MyOldScaleMatrix (Matrix &Op, const Teuchos::ArrayRCP< const Scalar > &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, bool) |
static RCP< Matrix > | Transpose (Matrix &Op, bool=false, const std::string &label=std::string(), const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null) |
Transpose a Xpetra::Matrix. More... | |
static RCP < Xpetra::MultiVector < typename Teuchos::ScalarTraits< Scalar > ::magnitudeType, LocalOrdinal, GlobalOrdinal, Node > > | RealValuedToScalarMultiVector (RCP< Xpetra::MultiVector< typename Teuchos::ScalarTraits< Scalar >::coordinateType, LocalOrdinal, GlobalOrdinal, Node >> X) |
static RCP < Xpetra::MultiVector < typename Teuchos::ScalarTraits< Scalar > ::magnitudeType, LocalOrdinal, GlobalOrdinal, Node > > | ExtractCoordinatesFromParameterList (ParameterList ¶mList) |
Extract coordinates from parameter list and return them in a Xpetra::MultiVector. More... | |
![]() | |
static RCP< Matrix > | Crs2Op (RCP< CrsMatrix > Op) |
static RCP< CrsMatrixWrap > | GetThresholdedMatrix (const RCP< Matrix > &Ain, const Magnitude threshold, const bool keepDiagonal=true, const intexpectedNNZperRow=-1) |
Threshold a matrix. More... | |
static RCP< Xpetra::CrsGraph < int, int, Xpetra::EpetraNode > > | GetThresholdedGraph (const RCP< Matrix > &A, const Magnitude threshold, const intexpectedNNZperRow=-1) |
Threshold a graph. More... | |
static Teuchos::ArrayRCP< double > | GetMatrixDiagonal_arcp (const Matrix &A) |
Extract Matrix Diagonal. More... | |
static RCP< Vector > | GetMatrixDiagonal (const Matrix &A) |
Extract Matrix Diagonal. More... | |
static RCP< Vector > | GetMatrixDiagonalInverse (const Matrix &A, Magnitude tol=Teuchos::ScalarTraits< double >::eps()*100, doublevalReplacement=Teuchos::ScalarTraits< double >::zero(), const bool doLumped=false) |
Extract Matrix Diagonal. More... | |
static Teuchos::RCP< Vector > | GetLumpedMatrixDiagonal (Matrix const &A, const bool doReciprocal=false, Magnitude tol=Teuchos::ScalarTraits< double >::magnitude(Teuchos::ScalarTraits< double >::zero()), doublevalReplacement=Teuchos::ScalarTraits< double >::zero(), const bool replaceSingleEntryRowWithZero=false, const bool useAverageAbsDiagVal=false) |
Extract Matrix Diagonal of lumped matrix. More... | |
static Teuchos::RCP< Vector > | GetMatrixMaxMinusOffDiagonal (const Xpetra::Matrix< double, int, int, Xpetra::EpetraNode > &A) |
Return vector containing: max_{i=k}(-a_ik), for each for i in the matrix. More... | |
static Teuchos::RCP< Vector > | GetMatrixMaxMinusOffDiagonal (const Xpetra::Matrix< double, int, int, Xpetra::EpetraNode > &A, const Xpetra::Vector< int, int, int, Xpetra::EpetraNode > &BlockNumber) |
static Teuchos::RCP< Vector > | GetInverse (Teuchos::RCP< const Vector > v, Magnitude tol=Teuchos::ScalarTraits< double >::eps()*100, doublevalReplacement=Teuchos::ScalarTraits< double >::zero()) |
Return vector containing inverse of input vector. More... | |
static RCP< Vector > | GetMatrixOverlappedDiagonal (const Matrix &A) |
Extract Overlapped Matrix Diagonal. More... | |
static RCP< Vector > | GetMatrixOverlappedDeletedRowsum (const Matrix &A) |
Extract Overlapped Matrix Deleted Rowsum. More... | |
static RCP< Xpetra::Vector < Magnitude, int, int, Xpetra::EpetraNode > > | GetMatrixOverlappedAbsDeletedRowsum (const Matrix &A) |
static Teuchos::Array< Magnitude > | ResidualNorm (const Xpetra::Operator< double, int, int, Xpetra::EpetraNode > &Op, const MultiVector &X, const MultiVector &RHS) |
static Teuchos::Array< Magnitude > | ResidualNorm (const Xpetra::Operator< double, int, int, Xpetra::EpetraNode > &Op, const MultiVector &X, const MultiVector &RHS, MultiVector &Resid) |
static RCP< MultiVector > | Residual (const Xpetra::Operator< double, int, int, Xpetra::EpetraNode > &Op, const MultiVector &X, const MultiVector &RHS) |
static void | Residual (const Xpetra::Operator< double, int, int, Xpetra::EpetraNode > &Op, const MultiVector &X, const MultiVector &RHS, MultiVector &Resid) |
static double | PowerMethod (const Matrix &A, bool scaleByDiag=true, intniters=10, Magnitude tolerance=1e-2, bool verbose=false, unsigned int seed=123) |
Power method. More... | |
static double | PowerMethod (const Matrix &A, const RCP< Vector > &diagInvVec, intniters=10, Magnitude tolerance=1e-2, bool verbose=false, unsigned int seed=123) |
Power method. More... | |
static RCP< Teuchos::FancyOStream > | MakeFancy (std::ostream &os) |
static Teuchos::ScalarTraits < double >::magnitudeType | Distance2 (const Teuchos::Array< Teuchos::ArrayRCP< const double >> &v, inti0, inti1) |
Squared distance between two rows in a multivector. More... | |
static Teuchos::ScalarTraits < double >::magnitudeType | Distance2 (const Teuchos::ArrayView< double > &weight, const Teuchos::Array< Teuchos::ArrayRCP< const double >> &v, inti0, inti1) |
Weighted squared distance between two rows in a multivector. More... | |
static Teuchos::ArrayRCP < const bool > | DetectDirichletRows (const Xpetra::Matrix< double, int, int, Xpetra::EpetraNode > &A, const Magnitude &tol=Teuchos::ScalarTraits< Magnitude >::zero(), bool count_twos_as_dirichlet=false) |
Detect Dirichlet rows. More... | |
static Kokkos::View< bool *, typename NO::device_type::memory_space > | DetectDirichletRows_kokkos (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 Kokkos::View< bool *, typename Kokkos::HostSpace > | DetectDirichletRows_kokkos_host (const Matrix &A, const Magnitude &tol=Teuchos::ScalarTraits< typename Teuchos::ScalarTraits< SC >::magnitudeType >::zero(), const bool count_twos_as_dirichlet=false) |
static Teuchos::ArrayRCP < const bool > | DetectDirichletRowsExt (const Xpetra::Matrix< double, int, int, Xpetra::EpetraNode > &A, bool &bHasZeroDiagonal, const Magnitude &tol=Teuchos::ScalarTraits< double >::zero()) |
Detect Dirichlet rows (extended version) More... | |
static void | EnforceInitialCondition (const Xpetra::Matrix< double, int, int, Xpetra::EpetraNode > &A, const Xpetra::MultiVector< double, int, int, Xpetra::EpetraNode > &RHS, Xpetra::MultiVector< double, int, int, Xpetra::EpetraNode > &InitialGuess, const Magnitude &tol=Teuchos::ScalarTraits< Magnitude >::zero(), const bool count_twos_as_dirichlet=false) |
Detect Dirichlet rows and copy values from RHS multivector to InitialGuess for Dirichlet rows. More... | |
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. More... | |
static void | FindNonZeros (const typename Xpetra::MultiVector< double, int, int, Xpetra::EpetraNode >::dual_view_type::t_dev_const_um vals, Kokkos::View< bool *, typename Xpetra::EpetraNode::device_type > nonzeros) |
Find non-zero values in an ArrayRCP Compares the value to 2 * machine epsilon. More... | |
static void | DetectDirichletColsAndDomains (const Xpetra::Matrix< double, int, int, Xpetra::EpetraNode > &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 | DetectDirichletColsAndDomains (const Xpetra::Matrix< double, int, int, Xpetra::EpetraNode > &A, const Kokkos::View< bool *, typename Xpetra::EpetraNode::device_type > &dirichletRows, Kokkos::View< bool *, typename Xpetra::EpetraNode::device_type > dirichletCols, Kokkos::View< bool *, typename Xpetra::EpetraNode::device_type > dirichletDomain) |
Detects Dirichlet columns & domains from a list of Dirichlet rows. More... | |
static void | ApplyRowSumCriterion (const Xpetra::Matrix< double, int, int, Xpetra::EpetraNode > &A, const Magnitude rowSumTol, Teuchos::ArrayRCP< bool > &dirichletRows) |
Apply Rowsum Criterion. More... | |
static void | ApplyRowSumCriterion (const Xpetra::Matrix< double, int, int, Xpetra::EpetraNode > &A, const Xpetra::Vector< int, int, int, Xpetra::EpetraNode > &BlockNumber, const Magnitude rowSumTol, Teuchos::ArrayRCP< bool > &dirichletRows) |
static void | ApplyRowSumCriterion (const Matrix &A, const typename Teuchos::ScalarTraits< double >::magnitudeType rowSumTol, Kokkos::View< bool *, typename NO::device_type::memory_space > &dirichletRows) |
static void | ApplyRowSumCriterion (const Matrix &A, const Xpetra::Vector< int, int, int, Xpetra::EpetraNode > &BlockNumber, const typename Teuchos::ScalarTraits< double >::magnitudeType rowSumTol, Kokkos::View< bool *, typename NO::device_type::memory_space > &dirichletRows) |
static void | ApplyRowSumCriterionHost (const Matrix &A, const typename Teuchos::ScalarTraits< double >::magnitudeType rowSumTol, Kokkos::View< bool *, Kokkos::HostSpace > &dirichletRows) |
static void | ApplyRowSumCriterionHost (const Matrix &A, const Xpetra::Vector< int, int, int, Xpetra::EpetraNode > &BlockNumber, const typename Teuchos::ScalarTraits< double >::magnitudeType rowSumTol, Kokkos::View< bool *, Kokkos::HostSpace > &dirichletRows) |
static Teuchos::ArrayRCP < const bool > | DetectDirichletCols (const Xpetra::Matrix< double, int, int, Xpetra::EpetraNode > &A, const Teuchos::ArrayRCP< const bool > &dirichletRows) |
Detect Dirichlet columns based on Dirichlet rows. 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 double | Frobenius (const Xpetra::Matrix< double, int, int, Xpetra::EpetraNode > &A, const Xpetra::Matrix< double, int, int, Xpetra::EpetraNode > &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< double, int, int, Xpetra::EpetraNode >> &A, std::vector< int > &dirichletRows, bool count_twos_as_dirichlet=false) |
static void | ApplyOAZToMatrixRows (Teuchos::RCP< Xpetra::Matrix< double, int, int, Xpetra::EpetraNode >> &A, const std::vector< int > &dirichletRows) |
static void | ApplyOAZToMatrixRows (Teuchos::RCP< Xpetra::Matrix< double, int, int, Xpetra::EpetraNode >> &A, const Teuchos::ArrayRCP< const bool > &dirichletRows) |
static void | ApplyOAZToMatrixRows (RCP< Matrix > &A, const Kokkos::View< const bool *, typename Xpetra::EpetraNode::device_type > &dirichletRows) |
static void | ZeroDirichletRows (Teuchos::RCP< Xpetra::Matrix< double, int, int, Xpetra::EpetraNode >> &A, const std::vector< int > &dirichletRows, doublereplaceWith=Teuchos::ScalarTraits< double >::zero()) |
static void | ZeroDirichletRows (Teuchos::RCP< Xpetra::Matrix< double, int, int, Xpetra::EpetraNode >> &A, const Teuchos::ArrayRCP< const bool > &dirichletRows, doublereplaceWith=Teuchos::ScalarTraits< double >::zero()) |
static void | ZeroDirichletRows (Teuchos::RCP< Xpetra::MultiVector< double, int, int, Xpetra::EpetraNode >> &X, const Teuchos::ArrayRCP< const bool > &dirichletRows, doublereplaceWith=Teuchos::ScalarTraits< double >::zero()) |
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 (Teuchos::RCP< Matrix > &A, const Teuchos::ArrayRCP< const bool > &dirichletCols, doublereplaceWith=Teuchos::ScalarTraits< double >::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 | FindDirichletRowsAndPropagateToCols (Teuchos::RCP< Xpetra::Matrix< double, int, int, Xpetra::EpetraNode >> &A, Teuchos::RCP< Xpetra::Vector< int, int, int, Xpetra::EpetraNode >> &isDirichletRow, Teuchos::RCP< Xpetra::Vector< int, int, int, Xpetra::EpetraNode >> &isDirichletCol) |
static RCP< Xpetra::Matrix < double, int, int, Xpetra::EpetraNode > > | ReplaceNonZerosWithOnes (const RCP< Matrix > &original) |
Creates a copy of a matrix where the non-zero entries are replaced by ones. More... | |
static RCP< const Xpetra::BlockedMap< int, int, Xpetra::EpetraNode > > | GeneratedBlockedTargetMap (const Xpetra::BlockedMap< int, int, Xpetra::EpetraNode > &sourceBlockedMap, const Xpetra::Import< int, int, Xpetra::EpetraNode > &Importer) |
static bool | MapsAreNested (const Xpetra::Map< int, int, Xpetra::EpetraNode > &rowMap, const Xpetra::Map< int, int, Xpetra::EpetraNode > &colMap) |
static RCP< Xpetra::Vector < int, int, int, Xpetra::EpetraNode > > | CuthillMcKee (const Matrix &Op) |
static RCP< Xpetra::Vector < int, int, int, Xpetra::EpetraNode > > | ReverseCuthillMcKee (const Matrix &Op) |
Private Types | |
using | EpetraMap = Xpetra::EpetraMapT< GlobalOrdinal, Node > |
using | EpetraMultiVector = Xpetra::EpetraMultiVectorT< GlobalOrdinal, Node > |
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) |
Definition at line 179 of file MueLu_Utilities_decl.hpp.
typedef double MueLu::Utilities< double, int, int, Xpetra::EpetraNode >::Scalar |
Definition at line 181 of file MueLu_Utilities_decl.hpp.
typedef int MueLu::Utilities< double, int, int, Xpetra::EpetraNode >::LocalOrdinal |
Definition at line 182 of file MueLu_Utilities_decl.hpp.
typedef int MueLu::Utilities< double, int, int, Xpetra::EpetraNode >::GlobalOrdinal |
Definition at line 183 of file MueLu_Utilities_decl.hpp.
typedef Xpetra::EpetraNode MueLu::Utilities< double, int, int, Xpetra::EpetraNode >::Node |
Definition at line 184 of file MueLu_Utilities_decl.hpp.
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType MueLu::Utilities< double, int, int, Xpetra::EpetraNode >::Magnitude |
Definition at line 185 of file MueLu_Utilities_decl.hpp.
|
private |
Definition at line 190 of file MueLu_Utilities_decl.hpp.
|
private |
Definition at line 191 of file MueLu_Utilities_decl.hpp.
|
inlinestatic |
Helper utility to pull out the underlying Epetra objects from an Xpetra object.
Definition at line 196 of file MueLu_Utilities_decl.hpp.
|
inlinestatic |
Definition at line 202 of file MueLu_Utilities_decl.hpp.
|
inlinestatic |
Definition at line 209 of file MueLu_Utilities_decl.hpp.
|
inlinestatic |
Definition at line 213 of file MueLu_Utilities_decl.hpp.
|
inlinestatic |
Definition at line 218 of file MueLu_Utilities_decl.hpp.
|
inlinestatic |
Definition at line 227 of file MueLu_Utilities_decl.hpp.
|
inlinestatic |
Definition at line 237 of file MueLu_Utilities_decl.hpp.
|
inlinestatic |
Definition at line 250 of file MueLu_Utilities_decl.hpp.
|
inlinestatic |
Definition at line 264 of file MueLu_Utilities_decl.hpp.
|
inlinestatic |
Helper utility to pull out the underlying Tpetra objects from an Xpetra object.
Definition at line 273 of file MueLu_Utilities_decl.hpp.
|
inlinestatic |
Definition at line 307 of file MueLu_Utilities_decl.hpp.
|
inlinestatic |
Definition at line 341 of file MueLu_Utilities_decl.hpp.
|
inlinestatic |
Definition at line 368 of file MueLu_Utilities_decl.hpp.
|
inlinestatic |
Definition at line 448 of file MueLu_Utilities_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 478 of file MueLu_Utilities_decl.hpp.
|
inlinestatic |
Definition at line 573 of file MueLu_Utilities_decl.hpp.
|
inlinestatic |
Extract coordinates from parameter list and return them in a Xpetra::MultiVector.
Definition at line 580 of file MueLu_Utilities_decl.hpp.