MueLu Version of the Day
Loading...
Searching...
No Matches
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
23namespace MueLu {
24
38template <class Scalar = DefaultScalar,
41 class Node = DefaultNode>
43#undef MUELU_AMALGAMATIONFACTORY_SHORT
45
46 public:
48
49
52
55
56 RCP<const ParameterList> GetValidParameterList() const override;
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
102 static void AmalgamateMap(RCP<const StridedMap> sourceMap, RCP<const Map>& amalgamatedMap);
103
104}; // class AmalgamationFactory
105
106} // namespace MueLu
107
108#define MUELU_AMALGAMATIONFACTORY_SHORT
109#endif // MUELU_AMALGAMATIONFACTORY_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
AmalgamationFactory for subblocks of strided map based amalgamation data.
RCP< const ParameterList > GetValidParameterList() const override
Return a const parameter list of valid parameters that setParameterList() will accept.
void DeclareInput(Level &currentLevel) const override
Input.
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.
static const GlobalOrdinal DOFGid2NodeId(GlobalOrdinal gid, LocalOrdinal blockSize, const GlobalOrdinal offset, const GlobalOrdinal indexBase)
Translate global (row/column) id to global amalgamation block id.
static const GlobalOrdinal DOFGidOffset(RCP< const StridedMap > stridedMap)
Method to calculate the global (row) id offset from scratch.
virtual ~AmalgamationFactory()
Destructor.
AmalgamationFactory()
Constructor.
void Build(Level &currentLevel) const override
Build an object with this factory.
Class that holds all level-specific information.
Base class for factories that use one level (currentLevel).
Namespace for MueLu classes and methods.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar