|
Zoltan2
Version of the Day
|
Provides access for Zoltan2 to Xpetra::CRowatrix data. More...
#include <Zoltan2_XpetraRowMatrixInput.hpp>


Public Member Functions | |
| ~XpetraRowMatrixInput () | |
| Destructor. More... | |
| XpetraRowMatrixInput (const RCP< const User > &inmatrix, int coordDim=0, int weightDim=0) | |
| Constructor. More... | |
| void | setRowCoordinates (int dim, const scalar_t *coordVal, int stride) |
| Specify geometric coordinates for matrix rows. More... | |
| void | setRowWeights (int dim, const scalar_t *weightVal, int stride) |
| Specify a weight for each row. More... | |
| void | setRowWeightIsNumberOfNonZeros (int dim) |
| Specify whether or not row weights for a dimension should be the count of row non zeros. More... | |
| const RCP< const xmatrix_t > & | getMatrix () const |
| Access to Xpetra-wrapped user matrix. 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... | |
| size_t | getLocalNumRows () const |
| Returns the number rows on this process. More... | |
| global_size_t | getGlobalNumRows () const |
| size_t | getLocalNumColumns () const |
| Returns the number columns on this process. More... | |
| global_size_t | getGlobalNumColumns () const |
| size_t | getRowListView (const gid_t *&rowIds, const lno_t *&offsets, const gid_t *&colIds) const |
| Sets pointers to this process' matrix entries. If this optional call is defined in the adapter, it can save a memory copy of application data. More... | |
| int | getRowWeightDimension () const |
| Returns the dimension (0 or greater) of row weights. More... | |
| size_t | getRowWeights (int dim, const scalar_t *&weights, int &stride) const |
| Provide a pointer to the row weights, if any. More... | |
| bool | getRowWeightIsNumberOfNonZeros (int dim) const |
| Is the row weight for a dimension the number of row non-zeros? More... | |
| int | getCoordinateDimension () const |
| Returns the dimension of the geometry, if any. More... | |
| size_t | getRowCoordinates (int dim, const scalar_t *&coords, int &stride) const |
| Provide a pointer to one dimension of row coordinates. 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... | |
Static Public Member Functions | |
| static string | inputAdapterTypeName (InputAdapterType iaType) |
| Returns the name of the input adapter. More... | |
Provides access for Zoltan2 to Xpetra::CRowatrix data.
we assume FillComplete has been called. We should support objects that are not FillCompleted.
add RowMatrix
The template parameter is the user's input object:
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::RowMatrix) have an inherent scalar type, and some (like Tpetra::RowGraph) 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 85 of file Zoltan2_XpetraRowMatrixInput.hpp.
|
inline |
Destructor.
Definition at line 101 of file Zoltan2_XpetraRowMatrixInput.hpp.
| Zoltan2::XpetraRowMatrixInput< User >::XpetraRowMatrixInput | ( | const RCP< const User > & | inmatrix, |
| int | coordDim = 0, |
||
| int | weightDim = 0 |
||
| ) |
Constructor.
| inmatrix | The users Epetra, Tpetra, or Xpetra RowMatrix object |
| coordDim | Some algorithms can use row geometric information if it is available. If coordinates will be supplied in setRowCoordinates() then provide the dimension of the coordinates here. |
| weightDim | If row weights will be provided in setRowWeights(), the set weightDim to the number of weights per row. |
Definition at line 278 of file Zoltan2_XpetraRowMatrixInput.hpp.
| void Zoltan2::XpetraRowMatrixInput< User >::setRowCoordinates | ( | int | dim, |
| const scalar_t * | coordVal, | ||
| int | stride | ||
| ) |
Specify geometric coordinates for matrix rows.
\param dim A value between zero and one less that the \c coordDim
argument to the constructor.
\param coordVal A pointer to the coordinates.
\stride A stride to be used in reading the values. The
dimension \c dim coordinate for row \k should be found at
<tt>coordVal[k*stride]</tt>.
The order of coordinates should correspond to the order of rows returned by
Definition at line 328 of file Zoltan2_XpetraRowMatrixInput.hpp.
| void Zoltan2::XpetraRowMatrixInput< User >::setRowWeights | ( | int | dim, |
| const scalar_t * | weightVal, | ||
| int | stride | ||
| ) |
Specify a weight for each row.
\param dim A value between zero and one less that the \c weightDim
argument to the constructor.
\param weightVal A pointer to the weights for this dimension.
\stride A stride to be used in reading the values. The
dimension \c dim weight for row \k should be found at
<tt>weightVal[k*stride]</tt>.
The order of weights should correspond to the order of rows returned by
Definition at line 344 of file Zoltan2_XpetraRowMatrixInput.hpp.
| void Zoltan2::XpetraRowMatrixInput< User >::setRowWeightIsNumberOfNonZeros | ( | int | dim | ) |
Specify whether or not row weights for a dimension should be the count of row non zeros.
| dim | If true, Zoltan2 will automatically us the number of non zeros in an row as the row's weight for dimension dim. |
Definition at line 360 of file Zoltan2_XpetraRowMatrixInput.hpp.
|
inline |
Access to Xpetra-wrapped user matrix.
Definition at line 158 of file Zoltan2_XpetraRowMatrixInput.hpp.
|
inlinevirtual |
Returns a descriptive name that identifies the concrete adapter.
Implements Zoltan2::InputAdapter< User >.
Definition at line 167 of file Zoltan2_XpetraRowMatrixInput.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 169 of file Zoltan2_XpetraRowMatrixInput.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 171 of file Zoltan2_XpetraRowMatrixInput.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 173 of file Zoltan2_XpetraRowMatrixInput.hpp.
|
inlinevirtual |
Returns the number rows on this process.
Implements Zoltan2::MatrixInput< User >.
Definition at line 182 of file Zoltan2_XpetraRowMatrixInput.hpp.
|
inline |
Definition at line 186 of file Zoltan2_XpetraRowMatrixInput.hpp.
|
inlinevirtual |
Returns the number columns on this process.
Implements Zoltan2::MatrixInput< User >.
Definition at line 190 of file Zoltan2_XpetraRowMatrixInput.hpp.
|
inline |
Definition at line 194 of file Zoltan2_XpetraRowMatrixInput.hpp.
|
inlinevirtual |
Sets pointers to this process' matrix entries. If this optional call is defined in the adapter, it can save a memory copy of application data.
| rowIds | will on return a pointer to row global Ids |
| offsets | is an array of size numRows + 1. The column Ids for rowId[i] begin at colIds[offsets[i]]. The last element of offsets is the size of the colIds array. |
| colIds | on return will point to the global column Ids for the non-zeros for each row. |
Implements Zoltan2::MatrixInput< User >.
Definition at line 198 of file Zoltan2_XpetraRowMatrixInput.hpp.
|
inlinevirtual |
Returns the dimension (0 or greater) of row weights.
Row weights may be used when partitioning matrix rows. If no weights are provided, and rowWeightIsNumberOfNonZeros() is false, then it is assumed rows are equally weighted.
Implements Zoltan2::MatrixInput< User >.
Definition at line 210 of file Zoltan2_XpetraRowMatrixInput.hpp.
|
inlinevirtual |
Provide a pointer to the row weights, if any.
| weightDim | ranges from zero to one less than getRowWeightDimension(). |
| weights | is the list of weights of the given dimension for the rows returned in getRowListView(). If weights for this dimension are to be uniform for all rows in the global problem, the weights should be a NULL pointer. |
| stride | The k'th weight is located at weights[stride*k] |
Zoltan2 does not copy your data. The data pointed to by weights must remain valid for the lifetime of this InputAdapter.
Implements Zoltan2::MatrixInput< User >.
Definition at line 215 of file Zoltan2_XpetraRowMatrixInput.hpp.
|
inlinevirtual |
Is the row weight for a dimension the number of row non-zeros?
| dim | a value between zero and getRowWeightDimension() that specifies the weight dimension that will be equal to the number of row non-zeros. |
If you wish for Zoltan2 to automatically assign for one of the weight dimensions for each row a weight that is equal to the number of non-zeros in the row, then return true here. Otherwise return false.
Implements Zoltan2::MatrixInput< User >.
Definition at line 227 of file Zoltan2_XpetraRowMatrixInput.hpp.
|
inlinevirtual |
Returns the dimension of the geometry, if any.
Some algorithms can use geometric row or column coordinate information if it is present. Given the problem parameters supplied by the user, it may make sense to use row coordinates or it may make sense to use column coordinates.
Implements Zoltan2::MatrixInput< User >.
Definition at line 229 of file Zoltan2_XpetraRowMatrixInput.hpp.
|
inlinevirtual |
Provide a pointer to one dimension of row coordinates.
| coordDim | [input] is a value from 0 to one less than getCoordinateDimension() specifying which dimension is being provided in the coords list. |
| coords | [output] points to a list of coordinate values for the dimension. The order of coords should correspond to the order of rowIds in getRowListView(). |
| stride | [output] describes the layout of the coordinate values in the coords list. If stride is one, then the ith coordinate value is coords[i], but if stride is two, then the ith coordinate value is coords[2*i]. |
coords list. This may be more than getLocalNumberOfVertices() because the stride may be more than one. It may also be zero if column coordinates but not row coordinates are supplied.Zoltan2 does not copy your data. The data pointed to by coords must remain valid for the lifetime of this InputAdapter.
Implements Zoltan2::MatrixInput< User >.
Definition at line 231 of file Zoltan2_XpetraRowMatrixInput.hpp.
| size_t Zoltan2::XpetraRowMatrixInput< User >::applyPartitioningSolution | ( | const User & | in, |
| User *& | out, | ||
| const PartitioningSolution< Adapter > & | solution | ||
| ) | const |
Definition at line 371 of file Zoltan2_XpetraRowMatrixInput.hpp.
|
inlinevirtualinherited |
Returns the type of adapter.
Implements Zoltan2::InputAdapter< User >.
Definition at line 118 of file Zoltan2_MatrixInput.hpp.
|
staticinherited |
Returns the name of the input adapter.
Definition at line 134 of file Zoltan2_InputAdapter.hpp.
1.8.5