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


Public Member Functions | |
| GraphModel (const Adapter *ia, const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, modelFlag_t &modelFlags) | |
| Constructor. More... | |
| size_t | getLocalNumVertices () const |
| Returns the number vertices on this process. More... | |
| size_t | getGlobalNumVertices () const |
| Returns the global number vertices. More... | |
| size_t | getLocalNumGlobalEdges () const |
| Returns the number of global edges on this process. Includes remote edges. More... | |
| size_t | getLocalNumLocalEdges () const |
| Returns the number of local edges on this process. Does not include edges to off-process vertices. More... | |
| size_t | getGlobalNumEdges () const |
| Returns the global number edges. More... | |
| int | getVertexWeightDim () const |
| Returns the dimension (0 or greater) of vertex weights. More... | |
| int | getEdgeWeightDim () const |
| Returns the dimension (0 or greater) of edge weights. More... | |
| int | getCoordinateDim () const |
| Returns the dimension (0 to 3) of vertex coordinates. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| size_t | getLocalNumObjects () const |
| Return the local number of objects. More... | |
| size_t | getGlobalNumObjects () const |
| Return the global number of objects. More... | |
| void | getGlobalObjectIds (ArrayView< const gno_t > &gnos) const |
| Get a list of the global Ids for the local objects. More... | |
| RCP< const idmap_t > | getIdentifierMap () const |
| Return the map from user global identifiers to internal Zoltan2 global numbers. More... | |
| int | getNumWeights () const |
| Return the number of weights supplied for each object. If the user supplied no weights, dimension one is returned, because one dimension of uniform weights is implied. More... | |
| bool | uniformWeight (int weightDim) const |
| Return whether the weights are uniform or not. More... | |
Protected Member Functions | |
| void | setIdentifierMap (RCP< const idmap_t > &map) |
| Set the IdentifierMap used by the model. More... | |
| void | setWeightArrayLengths (const Array< lno_t > &len, const Teuchos::Comm< int > &comm) |
| Set the length of each weight array. The Model calls this in the constructor so we know which weights are uniform. If lengths for a given weight dimension are zero on all processes, then we know that uniform weights are implied. More... | |
Static Protected Member Functions | |
| template<typename T > | |
| static void | maxCount (const Comm< int > &comm, Array< T > &countValues) |
| Get the global maximum for each of an array of values. More... | |
| template<typename T > | |
| static void | maxCount (const Comm< int > &comm, T &value1) |
| Get the global maximum for a value. More... | |
| template<typename T > | |
| static void | maxCount (const Comm< int > &comm, T &value1, T &value2) |
| Get the global maximums for each of two values. More... | |
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 403 of file Zoltan2_GraphModel.hpp.
|
inline |
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 425 of file Zoltan2_GraphModel.hpp.
|
inline |
Returns the number vertices on this process.
Definition at line 434 of file Zoltan2_GraphModel.hpp.
|
inline |
Returns the global number vertices.
Definition at line 438 of file Zoltan2_GraphModel.hpp.
|
inline |
Returns the number of global edges on this process. Includes remote edges.
Definition at line 443 of file Zoltan2_GraphModel.hpp.
|
inline |
Returns the number of local edges on this process. Does not include edges to off-process vertices.
Definition at line 448 of file Zoltan2_GraphModel.hpp.
|
inline |
Returns the global number edges.
Definition at line 452 of file Zoltan2_GraphModel.hpp.
|
inline |
Returns the dimension (0 or greater) of vertex weights.
Definition at line 456 of file Zoltan2_GraphModel.hpp.
|
inline |
Returns the dimension (0 or greater) of edge weights.
Definition at line 460 of file Zoltan2_GraphModel.hpp.
|
inline |
Returns the dimension (0 to 3) of vertex coordinates.
Definition at line 464 of file Zoltan2_GraphModel.hpp.
|
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 476 of file Zoltan2_GraphModel.hpp.
|
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 497 of file Zoltan2_GraphModel.hpp.
|
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 524 of file Zoltan2_GraphModel.hpp.
|
inlinevirtual |
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 532 of file Zoltan2_GraphModel.hpp.
|
inlinevirtual |
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 534 of file Zoltan2_GraphModel.hpp.
|
inlinevirtual |
Get a list of the global Ids for the local objects.
Set a view to the list of object global numbers, which may be vertex IDs, matrix row IDs, identifiers, coordinate IDs, or mesh node or element IDs.
Implements Zoltan2::Model< Adapter >.
Definition at line 536 of file Zoltan2_GraphModel.hpp.
|
inlineinherited |
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 135 of file Zoltan2_Model.hpp.
|
inlineinherited |
Return the number of weights supplied for each object. If the user supplied no weights, dimension one is returned, because one dimension of uniform weights is implied.
The concrete subclasses, however, return the number of weights supplied by the user.
Definition at line 144 of file Zoltan2_Model.hpp.
|
inlineinherited |
Return whether the weights are uniform or not.
| weightDim | a value from 0 to one less than the number of weights. |
Definition at line 151 of file Zoltan2_Model.hpp.
|
inlineprotectedinherited |
Set the IdentifierMap used by the model.
The Model should set the identifier map with this call during the constructor.
Definition at line 184 of file Zoltan2_Model.hpp.
|
inlineprotectedinherited |
Set the length of each weight array. The Model calls this in the constructor so we know which weights are uniform. If lengths for a given weight dimension are zero on all processes, then we know that uniform weights are implied.
This must be called by all processes.
Definition at line 193 of file Zoltan2_Model.hpp.
|
inlinestaticprotectedinherited |
Get the global maximum for each of an array of values.
Certain counts may not be available from processes that have no data. Models should find the maximum value of the count across all processes to get the correct count. (Examples are coordinate dimension and weight dimension.)
Definition at line 241 of file Zoltan2_Model.hpp.
|
inlinestaticprotectedinherited |
Get the global maximum for a value.
Certain counts may not be available from processes that have no data. Models should find the maximum value of the count across all processes to get the correct count. (Examples are coordinate dimension and weight dimension.)
Definition at line 261 of file Zoltan2_Model.hpp.
|
inlinestaticprotectedinherited |
Get the global maximums for each of two values.
Certain counts may not be available from processes that have no data. Models should find the maximum value of the count across all processes to get the correct count. (Examples are coordinate dimension and weight dimension.)
Definition at line 276 of file Zoltan2_Model.hpp.
1.8.5