Ifpack2 Templated Preconditioning Package
Version 1.0
|
#include <Ifpack2_BlockTriDiContainer_decl.hpp>
Public Member Functions | |
bool | isInitialized () const override |
Return true if the container has been successfully initialized. More... | |
bool | isComputed () const override |
Return true if the container has been successfully computed. More... | |
void | setParameters (const Teuchos::ParameterList &List) override |
Set parameters. More... | |
void | initialize () override |
Do all set-up operations that only require matrix structure. More... | |
void | compute () override |
Extract the local diagonal block and prepare the solver. More... | |
void | applyInverseJacobi (const mv_type &X, mv_type &Y, bool zeroStartingSolution=false, int numSweeps=1) const override |
Compute Y := (1 - a) Y + a D^{-1} (X - R*Y) . More... | |
void | apply (host_view_type &X, host_view_type &Y, int blockIndex, int stride, Teuchos::ETransp mode=Teuchos::NO_TRANS, scalar_type alpha=Teuchos::ScalarTraits< scalar_type >::one(), scalar_type beta=Teuchos::ScalarTraits< scalar_type >::zero()) const override |
Compute Y := alpha * M^{-1} X + beta*Y . More... | |
void | weightedApply (host_view_type &X, host_view_type &Y, host_view_type &W, int blockIndex, int stride, Teuchos::ETransp mode=Teuchos::NO_TRANS, scalar_type alpha=Teuchos::ScalarTraits< scalar_type >::one(), scalar_type beta=Teuchos::ScalarTraits< scalar_type >::zero()) const override |
Compute Y := alpha * diag(D) * M^{-1} (diag(D) * X) + beta*Y . More... | |
std::ostream & | print (std::ostream &os) const override |
Print basic information about the container to os . More... | |
Public Member Functions inherited from Ifpack2::Container< MatrixType > | |
Container (const Teuchos::RCP< const row_matrix_type > &matrix, const Teuchos::Array< Teuchos::Array< local_ordinal_type > > &partitions, const Teuchos::RCP< const import_type > &importer, int OverlapLevel, scalar_type DampingFactor) | |
Constructor. More... | |
Container (const Teuchos::RCP< const row_matrix_type > &matrix, const Teuchos::Array< local_ordinal_type > &localRows) | |
Constructor for single block. More... | |
virtual | ~Container () |
Destructor. More... | |
Teuchos::ArrayView< const local_ordinal_type > | getLocalRows (int blockIndex) const |
Local indices of the rows of the input matrix that belong to this block. More... | |
void | setBlockSizes (const Teuchos::Array< Teuchos::Array< local_ordinal_type > > &partitions) |
Initialize arrays with information about block sizes. More... | |
void | applyMV (mv_type &X, mv_type &Y) const |
Wrapper for apply with MVs, used in unit tests (never called by BlockRelaxation) More... | |
void | weightedApplyMV (mv_type &X, mv_type &Y, vector_type &W) |
Wrapper for weightedApply with MVs, used in unit tests (never called by BlockRelaxation) More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Ifpack2::Container< MatrixType > | |
static std::string | getName () |
Protected Types inherited from Ifpack2::Container< MatrixType > | |
typedef MatrixType::scalar_type | scalar_type |
typedef MatrixType::local_ordinal_type | local_ordinal_type |
typedef MatrixType::global_ordinal_type | global_ordinal_type |
typedef MatrixType::node_type | node_type |
typedef Tpetra::MultiVector < scalar_type, local_ordinal_type, global_ordinal_type, node_type > | mv_type |
typedef Tpetra::Vector < scalar_type, local_ordinal_type, global_ordinal_type, node_type > | vector_type |
typedef Tpetra::Map < local_ordinal_type, global_ordinal_type, node_type > | map_type |
typedef Teuchos::ScalarTraits < scalar_type > | STS |
typedef Tpetra::Import < local_ordinal_type, global_ordinal_type, node_type > | import_type |
typedef Partitioner < Tpetra::RowGraph < local_ordinal_type, global_ordinal_type, node_type > > | partitioner_type |
typedef Tpetra::Experimental::BlockCrsMatrix < scalar_type, local_ordinal_type, global_ordinal_type, node_type > | block_crs_matrix_type |
typedef Tpetra::RowMatrix < scalar_type, local_ordinal_type, global_ordinal_type, node_type > | row_matrix_type |
typedef Kokkos::Details::ArithTraits < scalar_type >::val_type | impl_scalar_type |
Internal representation of Scalar in Kokkos::View. More... | |
Protected Attributes inherited from Ifpack2::Container< MatrixType > | |
Teuchos::RCP< const row_matrix_type > | inputMatrix_ |
The input matrix to the constructor. More... | |
int | numBlocks_ |
The number of blocks (partitions) in the container. More... | |
Teuchos::Array < local_ordinal_type > | partitions_ |
Local indices of the rows of the input matrix that belong to this block. More... | |
Teuchos::Array < local_ordinal_type > | blockRows_ |
Number of rows in each block. More... | |
Teuchos::Array < local_ordinal_type > | partitionIndices_ |
Starting index in partitions_ of local row indices for each block. More... | |
Teuchos::RCP< vector_type > | Diag_ |
Diagonal elements. More... | |
bool | IsParallel_ |
Whether the problem is distributed across multiple MPI processes. More... | |
int | OverlapLevel_ |
Number of rows of overlap for adjacent blocks. More... | |
scalar_type | DampingFactor_ |
Damping factor, passed to apply() as alpha. More... | |
Teuchos::RCP< const Tpetra::Import < local_ordinal_type, global_ordinal_type, node_type > > | Importer_ |
Importer for importing off-process elements of MultiVectors. More... | |
local_ordinal_type | NumLocalRows_ |
Number of local rows in input matrix. More... | |
global_ordinal_type | NumGlobalRows_ |
Number of global rows in input matrix. More... | |
global_ordinal_type | NumGlobalNonzeros_ |
Number of nonzeros in input matrix. More... | |
bool | hasBlockCrs_ |
Whether the input matrix is a BlockCRS matrix. More... | |
int | bcrsBlockSize_ |
If hasBlockCrs_, the number of DOFs per vertex. Otherwise 1. More... | |
ImplNotAvailTag This container does not support UQ types; however, the UQ types are required for Stokhos ETI. To prevent linking errors, we provide an empty implementation with ImplNotAvailTag. Upon the request to support UQ types, we need to specialize the impl function and interface with ImplSacadoTag.
|
inlineoverridevirtual |
Return true
if the container has been successfully initialized.
Implements Ifpack2::Container< MatrixType >.
|
inlineoverridevirtual |
Return true
if the container has been successfully computed.
Implements Ifpack2::Container< MatrixType >.
|
inlineoverridevirtual |
Set parameters.
Implements Ifpack2::Container< MatrixType >.
|
inlineoverridevirtual |
Do all set-up operations that only require matrix structure.
If the input matrix's structure changes, you must call this method before you may call compute(). You must then call compute() before you may call apply() or weightedApply().
"Structure" refers to the graph of the matrix: the local and global dimensions, and the populated entries in each row.
Implements Ifpack2::Container< MatrixType >.
|
inlineoverridevirtual |
Extract the local diagonal block and prepare the solver.
If any entries' values in the input matrix have changed, you must call this method before you may call apply() or weightedApply().
Implements Ifpack2::Container< MatrixType >.
|
inlineoverridevirtual |
Compute Y := (1 - a) Y + a D^{-1} (X - R*Y)
.
Reimplemented from Ifpack2::Container< MatrixType >.
|
inlineoverridevirtual |
Compute Y := alpha * M^{-1} X + beta*Y
.
X is in the domain Map of the original matrix (the argument to compute()), and Y is in the range Map of the original matrix. This method only reads resp. modifies the permuted subset of entries of X resp. Y related to the diagonal block M. That permuted subset is defined by the indices passed into the constructor.
This method is marked const
for compatibility with Tpetra::Operator's method of the same name. This might require subclasses to mark some of their instance data as mutable
.
Implements Ifpack2::Container< MatrixType >.
|
inlineoverridevirtual |
Compute Y := alpha * diag(D) * M^{-1} (diag(D) * X) + beta*Y
.
X is in the domain Map of the original matrix (the argument to compute()), and Y is in the range Map of the original matrix. This method only reads resp. modifies the permuted subset of entries of X resp. Y related to the diagonal block M. That permuted subset is defined by the indices passed into the constructor. The D scaling vector must have the same number of entries on each process as X and Y, but otherwise need not have the same Map. (For example, D could be locally replicated, or could be a different object on each process with a local (MPI_COMM_SELF
) communicator.)
This method supports overlap techniques, such as those used in Schwarz methods.
This method is marked const
by analogy with apply(), which itself is marked const
for compatibility with Tpetra::Operator's method of the same name. This might require subclasses to mark some of their instance data as mutable
.
Implements Ifpack2::Container< MatrixType >.
|
inlineoverridevirtual |
Print basic information about the container to os
.
Implements Ifpack2::Container< MatrixType >.