8 #ifndef MUELU_ALGEBRAICPERMUTATIONSTRATEGY_DECL_HPP_
9 #define MUELU_ALGEBRAICPERMUTATIONSTRATEGY_DECL_HPP_
11 #include <Xpetra_MultiVector_fwd.hpp>
12 #include <Xpetra_Matrix_fwd.hpp>
13 #include <Xpetra_CrsGraph_fwd.hpp>
14 #include <Xpetra_Vector_fwd.hpp>
15 #include <Xpetra_MultiVectorFactory_fwd.hpp>
16 #include <Xpetra_VectorFactory_fwd.hpp>
17 #include <Xpetra_CrsMatrixWrap_fwd.hpp>
18 #include <Xpetra_Export_fwd.hpp>
19 #include <Xpetra_ExportFactory_fwd.hpp>
20 #include <Xpetra_Import_fwd.hpp>
21 #include <Xpetra_ImportFactory_fwd.hpp>
30 template<
class Scalar = DefaultScalar,
class LocalOrdinal = DefaultGlobalOrdinal>
41 template<
class Scalar,
class LocalOrdinal>
47 template<
class Scalar,
class LocalOrdinal>
49 size_t size = values.size();
50 v.clear(); v.reserve(size);
51 for(
size_t i=0; i<size; ++i)
54 std::sort(v.begin(),v.end(), MueLu::CreateCmpPairs<Scalar,LocalOrdinal>(values));
69 #undef MUELU_ALGEBRAICPERMUTATIONSTRATEGY_SHORT
98 Level & currentLevel,
const FactoryBase* genFactory)
const;
108 #define MUELU_ALGEBRAICPERMUTATIONSTRATEGY_SHORT
void BuildPermutation(const Teuchos::RCP< Matrix > &A, const Teuchos::RCP< const Map > &permRowMap, Level ¤tLevel, const FactoryBase *genFactory) const
build permutation operators
MueLu::DefaultLocalOrdinal LocalOrdinal
KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
std::vector< Scalar > vinternal_
void sortingPermutation(const std::vector< Scalar > &values, std::vector< LocalOrdinal > &v)
bool operator()(LocalOrdinal a, LocalOrdinal b)
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
CompPairs(const std::vector< Scalar > &v)
Class which defines local permutations of matrix columns.
CompPairs< Scalar, LocalOrdinal > CreateCmpPairs(const std::vector< Scalar > &v)
static magnitudeType magnitude(T a)