40 #ifndef _Isorropia_TpetraCostDescriber_hpp_ 41 #define _Isorropia_TpetraCostDescriber_hpp_ 45 #include <Teuchos_RCP.hpp> 46 #include <Teuchos_ParameterList.hpp> 53 #ifdef HAVE_ISORROPIA_TPETRA 55 #include <Kokkos_DefaultNode.hpp> 56 #include <Tpetra_Vector_decl.hpp> 57 #include <Tpetra_CrsMatrix_decl.hpp> 122 template <typename Node = ::Tpetra::Map<int, int>::node_type >
151 void setVertexWeights(Teuchos::RCP<const ::Tpetra::Vector<double,int,int,Node> > vwgts);
164 void setGraphEdgeWeights(Teuchos::RCP<const ::Tpetra::CrsMatrix<double,int,int,Node> > gewts);
175 void setHypergraphEdgeWeights(Teuchos::RCP<const ::Tpetra::Vector<double,int,int,Node> > hgewts);
193 void setHypergraphEdgeWeights(
int numHGedges,
const int *hgGIDs,
const float *hgEwgts);
196 void setHypergraphEdgeWeights(
int numHGedges,
const int *hgGIDs,
const double *hgEwgts);
206 void getCosts(std::map<int, float > &vertexWeights,
207 std::map<
int, std::map<int, float > > &graphEdgeWeights,
208 std::map<int, float > &hypergraphEdgeWeights)
const;
212 void show_cd(std::ostream &)
const;
218 void setParameters(
const Teuchos::ParameterList& paramlist);
222 bool haveVertexWeights()
const;
225 int getNumVertices()
const;
228 void getVertexWeights(
int numVertices,
229 int* global_ids,
float* weights)
const;
232 bool haveGraphEdgeWeights()
const;
235 int getNumGraphEdges(
int vertex_global_id)
const;
241 int getGraphEdgeVertices(std::set<int> &gids)
const;
246 void getGraphEdgeWeights(
int vertex_global_id,
248 int* neighbor_global_ids,
249 float* weights)
const;
252 bool haveHypergraphEdgeWeights()
const;
255 int getNumHypergraphEdgeWeights()
const;
258 void getHypergraphEdgeWeights(
int numEdges,
260 float* weights)
const;
267 int getHypergraphEdgeWeights(std::map<int, float> &wgtMap)
const;
275 int getVertexWeights(std::map<int, float> &wgtMap)
const;
286 int getGraphEdgeWeights(
int vertex_global_id, std::map<int, float> &wgtMap)
const;
293 bool haveGlobalVertexWeights()
const;
298 void setNumGlobalVertexWeights(
int num);
303 bool haveGlobalGraphEdgeWeights()
const;
308 void setNumGlobalGraphEdgeWeights(
int num);
313 bool haveGlobalHypergraphEdgeWeights()
const;
318 void setNumGlobalHypergraphEdgeWeights(
int num);
322 void allocate_hg_edge_weights_(
int n);
326 void free_hg_edge_weights_();
328 Teuchos::RCP<const ::Tpetra::Vector<double,int,int,Node> > vertex_weights_;
329 Teuchos::RCP<const ::Tpetra::CrsMatrix<double,int,int,Node> > graph_edge_weights_;
330 std::set<int> graph_self_edges_;
332 Teuchos::ParameterList paramlist_;
335 float *hg_edge_weights_;
336 int num_hg_edge_weights_;
338 int numGlobalVertexWeights_;
339 int numGlobalGraphEdgeWeights_;
340 int numGlobalHypergraphEdgeWeights_;
354 int getEdges(
int vertexGID,
int len,
int *nborGID,
float *weights)
const;
Isorropia is the namespace that contains general definitions that apply to all partitioners and that ...
Definition: Isorropia_Epetra.hpp:60
Interface (abstract base class) for describing the weights or costs associated with the vertices and/...
Definition: Isorropia_CostDescriber.hpp:61