10 #ifndef MUELU_SCALARDROPPINGCLASSICAL_DEF_HPP
11 #define MUELU_SCALARDROPPINGCLASSICAL_DEF_HPP
17 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node, Misc::StrengthMeasure SoC>
23 const std::string& droppingMethod,
25 const bool aggregationMayCreateDirichlet,
26 const bool symmetrizeDroppedGraph,
27 const bool useBlocking,
30 auto lclA = A.getLocalMatrixDevice();
33 if (droppingMethod ==
"point-wise") {
34 auto dropping = ClassicalDropping::make_drop_functor<SoC>(A, threshold, results);
36 if (aggregationMayCreateDirichlet) {
39 if (symmetrizeDroppedGraph) {
45 mark_singletons_as_boundary);
52 mark_singletons_as_boundary);
55 if (symmetrizeDroppedGraph) {
69 }
else if (droppingMethod ==
"cut-drop") {
70 auto comparison = CutDrop::make_comparison_functor<SoC>(A, results);
73 if (symmetrizeDroppedGraph) {
90 #define MUELU_ETI_GROUP(SC, LO, GO, NO) \
91 MUELU_ETI_SLGN_SoC(MueLu::ScalarDroppingClassical, SC, LO, GO, NO)
MueLu::DefaultLocalOrdinal LocalOrdinal
typename MueLu::LWGraph_kokkos< LocalOrdinal, GlobalOrdinal, Node >::boundary_nodes_type boundary_nodes_type
Kokkos::View< DecisionType *, memory_space > results_view
static void runDroppingFunctors(matrix_type &A, results_view &results, rowptr_type &filtered_rowptr, LocalOrdinal &nnz_filtered, const bool useBlocking, Level &level, const Factory &factory, Functors &...functors)
Functor that drops boundary nodes for a blockSize == 1 problem.
Functor that marks singletons (all off-diagonal entries in a row are dropped) as boundary.
Functor that drops boundary nodes for a blockSize == 1 problem.
Class that holds all level-specific information.
typename Teuchos::ScalarTraits< Scalar >::magnitudeType magnitudeType
Order each row by a criterion, compare the ratio of values and drop all entries once the ratio is bel...
Functor that marks diagonal as kept, unless the are already marked as boundary.
static void runDroppingFunctors_on_A(matrix_type &A, results_view &results, rowptr_type &filtered_rowptr, LocalOrdinal &nnz_filtered, boundary_nodes_type &boundaryNodes, const std::string &droppingMethod, const magnitudeType threshold, const bool aggregationMayCreateDirichlet, const bool symmetrizeDroppedGraph, const bool useBlocking, Level &level, const Factory &factory)
typename local_graph_type::row_map_type::non_const_type rowptr_type