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. More... | |
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. More... | |
MueLuGraphBaseAdapter (const RCP< const User > &ingraph, int nVtxWeights=0, int nEdgeWeights=0) | |
Constructor for graph with no weights or coordinates. More... | |
void | setWeights (const scalar_t *val, int stride, int idx) |
Provide a pointer to weights for the primary entity type. More... | |
void | setVertexWeights (const scalar_t *val, int stride, int idx) |
Provide a pointer to vertex weights. More... | |
void | setWeightIsDegree (int idx) |
Specify an index for which the weight should be the degree of the entity. More... | |
void | setVertexWeightIsDegree (int idx) |
Specify an index for which the vertex weight should be the degree of the vertex. More... | |
void | setEdgeWeights (const scalar_t *val, int stride, int idx) |
Provide a pointer to edge weights. More... | |
RCP< const xgraph_t > | getXpetraGraph () const |
Access to Xpetra-wrapped user's graph. More... | |
RCP< const User > | getUserGraph () const |
Access to user's graph. More... | |
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 49 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Destructor.
Definition at line 83 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 266 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
MueLu::GraphBase Compatibility Layer.
Definition at line 64 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 65 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 66 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 73 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 74 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 75 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 77 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 is k , then val[n * k] is the weight for the n th entity for index . |
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 320 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 is k , then val[n * k] is the weight for the n th vertex for index . |
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 330 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 348 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 363 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 is k , then val[n * k] is the weight for the n th edge for index . |
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 377 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Access to Xpetra-wrapped user's graph.
Definition at line 168 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Access to user's graph.
Definition at line 172 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 184 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 186 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 192 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 194 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 199 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 201 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 214 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 216 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 218 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 231 of file MueLu_Zoltan2GraphAdapter.hpp.
|
inline |
Definition at line 237 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 243 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 244 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 245 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 247 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 248 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 250 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 251 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 252 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 254 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 255 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 257 of file MueLu_Zoltan2GraphAdapter.hpp.
|
private |
Definition at line 258 of file MueLu_Zoltan2GraphAdapter.hpp.