MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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>
21 
24 
25 #include "MueLu_Level_fwd.hpp"
27 
28 namespace MueLu {
29 
72 // FIXME: this class should not be templated
73 template <class Scalar,
76  class Node = DefaultNode>
78 #undef MUELU_ZOLTANINTERFACE_SHORT
79 #include "MueLu_UseShortNames.hpp"
80 
81  public:
83 
84 
87 
89  virtual ~ZoltanInterface() {}
91 
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:
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
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
static ArrayRCP< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > coalesceCoordinates(ArrayRCP< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > coord, LocalOrdinal blksize)
static int GetProblemDimension(void *data, int *ierr)
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)
Interface to Zoltan library.This interface provides access to partitioning methods in Zoltan...
MueLu::DefaultNode Node
void Build(Level &level) const
Build an object with this factory.
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
virtual ~ZoltanInterface()
Destructor.
static void GetLocalNumberOfNonzeros(void *data, int NumGidEntries, int NumLidEntries, ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids, int wgtDim, float *weights, int *ierr)
void DeclareInput(Level &level) 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.
Base class for factories that use one level (currentLevel).
static int GetLocalNumberOfRows(void *data, int *ierr)