9 #ifndef IFPACK2_BANDEDCONTAINER_DECL_HPP
10 #define IFPACK2_BANDEDCONTAINER_DECL_HPP
15 #include "Ifpack2_Container.hpp"
16 #include "Tpetra_MultiVector.hpp"
17 #include "Tpetra_Map.hpp"
18 #include "Tpetra_RowMatrix.hpp"
68 template<
class MatrixType,
class LocalScalarType>
81 using matrix_type = MatrixType;
83 using LSC = LocalScalarType;
87 using typename Container<MatrixType>::SC;
89 using typename Container<MatrixType>::LO;
91 using typename Container<MatrixType>::GO;
93 using typename Container<MatrixType>::NO;
96 using typename ContainerImpl<MatrixType, LSC>::LISC;
98 using typename Container<MatrixType>::mv_type;
99 using typename Container<MatrixType>::map_type;
100 using local_mv_type = Tpetra::MultiVector<LSC, LO, GO, NO>;
101 using typename Container<MatrixType>::vector_type;
102 using typename Container<MatrixType>::import_type;
105 using typename ContainerImpl<MatrixType, LSC>::HostSubviewLocal;
106 using typename ContainerImpl<MatrixType, LSC>::ConstHostSubviewLocal;
107 using typename ContainerImpl<MatrixType,LSC>::block_crs_matrix_type;
108 using HostViewLocal =
typename local_mv_type::dual_view_type::t_host;
110 static_assert(std::is_same<MatrixType,
111 Tpetra::RowMatrix<SC, LO, GO, NO> >::value,
112 "Ifpack2::BandedContainer: Please use MatrixType = Tpetra::RowMatrix.");
122 using typename Container<MatrixType>::row_matrix_type;
164 virtual void compute ()
override;
170 void clearBlocks()
override;
179 virtual std::ostream&
print (std::ostream& os)
const override;
202 void extract()
override;
218 solveBlock(ConstHostSubviewLocal X,
223 const LSC beta)
const override;
226 std::vector<Teuchos::SerialBandDenseMatrix<int, LSC> > diagBlocks_;
243 #endif // IFPACK2_BANDEDCONTAINER_DECL_HPP
virtual void initialize() override
Do all set-up operations that only require matrix structure.
Definition: Ifpack2_BandedContainer_def.hpp:175
typename Kokkos::ArithTraits< SC >::val_type ISC
Internal representation of Scalar in Kokkos::View.
Definition: Ifpack2_Container_decl.hpp:102
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:310
virtual void compute() override
Initialize and compute each block.
Definition: Ifpack2_BandedContainer_def.hpp:209
typename mv_type::dual_view_type::t_host HostView
Definition: Ifpack2_Container_decl.hpp:106
static std::string getName()
Get the name of this container type for Details::constructContainer()
Definition: Ifpack2_BandedContainer_def.hpp:549
virtual std::ostream & print(std::ostream &os) const override
Print information about this object to the given output stream.
Definition: Ifpack2_BandedContainer_def.hpp:497
virtual ~BandedContainer()
Destructor (declared virtual for memory safety of derived classes).
Definition: Ifpack2_BandedContainer_def.hpp:46
void computeBandwidth()
Definition: Ifpack2_BandedContainer_def.hpp:68
static const EVerbosityLevel verbLevel_default
BandedContainer(const Teuchos::RCP< const row_matrix_type > &matrix, const Teuchos::Array< Teuchos::Array< LO > > &partitions, const Teuchos::RCP< const import_type > &, bool pointIndexed)
Constructor.
Definition: Ifpack2_BandedContainer_def.hpp:29
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const override
Print the object with some verbosity level to the given FancyOStream.
Definition: Ifpack2_BandedContainer_def.hpp:530
virtual void setParameters(const Teuchos::ParameterList &List) override
Set all necessary parameters (super- and sub-diagonal bandwidth)
Definition: Ifpack2_BandedContainer_def.hpp:50
Store and solve a local Banded linear problem.
Definition: Ifpack2_BandedContainer_decl.hpp:69
virtual std::string description() const override
A one-line description of this object.
Definition: Ifpack2_BandedContainer_def.hpp:508