MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_AmalgamationFactory_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_AMALGAMATIONFACTORY_DECL_HPP
11 #define MUELU_AMALGAMATIONFACTORY_DECL_HPP
12 
13 #include <Xpetra_Matrix_fwd.hpp>
14 #include <Xpetra_Map_fwd.hpp>
15 
16 #include "MueLu_ConfigDefs.hpp"
19 
20 #include "MueLu_Level_fwd.hpp"
21 #include "MueLu_Exceptions.hpp"
22 
23 namespace MueLu {
24 
38 template <class Scalar = DefaultScalar,
41  class Node = DefaultNode>
43 #undef MUELU_AMALGAMATIONFACTORY_SHORT
44 #include "MueLu_UseShortNames.hpp"
45 
46  public:
48 
49 
52 
54  virtual ~AmalgamationFactory();
55 
57 
59 
61 
62 
63  void DeclareInput(Level& currentLevel) const override;
64 
66 
67  void Build(Level& currentLevel) const override;
68 
78  static const GlobalOrdinal DOFGid2NodeId(GlobalOrdinal gid, LocalOrdinal blockSize, const GlobalOrdinal offset /*= 0*/,
79  const GlobalOrdinal indexBase /* = 0*/);
80 
85  static const GlobalOrdinal DOFGidOffset(RCP<const StridedMap> stridedMap);
86 
94  static void AmalgamateMap(const Map& sourceMap, const Matrix& A, RCP<const Map>& amalgamatedMap, Array<LO>& translation);
95 
96 }; // class AmalgamationFactory
97 
98 } // namespace MueLu
99 
100 #define MUELU_AMALGAMATIONFACTORY_SHORT
101 #endif // MUELU_AMALGAMATIONFACTORY_DECL_HPP
void DeclareInput(Level &currentLevel) const override
Input.
MueLu::DefaultLocalOrdinal LocalOrdinal
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
MueLu::DefaultNode Node
static const GlobalOrdinal DOFGidOffset(RCP< const StridedMap > stridedMap)
Method to calculate the global (row) id offset from scratch.
static const GlobalOrdinal DOFGid2NodeId(GlobalOrdinal gid, LocalOrdinal blockSize, const GlobalOrdinal offset, const GlobalOrdinal indexBase)
Translate global (row/column) id to global amalgamation block id.
AmalgamationFactory()
Constructor.
MueLu::DefaultScalar Scalar
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
static void AmalgamateMap(const Map &sourceMap, const Matrix &A, RCP< const Map > &amalgamatedMap, Array< LO > &translation)
Method to create merged map for systems of PDEs.
AmalgamationFactory for subblocks of strided map based amalgamation data.
void Build(Level &currentLevel) const override
Build an object with this factory.
virtual ~AmalgamationFactory()
Destructor.
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).