MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu_Zoltan2Interface_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_ZOLTAN2INTERFACE_DECL_HPP
11#define MUELU_ZOLTAN2INTERFACE_DECL_HPP
12
13#include "MueLu_ConfigDefs.hpp"
14
15#if defined(HAVE_MUELU_ZOLTAN2) && defined(HAVE_MPI)
16
17#include <Xpetra_Matrix_fwd.hpp>
18#include <Xpetra_VectorFactory_fwd.hpp>
19
22
23#include "MueLu_Level_fwd.hpp"
25
26#if defined(HAVE_MUELU_ZOLTAN)
27#include "MueLu_ZoltanInterface.hpp"
28#endif
29
30namespace MueLu {
31
74// FIXME: this class should not be templated
75template <class Scalar,
78 class Node = DefaultNode>
80#undef MUELU_ZOLTAN2INTERFACE_SHORT
82
83 public:
85
86
89
91 virtual ~Zoltan2Interface() {}
93
94 RCP<const ParameterList> GetValidParameterList() const;
95
97
98 void DeclareInput(Level& currentLevel) const;
100
102
103 void Build(Level& currentLevel) const;
104
106
107 private:
108 RCP<ParameterList> defaultZoltan2Params;
109
110}; // class Zoltan2Interface
111
112template <class Scalar,
115 class Node = DefaultNode>
117#undef MUELU_ZOLTAN2INTERFACE_SHORT
119
120 using real_type = typename Teuchos::ScalarTraits<SC>::coordinateType;
121 using RealValuedMultiVector = typename Xpetra::MultiVector<real_type, LO, GO, NO>;
122
123 static RCP<GOVector>
124 ComputeDecomposition(int numPartitions, RCP<Matrix>& A, RCP<RealValuedMultiVector> coords, Teuchos::ParameterList& Zoltan2Params, std::string debuggingFile = "");
125};
126
127} // namespace MueLu
128
129#define MUELU_ZOLTAN2INTERFACE_SHORT
130#endif // if defined(HAVE_MUELU_ZOLTAN2) && defined(HAVE_MPI)
131
132#endif // MUELU_ZOLTAN2INTERFACE_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Class that holds all level-specific information.
Base class for factories that use one level (currentLevel).
Interface to Zoltan2 library.
void DeclareInput(Level &currentLevel) const
Specifies the data that this class needs, and the factories that generate that data.
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
void Build(Level &currentLevel) const
Build an object with this factory.
Namespace for MueLu classes and methods.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
typename Teuchos::ScalarTraits< SC >::coordinateType real_type
typename Xpetra::MultiVector< real_type, LO, GO, NO > RealValuedMultiVector
static RCP< GOVector > ComputeDecomposition(int numPartitions, RCP< Matrix > &A, RCP< RealValuedMultiVector > coords, Teuchos::ParameterList &Zoltan2Params, std::string debuggingFile="")