|
Zoltan2
|
GraphModel defines the interface required for graph models. More...
#include <Zoltan2_GraphModel.hpp>


Public Member Functions | |
| ~GraphModel () | |
| Destructor. | |
| GraphModel (const MatrixAdapter< user_t, userCoord_t > *ia, const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, modelFlag_t &modelFlags) | |
| Constructor. | |
| GraphModel (const GraphAdapter< user_t, userCoord_t > *ia, const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, modelFlag_t &modelFlags) | |
| GraphModel (const MeshAdapter< user_t > *ia, const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, modelFlag_t &modelflags) | |
| GraphModel (const VectorAdapter< userCoord_t > *ia, const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, modelFlag_t &flags) | |
| GraphModel (const IdentifierAdapter< user_t > *ia, const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, modelFlag_t &flags) | |
| size_t | getLocalNumVertices () const |
| Returns the number vertices on this process. | |
| size_t | getGlobalNumVertices () const |
| Returns the global number vertices. | |
| size_t | getLocalNumGlobalEdges () const |
| Returns the number of global edges on this process. Includes remote edges. | |
| size_t | getLocalNumLocalEdges () const |
| Returns the number of local edges on this process. Does not include edges to off-process vertices. | |
| size_t | getGlobalNumEdges () const |
| Returns the global number edges. | |
| int | getNumWeightsPerVertex () const |
| Returns the number (0 or greater) of weights per vertex. | |
| int | getNumWeightsPerEdge () const |
| Returns the number (0 or greater) of weights per edge. | |
| int | getCoordinateDim () const |
| Returns the dimension (0 to 3) of vertex coordinates. | |
| size_t | getVertexList (ArrayView< const gno_t > &Ids, ArrayView< input_t > &xyz, ArrayView< input_t > &wgts) const |
| Sets pointers to this process' vertex Ids and their weights. | |
| size_t | getEdgeList (ArrayView< const gno_t > &edgeIds, ArrayView< const int > &procIds, ArrayView< const lno_t > &offsets, ArrayView< input_t > &wgts) const |
| Sets pointers to this process' edge (neighbor) global Ids, including off-process edges. | |
| size_t | getLocalEdgeList (ArrayView< const lno_t > &edgeIds, ArrayView< const lno_t > &offsets, ArrayView< input_t > &wgts) |
| Sets pointers to this process' local-only edge (neighbor) LNOs, using the same implied vertex LNOs returned in getVertexList. | |
| size_t | getLocalNumObjects () const |
| Return the local number of objects. | |
| size_t | getGlobalNumObjects () const |
| Return the global number of objects. | |
| RCP< const idmap_t > | getIdentifierMap () const |
| Return the map from user global identifiers to internal Zoltan2 global numbers. | |
Protected Member Functions | |
| void | setIdentifierMap (RCP< const idmap_t > &map) |
| Set the IdentifierMap used by the model. | |
GraphModel defines the interface required for graph models.
The constructor of the GraphModel can be a global call, requiring all processes in the application to call it. The rest of the methods should be local methods.
The template parameter is an InputAdapter, which is an object that provides a uniform interface for models to the user's input data.
Definition at line 429 of file Zoltan2_GraphModel.hpp.
| Zoltan2::GraphModel< Adapter >::~GraphModel | ( | ) | [inline] |
Destructor.
Definition at line 446 of file Zoltan2_GraphModel.hpp.
| Zoltan2::GraphModel< Adapter >::GraphModel | ( | const MatrixAdapter< user_t, userCoord_t > * | ia, |
| const RCP< const Environment > & | env, | ||
| const RCP< const Comm< int > > & | comm, | ||
| modelFlag_t & | modelFlags | ||
| ) |
Constructor.
| inputAdapter | a pointer to the user's data |
| env | object containing the parameters |
| comm | communicator for the problem |
| modelFlags | a bit map of Zoltan2::GraphModelFlags |
All processes in the communicator must call the constructor.
Definition at line 698 of file Zoltan2_GraphModel.hpp.
| Zoltan2::GraphModel< Adapter >::GraphModel | ( | const GraphAdapter< user_t, userCoord_t > * | ia, |
| const RCP< const Environment > & | env, | ||
| const RCP< const Comm< int > > & | comm, | ||
| modelFlag_t & | modelFlags | ||
| ) |
Definition at line 782 of file Zoltan2_GraphModel.hpp.
| Zoltan2::GraphModel< Adapter >::GraphModel | ( | const MeshAdapter< user_t > * | ia, |
| const RCP< const Environment > & | env, | ||
| const RCP< const Comm< int > > & | comm, | ||
| modelFlag_t & | modelflags | ||
| ) |
Definition at line 868 of file Zoltan2_GraphModel.hpp.
| Zoltan2::GraphModel< Adapter >::GraphModel | ( | const VectorAdapter< userCoord_t > * | ia, |
| const RCP< const Environment > & | env, | ||
| const RCP< const Comm< int > > & | comm, | ||
| modelFlag_t & | flags | ||
| ) | [inline] |
Definition at line 471 of file Zoltan2_GraphModel.hpp.
| Zoltan2::GraphModel< Adapter >::GraphModel | ( | const IdentifierAdapter< user_t > * | ia, |
| const RCP< const Environment > & | env, | ||
| const RCP< const Comm< int > > & | comm, | ||
| modelFlag_t & | flags | ||
| ) | [inline] |
Definition at line 478 of file Zoltan2_GraphModel.hpp.
| size_t Zoltan2::GraphModel< Adapter >::getLocalNumVertices | ( | ) | const [inline] |
Returns the number vertices on this process.
Definition at line 487 of file Zoltan2_GraphModel.hpp.
| size_t Zoltan2::GraphModel< Adapter >::getGlobalNumVertices | ( | ) | const [inline] |
Returns the global number vertices.
Definition at line 491 of file Zoltan2_GraphModel.hpp.
| size_t Zoltan2::GraphModel< Adapter >::getLocalNumGlobalEdges | ( | ) | const [inline] |
Returns the number of global edges on this process. Includes remote edges.
Definition at line 496 of file Zoltan2_GraphModel.hpp.
| size_t Zoltan2::GraphModel< Adapter >::getLocalNumLocalEdges | ( | ) | const [inline] |
Returns the number of local edges on this process. Does not include edges to off-process vertices.
Definition at line 501 of file Zoltan2_GraphModel.hpp.
| size_t Zoltan2::GraphModel< Adapter >::getGlobalNumEdges | ( | ) | const [inline] |
Returns the global number edges.
Definition at line 505 of file Zoltan2_GraphModel.hpp.
| int Zoltan2::GraphModel< Adapter >::getNumWeightsPerVertex | ( | ) | const [inline] |
Returns the number (0 or greater) of weights per vertex.
Definition at line 509 of file Zoltan2_GraphModel.hpp.
| int Zoltan2::GraphModel< Adapter >::getNumWeightsPerEdge | ( | ) | const [inline] |
Returns the number (0 or greater) of weights per edge.
Definition at line 513 of file Zoltan2_GraphModel.hpp.
| int Zoltan2::GraphModel< Adapter >::getCoordinateDim | ( | ) | const [inline] |
Returns the dimension (0 to 3) of vertex coordinates.
Definition at line 517 of file Zoltan2_GraphModel.hpp.
| size_t Zoltan2::GraphModel< Adapter >::getVertexList | ( | ArrayView< const gno_t > & | Ids, |
| ArrayView< input_t > & | xyz, | ||
| ArrayView< input_t > & | wgts | ||
| ) | const [inline] |
Sets pointers to this process' vertex Ids and their weights.
| Ids | will on return point to the list of the global Ids for each vertex on this process. |
| xyz | If vertex coordinate data is available, xyz will on return point to a StridedData object of coordinates. |
| wgts | If vertex weights is available, wgts will on return point to a StridedData object of weights. |
Definition at line 529 of file Zoltan2_GraphModel.hpp.
| size_t Zoltan2::GraphModel< Adapter >::getEdgeList | ( | ArrayView< const gno_t > & | edgeIds, |
| ArrayView< const int > & | procIds, | ||
| ArrayView< const lno_t > & | offsets, | ||
| ArrayView< input_t > & | wgts | ||
| ) | const [inline] |
Sets pointers to this process' edge (neighbor) global Ids, including off-process edges.
| edgeIds | This is the list of global neighbor Ids corresponding to the vertices listed in getVertexList. |
| procIds | lists the process owning each neighbor in the edgeIds list. |
| offsets | offsets[i] is the offset into edgeIds to the start of neighbors for ith vertex. |
| wgts | If edge weights is available, wgts will on return point to a StridedData object of weights. |
Definition at line 566 of file Zoltan2_GraphModel.hpp.
| size_t Zoltan2::GraphModel< Adapter >::getLocalEdgeList | ( | ArrayView< const lno_t > & | edgeIds, |
| ArrayView< const lno_t > & | offsets, | ||
| ArrayView< input_t > & | wgts | ||
| ) | [inline] |
Sets pointers to this process' local-only edge (neighbor) LNOs, using the same implied vertex LNOs returned in getVertexList.
Local only means the neighbor vertex is owned by this process.
| edgeIds | lists the only neighbors of the vertices in getVertexList which are on this process. The Id returned is not the neighbor's global Id, but rather the index of the neighbor in the list returned by getVertexList. |
| offsets | offsets[i] is the offset into edgeIds to the start of neighbors for ith vertex returned in getVertexList. |
| wgts | If edge weights is available, wgts will on return point to a StridedData object of weights. |
This method is not const, because a local edge list is not created unless this method is called.
Note that if there are no local edges, the edgeIds, offsets and wgts are returned as empty arrays.
Definition at line 609 of file Zoltan2_GraphModel.hpp.
| size_t Zoltan2::GraphModel< Adapter >::getLocalNumObjects | ( | ) | const [inline, virtual] |
Return the local number of objects.
Return the local number of objects, which may be vertices, matrix rows, identifiers, coordinates, or mesh nodes or elements.
Implements Zoltan2::Model< Adapter >.
Definition at line 637 of file Zoltan2_GraphModel.hpp.
| size_t Zoltan2::GraphModel< Adapter >::getGlobalNumObjects | ( | ) | const [inline, virtual] |
Return the global number of objects.
Return the global number of objects, which may be vertices, matrix rows, identifiers, coordinates, or mesh nodes or elements.
Implements Zoltan2::Model< Adapter >.
Definition at line 639 of file Zoltan2_GraphModel.hpp.
| RCP<const idmap_t > Zoltan2::Model< Adapter >::getIdentifierMap | ( | ) | const [inline, inherited] |
Return the map from user global identifiers to internal Zoltan2 global numbers.
Every model must have an IdentifierMap, whether it needs for mapping or not. The Map can simply indicate that Zoltan2 global numbers are identical to the application's global IDs.
Definition at line 139 of file Zoltan2_Model.hpp.
| void Zoltan2::Model< Adapter >::setIdentifierMap | ( | RCP< const idmap_t > & | map | ) | [inline, protected, inherited] |
Set the IdentifierMap used by the model.
The Model should set the identifier map with this call during the constructor.
Definition at line 165 of file Zoltan2_Model.hpp.
1.7.6.1