|
Zoltan2
Version of the Day
|
CoordinateInput defines the interface for input geometric coordinates. More...
#include <Zoltan2_CoordinateInput.hpp>


Public Member Functions | |
| virtual | ~CoordinateInput () |
| Destructor. More... | |
| enum InputAdapterType | inputAdapterType () const |
| Returns the type of adapter. More... | |
| virtual int | getCoordinateDimension () const =0 |
| Return dimension of the coordinates. More... | |
| virtual int | getNumberOfWeights () const =0 |
| Return the number of weights per coordinate. More... | |
| virtual size_t | getLocalNumberOfCoordinates () const =0 |
| Return the number of coordinates on this process. More... | |
| virtual size_t | getCoordinates (int coordDim, const gid_t *&gids, const scalar_t *&coords, int &stride) const =0 |
| Provide a pointer to one dimension of this process' coordinates. More... | |
| virtual size_t | getCoordinateWeights (int weightDim, const scalar_t *&weights, int &stride) const =0 |
| Provide a pointer to the weights, if any, corresponding to the coordinates returned in getCoordinates(). More... | |
| template<typename Adapter > | |
| size_t | applyPartitioningSolution (User &in, User *&out, const PartitioningSolution< Adapter > &solution) const |
| Apply a PartitioningSolution to an input. More... | |
| virtual string | inputAdapterName () const =0 |
| Returns a descriptive name that identifies the concrete adapter. More... | |
| virtual size_t | getLocalNumberOfObjects () const =0 |
| Returns the number of objects in the input. More... | |
| 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. More... | |
| virtual size_t | getObjectWeights (int dim, const scalar_t *&wgt, int &stride) const =0 |
| Provide pointer to a weight array with stride. More... | |
Static Public Member Functions | |
| static string | inputAdapterTypeName (InputAdapterType iaType) |
| Returns the name of the input adapter. More... | |
CoordinateInput defines the interface for input geometric coordinates.
InputAdapter objects provide access for Zoltan2 to the user's data. Many built-in adapters are already defined for common data structures, such as Tpetra and Epetra objects and C-language pointers to arrays.
Data types:
scalar_t coordinate values and weights 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 user-defined 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, 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.
Input adapters provide access for Zoltan2 to the user's data. The methods in the interface must be defined by users. Many built-in adapters are already defined for common data structures, such as Tpetra and Epetra objects and C-language pointers to arrays.
We don't really need global Ids. They should be optional
Migration doesn't move weights. Should it?
Definition at line 106 of file Zoltan2_CoordinateInput.hpp.
|
inlinevirtual |
Destructor.
Definition at line 121 of file Zoltan2_CoordinateInput.hpp.
|
inlinevirtual |
Returns the type of adapter.
Implements Zoltan2::InputAdapter< User >.
Definition at line 127 of file Zoltan2_CoordinateInput.hpp.
|
pure virtual |
Return dimension of the coordinates.
Implemented in Zoltan2::BasicCoordinateInput< User >.
|
pure virtual |
Return the number of weights per coordinate.
Implemented in Zoltan2::BasicCoordinateInput< User >.
|
pure virtual |
Return the number of coordinates on this process.
Implemented in Zoltan2::BasicCoordinateInput< User >.
|
pure virtual |
Provide a pointer to one dimension of this process' coordinates.
| coordDim | is a value from 0 to one less than getLocalNumberOfCoordinates() specifying which dimension is being provided in the coords list. |
| coords | points to a list of coordinate values for the dimension. |
| stride | 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 getLocalNumberOfCoordinates() because the stride may be more than one.Zoltan2 does not copy your data. The data pointed to coords must remain valid for the lifetime of this InputAdapter.
Implemented in Zoltan2::BasicCoordinateInput< User >.
|
pure virtual |
Provide a pointer to the weights, if any, corresponding to the coordinates returned in getCoordinates().
| weightDim | ranges from zero to one less than getNumberOfWeights() |
| weights | is the list of weights of the given dimension for the coordinates listed in getCoordinates(). If weights for this dimension are to be uniform for all coordinates 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::BasicCoordinateInput< User >.
|
inline |
Apply a PartitioningSolution to an input.
This is not a required part of the CoordinateInput 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 204 of file Zoltan2_CoordinateInput.hpp.
|
pure virtualinherited |
Returns a descriptive name that identifies the concrete adapter.
Implemented in Zoltan2::XpetraCrsGraphInput< User >, Zoltan2::BasicVectorInput< User >, Zoltan2::XpetraCrsMatrixInput< User >, Zoltan2::BasicCoordinateInput< User >, Zoltan2::XpetraRowMatrixInput< User >, Zoltan2::XpetraMultiVectorInput< User >, Zoltan2::XpetraVectorInput< User >, and Zoltan2::BasicIdentifierInput< User >.
|
pure virtualinherited |
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::XpetraCrsGraphInput< User >, Zoltan2::BasicVectorInput< User >, Zoltan2::XpetraCrsMatrixInput< User >, Zoltan2::BasicCoordinateInput< User >, Zoltan2::XpetraRowMatrixInput< User >, Zoltan2::XpetraMultiVectorInput< User >, Zoltan2::XpetraVectorInput< User >, and Zoltan2::BasicIdentifierInput< User >.
|
pure virtualinherited |
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::XpetraCrsGraphInput< User >, Zoltan2::BasicVectorInput< User >, Zoltan2::XpetraCrsMatrixInput< User >, Zoltan2::BasicCoordinateInput< User >, Zoltan2::XpetraRowMatrixInput< User >, Zoltan2::XpetraMultiVectorInput< User >, Zoltan2::XpetraVectorInput< User >, and Zoltan2::BasicIdentifierInput< User >.
|
pure virtualinherited |
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::XpetraCrsGraphInput< User >, Zoltan2::BasicVectorInput< User >, Zoltan2::XpetraCrsMatrixInput< User >, Zoltan2::BasicCoordinateInput< User >, Zoltan2::XpetraRowMatrixInput< User >, Zoltan2::XpetraMultiVectorInput< User >, Zoltan2::XpetraVectorInput< User >, and Zoltan2::BasicIdentifierInput< User >.
|
staticinherited |
Returns the name of the input adapter.
Definition at line 134 of file Zoltan2_InputAdapter.hpp.
1.8.11