MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_ClassicalMapFactory_decl.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // MueLu: A package for multigrid based preconditioning
4 //
5 // Copyright 2012 NTESS and the MueLu contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef MUELU_CLASSICALMAPFACTORY_DECL_HPP_
11 #define MUELU_CLASSICALMAPFACTORY_DECL_HPP_
12 
14 #include "Xpetra_Import_fwd.hpp"
15 #include "Xpetra_Vector_fwd.hpp"
17 
18 #include "MueLu_ConfigDefs.hpp"
21 #include "MueLu_LWGraph_fwd.hpp"
22 #include "MueLu_Level_fwd.hpp"
23 #include "MueLu_Exceptions.hpp"
24 
25 #include "MueLu_LWGraph_fwd.hpp"
27 
28 namespace MueLu {
29 
58 template <class Scalar = DefaultScalar,
61  class Node = DefaultNode>
63 #undef MUELU_CLASSICALMAPFACTORY_SHORT
64 #include "MueLu_UseShortNames.hpp"
65 
66  public:
68  typedef enum { F_PT = -1,
70  C_PT = 1,
72 
74 
75 
77 
84  void DeclareInput(Level &currentLevel) const override;
85 
87 
89 
90 
92  void Build(Level &currentLevel) const override;
93 
95 
96  protected:
97  virtual void GenerateCoarseMap(const Map &fineMap, LO num_c_points, Teuchos::RCP<const Map> &coarseMap) const;
98 
99  virtual void DoGraphColoring(const LWGraph &graph, Teuchos::ArrayRCP<LO> &myColors, LO &numColors) const;
100 
101  virtual void DoMISNaive(const LWGraph &graph, Teuchos::ArrayRCP<LO> &myColors, LO &numColors) const;
102 
103  virtual void DoDistributedGraphColoring(RCP<const LWGraph> &graph, Teuchos::ArrayRCP<LO> &myColors, LO &numColors) const;
104 
105 }; // class ClassicalMapFactory
106 
107 } // namespace MueLu
108 
109 #define MUELU_CLASSICALMAPFACTORY_SHORT
110 #endif /* MUELU_CLASSICALMAPFACTORY_DECL_HPP_ */
void Build(Level &currentLevel) const override
Build an object with this factory.
MueLu::DefaultLocalOrdinal LocalOrdinal
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
void DeclareInput(Level &currentLevel) const override
Specifies the data that this class needs, and the factories that generate that data.
virtual void DoDistributedGraphColoring(RCP< const LWGraph > &graph, Teuchos::ArrayRCP< LO > &myColors, LO &numColors) const
LocalOrdinal LO
virtual void DoMISNaive(const LWGraph &graph, Teuchos::ArrayRCP< LO > &myColors, LO &numColors) const
MueLu::DefaultNode Node
MueLu::DefaultScalar Scalar
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
Factory for generating F/C-splitting and a coarse level map. Used by ClassicalPFactory.
virtual void DoGraphColoring(const LWGraph &graph, Teuchos::ArrayRCP< LO > &myColors, LO &numColors) const
virtual void GenerateCoarseMap(const Map &fineMap, LO num_c_points, Teuchos::RCP< const Map > &coarseMap) const
Lightweight MueLu representation of a compressed row storage graph.
RCP< const ParameterList > GetValidParameterList() const override
Return a const parameter list of valid parameters that setParameterList() will accept.
Base class for factories that use one level (currentLevel).