43 #ifndef IFPACK2_DENSECONTAINER_DECL_HPP
44 #define IFPACK2_DENSECONTAINER_DECL_HPP
49 #include "Ifpack2_Container.hpp"
50 #include "Tpetra_MultiVector.hpp"
51 #include "Tpetra_Map.hpp"
52 #include "Tpetra_RowMatrix.hpp"
53 #include "Teuchos_SerialDenseMatrix.hpp"
54 #include "Tpetra_BlockCrsMatrix_decl.hpp"
102 template<
class MatrixType,
class LocalScalarType>
115 using matrix_type = MatrixType;
117 using LSC = LocalScalarType;
120 using typename Container<MatrixType>::SC;
122 using typename Container<MatrixType>::LO;
124 using typename Container<MatrixType>::GO;
126 using typename Container<MatrixType>::NO;
128 using typename Container<MatrixType>::mv_type;
129 using local_mv_type = Tpetra::MultiVector<LSC, LO, GO, NO>;
130 using typename Container<MatrixType>::map_type;
131 using typename Container<MatrixType>::vector_type;
132 using typename Container<MatrixType>::import_type;
135 using typename ContainerImpl<MatrixType, LocalScalarType>::LISC;
137 using typename ContainerImpl<MatrixType, LocalScalarType>::HostViewLocal;
138 using typename ContainerImpl<MatrixType, LocalScalarType>::HostSubviewLocal;
140 static_assert(std::is_same<MatrixType, Tpetra::RowMatrix<SC, LO, GO, NO>>::value,
141 "Ifpack2::DenseContainer: Please use MatrixType = Tpetra::RowMatrix.");
151 using typename Container<MatrixType>::row_matrix_type;
153 using block_crs_matrix_type = Tpetra::BlockCrsMatrix<SC, LO, GO, NO>;
170 DenseContainer (
const Teuchos::RCP<const row_matrix_type>& matrix,
171 const Teuchos::Array<Teuchos::Array<LO> >& partitions,
172 const Teuchos::RCP<const import_type>& importer,
203 virtual std::ostream&
print (std::ostream& os)
const;
214 describe (Teuchos::FancyOStream &out,
215 const Teuchos::EVerbosityLevel verbLevel =
216 Teuchos::Describable::verbLevel_default)
const;
241 solveBlock(HostSubviewLocal X,
244 Teuchos::ETransp mode,
246 const LSC beta)
const;
249 std::vector<Teuchos::SerialDenseMatrix<int, LSC>> diagBlocks_;
252 mutable Teuchos::Array<int> ipiv_;
255 bool hasBlockCrsMatrix_;
258 Teuchos::Array<LSC> scalars_;
261 Teuchos::Array<GO> scalarOffsets_;
266 #endif // IFPACK2_DENSECONTAINER_DECL_HPP