Zoltan2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
Zoltan2::GraphModel< Adapter > Class Template Reference

GraphModel defines the interface required for graph models. More...

#include <Zoltan2_GraphModel.hpp>

Inheritance diagram for Zoltan2::GraphModel< Adapter >:
Inheritance graph
[legend]
Collaboration diagram for Zoltan2::GraphModel< Adapter >:
Collaboration graph
[legend]

Public Member Functions

 ~GraphModel ()
 Destructor. More...
 
 GraphModel (const RCP< const MatrixAdapter< user_t, userCoord_t > > &ia, const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, modelFlag_t &modelFlags)
 Constructor. More...
 
 GraphModel (const RCP< const GraphAdapter< user_t, userCoord_t > > &ia, const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, modelFlag_t &modelFlags)
 
 GraphModel (const RCP< const MeshAdapter< user_t > > &ia, const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, modelFlag_t &modelflags)
 
 GraphModel (const RCP< const VectorAdapter< userCoord_t > > &, const RCP< const Environment > &, const RCP< const Comm< int > > &, modelFlag_t &)
 
 GraphModel (const RCP< const IdentifierAdapter< user_t > > &ia, const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, modelFlag_t &flags)
 
const RCP< const Comm< int > > getComm ()
 Return the communicator used by the model. 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 getLocalNumEdges () const
 Returns the number of edges on this process. In global or subset graphs, includes off-process edges. More...
 
size_t getGlobalNumEdges () const
 Returns the global number edges. For local graphs, the number of global edges is the number of local edges. More...
 
int getNumWeightsPerVertex () const
 Returns the number (0 or greater) of weights per vertex. More...
 
int getNumWeightsPerEdge () const
 Returns the number (0 or greater) of weights per edge. 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 > &wgts) const
 Sets pointers to this process' vertex Ids and their weights. More...
 
size_t getVertexCoords (ArrayView< input_t > &xyz) const
 Sets pointers to this process' vertex coordinates, if available. Order of coordinate info matches that of Ids in getVertexList(). More...
 
size_t getEdgeList (ArrayView< const gno_t > &edgeIds, ArrayView< const offset_t > &offsets, ArrayView< input_t > &wgts) const
 Sets pointers to this process' edge (neighbor) global Ids, including off-process edges. More...
 
void getVertexDist (ArrayView< size_t > &vtxdist) const
 Return the vtxDist array Array of size comm->getSize() + 1 Array[n+1] - Array[n] is number of vertices on rank n. More...
 
size_t getLocalNumObjects () const
 Return the local number of objects. More...
 
size_t getGlobalNumObjects () const
 Return the global number of objects. More...
 
- Public Member Functions inherited from Zoltan2::Model< Adapter >
virtual ~Model ()
 
 Model ()
 

Detailed Description

template<typename Adapter>
class Zoltan2::GraphModel< Adapter >

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.

GraphModels may represent a local (on-process) graph or a global (all-communicator) graph.

Definition at line 44 of file Zoltan2_GraphModel.hpp.

Constructor & Destructor Documentation

template<typename Adapter>
Zoltan2::GraphModel< Adapter >::~GraphModel ( )
inline

Destructor.

Definition at line 60 of file Zoltan2_GraphModel.hpp.

template<typename Adapter >
Zoltan2::GraphModel< Adapter >::GraphModel ( const RCP< const MatrixAdapter< user_t, userCoord_t > > &  ia,
const RCP< const Environment > &  env,
const RCP< const Comm< int > > &  comm,
modelFlag_t modelFlags 
)

Constructor.

Parameters
inputAdaptera pointer to the user's data
envobject containing the parameters
commcommunicator for the problem
modelFlagsa bit map of Zoltan2::GraphModelFlags

All processes in the communicator must call the constructor.

Todo:
document the model flags that might be set

Definition at line 267 of file Zoltan2_GraphModel.hpp.

template<typename Adapter >
Zoltan2::GraphModel< Adapter >::GraphModel ( const RCP< const GraphAdapter< user_t, userCoord_t > > &  ia,
const RCP< const Environment > &  env,
const RCP< const Comm< int > > &  comm,
modelFlag_t modelFlags 
)

Definition at line 350 of file Zoltan2_GraphModel.hpp.

template<typename Adapter >
Zoltan2::GraphModel< Adapter >::GraphModel ( const RCP< const MeshAdapter< user_t > > &  ia,
const RCP< const Environment > &  env,
const RCP< const Comm< int > > &  comm,
modelFlag_t modelflags 
)

Definition at line 434 of file Zoltan2_GraphModel.hpp.

template<typename Adapter>
Zoltan2::GraphModel< Adapter >::GraphModel ( const RCP< const VectorAdapter< userCoord_t > > &  ,
const RCP< const Environment > &  ,
const RCP< const Comm< int > > &  ,
modelFlag_t  
)
inline

Definition at line 85 of file Zoltan2_GraphModel.hpp.

template<typename Adapter>
Zoltan2::GraphModel< Adapter >::GraphModel ( const RCP< const IdentifierAdapter< user_t > > &  ia,
const RCP< const Environment > &  env,
const RCP< const Comm< int > > &  comm,
modelFlag_t flags 
)
inline

Definition at line 92 of file Zoltan2_GraphModel.hpp.

Member Function Documentation

template<typename Adapter>
const RCP<const Comm<int> > Zoltan2::GraphModel< Adapter >::getComm ( )
inline

Return the communicator used by the model.

Definition at line 101 of file Zoltan2_GraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::GraphModel< Adapter >::getLocalNumVertices ( ) const
inline

Returns the number vertices on this process.

Definition at line 105 of file Zoltan2_GraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::GraphModel< Adapter >::getGlobalNumVertices ( ) const
inline

Returns the global number vertices.

Definition at line 109 of file Zoltan2_GraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::GraphModel< Adapter >::getLocalNumEdges ( ) const
inline

Returns the number of edges on this process. In global or subset graphs, includes off-process edges.

Definition at line 114 of file Zoltan2_GraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::GraphModel< Adapter >::getGlobalNumEdges ( ) const
inline

Returns the global number edges. For local graphs, the number of global edges is the number of local edges.

Definition at line 119 of file Zoltan2_GraphModel.hpp.

template<typename Adapter>
int Zoltan2::GraphModel< Adapter >::getNumWeightsPerVertex ( ) const
inline

Returns the number (0 or greater) of weights per vertex.

Definition at line 123 of file Zoltan2_GraphModel.hpp.

template<typename Adapter>
int Zoltan2::GraphModel< Adapter >::getNumWeightsPerEdge ( ) const
inline

Returns the number (0 or greater) of weights per edge.

Definition at line 127 of file Zoltan2_GraphModel.hpp.

template<typename Adapter>
int Zoltan2::GraphModel< Adapter >::getCoordinateDim ( ) const
inline

Returns the dimension (0 to 3) of vertex coordinates.

Definition at line 131 of file Zoltan2_GraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::GraphModel< Adapter >::getVertexList ( ArrayView< const gno_t > &  Ids,
ArrayView< input_t > &  wgts 
) const
inline

Sets pointers to this process' vertex Ids and their weights.

Parameters
Idswill on return point to the list of the global Ids for each vertex on this process.
wgtsIf vertex weights is available, wgts will on return point to a StridedData object of weights.

Definition at line 141 of file Zoltan2_GraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::GraphModel< Adapter >::getVertexCoords ( ArrayView< input_t > &  xyz) const
inline

Sets pointers to this process' vertex coordinates, if available. Order of coordinate info matches that of Ids in getVertexList().

Parameters
xyzIf vertex coordinate data is available, xyz will on return point to a StridedData object of coordinates.

Definition at line 156 of file Zoltan2_GraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::GraphModel< Adapter >::getEdgeList ( ArrayView< const gno_t > &  edgeIds,
ArrayView< const offset_t > &  offsets,
ArrayView< input_t > &  wgts 
) const
inline

Sets pointers to this process' edge (neighbor) global Ids, including off-process edges.

Parameters
edgeIdsThis is the list of global neighbor Ids corresponding to the vertices listed in getVertexList.
offsetsoffsets[i] is the offset into edgeIds to the start of neighbors for ith vertex.
wgtsIf edge weights is available, wgts will on return point to a StridedData object of weights.
Returns
The number of ids in the edgeIds list.

Definition at line 177 of file Zoltan2_GraphModel.hpp.

template<typename Adapter>
void Zoltan2::GraphModel< Adapter >::getVertexDist ( ArrayView< size_t > &  vtxdist) const
inline

Return the vtxDist array Array of size comm->getSize() + 1 Array[n+1] - Array[n] is number of vertices on rank n.

Definition at line 191 of file Zoltan2_GraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::GraphModel< Adapter >::getLocalNumObjects ( ) const
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 204 of file Zoltan2_GraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::GraphModel< Adapter >::getGlobalNumObjects ( ) const
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 206 of file Zoltan2_GraphModel.hpp.


The documentation for this class was generated from the following file: