Ifpack2 Templated Preconditioning Package Version 1.0
|
#include <Ifpack2_BlockTriDiContainer_decl.hpp>
Public Member Functions | |
void | setParameters (const Teuchos::ParameterList &List) override |
Set parameters, if any. | |
void | initialize () override |
Do all set-up operations that only require matrix structure. | |
void | compute () override |
Extract the local diagonal blocks and prepare the solver. | |
void | applyInverseJacobi (const mv_type &X, mv_type &Y, scalar_type dampingFactor, bool zeroStartingSolution=false, int numSweeps=1) const override |
Compute Y := (1 - a) Y + a D^{-1} (X - R*Y) . | |
void | apply (const_host_view_type X, host_view_type Y, int blockIndex, 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 . | |
void | weightedApply (const_host_view_type X, host_view_type Y, const_host_view_type W, int blockIndex, 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 . | |
std::ostream & | print (std::ostream &os) const override |
Print basic information about the container to os . | |
![]() | |
Container (const Teuchos::RCP< const row_matrix_type > &matrix, const Teuchos::Array< Teuchos::Array< LO > > &partitions, bool pointIndexed) | |
Constructor. | |
virtual | ~Container () |
Destructor. | |
Teuchos::ArrayView< const LO > | getBlockRows (int blockIndex) const |
Local indices of the rows of the input matrix that belong to this block. | |
virtual void | initialize ()=0 |
Do all set-up operations that only require matrix structure. | |
void | setBlockSizes (const Teuchos::Array< Teuchos::Array< LO > > &partitions) |
Initialize arrays with information about block sizes. | |
bool | isInitialized () const |
Whether the container has been successfully initialized. | |
bool | isComputed () const |
Whether the container has been successfully computed. | |
virtual void | compute ()=0 |
Extract the local diagonal blocks and prepare the solver. | |
virtual void | setParameters (const Teuchos::ParameterList &List)=0 |
Set parameters, if any. | |
virtual void | apply (ConstHostView X, HostView Y, int blockIndex, Teuchos::ETransp mode=Teuchos::NO_TRANS, SC alpha=Teuchos::ScalarTraits< SC >::one(), SC beta=Teuchos::ScalarTraits< SC >::zero()) const =0 |
Compute Y := alpha * M^{-1} X + beta*Y . | |
virtual void | weightedApply (ConstHostView X, HostView Y, ConstHostView D, int blockIndex, Teuchos::ETransp mode=Teuchos::NO_TRANS, SC alpha=Teuchos::ScalarTraits< SC >::one(), SC beta=Teuchos::ScalarTraits< SC >::zero()) const =0 |
Compute Y := alpha * diag(D) * M^{-1} (diag(D) * X) + beta*Y . | |
virtual void | applyInverseJacobi (const mv_type &, mv_type &, SC dampingFactor, bool, int) const =0 |
Compute Y := (1 - a) Y + a D^{-1} (X - R*Y) . | |
virtual void | applyMV (const mv_type &X, mv_type &Y) const |
Wrapper for apply with MultiVector. | |
virtual void | weightedApplyMV (const mv_type &X, mv_type &Y, vector_type &W) const |
Wrapper for weightedApply with MultiVector. | |
virtual std::ostream & | print (std::ostream &os) const =0 |
Print basic information about the container to os . | |
Additional Inherited Members | |
![]() | |
static std::string | getName () |
![]() | |
using | ISC = typename Kokkos::Details::ArithTraits< SC >::val_type |
Internal representation of Scalar in Kokkos::View. | |
using | HostView = typename mv_type::dual_view_type::t_host |
![]() | |
virtual void | DoGSBlock (ConstHostView X, HostView Y, HostView Y2, HostView Resid, SC dampingFactor, LO i) const |
Do one step of Gauss-Seidel on block i (used by DoGaussSeidel and DoSGS) | |
![]() | |
Teuchos::RCP< const row_matrix_type > | inputMatrix_ |
The input matrix to the constructor. | |
Teuchos::RCP< const crs_matrix_type > | inputCrsMatrix_ |
The input matrix, dynamic cast to CrsMatrix. May be null. | |
Teuchos::RCP< const block_crs_matrix_type > | inputBlockMatrix_ |
The input matrix, dynamic cast to BlockCrsMatrix. May be null. | |
int | numBlocks_ |
The number of blocks (partitions) in the container. | |
Teuchos::Array< LO > | blockRows_ |
Local indices of the rows of the input matrix that belong to this block. | |
Teuchos::Array< LO > | blockSizes_ |
Number of rows in each block. | |
Teuchos::Array< LO > | blockOffsets_ |
Starting index in blockRows_ of local row indices for each block. | |
Teuchos::RCP< vector_type > | Diag_ |
Diagonal elements. | |
bool | IsParallel_ |
Whether the problem is distributed across multiple MPI processes. | |
LO | NumLocalRows_ |
Number of local rows in input matrix. | |
GO | NumGlobalRows_ |
Number of global rows in input matrix. | |
GO | NumGlobalNonzeros_ |
Number of nonzeros in input matrix. | |
bool | hasBlockCrs_ |
Whether the input matrix is a BlockCRS matrix. | |
int | bcrsBlockSize_ |
If hasBlockCrs_, the number of DOFs per vertex. Otherwise 1. | |
bool | pointIndexed_ |
(If hasBlockCrs_) Whether the blocks are described using sub-block row indices instead of full block rows. | |
LO | scalarsPerRow_ |
bool | IsInitialized_ |
If true , the container has been successfully initialized. | |
bool | IsComputed_ |
If true , the container has been successfully computed. | |
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 |
Set parameters, if any.
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 blocks 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().
If DOF decoupling is to be used, it must be enabled with enableDecoupling() before calling compute().
Implements Ifpack2::Container< MatrixType >.
|
inlineoverridevirtual |
Compute Y := (1 - a) Y + a D^{-1} (X - R*Y)
.
Implements 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
.
Implements Ifpack2::Container< MatrixType >.
|
inlineoverridevirtual |
Print basic information about the container to os
.
Implements Ifpack2::Container< MatrixType >.