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

HyperGraphModel defines the interface required for hyper graph models. More...

#include <Zoltan2_HyperGraphModel.hpp>

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

Public Member Functions

 ~HyperGraphModel ()
 Destructor. More...
 
 HyperGraphModel (const RCP< const MatrixAdapter< user_t, userCoord_t > > &ia, const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, modelFlag_t &modelFlags, CentricView view)
 Constructor. More...
 
 HyperGraphModel (const RCP< const GraphAdapter< user_t, userCoord_t > > &ia, const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, modelFlag_t &modelFlags, CentricView view)
 
 HyperGraphModel (const RCP< const MeshAdapter< user_t > > &ia, const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, modelFlag_t &modelflags, CentricView view)
 
 HyperGraphModel (const RCP< const VectorAdapter< userCoord_t > > &ia, const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, modelFlag_t &flags, CentricView view)
 
 HyperGraphModel (const RCP< const IdentifierAdapter< user_t > > &ia, const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, modelFlag_t &flags, CentricView view)
 
CentricView getCentricView () const
 Returns the centric view of the hypergraph. More...
 
bool areVertexIDsUnique () const
 Returns true if the vertices are unique false otherwise. More...
 
size_t getLocalNumVertices () const
 Returns the number vertices on this process. More...
 
size_t getLocalNumOwnedVertices () const
 Returns the number vertices on this process that are owned. More...
 
size_t getGlobalNumVertices () const
 Returns the global number vertices. More...
 
size_t getLocalNumHyperEdges () const
 Returns the number of hyper edges on this process. These are all hyper edges that have an adjacency to at least one on process vertex. More...
 
size_t getGlobalNumHyperEdges () const
 Returns the global number hyper edges. More...
 
size_t getLocalNumPins () const
 Returns the local number of pins. More...
 
int getNumWeightsPerVertex () const
 Returns the number (0 or greater) of weights per vertex. More...
 
int getNumWeightsPerHyperEdge () const
 Returns the number (0 or greater) of weights per edge. More...
 
int getNumWeightesPerPin () const
 Returns the number (0 or greater) of weights per pins. 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. More...
 
size_t getOwnedList (ArrayView< bool > &isOwner) const
 Sets pointer to the ownership of this processes vertices. More...
 
void getVertexMaps (Teuchos::RCP< const map_t > &copiesMap, Teuchos::RCP< const map_t > &onetooneMap) const
 Sets pointers to the vertex map with copies and the vertex map without copies Note: the pointers will not exist if the hypergraph has unique vertices check the areVertexIDsUnique() function before calling this function. More...
 
size_t getEdgeList (ArrayView< const gno_t > &Ids, ArrayView< input_t > &wgts) const
 Sets pointers to this process' hyperedge Ids and their weights. More...
 
size_t getPinList (ArrayView< const gno_t > &pinIds, ArrayView< const offset_t > &offsets, ArrayView< input_t > &wgts) const
 Sets pointers to this process' pins global Ids based on the centric view given by getCentricView() 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::HyperGraphModel< Adapter >

HyperGraphModel defines the interface required for hyper graph models.

The constructor of the HyperGraphModel 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 90 of file Zoltan2_HyperGraphModel.hpp.

Constructor & Destructor Documentation

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

Destructor.

Definition at line 107 of file Zoltan2_HyperGraphModel.hpp.

template<typename Adapter>
Zoltan2::HyperGraphModel< Adapter >::HyperGraphModel ( const RCP< const MatrixAdapter< user_t, userCoord_t > > &  ia,
const RCP< const Environment > &  env,
const RCP< const Comm< int > > &  comm,
modelFlag_t modelFlags,
CentricView  view 
)
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.

Todo:
document the model flags that might be set

Definition at line 120 of file Zoltan2_HyperGraphModel.hpp.

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

Definition at line 127 of file Zoltan2_HyperGraphModel.hpp.

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

Definition at line 371 of file Zoltan2_HyperGraphModel.hpp.

template<typename Adapter>
Zoltan2::HyperGraphModel< Adapter >::HyperGraphModel ( const RCP< const VectorAdapter< userCoord_t > > &  ia,
const RCP< const Environment > &  env,
const RCP< const Comm< int > > &  comm,
modelFlag_t flags,
CentricView  view 
)
inline

Definition at line 138 of file Zoltan2_HyperGraphModel.hpp.

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

Definition at line 145 of file Zoltan2_HyperGraphModel.hpp.

Member Function Documentation

template<typename Adapter>
CentricView Zoltan2::HyperGraphModel< Adapter >::getCentricView ( ) const
inline

Returns the centric view of the hypergraph.

Definition at line 155 of file Zoltan2_HyperGraphModel.hpp.

template<typename Adapter>
bool Zoltan2::HyperGraphModel< Adapter >::areVertexIDsUnique ( ) const
inline

Returns true if the vertices are unique false otherwise.

Definition at line 159 of file Zoltan2_HyperGraphModel.hpp.

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

Returns the number vertices on this process.

Definition at line 163 of file Zoltan2_HyperGraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::HyperGraphModel< Adapter >::getLocalNumOwnedVertices ( ) const
inline

Returns the number vertices on this process that are owned.

Definition at line 167 of file Zoltan2_HyperGraphModel.hpp.

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

Returns the global number vertices.

Definition at line 171 of file Zoltan2_HyperGraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::HyperGraphModel< Adapter >::getLocalNumHyperEdges ( ) const
inline

Returns the number of hyper edges on this process. These are all hyper edges that have an adjacency to at least one on process vertex.

Definition at line 177 of file Zoltan2_HyperGraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::HyperGraphModel< Adapter >::getGlobalNumHyperEdges ( ) const
inline

Returns the global number hyper edges.

Definition at line 181 of file Zoltan2_HyperGraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::HyperGraphModel< Adapter >::getLocalNumPins ( ) const
inline

Returns the local number of pins.

Definition at line 185 of file Zoltan2_HyperGraphModel.hpp.

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

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

Definition at line 189 of file Zoltan2_HyperGraphModel.hpp.

template<typename Adapter>
int Zoltan2::HyperGraphModel< Adapter >::getNumWeightsPerHyperEdge ( ) const
inline

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

Definition at line 193 of file Zoltan2_HyperGraphModel.hpp.

template<typename Adapter>
int Zoltan2::HyperGraphModel< Adapter >::getNumWeightesPerPin ( ) const
inline

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

Definition at line 197 of file Zoltan2_HyperGraphModel.hpp.

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

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

Definition at line 201 of file Zoltan2_HyperGraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::HyperGraphModel< 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 210 of file Zoltan2_HyperGraphModel.hpp.

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

Sets pointers to this process' vertex coordinates, if available.

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

Definition at line 225 of file Zoltan2_HyperGraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::HyperGraphModel< Adapter >::getOwnedList ( ArrayView< bool > &  isOwner) const
inline

Sets pointer to the ownership of this processes vertices.

Parameters
isOwnerwill on return point to the list of ownership for each vertex on this process, true if this process owns the vertex false otherwise.

Definition at line 238 of file Zoltan2_HyperGraphModel.hpp.

template<typename Adapter>
void Zoltan2::HyperGraphModel< Adapter >::getVertexMaps ( Teuchos::RCP< const map_t > &  copiesMap,
Teuchos::RCP< const map_t > &  onetooneMap 
) const
inline

Sets pointers to the vertex map with copies and the vertex map without copies Note: the pointers will not exist if the hypergraph has unique vertices check the areVertexIDsUnique() function before calling this function.

Parameters
copiesMapon return points to the map of vertices with copies
onetooneMapon return points to the map of vertices without copies

Definition at line 252 of file Zoltan2_HyperGraphModel.hpp.

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

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

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

Definition at line 266 of file Zoltan2_HyperGraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::HyperGraphModel< Adapter >::getPinList ( ArrayView< const gno_t > &  pinIds,
ArrayView< const offset_t > &  offsets,
ArrayView< input_t > &  wgts 
) const
inline

Sets pointers to this process' pins global Ids based on the centric view given by getCentricView()

Parameters
pinIdsThis is the list of global neighbor Ids corresponding to the vertices or hyperedges listed in getVertexList/getEdgeList.
offsetsoffsets[i] is the offset into pinIds to the start of neighbors for ith neighbor.
wgtsIf pin weights is available, wgts will on return point to a StridedData object of weights.
Returns
The number of ids in the pinIds list.

Definition at line 288 of file Zoltan2_HyperGraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::HyperGraphModel< 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 303 of file Zoltan2_HyperGraphModel.hpp.

template<typename Adapter>
size_t Zoltan2::HyperGraphModel< 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 305 of file Zoltan2_HyperGraphModel.hpp.


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