50#ifndef _ZOLTAN2_MATRIXPARTITIONINGSOLUTION_HPP_
51#define _ZOLTAN2_MATRIXPARTITIONINGSOLUTION_HPP_
85template <
typename Adapter>
90#ifndef DOXYGEN_SHOULD_SKIP_THIS
91 typedef typename Adapter::gno_t
gno_t;
92 typedef typename Adapter::scalar_t scalar_t;
93 typedef typename Adapter::lno_t
lno_t;
94 typedef typename Adapter::part_t
part_t;
95 typedef typename Adapter::user_t
user_t;
114 const RCP<
const Comm<int> > &comm,
115 const RCP<Algorithm<Adapter> > &algorithm = Teuchos::null);
138 void setIDLists(ArrayRCP<part_t> &rowIDs,ArrayRCP<part_t> &colIDs,
139 ArrayRCP<part_t> &domainIDs, ArrayRCP<part_t> &rangeIDs);
197 if (rowIDs_.size() > 0)
198 return rowIDs_.getRawPtr();
208 if (colIDs_.size() > 0)
209 return colIDs_.getRawPtr();
258 RCP<const Environment> env_;
259 const RCP<const Comm<int> > comm_;
295 ArrayRCP<gno_t> rowIDs_;
296 ArrayRCP<gno_t> colIDs_;
298 ArrayRCP<gno_t> domainIDs_;
299 ArrayRCP<gno_t> rangeIDs_;
308 const RCP<Algorithm<Adapter> > algorithm_;
313template <
typename Adapter>
315 const RCP<
const Comm<int> > &comm,
const RCP<Algorithm<Adapter> > &algorithm)
316 : env_(env), comm_(comm), rowIDs_(), colIDs_(), haveSolution_(false),
317 algorithm_(algorithm)
319 env_->memory(
"After construction of solution");
325template <
typename Adapter>
327 ArrayRCP<part_t> &domainIDs, ArrayRCP<part_t> &rangeIDs)
329 env_->debug(DETAILED_STATUS,
"Entering setParts");
333 domainIDs_=domainIDs;
336 haveSolution_ =
true;
338 env_->memory(
"After Solution has processed algorithm's answer");
339 env_->debug(DETAILED_STATUS,
"Exiting setParts");
Zoltan2::BasicUserTypes< zscalar_t, zlno_t, zgno_t > user_t
A PartitioningSolution is a solution to a partitioning problem.
const RCP< const Comm< int > > & getCommunicator() const
Remap a new partition for maximum overlap with an input partition.
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.
const RCP< const Environment > & getEnvironment() const
Return the environment associated with the solution.
const gno_t * getRowIdsView() const
Returns list of global row IDs of the nonzeros owned by this process.
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.
const gno_t * getColIdsView() const
Returns list of global column IDs of the nonzeros owned by this process.
Just a placeholder for now.
map_t::local_ordinal_type lno_t
map_t::global_ordinal_type gno_t
Created by mbenlioglu on Aug 31, 2020.
SparseMatrixAdapter_t::part_t part_t