Zoltan2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
Zoltan2::MatrixPartitioningSolution< Adapter > Class Template Reference

A PartitioningSolution is a solution to a partitioning problem. More...

#include <Zoltan2_MatrixPartitioningSolution.hpp>

Inheritance diagram for Zoltan2::MatrixPartitioningSolution< Adapter >:
Inheritance graph
[legend]
Collaboration diagram for Zoltan2::MatrixPartitioningSolution< Adapter >:
Collaboration graph
[legend]

Public Member Functions

 MatrixPartitioningSolution (const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, const RCP< Algorithm< Adapter > > &algorithm=Teuchos::null)
 Constructor when part sizes are not supplied. More...
 
void setIDLists (ArrayRCP< part_t > &rowIDs, ArrayRCP< part_t > &colIDs, ArrayRCP< part_t > &domainIDs, ArrayRCP< part_t > &rangeIDs)
 The algorithm uses setIDLists to set the solution. More...
 
const RCP< const Comm< int > > & getCommunicator () const
 Remap a new partition for maximum overlap with an input partition. More...
 
const RCP< const Environment > & getEnvironment () const
 Return the environment associated with the solution. More...
 
const gno_t * getRowIdsView () const
 Returns list of global row IDs of the nonzeros owned by this process. More...
 
const gno_t * getColIdsView () const
 Returns list of global column IDs of the nonzeros owned by this process. More...
 
- Public Member Functions inherited from Zoltan2::Solution
virtual ~Solution ()
 

Detailed Description

template<typename Adapter>
class Zoltan2::MatrixPartitioningSolution< Adapter >

A PartitioningSolution is a solution to a partitioning problem.

It is initialized by a PartitioningProblem, written to by an algorithm, and may be read by the user or by a data migration routine in an input adapter.

Todo:

Problem computes metrics using the Solution. Should Solution have a pointer to the metrics, since it may persist after the Problem is gone?

save an RCB tree, so it can be used in repartitioning, and supplied to the caller.

doxyfy the comments in this file.

Definition at line 86 of file Zoltan2_MatrixPartitioningSolution.hpp.

Constructor & Destructor Documentation

template<typename Adapter >
Zoltan2::MatrixPartitioningSolution< Adapter >::MatrixPartitioningSolution ( const RCP< const Environment > &  env,
const RCP< const Comm< int > > &  comm,
const RCP< Algorithm< Adapter > > &  algorithm = Teuchos::null 
)

Constructor when part sizes are not supplied.

The Solution constructor may require global communication. The rest of the Solution methods do not.

Parameters
envthe environment for the application
commthe communicator for the problem associated with this solution
algorithmAlgorithm, if any, used to compute the solution.

It is possible that part sizes were supplied on other processes, so this constructor does do a check to see if part sizes need to be globally calculated.

Definition at line 314 of file Zoltan2_MatrixPartitioningSolution.hpp.

Member Function Documentation

template<typename Adapter >
void Zoltan2::MatrixPartitioningSolution< Adapter >::setIDLists ( ArrayRCP< part_t > &  rowIDs,
ArrayRCP< part_t > &  colIDs,
ArrayRCP< part_t > &  domainIDs,
ArrayRCP< part_t > &  rangeIDs 
)

The algorithm uses setIDLists to set the solution.

Parameters
rowIDsList of row numbers that the nonzeros for this processor contain.
colIDsList of column numbers that the nonzeros for this processor contain.
domainIDsDomain vector Ids assigned to this process
rangeIDsRange vector Ids assigned to this process

Definition at line 326 of file Zoltan2_MatrixPartitioningSolution.hpp.

template<typename Adapter>
const RCP<const Comm<int> >& Zoltan2::MatrixPartitioningSolution< Adapter >::getCommunicator ( ) const
inline

Remap a new partition for maximum overlap with an input partition.

Assumptions for this version: input part assignment == processor rank for every local object. assuming nGlobalParts <= num ranks TODO: Write a version that takes the input part number as input; this change requires input parts in adapters to be provided in the Adapter. TODO: For repartitioning, compare to old remapping results; see Zoltan1.

Return the communicator associated with the solution.

Definition at line 186 of file Zoltan2_MatrixPartitioningSolution.hpp.

template<typename Adapter>
const RCP<const Environment>& Zoltan2::MatrixPartitioningSolution< Adapter >::getEnvironment ( ) const
inline

Return the environment associated with the solution.

Definition at line 190 of file Zoltan2_MatrixPartitioningSolution.hpp.

template<typename Adapter>
const gno_t* Zoltan2::MatrixPartitioningSolution< Adapter >::getRowIdsView ( ) const
inline

Returns list of global row IDs of the nonzeros owned by this process.

Definition at line 195 of file Zoltan2_MatrixPartitioningSolution.hpp.

template<typename Adapter>
const gno_t* Zoltan2::MatrixPartitioningSolution< Adapter >::getColIdsView ( ) const
inline

Returns list of global column IDs of the nonzeros owned by this process.

Definition at line 206 of file Zoltan2_MatrixPartitioningSolution.hpp.


The documentation for this class was generated from the following file: