42 #ifndef IFPACK2_TRIDICONTAINER_DECL_HPP
43 #define IFPACK2_TRIDICONTAINER_DECL_HPP
48 #include "Ifpack2_Container.hpp"
49 #include "Tpetra_MultiVector.hpp"
50 #include "Tpetra_Map.hpp"
51 #include "Tpetra_RowMatrix.hpp"
54 #include <type_traits>
104 template<
class MatrixType,
class LocalScalarType>
116 using matrix_type = MatrixType;
120 using typename Container<MatrixType>::SC;
122 using typename Container<MatrixType>::LO;
124 using typename Container<MatrixType>::GO;
126 using typename Container<MatrixType>::NO;
127 using LSC = LocalScalarType;
129 using typename Container<MatrixType>::mv_type;
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 local_mv_type = Tpetra::MultiVector<LSC, LO, GO, NO>;
138 using HostViewLocal =
typename Kokkos::View<LSC**, Kokkos::HostSpace>;
139 using typename ContainerImpl<MatrixType, LocalScalarType>::HostSubviewLocal;
141 static_assert (std::is_same<MatrixType, Tpetra::RowMatrix<SC, LO, GO, NO>>::value,
142 "Ifpack2::TriDiContainer: MatrixType must be a Tpetra::RowMatrix specialization.");
152 using typename Container<MatrixType>::row_matrix_type;
208 virtual std::ostream&
print (std::ostream& os)
const;
237 std::vector<Teuchos::SerialTriDiMatrix<int, LSC>> diagBlocks_;
251 #endif // IFPACK2_TRIDICONTAINER_DECL_HPP
Store and solve a local TriDi linear problem.
Definition: Ifpack2_TriDiContainer_decl.hpp:105
virtual std::string description() const
A one-line description of this object.
Definition: Ifpack2_TriDiContainer_def.hpp:393
static std::string getName()
Get the name of this container type for Details::constructContainer()
Definition: Ifpack2_TriDiContainer_def.hpp:431
virtual void compute()
Extract the local diagonal block and prepare the solver.
Definition: Ifpack2_TriDiContainer_def.hpp:116
The implementation of the numerical features of Container (Jacobi, Gauss-Seidel, SGS). This class allows a custom scalar type (LocalScalarType) to be used for storing blocks and solving the block systems. Hiding this template parameter from the Container interface simplifies the BlockRelaxation and ContainerFactory classes.
Definition: Ifpack2_Container_decl.hpp:342
virtual ~TriDiContainer()
Destructor (declared virtual for memory safety of derived classes).
Definition: Ifpack2_TriDiContainer_def.hpp:102
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with some verbosity level to the given FancyOStream.
Definition: Ifpack2_TriDiContainer_def.hpp:416
typename Kokkos::Details::ArithTraits< SC >::val_type ISC
Internal representation of Scalar in Kokkos::View.
Definition: Ifpack2_Container_decl.hpp:135
virtual std::ostream & print(std::ostream &os) const
Print information about this object to the given output stream.
Definition: Ifpack2_TriDiContainer_def.hpp:384
typename mv_type::dual_view_type::t_host HostView
Definition: Ifpack2_Container_decl.hpp:139
static const EVerbosityLevel verbLevel_default
TriDiContainer(const Teuchos::RCP< const row_matrix_type > &matrix, const Teuchos::Array< Teuchos::Array< LO > > &partitions, const Teuchos::RCP< const import_type > &importer, bool pointIndexed)
Constructor.
Definition: Ifpack2_TriDiContainer_def.hpp:60
void solveBlock(HostSubviewLocal X, HostSubviewLocal Y, int blockIndex, Teuchos::ETransp mode, LSC alpha, LSC beta) const
Definition: Ifpack2_TriDiContainer_def.hpp:280
virtual void initialize()
Do all set-up operations that only require matrix structure.
Definition: Ifpack2_TriDiContainer_def.hpp:105