MueLu Version of the Day
|
#include <MueLu_Zoltan2GraphAdapter.hpp>
Public Member Functions | |
const Teuchos::RCP< const Teuchos::Comm< int > > | getComm () const |
MueLu::GraphBase Compatibility Layer. | |
const Teuchos::RCP< const Xpetra::Map< lno_t, gno_t, node_t > > | getRowMap () const |
const RCP< const Xpetra::Map< lno_t, gno_t, node_t > > | getColMap () const |
size_t | getLocalNumEntries () const |
size_t | getLocalNumRows () const |
size_t | getLocalNumCols () const |
void | getLocalRowView (lno_t LocalRow, Teuchos::ArrayView< const lno_t > &indices) const |
~MueLuGraphBaseAdapter () | |
Destructor. | |
MueLuGraphBaseAdapter (const RCP< const User > &ingraph, int nVtxWeights=0, int nEdgeWeights=0) | |
Constructor for graph with no weights or coordinates. | |
void | setWeights (const scalar_t *val, int stride, int idx) |
Provide a pointer to weights for the primary entity type. | |
void | setVertexWeights (const scalar_t *val, int stride, int idx) |
Provide a pointer to vertex weights. | |
void | setWeightIsDegree (int idx) |
Specify an index for which the weight should be the degree of the entity. | |
void | setVertexWeightIsDegree (int idx) |
Specify an index for which the vertex weight should be the degree of the vertex. | |
void | setEdgeWeights (const scalar_t *val, int stride, int idx) |
Provide a pointer to edge weights. | |
RCP< const xgraph_t > | getXpetraGraph () const |
Access to Xpetra-wrapped user's graph. | |
RCP< const User > | getUserGraph () const |
Access to user's graph. | |
size_t | getLocalNumVertices () const |
void | getVertexIDsView (const gno_t *&ids) const |
size_t | getLocalNumEdges () const |
void | getEdgesView (const offset_t *&offsets, const gno_t *&adjIds) const |
int | getNumWeightsPerVertex () const |
void | getVertexWeightsView (const scalar_t *&weights, int &stride, int idx) const |
bool | useDegreeAsVertexWeight (int idx) const |
int | getNumWeightsPerEdge () const |
void | getEdgeWeightsView (const scalar_t *&weights, int &stride, int idx) const |
template<typename Adapter > | |
void | applyPartitioningSolution (const User &in, User *&out, const Zoltan2::PartitioningSolution< Adapter > &solution) const |
template<typename Adapter > | |
void | applyPartitioningSolution (const User &in, RCP< User > &out, const Zoltan2::PartitioningSolution< Adapter > &solution) const |
Private Attributes | |
RCP< const User > | ingraph_ |
RCP< const xgraph_t > | graph_ |
RCP< const Teuchos::Comm< int > > | comm_ |
ArrayRCP< const offset_t > | offs_ |
ArrayRCP< const gno_t > | adjids_ |
int | nWeightsPerVertex_ |
ArrayRCP< Zoltan2::StridedData< lno_t, scalar_t > > | vertexWeights_ |
ArrayRCP< bool > | vertexDegreeWeight_ |
int | nWeightsPerEdge_ |
ArrayRCP< Zoltan2::StridedData< lno_t, scalar_t > > | edgeWeights_ |
int | coordinateDim_ |
ArrayRCP< Zoltan2::StridedData< lno_t, scalar_t > > | coords_ |
Definition at line 90 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Destructor.
Definition at line 127 of file MueLu_Zoltan2GraphAdapter.hpp.
MueLu::MueLuGraphBaseAdapter< User, UserCoord >::MueLuGraphBaseAdapter | ( | const RCP< const User > & | ingraph, |
int | nVtxWeights = 0, | ||
int | nEdgeWeights = 0 ) |
Constructor for graph with no weights or coordinates.
ingraph | the Epetra_CrsGraph, Tpetra::CrsGraph or Xpetra::CrsGraph |
numVtxWeights | the number of weights per vertex (default = 0) |
numEdgeWeights | the number of weights per edge (default = 0) |
Most adapters do not have RCPs in their interface. This one does because the user is obviously a Trilinos user.
Definition at line 323 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
MueLu::GraphBase Compatibility Layer.
Definition at line 106 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 107 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 108 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 115 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 116 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 117 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 119 of file MueLu_Zoltan2GraphAdapter.hpp.
void MueLu::MueLuGraphBaseAdapter< User, UserCoord >::setWeights | ( | const scalar_t * | val, |
int | stride, | ||
int | idx ) |
Provide a pointer to weights for the primary entity type.
val | A pointer to the weights for index idx . |
stride | A stride for the val array. If \stride is k , then val[n * k] is the weight for the n th entity for index \idx. |
idx | A number from 0 to one less than weight idx specified in the constructor. |
The order of the weights should match the order that entities appear in the input data structure.
Definition at line 372 of file MueLu_Zoltan2GraphAdapter.hpp.
void MueLu::MueLuGraphBaseAdapter< User, UserCoord >::setVertexWeights | ( | const scalar_t * | val, |
int | stride, | ||
int | idx ) |
Provide a pointer to vertex weights.
val | A pointer to the weights for index idx . |
stride | A stride for the val array. If \stride is k , then val[n * k] is the weight for the n th vertex for index \idx. |
idx | A number from 0 to one less than number of vertex weights specified in the constructor. |
The order of the vertex weights should match the order that vertices appear in the input data structure.
Definition at line 383 of file MueLu_Zoltan2GraphAdapter.hpp.
void MueLu::MueLuGraphBaseAdapter< User, UserCoord >::setWeightIsDegree | ( | int | idx | ) |
Specify an index for which the weight should be the degree of the entity.
idx | Zoltan2 will use the entity's degree as the entity weight for index idx . |
Definition at line 403 of file MueLu_Zoltan2GraphAdapter.hpp.
void MueLu::MueLuGraphBaseAdapter< User, UserCoord >::setVertexWeightIsDegree | ( | int | idx | ) |
Specify an index for which the vertex weight should be the degree of the vertex.
idx | Zoltan2 will use the vertex's degree as the vertex weight for index idx . |
Definition at line 419 of file MueLu_Zoltan2GraphAdapter.hpp.
void MueLu::MueLuGraphBaseAdapter< User, UserCoord >::setEdgeWeights | ( | const scalar_t * | val, |
int | stride, | ||
int | idx ) |
Provide a pointer to edge weights.
val | A pointer to the weights for index idx . |
stride | A stride for the val array. If \stride is k , then val[n * k] is the weight for the n th edge for index \idx. |
dim | A number from 0 to one less than the number of edge weights specified in the constructor. |
The order of the edge weights should follow the order that the the vertices and edges appear in the input data structure.
By vertex:
Then by vertex neighbor:
Definition at line 435 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Access to Xpetra-wrapped user's graph.
Definition at line 212 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Access to user's graph.
Definition at line 216 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 228 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 230 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 237 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 239 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 245 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 247 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 263 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 265 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 267 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 284 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 290 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 298 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 299 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 300 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 302 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 303 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 305 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 306 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 307 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 309 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 310 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 312 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 313 of file MueLu_Zoltan2GraphAdapter.hpp.