40 #ifndef ISORROPIA_TPETRA_ZOLTAN_QUERYOBJECT_H 41 #define ISORROPIA_TPETRA_ZOLTAN_QUERYOBJECT_H 45 #include <Teuchos_RCP.hpp> 47 #include <zoltan_cpp.h> 53 #include <Kokkos_DefaultNode.hpp> 54 #include <Tpetra_CrsGraph_decl.hpp> 55 #include <Tpetra_RowMatrix.hpp> 56 #include <Tpetra_MultiVector_decl.hpp> 86 template <typename Node = ::Tpetra::Map<int,int>::node_type >
98 Teuchos::RCP<const ::Tpetra::CrsGraph<int,int,Node> >
graph_;
104 Teuchos::RCP<const ::Tpetra::RowMatrix<double,int,int,Node> >
matrix_;
111 Teuchos::RCP<const ::Tpetra::MultiVector<double,int,int,Node> >
coords_;
125 Teuchos::RCP<const Isorropia::Tpetra::CostDescriber<Node> >
costs_;
132 Teuchos::RCP<const ::Tpetra::MultiVector<double,int,int,Node> >
weights_;
154 ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids,
155 int weight_dim,
float * object_weights,
int * ierr );
162 int num_obj, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids,
163 int *num_edges,
int * ierr );
170 int num_obj, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids,
171 int *num_edges, ZOLTAN_ID_PTR neighbor_global_ids,
int * neighbor_procs,
172 int weight_dim,
float * edge_weights,
int * ierr );
177 void My_HG_Size_CS (
int* num_lists,
int* num_pins,
int* format,
183 void My_HG_CS (
int num_gid_entries,
int num_row_or_col,
int num_pins,
184 int format, ZOLTAN_ID_PTR vtxedge_GID,
int* vtxedge_ptr, ZOLTAN_ID_PTR pin_GID,
191 void My_FGHG_CS (
int num_gid_entries,
int num_row_or_col,
int num_pins,
192 int format, ZOLTAN_ID_PTR vtxedge_GID,
int* vtxedge_ptr, ZOLTAN_ID_PTR pin_GID,
205 void My_HG_Edge_Weights(
int num_gid_entries,
int num_lid_entries,
int num_edges,
int edge_weight_dim,
206 ZOLTAN_ID_PTR edge_GID, ZOLTAN_ID_PTR edge_LID,
float* edge_weights,
int* ierr);
218 int num_obj, ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids,
int num_dim,
219 double *geom_vec,
int *ierr);
225 QueryObject( Teuchos::RCP<const ::Tpetra::CrsGraph<int,int,Node> > graph,
226 Teuchos::RCP<
const Isorropia::Tpetra::CostDescriber<Node> > costs,
232 QueryObject( Teuchos::RCP<const ::Tpetra::RowMatrix<double,int,int,Node> > matrix,
233 Teuchos::RCP<
const Isorropia::Tpetra::CostDescriber<Node> > costs,
238 QueryObject( Teuchos::RCP<const ::Tpetra::MultiVector<double,int,int,Node> > coords,
239 Teuchos::RCP<const ::Tpetra::MultiVector<double,int,int,Node> > weights);
244 QueryObject(Teuchos::RCP<const ::Tpetra::CrsGraph<int,int,Node> > graph,
245 Teuchos::RCP<
const Isorropia::Tpetra::CostDescriber<Node> > costs,
246 Teuchos::RCP<const ::Tpetra::MultiVector<double,int,int,Node> > coords,
247 Teuchos::RCP<const ::Tpetra::MultiVector<double,int,int,Node> > weights,
253 QueryObject(Teuchos::RCP<const ::Tpetra::RowMatrix<double,int,int,Node> > matrix,
254 Teuchos::RCP<
const Isorropia::Tpetra::CostDescriber<Node> > costs,
255 Teuchos::RCP<const ::Tpetra::MultiVector<double,int,int,Node> > coords,
256 Teuchos::RCP<const ::Tpetra::MultiVector<double,int,int,Node> > weights,
262 QueryObject( Teuchos::RCP<const ::Tpetra::Map<int,int,Node> > inputMap,
376 static void Object_List (
void * data,
int num_gid_entries,
int num_lid_entries,
377 ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids,
378 int weight_dim,
float * object_weights,
int * ierr );
384 static void Number_Edges_Multi (
void * data,
int num_gid_entries,
int num_lid_entries,
385 int num_obj, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids,
386 int *num_edges,
int * ierr );
390 static void Edge_List_Multi(
void * data,
int num_gid_entries,
int num_lid_entries,
391 int num_obj, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids,
392 int *num_edges, ZOLTAN_ID_PTR neighbor_global_ids,
int * neighbor_procs,
393 int weight_dim,
float * edge_weights,
int * ierr );
399 static void HG_Size_CS (
void * data,
int* num_lists,
int* num_pins,
int* format,
403 static void HG_CS (
void * data,
int num_gid_entries,
int num_row_or_col,
int num_pins,
404 int format, ZOLTAN_ID_PTR vtxedge_GID,
int* vtxedge_ptr, ZOLTAN_ID_PTR pin_GID,
413 int num_gid_entries,
int num_lid_entries,
int num_edges,
int edge_weight_dim,
414 ZOLTAN_ID_PTR edge_GID, ZOLTAN_ID_PTR edge_LID,
float* edge_weights,
int* ierr);
422 static void Geom_Multi(
void *data,
int num_gid_entries,
int num_lid_entries,
423 int num_obj, ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids,
int num_dim,
424 double *geom_vec,
int *ierr);
435 #endif //ISORROPIA_TPETRA_ZOLTAN_QUERYOBJECT_H void My_Edge_List_Multi(int num_gid_entries, int num_lid_entries, int num_obj, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids, int *num_edges, ZOLTAN_ID_PTR neighbor_global_ids, int *neighbor_procs, int weight_dim, float *edge_weights, int *ierr)
My_Edge_List_Multi() is a query function used for graph partitioning only.
static const int simple_input_
input_type_ == simple_input_ This indicates that a simple method (block, cyclic, or random) will be u...
Definition: Isorropia_TpetraQueryObject.hpp:332
bool haveGraphEdgeWeights()
Return true if any of the processes in the application have defined graph edge weights.
static void HG_Edge_Weights(void *data, int num_gid_entries, int num_lid_entries, int num_edges, int edge_weight_dim, ZOLTAN_ID_PTR edge_GID, ZOLTAN_ID_PTR edge_LID, float *edge_weights, int *ierr)
The interface to a particular QueryObject's My_HG_Edge_Weights query function.
int input_type_
The input_type_ indicates how the object to be partitioned is to be interpreted - as a graph or a hyp...
Definition: Isorropia_TpetraQueryObject.hpp:347
static const int graph_input_
input_type_ == graph_input_.
Definition: Isorropia_TpetraQueryObject.hpp:290
int My_Number_Objects(int *ierr)
My_Number_Objects() returns the number of objects currently assigned to this process.
Isorropia is the namespace that contains general definitions that apply to all partitioners and that ...
Definition: Isorropia_Epetra.hpp:60
QueryObject(Teuchos::RCP< const ::Tpetra::CrsGraph< int, int, Node > > graph, Teuchos::RCP< const Isorropia::Tpetra::CostDescriber< Node > > costs, int inputType)
Constructor.
bool haveVertexWeights()
Return true if any of the processes in the application have defined vertex weights.
static int Number_Objects(void *data, int *ierr)
The interface to a particular QueryObject's My_Number_Objects query function.
static void Geom_Multi(void *data, int num_gid_entries, int num_lid_entries, int num_obj, ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids, int num_dim, double *geom_vec, int *ierr)
The interface to a particular QueryObject's My_Geom_Multi query function.
const ::Tpetra::Map< int, int, Node > * rowMap_
The graph or matrix row map, or the MultiVector map.
Definition: Isorropia_TpetraQueryObject.hpp:115
void My_HG_Edge_Weights(int num_gid_entries, int num_lid_entries, int num_edges, int edge_weight_dim, ZOLTAN_ID_PTR edge_GID, ZOLTAN_ID_PTR edge_LID, float *edge_weights, int *ierr)
My_HG_Edge_Weights() is a query function used for hypergraph partitioning only.
static const int geometric_input_
input_type_ == geometric_input_.
Definition: Isorropia_TpetraQueryObject.hpp:298
virtual ~QueryObject()
Destructor.
const bool haveGraph_
haveGraph is true if we have CrsGraph, and not a CrsMatrix or a MultiVector.
Definition: Isorropia_TpetraQueryObject.hpp:93
void My_HG_Size_CS(int *num_lists, int *num_pins, int *format, int *ierr)
My_HG_Size_CS() is a query function used for hypergraph partitioning only.
static const int graph_geometric_input_
input_type_ == graph_geometric_input_ This indicates that the Tpetra::MultiVector represents graph an...
Definition: Isorropia_TpetraQueryObject.hpp:320
void My_Geom_Multi(int num_gid_entries, int num_lid_entries, int num_obj, ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids, int num_dim, double *geom_vec, int *ierr)
My_Geom_Multi() is a query function used for geometric partitioning only.
Teuchos::RCP< const Isorropia::Tpetra::CostDescriber< Node > > costs_
The CostDescriber contains optional vertex and/or edge weights for graph and hypergraph partitioning...
Definition: Isorropia_TpetraQueryObject.hpp:125
static int Number_Geom(void *data, int *ierr)
The interface to a particular QueryObject's My_Number_Geom query function.
int My_Number_Geom(int *ierr)
My_Number_Geom() is a query function used for geometric partitioning only.
std::set< int > graph_self_edges_
Definition: Isorropia_TpetraQueryObject.hpp:135
std::map< int, int > procmap_
Definition: Isorropia_TpetraQueryObject.hpp:134
static void HG_Size_Edge_Weights(void *data, int *num_edges, int *ierr)
The interface to a particular QueryObject's My_HG_Size_Edge_Weights query function.
static const int hgraph_geometric_input_
input_type_ == hgraph_geometric_input_ This indicates that the Tpetra::MultiVector represents a hyper...
Definition: Isorropia_TpetraQueryObject.hpp:312
void My_Number_Edges_Multi(int num_gid_entries, int num_lid_entries, int num_obj, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids, int *num_edges, int *ierr)
My_Number_Edges_Multi() is a query function used for graph partitioning only.
static void Edge_List_Multi(void *data, int num_gid_entries, int num_lid_entries, int num_obj, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids, int *num_edges, ZOLTAN_ID_PTR neighbor_global_ids, int *neighbor_procs, int weight_dim, float *edge_weights, int *ierr)
The interface to a particular QueryObject's My_Edges_Multi query function.
void My_HG_Size_Edge_Weights(int *num_edges, int *ierr)
My_HG_Size_Edge_Weights() is a query function used for hypergraph partitioning only.
static const int hgraph_graph_input_
input_type_ == hgraph_graph_input_ This indicates that the Tpetra::MultiVector represents a hypergrap...
Definition: Isorropia_TpetraQueryObject.hpp:305
QueryObject is a class that contains the query functions required by the Zoltan library.
Definition: Isorropia_TpetraQueryObject.hpp:87
static void Number_Edges_Multi(void *data, int num_gid_entries, int num_lid_entries, int num_obj, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids, int *num_edges, int *ierr)
The interface to a particular QueryObject's My_Number_Edges_Multi query function. ...
static const int unspecified_input_
input_type_ == unspecified_input_.
Definition: Isorropia_TpetraQueryObject.hpp:338
bool haveHypergraphEdgeWeights()
Return true if any of the processes in the application have defined hypergraph edge weights...
int myProc_
Definition: Isorropia_TpetraQueryObject.hpp:137
static void HG_CS(void *data, int num_gid_entries, int num_row_or_col, int num_pins, int format, ZOLTAN_ID_PTR vtxedge_GID, int *vtxedge_ptr, ZOLTAN_ID_PTR pin_GID, int *ierr)
The interface to a particular QueryObject's My_HG_CS query function.
int base_
Definition: Isorropia_TpetraQueryObject.hpp:138
const ::Tpetra::Map< int, int, Node > * colMap_
The graph or matrix column map.
Definition: Isorropia_TpetraQueryObject.hpp:119
static void HG_Size_CS(void *data, int *num_lists, int *num_pins, int *format, int *ierr)
The interface to a particular QueryObject's My_HG_Size_CS query function.
void My_HG_CS(int num_gid_entries, int num_row_or_col, int num_pins, int format, ZOLTAN_ID_PTR vtxedge_GID, int *vtxedge_ptr, ZOLTAN_ID_PTR pin_GID, int *ierr)
My_HG_CS() is a query function used for hypergraph partitioning only.
void My_FGHG_CS(int num_gid_entries, int num_row_or_col, int num_pins, int format, ZOLTAN_ID_PTR vtxedge_GID, int *vtxedge_ptr, ZOLTAN_ID_PTR pin_GID, int *ierr)
My_FGHG_CS() is a query function used for fine-grain hypergraph partitioning only.
static const int hgraph_graph_geometric_input_
input_type_ == hgraph_graph_geometric_input_ This indicates that the Tpetra::MultiVector represents a...
Definition: Isorropia_TpetraQueryObject.hpp:327
Teuchos::RCP< const ::Tpetra::RowMatrix< double, int, int, Node > > matrix_
The CrsMatrix.
Definition: Isorropia_TpetraQueryObject.hpp:104
const ::Tpetra::Map< int, int, Node > & RowMap(void)
Return the map associated with the object to be partitioned.
Definition: Isorropia_TpetraQueryObject.hpp:351
static void Object_List(void *data, int num_gid_entries, int num_lid_entries, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids, int weight_dim, float *object_weights, int *ierr)
The interface to a particular QueryObject's My_Object_List query function.
static const int hgraph_input_
input_type_ == hgraph_input_.
Definition: Isorropia_TpetraQueryObject.hpp:277
void My_Object_List(int num_gid_entries, int num_lid_entries, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids, int weight_dim, float *object_weights, int *ierr)
My_ObjectList() returns to Zoltan the global ID and weight of the objects currently assigned to this ...
Teuchos::RCP< const ::Tpetra::MultiVector< double, int, int, Node > > weights_
The MultiVector contains optional object (point) weights for geometric partitioning.
Definition: Isorropia_TpetraQueryObject.hpp:132
Teuchos::RCP< const ::Tpetra::CrsGraph< int, int, Node > > graph_
The CrsGraph.
Definition: Isorropia_TpetraQueryObject.hpp:98
static const int hgraph2d_finegrain_input_
input_type_ == hgraph2d_finegrain_input_.
Definition: Isorropia_TpetraQueryObject.hpp:283
Teuchos::RCP< const ::Tpetra::MultiVector< double, int, int, Node > > coords_
The MultiVector containing 1, 2 or 3 dimensional coordinates.
Definition: Isorropia_TpetraQueryObject.hpp:111