10 #ifndef PACKAGES_XPETRA_SUP_MATRIX_UTILS_DECL_HPP_
11 #define PACKAGES_XPETRA_SUP_MATRIX_UTILS_DECL_HPP_
15 #include "Xpetra_Map.hpp"
17 #include "Xpetra_StridedMap.hpp"
18 #include "Xpetra_MapFactory.hpp"
19 #include "Xpetra_MapExtractor.hpp"
21 #include "Xpetra_Matrix.hpp"
22 #include "Xpetra_MatrixFactory.hpp"
23 #include "Xpetra_BlockedCrsMatrix.hpp"
24 #include "Xpetra_MatrixMatrix.hpp"
25 #include "Xpetra_Helpers.hpp"
27 #ifdef HAVE_XPETRA_TPETRA
28 #include "Xpetra_TpetraMultiVector.hpp"
29 #include <Tpetra_RowMatrixTransposer.hpp>
30 #include <Tpetra_Details_extractBlockDiagonal.hpp>
31 #include <Tpetra_Details_scaleBlockDiagonal.hpp>
45 template <
class Scalar,
50 #undef XPETRA_MATRIXUTILS_SHORT
57 static Teuchos::RCP<Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>>
findColumnSubMap(
71 static Teuchos::RCP<Xpetra::BlockedCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
SplitMatrix(
76 bool bThyraMode =
false);
81 bool const& repairZeroDiagonals, Teuchos::FancyOStream& fos,
82 const typename Teuchos::ScalarTraits<Scalar>::magnitudeType threshold = Teuchos::ScalarTraits<
typename Teuchos::ScalarTraits<Scalar>::magnitudeType>::zero(),
83 const Scalar replacementValue = Teuchos::ScalarTraits<Scalar>::one());
92 const Teuchos::ArrayView<const double>& relativeThreshold, Teuchos::FancyOStream& fos);
114 std::vector<size_t>& rangeStridingInfo, std::vector<size_t>& domainStridingInfo);
119 #define XPETRA_MATRIXUTILS_SHORT
121 #endif // PACKAGES_XPETRA_SUP_MATRIX_UTILS_DECL_HPP_
static void CheckRepairMainDiagonal(RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >> &Ac, bool const &repairZeroDiagonals, Teuchos::FancyOStream &fos, const typename Teuchos::ScalarTraits< Scalar >::magnitudeType threshold=Teuchos::ScalarTraits< typename Teuchos::ScalarTraits< Scalar >::magnitudeType >::zero(), const Scalar replacementValue=Teuchos::ScalarTraits< Scalar >::one())
static Teuchos::RCP< Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > SplitMatrix(const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &input, Teuchos::RCP< const Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >> rangeMapExtractor, Teuchos::RCP< const Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >> domainMapExtractor, Teuchos::RCP< const Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >> columnMapExtractor=Teuchos::null, bool bThyraMode=false)
static Teuchos::RCP< Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > findColumnSubMap(const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &input, const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > &domainMap)
static void RelativeDiagonalBoost(RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >> &A, const Teuchos::ArrayView< const double > &relativeThreshold, Teuchos::FancyOStream &fos)
static Teuchos::RCP< Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > xpetraGidNumbering2ThyraGidNumbering(const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &input)
static void convertMatrixToStridedMaps(Teuchos::RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >> matrix, std::vector< size_t > &rangeStridingInfo, std::vector< size_t > &domainStridingInfo)
static void extractBlockDiagonal(const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diagonal)
Xpetra-specific matrix class.
static void checkLocalRowMapMatchesColMap(const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)
static void inverseScaleBlockDiagonal(Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &blockDiagonal, bool doTranspose, Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &toBeScaled)