46 #ifndef IFPACK2_EXPERIMENTALCRSRBILUK_DECL_HPP 47 #define IFPACK2_EXPERIMENTALCRSRBILUK_DECL_HPP 49 #include <Tpetra_BlockCrsMatrix.hpp> 51 #include <Ifpack2_RILUK.hpp> 127 template<
class MatrixType>
129 typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type> >
135 typedef typename MatrixType::scalar_type
scalar_type;
139 typedef typename MatrixType::scalar_type impl_scalar_type;
151 typedef typename Teuchos::ScalarTraits<scalar_type>::magnitudeType
magnitude_type;
170 template <
class NewMatrixType>
friend class RBILUK;
175 RBILUK (
const Teuchos::RCP<const row_matrix_type>& A_in);
183 RBILUK (
const Teuchos::RCP<const block_crs_matrix_type>& A_in);
219 using RILUK<Tpetra::RowMatrix<
typename MatrixType::scalar_type,
220 typename MatrixType::local_ordinal_type,
221 typename MatrixType::global_ordinal_type,
247 setMatrix (
const Teuchos::RCP<const block_crs_matrix_type>& A);
290 apply (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& X,
291 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& Y,
292 Teuchos::ETransp mode = Teuchos::NO_TRANS,
293 scalar_type alpha = Teuchos::ScalarTraits<scalar_type>::one (),
294 scalar_type beta = Teuchos::ScalarTraits<scalar_type>::zero ())
const;
300 Teuchos::RCP<const block_crs_matrix_type>
getBlockMatrix ()
const;
303 const block_crs_matrix_type&
getLBlock ()
const;
306 const block_crs_matrix_type&
getDBlock ()
const;
309 const block_crs_matrix_type&
getUBlock ()
const;
312 typedef Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type> MV;
313 typedef Teuchos::ScalarTraits<impl_scalar_type> STS;
314 typedef Teuchos::ScalarTraits<magnitude_type> STM;
315 typedef typename block_crs_matrix_type::little_block_type little_block_type;
316 typedef typename block_crs_matrix_type::little_vec_type little_vec_type;
318 void allocate_L_and_U_blocks();
319 void initAllValues (
const block_crs_matrix_type& A);
322 Teuchos::RCP<const row_matrix_type> A_;
325 Teuchos::RCP<const block_crs_matrix_type> A_block_;
331 Teuchos::RCP<block_crs_matrix_type> L_block_;
333 Teuchos::RCP<block_crs_matrix_type> U_block_;
335 Teuchos::RCP<block_crs_matrix_type> D_block_;
338 Teuchos::RCP<block_crs_matrix_type> D_block_inverse_;
const block_crs_matrix_type & getDBlock() const
Return the diagonal entries of the ILU factorization.
Definition: Ifpack2_Experimental_RBILUK_def.hpp:125
Ifpack2 features that are experimental. Use at your own risk.
void initialize()
Initialize by computing the symbolic incomplete factorization.
Definition: Ifpack2_Experimental_RBILUK_def.hpp:187
Teuchos::RCP< const block_crs_matrix_type > getBlockMatrix() const
Get the input matrix.
Definition: Ifpack2_Experimental_RBILUK_def.hpp:182
MatrixType::global_ordinal_type global_ordinal_type
The type of global indices in the input MatrixType.
Definition: Ifpack2_Experimental_RBILUK_decl.hpp:145
virtual ~RBILUK()
Destructor (declared virtual for memory safety).
Definition: Ifpack2_Experimental_RBILUK_def.hpp:81
MatrixType::scalar_type scalar_type
The type of the entries of the input MatrixType.
Definition: Ifpack2_Experimental_RBILUK_decl.hpp:136
Teuchos::ScalarTraits< scalar_type >::magnitudeType magnitude_type
The type of the magnitude (absolute value) of a matrix entry.
Definition: Ifpack2_Experimental_RBILUK_decl.hpp:151
ILU(k) factorization of a given Tpetra::RowMatrix.
Definition: Ifpack2_RILUK_decl.hpp:243
MatrixType::node_type node_type
The Node type used by the input MatrixType.
Definition: Ifpack2_Experimental_RBILUK_decl.hpp:148
void apply(const Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &X, Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, scalar_type alpha=Teuchos::ScalarTraits< scalar_type >::one(), scalar_type beta=Teuchos::ScalarTraits< scalar_type >::zero()) const
Apply the (inverse of the) incomplete factorization to X, resulting in Y.
Definition: Ifpack2_Experimental_RBILUK_def.hpp:782
Tpetra::CrsMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > crs_matrix_type
Tpetra::CrsMatrix specialization used by this class for representing L and U.
Definition: Ifpack2_Experimental_RBILUK_decl.hpp:163
MatrixType::local_ordinal_type local_ordinal_type
The type of local indices in the input MatrixType.
Definition: Ifpack2_Experimental_RBILUK_decl.hpp:142
void compute()
Compute the (numeric) incomplete factorization.
Definition: Ifpack2_Experimental_RBILUK_def.hpp:448
const block_crs_matrix_type & getUBlock() const
Return the U factor of the ILU factorization.
Definition: Ifpack2_Experimental_RBILUK_def.hpp:139
void setMatrix(const Teuchos::RCP< const block_crs_matrix_type > &A)
Change the matrix to be preconditioned.
Definition: Ifpack2_Experimental_RBILUK_def.hpp:86
std::string description() const
A one-line description of this object.
Definition: Ifpack2_Experimental_RBILUK_def.hpp:931
const block_crs_matrix_type & getLBlock() const
Return the L factor of the ILU factorization.
Definition: Ifpack2_Experimental_RBILUK_def.hpp:111
Tpetra::RowMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > row_matrix_type
Tpetra::RowMatrix specialization used by this class.
Definition: Ifpack2_Experimental_RBILUK_decl.hpp:157
Preconditioners and smoothers for Tpetra sparse matrices.
Definition: Ifpack2_AdditiveSchwarz_decl.hpp:73
ILU(k) factorization of a given Tpetra::BlockCrsMatrix.
Definition: Ifpack2_Experimental_RBILUK_decl.hpp:128