MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu_ZoltanInterface_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_ZOLTANINTERFACE_DECL_HPP
11#define MUELU_ZOLTANINTERFACE_DECL_HPP
12
13#include "MueLu_ConfigDefs.hpp"
14
15#if defined(HAVE_MUELU_ZOLTAN) && defined(HAVE_MPI)
16
17#include <zoltan_cpp.h>
18
19#include <Xpetra_Matrix_fwd.hpp>
20#include <Xpetra_VectorFactory_fwd.hpp>
21
24
25#include "MueLu_Level_fwd.hpp"
27
28namespace MueLu {
29
72// FIXME: this class should not be templated
73template <class Scalar,
76 class Node = DefaultNode>
78#undef MUELU_ZOLTANINTERFACE_SHORT
80
81 public:
83
84
87
89 virtual ~ZoltanInterface() {}
91
92 RCP<const ParameterList> GetValidParameterList() const;
93
95
96 void DeclareInput(Level &level) const;
98
100
101 void Build(Level &level) const;
102
104
106
107
115 static int GetLocalNumberOfRows(void *data, int *ierr);
116
125 static void GetLocalNumberOfNonzeros(void *data, int NumGidEntries, int NumLidEntries, ZOLTAN_ID_PTR gids,
126 ZOLTAN_ID_PTR lids, int wgtDim, float *weights, int *ierr);
127
133 static int GetProblemDimension(void *data, int *ierr);
134
143 static void GetProblemGeometry(void *data, int numGIDEntries, int numLIDEntries, int numObjectIDs,
144 ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids, int dim, double *coordinates, int *ierr);
145
147
148 private:
149 static ArrayRCP<typename Teuchos::ScalarTraits<Scalar>::magnitudeType> coalesceCoordinates(ArrayRCP<typename Teuchos::ScalarTraits<Scalar>::magnitudeType> coord, LocalOrdinal blksize);
150
151}; // class ZoltanInterface
152
153} // namespace MueLu
154
155#define MUELU_ZOLTANINTERFACE_SHORT
156#endif // if defined(HAVE_MUELU_ZOLTAN) && defined(HAVE_MPI)
157
158#endif // MUELU_ZOLTANINTERFACE_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 Zoltan library.
static void GetLocalNumberOfNonzeros(void *data, int NumGidEntries, int NumLidEntries, ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids, int wgtDim, float *weights, int *ierr)
static int GetLocalNumberOfRows(void *data, int *ierr)
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
static ArrayRCP< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > coalesceCoordinates(ArrayRCP< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > coord, LocalOrdinal blksize)
void Build(Level &level) const
Build an object with this factory.
void DeclareInput(Level &level) const
Specifies the data that this class needs, and the factories that generate that data.
static void GetProblemGeometry(void *data, int numGIDEntries, int numLIDEntries, int numObjectIDs, ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids, int dim, double *coordinates, int *ierr)
static int GetProblemDimension(void *data, int *ierr)
Namespace for MueLu classes and methods.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode