Zoltan2 Version of the Day

The base class for all model classes. More...
#include <Zoltan2_Model.hpp>
Public Member Functions  
virtual  ~Model () 
Model ()  
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.  
virtual size_t  getLocalNumObjects () const =0 
Return the local number of objects.  
virtual global_size_t  getGlobalNumObjects () const =0 
Return the global number of objects.  
virtual void  getGlobalObjectIds (ArrayView< const gno_t > &gnos) const =0 
Get a list of the global Ids for the local objects.  
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. 
The base class for all model classes.
The Model is the computational model created by a Problem based on the user's input data and parameters. Graphs, hypergraph, and collections of geometric coordinates are examples of computational models.
The Problem passes the Model to an algorithm. The algorithm queries the Model for input to its calculation.
Definition at line 107 of file Zoltan2_Model.hpp.
virtual Zoltan2::Model< Adapter >::~Model  (  )  [inline, virtual] 
Destructor
Definition at line 122 of file Zoltan2_Model.hpp.
Zoltan2::Model< Adapter >::Model  (  )  [inline] 
Constructor
Definition at line 126 of file Zoltan2_Model.hpp.
RCP<const idmap_t > Zoltan2::Model< Adapter >::getIdentifierMap  (  )  const [inline] 
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.
int Zoltan2::Model< Adapter >::getNumWeights  (  )  const [inline] 
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.
bool Zoltan2::Model< Adapter >::uniformWeight  (  int  weightDim  )  const [inline] 
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.
virtual size_t Zoltan2::Model< Adapter >::getLocalNumObjects  (  )  const [pure 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.
Implemented in Zoltan2::CoordinateModel< Adapter >, Zoltan2::GraphModel< Adapter >, and Zoltan2::IdentifierModel< Adapter >.
virtual global_size_t Zoltan2::Model< Adapter >::getGlobalNumObjects  (  )  const [pure 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.
Implemented in Zoltan2::CoordinateModel< Adapter >, Zoltan2::GraphModel< Adapter >, and Zoltan2::IdentifierModel< Adapter >.
virtual void Zoltan2::Model< Adapter >::getGlobalObjectIds  (  ArrayView< const gno_t > &  gnos  )  const [pure 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.
Implemented in Zoltan2::CoordinateModel< Adapter >, Zoltan2::GraphModel< Adapter >, and Zoltan2::IdentifierModel< Adapter >.
void Zoltan2::Model< Adapter >::setIdentifierMap  (  RCP< const idmap_t > &  map  )  [inline, protected] 
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.
void Zoltan2::Model< Adapter >::setWeightArrayLengths  (  const Array< lno_t > &  len, 
const Teuchos::Comm< int > &  comm  
)  [inline, protected] 
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.
static void Zoltan2::Model< Adapter >::maxCount  (  const Comm< int > &  comm, 
Array< T > &  countValues  
)  [inline, static, protected] 
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.
static void Zoltan2::Model< Adapter >::maxCount  (  const Comm< int > &  comm, 
T &  value1  
)  [inline, static, protected] 
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.
static void Zoltan2::Model< Adapter >::maxCount  (  const Comm< int > &  comm, 
T &  value1,  
T &  value2  
)  [inline, static, protected] 
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.