MueLu  Version of the Day
MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

MueLu utility class. More...

#include <MueLu_Utilities_fwd.hpp>

Public Types

typedef Teuchos::ScalarTraits< SC >::magnitudeType Magnitude
 

Static Public Member Functions

static void PauseForDebugger ()
 
static Scalar 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 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 RCP< Teuchos::FancyOStream > MakeFancy (std::ostream &os)
 
static Teuchos::ScalarTraits< Scalar >::magnitudeType Distance2 (const MultiVector &v, LocalOrdinal i0, LocalOrdinal i1)
 Squared distance between two rows in a multivector. More...
 
static Teuchos::ArrayRCP< const bool > DetectDirichletRows (const Matrix &A, const Magnitude &tol=Teuchos::ScalarTraits< SC >::zero())
 Detect Dirichlet rows. More...
 
static void SetRandomSeed (const Teuchos::Comm< int > &comm)
 Set seed for random number generator. More...
 
static void findDirichletRows (Teuchos::RCP< Matrix > A, std::vector< LO > &dirichletRows)
 
static void findDirichletCols (Teuchos::RCP< Matrix > A, std::vector< LO > &dirichletRows, std::vector< LO > &dirichletCols)
 
static void Apply_BCsToMatrixRows (Teuchos::RCP< Matrix > &A, std::vector< LO > &dirichletRows)
 
static void Apply_BCsToMatrixCols (Teuchos::RCP< Matrix > &A, std::vector< LO > &dirichletCols)
 
static void Remove_Zeroed_Rows (Teuchos::RCP< Matrix > &A, double tol=1.0e-14)
 
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 Teuchos::ArrayRCP< SC > GetMatrixDiagonal (const Matrix &A)
 Extract Matrix Diagonal. More...
 
static RCP< Vector > GetMatrixDiagonalInverse (const Matrix &A, Magnitude tol=Teuchos::ScalarTraits< SC >::eps()*100)
 Extract Matrix Diagonal. More...
 
static Teuchos::ArrayRCP< SC > GetLumpedMatrixDiagonal (const Matrix &A)
 Extract Matrix Diagonal of lumped matrix. More...
 
static RCP< Vector > GetMatrixOverlappedDiagonal (const Matrix &A)
 Extract Overlapped Matrix Diagonal. More...
 
static void ScaleMatrix (Matrix &Op, const Teuchos::ArrayRCP< SC > &scalingVector, bool doInverse=true)
 Left scale matrix by an arbitrary vector. More...
 
static Teuchos::Array< MagnitudeResidualNorm (const Operator &Op, const MultiVector &X, const MultiVector &RHS)
 
static RCP< MultiVector > Residual (const Operator &Op, const MultiVector &X, const MultiVector &RHS)
 
static void Write (const std::string &fileName, const Map &M)
 Read/Write methods. More...
 
static void Write (const std::string &fileName, const MultiVector &Vec)
 Save vector to file in Matrix Market format. More...
 
static void Write (const std::string &fileName, const Matrix &Op)
 Save matrix to file in Matrix Market format. More...
 
static Teuchos::RCP< Matrix > Read (const std::string &fileName, Xpetra::UnderlyingLib lib, const RCP< const Teuchos::Comm< int > > &comm, bool binary=false)
 Read matrix from file in Matrix Market or binary format. More...
 
static Teuchos::RCP< Matrix > Read (const std::string &filename, const RCP< const Map > rowMap, RCP< const Map > colMap=Teuchos::null, const RCP< const Map > domainMap=Teuchos::null, const RCP< const Map > rangeMap=Teuchos::null, const bool callFillComplete=true, const bool binary=false, const bool tolerant=false, const bool debug=false)
 Read matrix from file in Matrix Market or binary format. More...
 

Detailed Description

template<class Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
class MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >

MueLu utility class.

This class provides a number of static helper methods. Some are temporary and will eventually go away, while others should be moved to Xpetra.

Definition at line 51 of file MueLu_Utilities_fwd.hpp.

Member Typedef Documentation

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
typedef Teuchos::ScalarTraits<SC>::magnitudeType MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Magnitude

Definition at line 150 of file MueLu_Utilities_decl.hpp.

Member Function Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< const Epetra_MultiVector > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MV2EpetraMV ( RCP< MultiVector > const  Vec)
static

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

Definition at line 122 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Epetra_MultiVector > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MV2NonConstEpetraMV ( RCP< MultiVector >  Vec)
static

Definition at line 130 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
const Epetra_MultiVector & MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MV2EpetraMV ( const MultiVector &  Vec)
static

Definition at line 144 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Epetra_MultiVector & MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MV2NonConstEpetraMV ( MultiVector &  Vec)
static

Definition at line 138 of file MueLu_Utilities_def.hpp.

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

Definition at line 150 of file MueLu_Utilities_def.hpp.

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

Definition at line 161 of file MueLu_Utilities_def.hpp.

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

Definition at line 172 of file MueLu_Utilities_def.hpp.

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

Definition at line 187 of file MueLu_Utilities_def.hpp.

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

Definition at line 202 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MV2TpetraMV ( RCP< MultiVector > const  Vec)
static

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

Definition at line 213 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MV2NonConstTpetraMV ( RCP< MultiVector >  Vec)
static

Definition at line 221 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MV2NonConstTpetraMV2 ( MultiVector &  Vec)
static

Definition at line 235 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MV2TpetraMV ( const MultiVector &  Vec)
static

Definition at line 242 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MV2NonConstTpetraMV ( MultiVector &  Vec)
static

Definition at line 229 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
static RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO> > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Op2TpetraCrs ( RCP< const Matrix >  Op)
static
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Op2NonConstTpetraCrs ( RCP< Matrix >  Op)
static

Definition at line 260 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
const Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > & MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Op2TpetraCrs ( const Matrix &  Op)
static

Definition at line 271 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > & MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Op2NonConstTpetraCrs ( Matrix &  Op)
static

Definition at line 286 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
RCP< const Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Op2TpetraRow ( RCP< const Matrix >  Op)
static

Definition at line 301 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Op2NonConstTpetraRow ( RCP< Matrix >  Op)
static

Definition at line 321 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
const RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Map2TpetraMap ( const Map &  map)
static

Definition at line 342 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Crs2Op ( RCP< CrsMatrix >  Op)
static

Definition at line 351 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayRCP< Scalar > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::GetMatrixDiagonal ( const Matrix &  A)
static

Extract Matrix Diagonal.

Returns Matrix diagonal in ArrayRCP.

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

Definition at line 359 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::GetMatrixDiagonalInverse ( const Matrix &  A,
Magnitude  tol = Teuchos::ScalarTraits<SC>::eps()*100 
)
static

Extract Matrix Diagonal.

Returns inverse of the Matrix diagonal in ArrayRCP.

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

Definition at line 386 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayRCP< Scalar > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::GetLumpedMatrixDiagonal ( const Matrix &  A)
static

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 421 of file MueLu_Utilities_def.hpp.

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

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

Left scale matrix by an arbitrary vector.

Algorithmically, this left scales a matrix by a diagonal matrix. The inverse of a diagonal matrix can also be applied.

Parameters
Opmatrix to be scaled
scalingVectorvector that represents diagonal matrix Indicates whether the inverse of the diagonal matrix should be applied. (Default is to use inverse.)

Definition at line 473 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::Array< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ResidualNorm ( const Operator &  Op,
const MultiVector &  X,
const MultiVector &  RHS 
)
static

Definition at line 497 of file MueLu_Utilities_def.hpp.

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

Definition at line 510 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Write ( const std::string &  fileName,
const Map &  M 
)
static

Read/Write methods.

Save map to file.

Definition at line 862 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Write ( const std::string &  fileName,
const MultiVector &  Vec 
)
static

Save vector to file in Matrix Market format.

Definition at line 828 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Write ( const std::string &  fileName,
const Matrix &  Op 
)
static

Save matrix to file in Matrix Market format.

Definition at line 524 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Read ( const std::string &  fileName,
Xpetra::UnderlyingLib  lib,
const RCP< const Teuchos::Comm< int > > &  comm,
bool  binary = false 
)
static

Read matrix from file in Matrix Market or binary format.

Definition at line 617 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Read ( const std::string &  filename,
const RCP< const Map >  rowMap,
RCP< const Map >  colMap = Teuchos::null,
const RCP< const Map >  domainMap = Teuchos::null,
const RCP< const Map >  rangeMap = Teuchos::null,
const bool  callFillComplete = true,
const bool  binary = false,
const bool  tolerant = false,
const bool  debug = false 
)
static

Read matrix from file in Matrix Market or binary format.

If only rowMap is specified, then it is used for the domainMap and rangeMap, as well.

Definition at line 714 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::PauseForDebugger ( )
static

Definition at line 895 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Scalar MueLu::Utils< 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 
)
static

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 929 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void MueLu::Utils< 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 986 of file MueLu_Utilities_def.hpp.

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

Definition at line 1016 of file MueLu_Utilities_def.hpp.

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

Definition at line 1097 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ScalarTraits< Scalar >::magnitudeType MueLu::Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Distance2 ( const MultiVector &  v,
LocalOrdinal  i0,
LocalOrdinal  i1 
)
static

Squared distance between two rows in a multivector.

Used for coordinate vectors.

Definition at line 1104 of file MueLu_Utilities_def.hpp.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
ArrayRCP< const bool > MueLu::Utils< SC, LO, GO, NO >::DetectDirichletRows ( const Matrix &  A,
const Magnitude tol = Teuchos::ScalarTraits<SC>::zero() 
)
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 1117 of file MueLu_Utilities_def.hpp.

template<class SC , class LO , class GO , class NO >
void MueLu::Utils< SC, LO, GO, NO >::SetRandomSeed ( const Teuchos::Comm< int > &  comm)
static

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 1142 of file MueLu_Utilities_def.hpp.

template<class SC , class LO , class GO , class NO >
void MueLu::Utils< SC, LO, GO, NO >::findDirichletRows ( Teuchos::RCP< Matrix >  A,
std::vector< LO > &  dirichletRows 
)
static

Definition at line 1169 of file MueLu_Utilities_def.hpp.

template<class SC , class LO , class GO , class NO >
void MueLu::Utils< SC, LO, GO, NO >::findDirichletCols ( Teuchos::RCP< Matrix >  A,
std::vector< LO > &  dirichletRows,
std::vector< LO > &  dirichletCols 
)
static

Definition at line 1194 of file MueLu_Utilities_def.hpp.

template<class SC , class LO , class GO , class NO >
void MueLu::Utils< SC, LO, GO, NO >::Apply_BCsToMatrixRows ( Teuchos::RCP< Matrix > &  A,
std::vector< LO > &  dirichletRows 
)
static

Definition at line 1225 of file MueLu_Utilities_def.hpp.

template<class SC , class LO , class GO , class NO >
void MueLu::Utils< SC, LO, GO, NO >::Apply_BCsToMatrixCols ( Teuchos::RCP< Matrix > &  A,
std::vector< LO > &  dirichletCols 
)
static

Definition at line 1241 of file MueLu_Utilities_def.hpp.

template<class SC , class LO , class GO , class NO >
void MueLu::Utils< SC, LO, GO, NO >::Remove_Zeroed_Rows ( Teuchos::RCP< Matrix > &  A,
double  tol = 1.0e-14 
)
static

Definition at line 1261 of file MueLu_Utilities_def.hpp.


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