40 #ifndef ISORROPIA_EPETRA_ZOLTAN_QUERYOBJECT_H
41 #define ISORROPIA_EPETRA_ZOLTAN_QUERYOBJECT_H
45 #include <Teuchos_RCP.hpp>
47 #include <zoltan_cpp.h>
52 class Epetra_BlockMap;
53 class Epetra_CrsGraph;
54 class Epetra_RowMatrix;
55 class Epetra_MultiVector;
92 Teuchos::RCP<const Epetra_CrsGraph>
graph_;
98 Teuchos::RCP<const Epetra_RowMatrix>
matrix_;
105 Teuchos::RCP<const Epetra_MultiVector>
coords_;
119 Teuchos::RCP<const Isorropia::Epetra::CostDescriber>
costs_;
148 ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids,
149 int weight_dim,
float * object_weights,
int * ierr );
156 int num_obj, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids,
157 int *num_edges,
int * ierr );
164 int num_obj, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids,
165 int *num_edges, ZOLTAN_ID_PTR neighbor_global_ids,
int * neighbor_procs,
166 int weight_dim,
float * edge_weights,
int * ierr );
171 void My_HG_Size_CS (
int* num_lists,
int* num_pins,
int* format,
177 void My_HG_CS (
int num_gid_entries,
int num_row_or_col,
int num_pins,
178 int format, ZOLTAN_ID_PTR vtxedge_GID,
int* vtxedge_ptr, ZOLTAN_ID_PTR pin_GID,
185 void My_FGHG_CS (
int num_gid_entries,
int num_row_or_col,
int num_pins,
186 int format, ZOLTAN_ID_PTR vtxedge_GID,
int* vtxedge_ptr, ZOLTAN_ID_PTR pin_GID,
199 void My_HG_Edge_Weights(
int num_gid_entries,
int num_lid_entries,
int num_edges,
int edge_weight_dim,
200 ZOLTAN_ID_PTR edge_GID, ZOLTAN_ID_PTR edge_LID,
float* edge_weights,
int* ierr);
212 int num_obj, ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids,
int num_dim,
213 double *geom_vec,
int *ierr);
219 QueryObject( Teuchos::RCP<const Epetra_CrsGraph> graph,
220 Teuchos::RCP<const Isorropia::Epetra::CostDescriber> costs,
226 QueryObject( Teuchos::RCP<const Epetra_RowMatrix> matrix,
227 Teuchos::RCP<const Isorropia::Epetra::CostDescriber> costs,
232 QueryObject( Teuchos::RCP<const Epetra_MultiVector> coords,
233 Teuchos::RCP<const Epetra_MultiVector> weights);
238 QueryObject(Teuchos::RCP<const Epetra_CrsGraph> graph,
239 Teuchos::RCP<const Isorropia::Epetra::CostDescriber> costs,
240 Teuchos::RCP<const Epetra_MultiVector> coords,
241 Teuchos::RCP<const Epetra_MultiVector> weights,
247 QueryObject(Teuchos::RCP<const Epetra_RowMatrix> matrix,
248 Teuchos::RCP<const Isorropia::Epetra::CostDescriber> costs,
249 Teuchos::RCP<const Epetra_MultiVector> coords,
250 Teuchos::RCP<const Epetra_MultiVector> weights,
256 QueryObject( Teuchos::RCP<const Epetra_BlockMap> inputMap,
370 static void Object_List (
void * data,
int num_gid_entries,
int num_lid_entries,
371 ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids,
372 int weight_dim,
float * object_weights,
int * ierr );
378 static void Number_Edges_Multi (
void * data,
int num_gid_entries,
int num_lid_entries,
379 int num_obj, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids,
380 int *num_edges,
int * ierr );
384 static void Edge_List_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, ZOLTAN_ID_PTR neighbor_global_ids,
int * neighbor_procs,
387 int weight_dim,
float * edge_weights,
int * ierr );
393 static void HG_Size_CS (
void * data,
int* num_lists,
int* num_pins,
int* format,
397 static void HG_CS (
void * data,
int num_gid_entries,
int num_row_or_col,
int num_pins,
398 int format, ZOLTAN_ID_PTR vtxedge_GID,
int* vtxedge_ptr, ZOLTAN_ID_PTR pin_GID,
407 int num_gid_entries,
int num_lid_entries,
int num_edges,
int edge_weight_dim,
408 ZOLTAN_ID_PTR edge_GID, ZOLTAN_ID_PTR edge_LID,
float* edge_weights,
int* ierr);
416 static void Geom_Multi(
void *data,
int num_gid_entries,
int num_lid_entries,
417 int num_obj, ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids,
int num_dim,
418 double *geom_vec,
int *ierr);
429 #endif //ISORROPIA_EPETRA_ZOLTAN_QUERYOBJECT_H
431 #if defined(Isorropia_SHOW_DEPRECATED_WARNINGS)
433 #warning "The Isorropia package is deprecated"
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.
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.
QueryObject(Teuchos::RCP< const Epetra_CrsGraph > graph, Teuchos::RCP< const Isorropia::Epetra::CostDescriber > costs, int inputType)
Constructor.
int My_Number_Objects(int *ierr)
My_Number_Objects() returns the number of objects currently assigned to this process.
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.
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 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.
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.
virtual ~QueryObject()
Destructor.
int My_Number_Geom(int *ierr)
My_Number_Geom() is a query function used for geometric partitioning only.
const Epetra_BlockMap & RowMap(void)
Return the map associated with the object to be partitioned.
Definition: QueryObject.hpp:345
unsigned int myProc_
Definition: QueryObject.hpp:131
Teuchos::RCP< const Epetra_MultiVector > weights_
The MultiVector contains optional object (point) weights for geometric partitioning.
Definition: QueryObject.hpp:126
static const int graph_geometric_input_
input_type_ == graph_geometric_input_ This indicates that the Epetra_MultiVector represents graph and...
Definition: QueryObject.hpp:314
static const int simple_input_
input_type_ == simple_input_ This indicates that a simple method (block, cyclic, or random) will be u...
Definition: QueryObject.hpp:326
QueryObject is a class that contains the query functions required by the Zoltan library.
Definition: QueryObject.hpp:81
Teuchos::RCP< const Epetra_MultiVector > coords_
The MultiVector containing 1, 2 or 3 dimensional coordinates.
Definition: QueryObject.hpp:105
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.
Teuchos::RCP< const Epetra_RowMatrix > matrix_
The CrsMatrix.
Definition: QueryObject.hpp:98
static const int hgraph_graph_input_
input_type_ == hgraph_graph_input_ This indicates that the Epetra_MultiVector represents a hypergraph...
Definition: QueryObject.hpp:299
static const int hgraph2d_finegrain_input_
input_type_ == hgraph2d_finegrain_input_.
Definition: QueryObject.hpp:277
static const int hgraph_input_
input_type_ == hgraph_input_.
Definition: QueryObject.hpp:271
static const int hgraph_graph_geometric_input_
input_type_ == hgraph_graph_geometric_input_ This indicates that the Epetra_MultiVector represents a ...
Definition: QueryObject.hpp:321
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.
unsigned int base_
Definition: QueryObject.hpp:132
static int Number_Objects(void *data, int *ierr)
The interface to a particular QueryObject's My_Number_Objects query function.
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.
std::set< int > graph_self_edges_
Definition: QueryObject.hpp:129
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 ...
static const int geometric_input_
input_type_ == geometric_input_.
Definition: QueryObject.hpp:292
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 int Number_Geom(void *data, int *ierr)
The interface to a particular QueryObject's My_Number_Geom query function.
Teuchos::RCP< const Epetra_CrsGraph > graph_
The CrsGraph.
Definition: QueryObject.hpp:92
int input_type_
The input_type_ indicates how the object to be partitioned is to be interpreted - as a graph or a hyp...
Definition: QueryObject.hpp:341
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. ...
std::map< int, int > procmap_
Definition: QueryObject.hpp:128
const bool haveGraph_
haveGraph is true if we have CrsGraph, and not a CrsMatrix or a MultiVector.
Definition: QueryObject.hpp:87
bool haveVertexWeights()
Return true if any of the processes in the application have defined vertex weights.
const Epetra_BlockMap * colMap_
The graph or matrix column map.
Definition: QueryObject.hpp:113
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.
const Epetra_BlockMap * rowMap_
The graph or matrix row map, or the MultiVector map.
Definition: QueryObject.hpp:109
static const int unspecified_input_
input_type_ == unspecified_input_.
Definition: QueryObject.hpp:332
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.
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.
bool haveHypergraphEdgeWeights()
Return true if any of the processes in the application have defined hypergraph edge weights...
static const int graph_input_
input_type_ == graph_input_.
Definition: QueryObject.hpp:284
Teuchos::RCP< const Isorropia::Epetra::CostDescriber > costs_
The CostDescriber contains optional vertex and/or edge weights for graph and hypergraph partitioning...
Definition: QueryObject.hpp:119
bool haveGraphEdgeWeights()
Return true if any of the processes in the application have defined graph edge weights.
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 hgraph_geometric_input_
input_type_ == hgraph_geometric_input_ This indicates that the Epetra_MultiVector represents a hyperg...
Definition: QueryObject.hpp:306
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.