Zoltan 2 Version 0.5

VectorInput defines the interface for vector input adapters. More...
#include <Zoltan2_VectorInput.hpp>
Public Member Functions  
virtual  ~VectorInput () 
Destructor.  
enum InputAdapterType  inputAdapterType () const 
Returns the type of adapter.  
virtual int  getNumberOfVectors () const =0 
Return the number of vectors (typically one).  
virtual int  getNumberOfWeights () const =0 
Return the number of weights per vector element. Number of weights per element should be zero or greater. If zero, it is assumed each vector is equally weighted.  
virtual size_t  getLocalLength () const =0 
Return the length of the portion of the vector on this process.  
virtual size_t  getVector (const gid_t *&ids, const scalar_t *&elements, int &stride) const =0 
Provide a pointer to the vertex elements. If the VectorInput represents more than one vector, vector zero is implied.  
virtual size_t  getVector (int i, const gid_t *&ids, const scalar_t *&elements, int &stride) const =0 
Provide a pointer to the elements of the specified vector.  
virtual size_t  getVectorWeights (int dimension, const scalar_t *&weights, int &stride) const =0 
Provide a pointer to the weights corresponding to the elements returned in getVector().  
template<typename Adapter >  
size_t  applyPartitioningSolution (User &in, User *&out, const PartitioningSolution< Adapter > &solution) const 
Apply a PartitioningSolution to an input.  
virtual string  inputAdapterName () const =0 
Returns a descriptive name that identifies the concrete adapter.  
virtual size_t  getLocalNumberOfObjects () const =0 
Returns the number of objects in the input.  
virtual int  getNumberOfWeightsPerObject () const =0 
Returns the number of weights per object. Number of weights per object should be zero or greater. If zero, then it is assumed that all objects are equally weighted.  
virtual size_t  getObjectWeights (int dim, const scalar_t *&wgt, int &stride) const =0 
Provide pointer to a weight array with stride.  
Static Public Member Functions  
static string  inputAdapterTypeName (InputAdapterType iaType) 
Returns the name of the input adapter. 
VectorInput defines the interface for vector input adapters.
InputAdapter objects provide access for Zoltan2 to the user's data. Many builtin adapters are already defined for common data structures, such as Tpetra and Epetra objects and Clanguage pointers to arrays.
Data types:
scalar_t
weights and vector element values lno_t
local indices and local counts gno_t
global indices and global counts gid_t
application global Ids node_t
is a sub class of Kokkos::StandardNodeMemoryModelSee IdentifierTraits to understand why the user's global ID type (gid_t
) may differ from that used by Zoltan2 (gno_t
).
The Kokkos node type can be safely ignored.
The template parameter User
is a userdefined data type which, through a traits mechanism, provides the actual data types with which the Zoltan2 library will be compiled. User
may be the actual class or structure used by application to represent a vector, or it may be the helper class BasicUserTypes. See InputTraits for more information.
The scalar_t
type, representing use data such as matrix values, is used by Zoltan2 for weights, coordinates, part sizes and quality metrics. Some User types (like Tpetra::CrsMatrix) have an inherent scalar type, and some (like Tpetra::CrsGraph) do not. For such objects, the scalar type is set by Zoltan2 to float
. If you wish to change it to double, set the second template parameter to double
.
VectorInput may be a single vector or a set of corresponding vectors which have with the same global identifiers and the same distribution across processes.
Definition at line 103 of file Zoltan2_VectorInput.hpp.
virtual Zoltan2::VectorInput< User >::~VectorInput  (  )  [inline, virtual] 
Destructor.
Definition at line 119 of file Zoltan2_VectorInput.hpp.
enum InputAdapterType Zoltan2::VectorInput< User >::inputAdapterType  (  )  const [inline, virtual] 
Returns the type of adapter.
Implements Zoltan2::InputAdapter< User >.
Definition at line 125 of file Zoltan2_VectorInput.hpp.
virtual int Zoltan2::VectorInput< User >::getNumberOfVectors  (  )  const [pure virtual] 
Return the number of vectors (typically one).
Implemented in Zoltan2::BasicVectorInput< User >, Zoltan2::XpetraMultiVectorInput< User >, and Zoltan2::XpetraVectorInput< User >.
virtual int Zoltan2::VectorInput< User >::getNumberOfWeights  (  )  const [pure virtual] 
Return the number of weights per vector element. Number of weights per element should be zero or greater. If zero, it is assumed each vector is equally weighted.
Implemented in Zoltan2::BasicVectorInput< User >, Zoltan2::XpetraMultiVectorInput< User >, and Zoltan2::XpetraVectorInput< User >.
virtual size_t Zoltan2::VectorInput< User >::getLocalLength  (  )  const [pure virtual] 
Return the length of the portion of the vector on this process.
Implemented in Zoltan2::BasicVectorInput< User >, Zoltan2::XpetraMultiVectorInput< User >, and Zoltan2::XpetraVectorInput< User >.
virtual size_t Zoltan2::VectorInput< User >::getVector  (  const gid_t *&  ids, 
const scalar_t *&  elements,  
int &  stride  
)  const [pure virtual] 
Provide a pointer to the vertex elements. If the VectorInput represents more than one vector, vector zero is implied.
ids  will on return point to the list of global Ids for each element on this process. 
elements  will on return point to the vector values corresponding to the global Ids. 
stride  the k'th element is located at elements[stride*k] 
Implemented in Zoltan2::BasicVectorInput< User >, Zoltan2::XpetraMultiVectorInput< User >, and Zoltan2::XpetraVectorInput< User >.
virtual size_t Zoltan2::VectorInput< User >::getVector  (  int  i, 
const gid_t *&  ids,  
const scalar_t *&  elements,  
int &  stride  
)  const [pure virtual] 
Provide a pointer to the elements of the specified vector.
i  ranges from zero to one less than getNumberOfVector(), and represents the vector for which data is being requested. 
ids  will on return point to the list of global Ids for each element on this process. 
elements  will on return point to the vector values corresponding to the global Ids. 
stride  the k'th element is located at elements[stride*k] 
Implemented in Zoltan2::BasicVectorInput< User >, Zoltan2::XpetraMultiVectorInput< User >, and Zoltan2::XpetraVectorInput< User >.
virtual size_t Zoltan2::VectorInput< User >::getVectorWeights  (  int  dimension, 
const scalar_t *&  weights,  
int &  stride  
)  const [pure virtual] 
Provide a pointer to the weights corresponding to the elements returned in getVector().
dimension  ranges from zero to one less than getNumberOfWeights() 
weights  is the list of weights of the given dimension for the elements listed in getVector. If weights for this dimension are to be uniform for all vectors in the global problem, the weights should be a NULL pointer. 
stride  The k'th weight is located at weights[stride*k] 
Implemented in Zoltan2::BasicVectorInput< User >, Zoltan2::XpetraMultiVectorInput< User >, and Zoltan2::XpetraVectorInput< User >.
size_t Zoltan2::VectorInput< User >::applyPartitioningSolution  (  User &  in, 
User *&  out,  
const PartitioningSolution< Adapter > &  solution  
)  const [inline] 
Apply a PartitioningSolution to an input.
This is not a required part of the VectorInput interface. However if the Caller calls a Problem method to redistribute data, it needs this method to perform the redistribution.
in  An input object with a structure and assignment of of global Ids to processes that matches that of the input data that instantiated this InputAdapter. 
out  On return this should point to a newly created object with the specified partitioning. 
solution  The Solution object created by a Problem should be supplied as the third argument. It must have been templated on user data that has the same global ID distribution as this user data. 
Definition at line 209 of file Zoltan2_VectorInput.hpp.
virtual string Zoltan2::InputAdapter< User >::inputAdapterName  (  )  const [pure virtual, inherited] 
Returns a descriptive name that identifies the concrete adapter.
Implemented in Zoltan2::BasicCoordinateInput< User >, Zoltan2::BasicIdentifierInput< User >, Zoltan2::BasicVectorInput< User >, Zoltan2::XpetraCrsGraphInput< User >, Zoltan2::XpetraCrsMatrixInput< User >, Zoltan2::XpetraMultiVectorInput< User >, and Zoltan2::XpetraVectorInput< User >.
virtual size_t Zoltan2::InputAdapter< User >::getLocalNumberOfObjects  (  )  const [pure virtual, inherited] 
Returns the number of objects in the input.
Objects may be coordinates, graph vertices, matrix rows, etc. They are the objects to be partitioned, ordered, or colored.
Implemented in Zoltan2::BasicCoordinateInput< User >, Zoltan2::BasicIdentifierInput< User >, Zoltan2::BasicVectorInput< User >, Zoltan2::XpetraCrsGraphInput< User >, Zoltan2::XpetraCrsMatrixInput< User >, Zoltan2::XpetraMultiVectorInput< User >, and Zoltan2::XpetraVectorInput< User >.
virtual int Zoltan2::InputAdapter< User >::getNumberOfWeightsPerObject  (  )  const [pure virtual, inherited] 
Returns the number of weights per object. Number of weights per object should be zero or greater. If zero, then it is assumed that all objects are equally weighted.
Implemented in Zoltan2::BasicCoordinateInput< User >, Zoltan2::BasicIdentifierInput< User >, Zoltan2::BasicVectorInput< User >, Zoltan2::XpetraCrsGraphInput< User >, Zoltan2::XpetraCrsMatrixInput< User >, Zoltan2::XpetraMultiVectorInput< User >, and Zoltan2::XpetraVectorInput< User >.
virtual size_t Zoltan2::InputAdapter< User >::getObjectWeights  (  int  dim, 
const scalar_t *&  wgt,  
int &  stride  
)  const [pure virtual, inherited] 
Provide pointer to a weight array with stride.
dim  the weight dimension, zero or greater 
wgt  on return a pointer to the weights for this dimension 
stride  on return, the value such that the nth weight should be found at wgt[n*stride] . 
wgt
array, which should be at least equal to getLocalNumberOfObjects() * stride
. Implemented in Zoltan2::BasicCoordinateInput< User >, Zoltan2::BasicIdentifierInput< User >, Zoltan2::BasicVectorInput< User >, Zoltan2::XpetraCrsGraphInput< User >, Zoltan2::XpetraCrsMatrixInput< User >, Zoltan2::XpetraMultiVectorInput< User >, and Zoltan2::XpetraVectorInput< User >.
string Zoltan2::InputAdapter< User >::inputAdapterTypeName  (  InputAdapterType  iaType  )  [static, inherited] 
Returns the name of the input adapter.
Definition at line 134 of file Zoltan2_InputAdapter.hpp.