|
Tpetra parallel linear algebra
Version of the Day
|
Namespace for new Tpetra features that are not ready for public release, but are ready for evaluation by friendly expert users. More...
Classes | |
| class | BlockCrsMatrix |
| Constant block CRS matrix class. More... | |
| class | BlockMultiVector |
| MultiVector for multiple degrees of freedom per mesh point. More... | |
| class | BlockVector |
| Vector for multiple degrees of freedom per mesh point. More... | |
| class | LittleBlock |
| Nonowning view of a square dense block in a block matrix. More... | |
| class | LittleVector |
| Nonowning view of a set of degrees of freedom corresponding to a mesh point in a block vector or multivector. More... | |
Functions | |
| template<class Scalar , class LO , class GO , class Node > | |
| void | blockCrsMatrixWriter (BlockCrsMatrix< Scalar, LO, GO, Node > const &A, std::string const &fileName) |
| Helper function to write a BlockCrsMatrix. Calls the 3-argument version. More... | |
| template<class Scalar , class LO , class GO , class Node > | |
| void | blockCrsMatrixWriter (BlockCrsMatrix< Scalar, LO, GO, Node > const &A, std::string const &fileName, Teuchos::ParameterList const ¶ms) |
| Helper function to write a BlockCrsMatrix. Calls the 3-argument version. More... | |
| template<class Scalar , class LO , class GO , class Node > | |
| void | blockCrsMatrixWriter (BlockCrsMatrix< Scalar, LO, GO, Node > const &A, std::ostream &os) |
| Helper function to write a BlockCrsMatrix. Calls the 3-argument version. More... | |
| template<class Scalar , class LO , class GO , class Node > | |
| void | blockCrsMatrixWriter (BlockCrsMatrix< Scalar, LO, GO, Node > const &A, std::ostream &os, Teuchos::ParameterList const ¶ms) |
| Helper function to write a BlockCrsMatrix. More... | |
| template<class Scalar , class LO , class GO , class Node > | |
| void | writeMatrixStrip (BlockCrsMatrix< Scalar, LO, GO, Node > const &A, std::ostream &os, Teuchos::ParameterList const ¶ms) |
| Helper function called by blockCrsMatrixWriter. More... | |
| template<class Scalar , class LO , class GO , class Node > | |
| RCP< BlockCrsMatrix< Scalar, LO, GO, Node > > | convertToBlockCrsMatrix (const Tpetra::CrsMatrix< Scalar, LO, GO, Node > &pointMatrix, const LO &blockSize) |
| Non-member constructor that creates a BlockCrsMatrix from an existing point CrsMatrix. More... | |
| template<class LO , class GO , class Node > | |
| RCP< const Tpetra::Map< LO, GO, Node > > | createMeshMap (LO const &blockSize, const Tpetra::Map< LO, GO, Node > &pointMap) |
| Helper function to generate a mesh map from a point map. Important! It's assumed that point GIDs associated with a single mesh GID appear consecutively in pointMap. More... | |
| template<class LO , class GO , class Node > | |
| Teuchos::RCP< const Tpetra::Map< LO, GO, Node > > | createMeshMap (const LO &blockSize, const Tpetra::Map< LO, GO, Node > &pointMap) |
| Helper function to generate a mesh map from a point map. Important! It's assumed that point GIDs associated with a single mesh GID appear consecutively in pointMap. More... | |
| template<class ViewType , class CoefficientType , class LayoutType = typename ViewType::array_layout, class IndexType = int, const int rank = ViewType::rank> | |
| void | SCAL (const CoefficientType &alpha, const ViewType &x) |
| x := alpha*x, where x is either rank 1 (a vector) or rank 2 (a matrix). More... | |
| template<class CoefficientType , class ViewType1 , class ViewType2 , class LayoutType1 = typename ViewType1::array_layout, class LayoutType2 = typename ViewType2::array_layout, class IndexType = int, const int rank = ViewType1::rank> | |
| void | AXPY (const CoefficientType &alpha, const ViewType1 &x, const ViewType2 &y) |
y := y + alpha * x (dense vector or matrix update) More... | |
| template<class ViewType1 , class ViewType2 , class LayoutType1 = typename ViewType1::array_layout, class LayoutType2 = typename ViewType2::array_layout, class IndexType = int, const int rank = ViewType1::rank> | |
| void | COPY (const ViewType1 &x, const ViewType2 &y) |
| y := x, where x and y are either rank 1 (vectors) or rank 2 (matrices) with the same dimension(s). More... | |
| template<class LittleVectorType1 , class LittleBlockType , class LittleVectorType2 , class CoefficientType , class IndexType = int> | |
| void | GEMV (const CoefficientType &alpha, const LittleBlockType &A, const LittleVectorType1 &x, const LittleVectorType2 &y) |
y := y + alpha * A * x (dense matrix-vector multiply) More... | |
| template<class ViewType1 , class ViewType2 , class ViewType3 , class CoefficientType , class IndexType = int> | |
| void | GEMM (const char transA[], const char transB[], const CoefficientType &alpha, const ViewType1 &A, const ViewType2 &B, const CoefficientType &beta, const ViewType3 &C) |
Small dense matrix-matrix multiply: C := alpha*A*B + beta*C More... | |
| template<class LittleBlockType , class LittleVectorType > | |
| void | GETF2 (const LittleBlockType &A, const LittleVectorType &ipiv, int &info) |
| Computes A = P*L*U. More... | |
| template<class LittleBlockType , class LittleIntVectorType , class LittleScalarVectorType > | |
| void | GETRS (const char mode[], const LittleBlockType &A, const LittleIntVectorType &ipiv, const LittleScalarVectorType &B, int &info) |
| Solve the linear system(s) AX=B, using the result of GETRF or GETF2. More... | |
| template<class LittleBlockType , class LittleIntVectorType , class LittleScalarVectorType > | |
| void | GETRI (const LittleBlockType &A, const LittleIntVectorType &ipiv, const LittleScalarVectorType &work, int &info) |
| Compute inverse of A, using result of GETRF or GETF2. More... | |
| template<class ST1 , class ST2 , class LO > | |
| void | deep_copy (const LittleBlock< ST2, LO > &dst, const LittleBlock< ST1, LO > &src, typename std::enable_if< std::is_convertible< ST1, ST2 >::value &&!std::is_const< ST2 >::value, int >::type *=NULL) |
| Copy the LittleBlock src into the LittleBlock dst. More... | |
| template<class ST1 , class ST2 , class LO > | |
| void | deep_copy (const LittleVector< ST2, LO > &dst, const LittleVector< ST1, LO > &src, typename std::enable_if< std::is_convertible< ST1, ST2 >::value &&!std::is_const< ST2 >::value, int >::type *=NULL) |
| Copy the LittleVector src into the LittleVector dst. More... | |
| template<class ST1 , class ST2 , class LO > | |
| void | deep_copy (const LittleBlock< ST2, LO > &dst, const ST1 &val, typename std::enable_if< std::is_convertible< ST1, ST2 >::value &&!std::is_const< ST2 >::value, int >::type *=NULL) |
Assign the scalar val to all entries of the LittleBlock dst. More... | |
| template<class ST1 , class ST2 , class LO > | |
| void | deep_copy (const LittleVector< ST2, LO > &dst, const ST1 &val, typename std::enable_if< std::is_convertible< ST1, ST2 >::value &&!std::is_const< ST2 >::value, int >::type *=NULL) |
Assign the scalar val to all entries of the LittleVector dst. More... | |
Namespace for new Tpetra features that are not ready for public release, but are ready for evaluation by friendly expert users.
| void Tpetra::Experimental::blockCrsMatrixWriter | ( | BlockCrsMatrix< Scalar, LO, GO, Node > const & | A, |
| std::string const & | fileName | ||
| ) |
Helper function to write a BlockCrsMatrix. Calls the 3-argument version.
Definition at line 55 of file Tpetra_Experimental_BlockCrsMatrix_Helpers_def.hpp.
| void Tpetra::Experimental::blockCrsMatrixWriter | ( | BlockCrsMatrix< Scalar, LO, GO, Node > const & | A, |
| std::string const & | fileName, | ||
| Teuchos::ParameterList const & | params | ||
| ) |
Helper function to write a BlockCrsMatrix. Calls the 3-argument version.
Definition at line 63 of file Tpetra_Experimental_BlockCrsMatrix_Helpers_def.hpp.
| void Tpetra::Experimental::blockCrsMatrixWriter | ( | BlockCrsMatrix< Scalar, LO, GO, Node > const & | A, |
| std::ostream & | os | ||
| ) |
Helper function to write a BlockCrsMatrix. Calls the 3-argument version.
Definition at line 70 of file Tpetra_Experimental_BlockCrsMatrix_Helpers_def.hpp.
| void Tpetra::Experimental::blockCrsMatrixWriter | ( | BlockCrsMatrix< Scalar, LO, GO, Node > const & | A, |
| std::ostream & | os, | ||
| Teuchos::ParameterList const & | params | ||
| ) |
Helper function to write a BlockCrsMatrix.
Writes the block matrix to the specified ostream in point form. The following parameter list options are available:
Definition at line 76 of file Tpetra_Experimental_BlockCrsMatrix_Helpers_def.hpp.
| void Tpetra::Experimental::writeMatrixStrip | ( | BlockCrsMatrix< Scalar, LO, GO, Node > const & | A, |
| std::ostream & | os, | ||
| Teuchos::ParameterList const & | params | ||
| ) |
Helper function called by blockCrsMatrixWriter.
This function should not be called directly.
Definition at line 194 of file Tpetra_Experimental_BlockCrsMatrix_Helpers_def.hpp.
| RCP< BlockCrsMatrix< Scalar, LO, GO, Node > > Tpetra::Experimental::convertToBlockCrsMatrix | ( | const Tpetra::CrsMatrix< Scalar, LO, GO, Node > & | pointMatrix, |
| const LO & | blockSize | ||
| ) |
Non-member constructor that creates a BlockCrsMatrix from an existing point CrsMatrix.
This function accepts an already constructed point version of the block matrix. Assumptions:
Definition at line 290 of file Tpetra_Experimental_BlockCrsMatrix_Helpers_def.hpp.
| RCP<const Tpetra::Map<LO,GO,Node> > Tpetra::Experimental::createMeshMap | ( | LO const & | blockSize, |
| const Tpetra::Map< LO, GO, Node > & | pointMap | ||
| ) |
Helper function to generate a mesh map from a point map. Important! It's assumed that point GIDs associated with a single mesh GID appear consecutively in pointMap.
Definition at line 413 of file Tpetra_Experimental_BlockCrsMatrix_Helpers_def.hpp.
| Teuchos::RCP<const Tpetra::Map<LO,GO,Node> > Tpetra::Experimental::createMeshMap | ( | const LO & | blockSize, |
| const Tpetra::Map< LO, GO, Node > & | pointMap | ||
| ) |
Helper function to generate a mesh map from a point map. Important! It's assumed that point GIDs associated with a single mesh GID appear consecutively in pointMap.
Definition at line 413 of file Tpetra_Experimental_BlockCrsMatrix_Helpers_def.hpp.
| void Tpetra::Experimental::SCAL | ( | const CoefficientType & | alpha, |
| const ViewType & | x | ||
| ) |
x := alpha*x, where x is either rank 1 (a vector) or rank 2 (a matrix).
Definition at line 447 of file Tpetra_Experimental_BlockView.hpp.
| void Tpetra::Experimental::AXPY | ( | const CoefficientType & | alpha, |
| const ViewType1 & | x, | ||
| const ViewType2 & | y | ||
| ) |
y := y + alpha * x (dense vector or matrix update)
This function follows the BLAS convention that if alpha == 0, then it does nothing. (This matters only if x contains Inf or NaN values.)
Definition at line 464 of file Tpetra_Experimental_BlockView.hpp.
| void Tpetra::Experimental::COPY | ( | const ViewType1 & | x, |
| const ViewType2 & | y | ||
| ) |
y := x, where x and y are either rank 1 (vectors) or rank 2 (matrices) with the same dimension(s).
| x | [in] The input vector / matrix. |
| y | [out] The output vector / matrix. |
We put the output argument last, because that's what the BLAS functions _XCOPY (replace _ with "S", "D", "C", or "Z") do.
Definition at line 487 of file Tpetra_Experimental_BlockView.hpp.
| void Tpetra::Experimental::GEMV | ( | const CoefficientType & | alpha, |
| const LittleBlockType & | A, | ||
| const LittleVectorType1 & | x, | ||
| const LittleVectorType2 & | y | ||
| ) |
y := y + alpha * A * x (dense matrix-vector multiply)
| alpha | [in] Coefficient by which to multiply A*x |
| A | [in] Small dense matrix (must have rank 2) |
| x | [in] Small dense vector input (must have rank 1 and at least as many rows as A has columns) |
| y | [in/out] Small dense vector output (must have rank 1 and at least as many rows as A has rows) |
This function follows the BLAS convention that if alpha == 0, then it does nothing. (This matters only if x contains Inf or NaN values.)
Definition at line 511 of file Tpetra_Experimental_BlockView.hpp.
| void Tpetra::Experimental::GEMM | ( | const char | transA[], |
| const char | transB[], | ||
| const CoefficientType & | alpha, | ||
| const ViewType1 & | A, | ||
| const ViewType2 & | B, | ||
| const CoefficientType & | beta, | ||
| const ViewType3 & | C | ||
| ) |
Small dense matrix-matrix multiply: C := alpha*A*B + beta*C
| ViewType1 | Type of the first matrix input A. |
| ViewType2 | Type of the second matrix input B. |
| ViewType3 | Type of the third matrix input/output C. |
| CoefficientType | Type of the scalar coefficients alpha and beta. |
| IndexType | Type of the index used in for loops; defaults to int. |
Definition at line 544 of file Tpetra_Experimental_BlockView.hpp.
| void Tpetra::Experimental::GETF2 | ( | const LittleBlockType & | A, |
| const LittleVectorType & | ipiv, | ||
| int & | info | ||
| ) |
Computes A = P*L*U.
Definition at line 683 of file Tpetra_Experimental_BlockView.hpp.
| void Tpetra::Experimental::GETRS | ( | const char | mode[], |
| const LittleBlockType & | A, | ||
| const LittleIntVectorType & | ipiv, | ||
| const LittleScalarVectorType & | B, | ||
| int & | info | ||
| ) |
Solve the linear system(s) AX=B, using the result of GETRF or GETF2.
Definition at line 917 of file Tpetra_Experimental_BlockView.hpp.
| void Tpetra::Experimental::GETRI | ( | const LittleBlockType & | A, |
| const LittleIntVectorType & | ipiv, | ||
| const LittleScalarVectorType & | work, | ||
| int & | info | ||
| ) |
Compute inverse of A, using result of GETRF or GETF2.
| LittleBlockType | Type of dense matrix A |
| LittleBlockType | Type of 1-D pivot array ipiv |
| LittleScalarVectorType | Type of 1-D work array work |
| A | [in/out] On input: output matrix resulting from running GETRF or GETF2 on a square matrix A. On output: inverse of the original matrix A. |
| ipiv | [in] Pivot array from the LU factorization. |
| work | [out] Temporary workspace; must be at least as long as the number of rows in A. |
| info | [out] On output, 0 if the routine was successful, else nonzero. |
Definition at line 941 of file Tpetra_Experimental_BlockView.hpp.
|
inline |
Copy the LittleBlock src into the LittleBlock dst.
| dst | [out] Output LittleBlock |
| src | [in] Input LittleBlock; it must have at least as many rows and at least as many columns as src |
Call this method with two arguments. Ignore the third argument; its purpose is to ensure, at compile time, that it is legal to assign an entry of src to an entry of dst.
This works exactly like Kokkos::deep_copy(dst, src). In fact, we intend for (2-D, unmanaged) Kokkos::View to replace LittleBlock, and for Kokkos::deep_copy to replace this function.
Definition at line 1387 of file Tpetra_Experimental_BlockView.hpp.
|
inline |
Copy the LittleVector src into the LittleVector dst.
| dst | [out] Output LittleVector |
| src | [in] Input LittleVector; it must have at least as many rows and at least as many columns as src |
Call this method with two arguments. Ignore the third argument; its purpose is to ensure, at compile time, that it is legal to assign an entry of src to an entry of dst.
This works exactly like Kokkos::deep_copy(dst, src). In fact, we intend for (1-D, unmanaged) Kokkos::View to replace LittleVector, and for Kokkos::deep_copy to replace this function.
Definition at line 1409 of file Tpetra_Experimental_BlockView.hpp.
|
inline |
Assign the scalar val to all entries of the LittleBlock dst.
| dst | [out] Output LittleBlock |
| val | [in] Input scalar value; it must be assignable to an entry of dst |
Call this method with two arguments. Ignore the third argument; its purpose is to ensure, at compile time, that it is legal to assign val to an entry of dst.
This works exactly like Kokkos::deep_copy(dst, val). In fact, we intend for (2-D, unmanaged) Kokkos::View to replace LittleBlock, and for Kokkos::deep_copy to replace this function.
Definition at line 1431 of file Tpetra_Experimental_BlockView.hpp.
|
inline |
Assign the scalar val to all entries of the LittleVector dst.
| dst | [out] Output LittleVector |
| val | [in] Input scalar value; it must be assignable to an entry of dst |
Call this method with two arguments. Ignore the third argument; its purpose is to ensure, at compile time, that it is legal to assign val to an entry of dst.
This works exactly like Kokkos::deep_copy(dst, val). In fact, we intend for (2-D, unmanaged) Kokkos::View to replace LittleVector, and for Kokkos::deep_copy to replace this function.
Definition at line 1461 of file Tpetra_Experimental_BlockView.hpp.
1.8.11