|
Zoltan2
Version of the Day
|
MeshInput defines the interface for mesh input adapters. More...
#include <Zoltan2_MeshInput.hpp>


Public Member Functions | |
| enum InputAdapterType | inputAdapterType () const |
| Returns the type of adapter. More... | |
| virtual | ~MeshInput () |
| Destructor. More... | |
| enum virtual entityType size_t | getGlobalNumEntityIDs (entityType etype) const =0 |
| Return the global number of IDs across all processes. More... | |
| virtual size_t | getLocalNumEntityIDs (entityType etype) const =0 |
| Returns the number of mesh entities on this process. More... | |
| virtual int | getNumWeightsPerEntityID (entityType etype) const =0 |
| Return the number of weights per entity. More... | |
| virtual size_t | getLocalEntityIDsView (entityType etype, gid_t const *&Ids) const =0 |
| Provide a pointer to this process' identifiers. More... | |
| virtual size_t | getLocalEntityIDsWeightsView (entityType etype, const scalar_t *&weights, int &stride, int number) const =0 |
| Provide a pointer to one of the number of this process' optional entity weights. More... | |
| virtual size_t | getEntityIDWeights (gid_t id, scalar_t *wgts) const =0 |
| Copy the weights for a specific entity into array provided by Zoltan2. More... | |
| virtual int | getEntityCoordinateDimension (entityType etype) const =0 |
| Return dimension of the entity coordinates, if any. More... | |
| virtual size_t | getLocalEntityCoordinatesView (entityType etype, const scalar_t *&coords, int &stride, int coordDim) const =0 |
| Provide a pointer to one dimension of entity coordinates. More... | |
| virtual size_t | getEntityCoordinates (gid_t id, scalar_t *coords) const =0 |
| Copy the coordinates for a specific ID into array provided by Zoltan2. More... | |
| virtual bool | availAdjs (entityType source, entityType target) |
| Returns whether a first adjacency combination is available. More... | |
| virtual size_t | getGlobalNumAdjs (entityType source, entityType target) const =0 |
| Returns the global number of edges across all processes Need to define whether an undirected edge A<->B is counted as one edge or as two edges A->B and B->A. TODO: Do we need this function? More... | |
| virtual size_t | getLocalNumAdjs (entityType source, entityType target) const =0 |
| Returns the number of first adjacencies on this process. More... | |
| virtual size_t | getEntityNumAdjs (entityType source, entityType target, gid_t id) const =0 |
| Returns the number of first adjacencies for this entity. More... | |
| virtual size_t | getLocalAdjsView (entityType source, entityType target, const lno_t *&offsets, const gid_t *&adjacencyIds) const =0 |
| Sets pointers to this process' mesh first adjacencies. More... | |
| virtual size_t | getEntityAdjs (entityType source, entityType target, gid_t id, gid_t *adjacencyIds) const =0 |
| Copy all the first adjacency IDs for a specific entity into arrays provided by Zoltan2. More... | |
| virtual bool | avail2ndAdjs (entityType sourcetarget, entityType through) |
| Returns whether a second adjacency combination is available. More... | |
| virtual size_t | getGlobalNum2ndAdjs (entityType sourcetarget, entityType through) const =0 |
| Return the global number of entity second adjacencies across all processes TODO: Do we need this function? More... | |
| virtual size_t | getLocalNum2ndAdjs (entityType sourcetarget, entityType through) const =0 |
| Returns the number of second adjacencies on this process. More... | |
| virtual lno_t | getEntityNum2ndAdjs (entityType sourcetarget, entityType through, gid_t id) const =0 |
| Return number of second adjacencies to specific entity. More... | |
| virtual size_t | getLocal2ndAdjsView (entityType sourcetarget, entityType through, const lno_t *&offsets, const gid_t *&adjacencyIds) const =0 |
| Sets pointers to this process' mesh second adjacencies. More... | |
| virtual size_t | getEntity2ndAdjs (entityType sourcetarget, entityType through, gid_t id, gid_t *nborIds) const =0 |
| Copy the second adjacency IDs for all adjacencies incident to a specific entity into array provided by Zoltan2. More... | |
| virtual int | getNumWeightsPer2ndAdj (entityType sourcetarger, entityType through) const =0 |
| Returns the number (0 or greater) of weights per second adjacency. More... | |
| virtual size_t | getLocal2ndAdjWeightsView (entityType sourcetarget, entityType through, const scalar_t *&weights, int &stride, int number) const =0 |
| Provide a pointer to the second adjacency weights, if any. More... | |
| virtual size_t | getEntity2ndAdjWeights (entityType sourcetarget, entityType through, gid_t id, scalar_t *ewgts) |
| Copy the second adjacency weights incident to a specific entity id into array provided by Zoltan2. More... | |
| template<typename Adapter > | |
| size_t | applyPartitioningSolution (const User &in, User *&out, const PartitioningSolution< Adapter > &solution) const |
| Apply a partitioning problem solution 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... | |
MeshInput defines the interface for mesh input adapters.
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 entity and adjacency 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, 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 96 of file Zoltan2_MeshInput.hpp.
|
inlinevirtual |
Destructor.
Definition at line 114 of file Zoltan2_MeshInput.hpp.
|
inlinevirtual |
Returns the type of adapter.
Implements Zoltan2::InputAdapter< User >.
Definition at line 110 of file Zoltan2_MeshInput.hpp.
|
pure virtual |
Return the global number of IDs across all processes.
|
pure virtual |
Returns the number of mesh entities on this process.
|
pure virtual |
Return the number of weights per entity.
|
pure virtual |
Provide a pointer to this process' identifiers.
| Ids | will on return point to the list of the global Ids for this process. |
Some algorithms can partition a simple list of weighted identifiers with no geometry or topology provided.
|
pure virtual |
Provide a pointer to one of the number of this process' optional entity weights.
| weights | on return will contain a list of the weights for the number specified. If weights for this number are to be uniform for all entities in the global problem, the weights should be a NULL pointer. |
| stride | on return will indicate the stride of the weights list. |
The k'th weight is located at weights[stride*k].
| number | is a value ranging from zero to one less than getNumWeightsPerEntityID() |
Zoltan2 does not copy your data. The data pointed to by weights must remain valid for the lifetime of this InputAdapter.
|
pure virtual |
|
pure virtual |
Return dimension of the entity coordinates, if any.
Some algorithms can partition mesh entities using geometric coordinate information
Some algorithms can use geometric entity coordinate information if it is present.
|
pure virtual |
Provide a pointer to one dimension of entity coordinates.
| 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]. |
| coordDim | is a value from 0 to one less than getEntityCoordinateDimension() specifying which dimension is being provided in the coords list. |
coords list. This may be more than getLocalNumEntityIDs() 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.
|
pure virtual |
|
virtual |
Returns whether a first adjacency combination is available.
|
pure virtual |
Returns the global number of edges across all processes Need to define whether an undirected edge A<->B is counted as one edge or as two edges A->B and B->A. TODO: Do we need this function?
|
pure virtual |
Returns the number of first adjacencies on this process.
|
pure virtual |
Returns the number of first adjacencies for this entity.
| source |
|
pure virtual |
Sets pointers to this process' mesh first adjacencies.
| source | |
| offsets | is an array of size getLocalNumEntityIDs() + 1. The first adjacency Ids for Ids[i] (returned in getLocalEntityIDsView()) begin at adjacencyIds[offsets[i]]. The last element of offsets is the size of the adjacencyIds array. |
| adjacencyIds | on return will point to the global first adjacency Ids for each entity. |
Zoltan2 does not copy your data. The data pointed to by offsets and adjacencyIds must remain valid for the lifetime of this InputAdapter.
|
pure virtual |
|
virtual |
Returns whether a second adjacency combination is available.
|
pure virtual |
Return the global number of entity second adjacencies across all processes TODO: Do we need this function?
|
pure virtual |
Returns the number of second adjacencies on this process.
Some algorithms can partition a graph of mesh entities
Parameters will specify algorithm options: balance_entity_type==entityType, adjacency_through==entityType
|
pure virtual |
Return number of second adjacencies to specific entity.
| sourcetarget | |
| id | specific entity. Works only if id is local to this process. |
|
pure virtual |
Sets pointers to this process' mesh second adjacencies.
| sourcetarget | |
| offsets | is an array of size getLocalNumEntityIDs() + 1. The second adjacency Ids for Ids[i] (returned in getLocalEntityIDsView()) begin at adjacencyIds[offsets[i]]. The last element of offsets is the size of the adjacencyIds array. |
| adjacencyIds | on return will point to the global second adjacency Ids for each entity. |
Zoltan2 does not copy your data. The data pointed to by offsets and adjacencyIds must remain valid for the lifetime of this InputAdapter.
|
pure virtual |
|
pure virtual |
Returns the number (0 or greater) of weights per second adjacency.
|
pure virtual |
Provide a pointer to the second adjacency weights, if any.
| weights | is the list of weights of the given number for the second adjacencies returned in getLocal2ndAdjsView(). |
| stride | The k'th weight is located at weights[stride*k] |
| number | ranges from zero to one less than getNumWeightsPer2ndAdj(). |
Zoltan2 does not copy your data. The data pointed to by weights must remain valid for the lifetime of this InputAdapter.
|
virtual |
|
inline |
Apply a partitioning problem solution to an input.
This is not a required part of the MeshInput 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 407 of file Zoltan2_MeshInput.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.5