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

CommGraphModel defines the interface required for communication graph. More...

#include <Zoltan2_CommGraphModel.hpp>

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

Public Member Functions

 ~CommGraphModel ()
 Destructor. More...
 
 CommGraphModel (const RCP< const MatrixAdapter< user_t, userCoord_t > > &, const RCP< const Environment > &, const RCP< const Comm< int > > &, const modelFlag_t &modelflags=modelFlag_t())
 Constructor. More...
 
 CommGraphModel (const RCP< const GraphAdapter< user_t, userCoord_t > > &ia, const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, const modelFlag_t &modelflags=modelFlag_t())
 
 CommGraphModel (const RCP< const MeshAdapter< user_t > > &, const RCP< const Environment > &, const RCP< const Comm< int > > &, const modelFlag_t &modelflags=modelFlag_t())
 
 CommGraphModel (const RCP< const VectorAdapter< userCoord_t > > &, const RCP< const Environment > &, const RCP< const Comm< int > > &, const modelFlag_t &modelflags=modelFlag_t())
 
 CommGraphModel (const RCP< const IdentifierAdapter< user_t > > &, const RCP< const Environment > &, const RCP< const Comm< int > > &, const modelFlag_t &modelflags=modelFlag_t())
 
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...
 
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 getEdgeList (ArrayView< const gno_t > &edgeIds, ArrayView< const offset_t > &offsets, ArrayView< input_t > &wgts) const
 
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...
 
int getNumActiveRanks () const
 
int getDestinationRank () const
 
int getStartRank () const
 
int getEndRank () const
 
- Public Member Functions inherited from Zoltan2::Model< Adapter >
virtual ~Model ()
 
 Model ()
 

Detailed Description

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

CommGraphModel defines the interface required for communication graph.

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.

For now, this model only works with GraphAdapter (XpetraCrsGraphAdapter).

Definition at line 91 of file Zoltan2_CommGraphModel.hpp.

Constructor & Destructor Documentation

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

Destructor.

Definition at line 107 of file Zoltan2_CommGraphModel.hpp.

template<typename Adapter >
Zoltan2::CommGraphModel< Adapter >::CommGraphModel ( const RCP< const MatrixAdapter< user_t, userCoord_t > > &  ,
const RCP< const Environment > &  ,
const RCP< const Comm< int > > &  ,
const modelFlag_t modelflags = modelFlag_t() 
)
inline

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.

Definition at line 119 of file Zoltan2_CommGraphModel.hpp.

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

Definition at line 296 of file Zoltan2_CommGraphModel.hpp.

template<typename Adapter >
Zoltan2::CommGraphModel< Adapter >::CommGraphModel ( const RCP< const MeshAdapter< user_t > > &  ,
const RCP< const Environment > &  ,
const RCP< const Comm< int > > &  ,
const modelFlag_t modelflags = modelFlag_t() 
)
inline

Definition at line 130 of file Zoltan2_CommGraphModel.hpp.

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

Definition at line 137 of file Zoltan2_CommGraphModel.hpp.

template<typename Adapter >
Zoltan2::CommGraphModel< Adapter >::CommGraphModel ( const RCP< const IdentifierAdapter< user_t > > &  ,
const RCP< const Environment > &  ,
const RCP< const Comm< int > > &  ,
const modelFlag_t modelflags = modelFlag_t() 
)
inline

Definition at line 144 of file Zoltan2_CommGraphModel.hpp.

Member Function Documentation

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

Return the communicator used by the model.

Definition at line 153 of file Zoltan2_CommGraphModel.hpp.

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

Returns the number vertices on this process.

Definition at line 157 of file Zoltan2_CommGraphModel.hpp.

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

Returns the global number vertices.

Definition at line 161 of file Zoltan2_CommGraphModel.hpp.

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

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

Definition at line 166 of file Zoltan2_CommGraphModel.hpp.

template<typename Adapter >
size_t Zoltan2::CommGraphModel< 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 171 of file Zoltan2_CommGraphModel.hpp.

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

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

Definition at line 175 of file Zoltan2_CommGraphModel.hpp.

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

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

Definition at line 179 of file Zoltan2_CommGraphModel.hpp.

template<typename Adapter >
size_t Zoltan2::CommGraphModel< 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 189 of file Zoltan2_CommGraphModel.hpp.

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

Definition at line 202 of file Zoltan2_CommGraphModel.hpp.

template<typename Adapter >
void Zoltan2::CommGraphModel< 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 216 of file Zoltan2_CommGraphModel.hpp.

template<typename Adapter >
size_t Zoltan2::CommGraphModel< 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 229 of file Zoltan2_CommGraphModel.hpp.

template<typename Adapter >
size_t Zoltan2::CommGraphModel< 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 231 of file Zoltan2_CommGraphModel.hpp.

template<typename Adapter >
int Zoltan2::CommGraphModel< Adapter >::getNumActiveRanks ( ) const
inline

Definition at line 237 of file Zoltan2_CommGraphModel.hpp.

template<typename Adapter >
int Zoltan2::CommGraphModel< Adapter >::getDestinationRank ( ) const
inline

Definition at line 239 of file Zoltan2_CommGraphModel.hpp.

template<typename Adapter >
int Zoltan2::CommGraphModel< Adapter >::getStartRank ( ) const
inline

Definition at line 241 of file Zoltan2_CommGraphModel.hpp.

template<typename Adapter >
int Zoltan2::CommGraphModel< Adapter >::getEndRank ( ) const
inline

Definition at line 243 of file Zoltan2_CommGraphModel.hpp.


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