|
Zoltan2
Version of the Day
|
An input adapter for Xpetra::MultiVector. More...
#include <Zoltan2_XpetraMultiVectorInput.hpp>


Public Member Functions | |
| ~XpetraMultiVectorInput () | |
| Destructor. More... | |
| XpetraMultiVectorInput (const RCP< const User > &invector, vector< const scalar_t * > &weights, vector< int > &weightStrides) | |
| Constructor. More... | |
| XpetraMultiVectorInput (const RCP< const User > &invector) | |
| Constructor for case when weights are not being used. More... | |
| const RCP< const x_mvector_t > & | getVector () const |
| Access to xpetra wrapper multivector. More... | |
| string | inputAdapterName () const |
| Returns a descriptive name that identifies the concrete adapter. More... | |
| size_t | getLocalNumberOfObjects () const |
| Returns the number of objects in the input. More... | |
| int | getNumberOfWeightsPerObject () const |
| 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. More... | |
| size_t | getObjectWeights (int dim, const scalar_t *&wgt, int &stride) const |
| Provide pointer to a weight array with stride. More... | |
| int | getNumberOfVectors () const |
| Return the number of vectors (typically one). More... | |
| int | getNumberOfWeights () const |
| 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. More... | |
| size_t | getLocalLength () const |
| Return the length of the portion of the vector on this process. More... | |
| size_t | getGlobalLength () const |
| size_t | getVector (const gid_t *&Ids, const scalar_t *&elements, int &stride) const |
| Provide a pointer to the vertex elements. If the VectorInput represents more than one vector, vector zero is implied. More... | |
| size_t | getVector (int i, const gid_t *&Ids, const scalar_t *&elements, int &stride) const |
| Provide a pointer to the elements of the specified vector. More... | |
| size_t | getVectorWeights (int dim, const scalar_t *&weights, int &stride) const |
| Provide a pointer to the weights corresponding to the elements returned in getVector(). More... | |
| template<typename Adapter > | |
| size_t | applyPartitioningSolution (const User &in, User *&out, const PartitioningSolution< Adapter > &solution) const |
| enum InputAdapterType | inputAdapterType () const |
| Returns the type of adapter. More... | |
| template<typename Adapter > | |
| size_t | applyPartitioningSolution (User &in, User *&out, const PartitioningSolution< Adapter > &solution) const |
| Apply a PartitioningSolution to an input. More... | |
Static Public Member Functions | |
| static string | inputAdapterTypeName (InputAdapterType iaType) |
| Returns the name of the input adapter. More... | |
An input adapter for Xpetra::MultiVector.
The template parameter is the user's input object:
Epetra_MultiVector Tpetra::MultiVector Xpetra::MultiVector 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.
Definition at line 81 of file Zoltan2_XpetraMultiVectorInput.hpp.
|
inline |
Destructor.
Definition at line 101 of file Zoltan2_XpetraMultiVectorInput.hpp.
| Zoltan2::XpetraMultiVectorInput< User >::XpetraMultiVectorInput | ( | const RCP< const User > & | invector, |
| vector< const scalar_t * > & | weights, | ||
| vector< int > & | weightStrides | ||
| ) |
Constructor.
| invector | the user's Xpetra, Tpetra or Epetra MultiVector object |
| weights | a list of pointers to arrays of weights. The number of weights per multivector element is assumed to be weights.size(). |
| weightStrides | a list of strides for the weights. The weight for weight dimension n for multivector element k should be found at weights[n][weightStrides[n] * k]. If weightStrides.size() is zero, it is assumed all strides are one. |
The values pointed to the arguments must remain valid for the lifetime of this InputAdapter.
Definition at line 205 of file Zoltan2_XpetraMultiVectorInput.hpp.
| Zoltan2::XpetraMultiVectorInput< User >::XpetraMultiVectorInput | ( | const RCP< const User > & | invector | ) |
Constructor for case when weights are not being used.
| invector | the user's Xpetra, Tpetra or Epetra MultiVector object |
Definition at line 233 of file Zoltan2_XpetraMultiVectorInput.hpp.
|
inline |
Access to xpetra wrapper multivector.
Definition at line 131 of file Zoltan2_XpetraMultiVectorInput.hpp.
|
inlinevirtual |
Returns a descriptive name that identifies the concrete adapter.
Implements Zoltan2::InputAdapter< User >.
Definition at line 140 of file Zoltan2_XpetraMultiVectorInput.hpp.
|
inlinevirtual |
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.
Implements Zoltan2::InputAdapter< User >.
Definition at line 142 of file Zoltan2_XpetraMultiVectorInput.hpp.
|
inlinevirtual |
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.
Implements Zoltan2::InputAdapter< User >.
Definition at line 144 of file Zoltan2_XpetraMultiVectorInput.hpp.
|
inlinevirtual |
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 . Implements Zoltan2::InputAdapter< User >.
Definition at line 146 of file Zoltan2_XpetraMultiVectorInput.hpp.
|
inlinevirtual |
Return the number of vectors (typically one).
Implements Zoltan2::VectorInput< User >.
Definition at line 155 of file Zoltan2_XpetraMultiVectorInput.hpp.
|
inlinevirtual |
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.
Implements Zoltan2::VectorInput< User >.
Definition at line 157 of file Zoltan2_XpetraMultiVectorInput.hpp.
|
inlinevirtual |
Return the length of the portion of the vector on this process.
Implements Zoltan2::VectorInput< User >.
Definition at line 159 of file Zoltan2_XpetraMultiVectorInput.hpp.
|
inline |
Definition at line 161 of file Zoltan2_XpetraMultiVectorInput.hpp.
|
inlinevirtual |
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] |
Implements Zoltan2::VectorInput< User >.
Definition at line 163 of file Zoltan2_XpetraMultiVectorInput.hpp.
|
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] |
Implements Zoltan2::VectorInput< User >.
Definition at line 245 of file Zoltan2_XpetraMultiVectorInput.hpp.
|
inlinevirtual |
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] |
Implements Zoltan2::VectorInput< User >.
Definition at line 172 of file Zoltan2_XpetraMultiVectorInput.hpp.
| size_t Zoltan2::XpetraMultiVectorInput< User >::applyPartitioningSolution | ( | const User & | in, |
| User *& | out, | ||
| const PartitioningSolution< Adapter > & | solution | ||
| ) | const |
Definition at line 282 of file Zoltan2_XpetraMultiVectorInput.hpp.
|
inlinevirtualinherited |
Returns the type of adapter.
Implements Zoltan2::InputAdapter< User >.
Definition at line 125 of file Zoltan2_VectorInput.hpp.
|
inlineinherited |
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.
|
staticinherited |
Returns the name of the input adapter.
Definition at line 134 of file Zoltan2_InputAdapter.hpp.
1.8.11