Zoltan 2 Version 0.5
Public Member Functions | Protected Member Functions | Static Protected Member Functions
Zoltan2::IdentifierModel< Adapter > Class Template Reference

IdentifierModel defines the interface for all identifier models. More...

#include <Zoltan2_IdentifierModel.hpp>

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

List of all members.

Public Member Functions

 IdentifierModel ()
size_t getLocalNumIdentifiers () const
 Returns the number identifiers on this process.
global_size_t getGlobalNumIdentifiers () const
 Returns the global number identifiers.
int getIdentifierWeightDim () const
 Returns the dimension (0 or greater) of identifier weights.
size_t getIdentifierList (ArrayView< const gno_t > &Ids, ArrayView< input_t > &wgts) const
 Sets pointers to this process' identifier Ids and their weights.
size_t getLocalNumObjects () const
 Return the local number of objects.
size_t getGlobalNumObjects () const
 Return the global number of objects.
void getGlobalObjectIds (ArrayView< const gno_t > &gnos) const
 Get a list of the global Ids for the local objects.
RCP< const idmap_t > getIdentifierMap () const
 Return the map from user global identifiers to internal Zoltan2 global numbers.
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.
bool uniformWeight (int weightDim) const
 Return whether the weights are uniform or not.

Protected Member Functions

void setIdentifierMap (RCP< const idmap_t > &map)
 Set the IdentifierMap used by the model.
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.

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.
template<typename T >
static void maxCount (const Comm< int > &comm, T &value1)
 Get the global maximum for a value.
template<typename T >
static void maxCount (const Comm< int > &comm, T &value1, T &value2)
 Get the global maximums for each of two values.

Detailed Description

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

IdentifierModel defines the interface for all identifier models.

The constructor of the IdentifierModel 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.

Explicit instantiations exist for:

Todo:
Add instantiations for GraphInput, MeshInput

Definition at line 82 of file Zoltan2_IdentifierModel.hpp.


Constructor & Destructor Documentation

template<typename Adapter>
Zoltan2::IdentifierModel< Adapter >::IdentifierModel ( ) [inline]

Definition at line 95 of file Zoltan2_IdentifierModel.hpp.


Member Function Documentation

template<typename Adapter>
size_t Zoltan2::IdentifierModel< Adapter >::getLocalNumIdentifiers ( ) const [inline]

Returns the number identifiers on this process.

Definition at line 105 of file Zoltan2_IdentifierModel.hpp.

template<typename Adapter>
global_size_t Zoltan2::IdentifierModel< Adapter >::getGlobalNumIdentifiers ( ) const [inline]

Returns the global number identifiers.

Definition at line 109 of file Zoltan2_IdentifierModel.hpp.

template<typename Adapter>
int Zoltan2::IdentifierModel< Adapter >::getIdentifierWeightDim ( ) const [inline]

Returns the dimension (0 or greater) of identifier weights.

Definition at line 113 of file Zoltan2_IdentifierModel.hpp.

template<typename Adapter>
size_t Zoltan2::IdentifierModel< Adapter >::getIdentifierList ( ArrayView< const gno_t > &  Ids,
ArrayView< input_t > &  wgts 
) const [inline]

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

Parameters:
Idswill on return point to the list of the global Ids for each identifier on this process.
wgtswill on return point to a list of the weight or weights associated with each identifier in the Ids list. Each weight is represented as a StridedData object.
Returns:
The number of ids in the Ids list.

Definition at line 126 of file Zoltan2_IdentifierModel.hpp.

template<typename Adapter>
size_t Zoltan2::IdentifierModel< 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 133 of file Zoltan2_IdentifierModel.hpp.

template<typename Adapter>
size_t Zoltan2::IdentifierModel< 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 138 of file Zoltan2_IdentifierModel.hpp.

template<typename Adapter>
void Zoltan2::IdentifierModel< Adapter >::getGlobalObjectIds ( ArrayView< const gno_t > &  gnos) const [inline, virtual]

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 143 of file Zoltan2_IdentifierModel.hpp.

template<typename Adapter >
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 135 of file Zoltan2_Model.hpp.

template<typename Adapter >
int Zoltan2::Model< Adapter >::getNumWeights ( ) const [inline, inherited]

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.

template<typename Adapter >
bool Zoltan2::Model< Adapter >::uniformWeight ( int  weightDim) const [inline, inherited]

Return whether the weights are uniform or not.

Parameters:
weightDima value from 0 to one less than the number of weights.
Returns:
1 if the weights for that dimension are uniform, 0 if there is a list of differing weights for that dimension.

Definition at line 151 of file Zoltan2_Model.hpp.

template<typename Adapter >
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 184 of file Zoltan2_Model.hpp.

template<typename Adapter >
void Zoltan2::Model< Adapter >::setWeightArrayLengths ( const Array< lno_t > &  len,
const Teuchos::Comm< int > &  comm 
) [inline, protected, inherited]

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.

template<typename Adapter >
template<typename T >
static void Zoltan2::Model< Adapter >::maxCount ( const Comm< int > &  comm,
Array< T > &  countValues 
) [inline, static, protected, inherited]

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.

template<typename Adapter >
template<typename T >
static void Zoltan2::Model< Adapter >::maxCount ( const Comm< int > &  comm,
T &  value1 
) [inline, static, protected, inherited]

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.

template<typename Adapter >
template<typename T >
static void Zoltan2::Model< Adapter >::maxCount ( const Comm< int > &  comm,
T &  value1,
T &  value2 
) [inline, static, protected, inherited]

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.


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