43 #ifndef IFPACK2_LINEAR_PARTITIONER_DEF_HPP
44 #define IFPACK2_LINEAR_PARTITIONER_DEF_HPP
45 #include "Ifpack2_ConfigDefs.hpp"
46 #include "Ifpack2_LinearPartitioner_decl.hpp"
52 template<
class GraphType>
59 template<
class GraphType>
63 template<
class GraphType>
69 template<
class GraphType>
80 const int mod = as<int> (this->Graph_->getNodeNumRows () /
81 this->NumLocalParts_);
82 for (
size_t i = 0; i < this->Graph_->getNodeNumRows (); ++i) {
83 this->Partition_[i] = as<local_ordinal_type> (i / mod);
84 if (this->Partition_[i] >= as<local_ordinal_type> (this->NumLocalParts_)) {
85 this->Partition_[i] = this->NumLocalParts_ - 1;
93 #define IFPACK2_LINEARPARTITIONER_INSTANT(LO,GO,N) \
94 template class Ifpack2::LinearPartitioner<Tpetra::CrsGraph< LO, GO, N > >; \
95 template class Ifpack2::LinearPartitioner<Tpetra::RowGraph< LO, GO, N > >;
97 #endif // IFPACK2_LINEARPARTITIONER_DEF_HPP
void computePartitions()
Compute the partitions.
Definition: Ifpack2_LinearPartitioner_def.hpp:70
virtual ~LinearPartitioner()
Destructor.
Definition: Ifpack2_LinearPartitioner_def.hpp:60
LinearPartitioner(const Teuchos::RCP< const row_graph_type > &graph)
Constructor.
Definition: Ifpack2_LinearPartitioner_def.hpp:54
void setPartitionParameters(Teuchos::ParameterList &List)
Set the partitioner's parameters (none for linear partitioning).
Definition: Ifpack2_LinearPartitioner_def.hpp:66
TypeTo as(const TypeFrom &t)
Create overlapping partitions of a local graph.
Definition: Ifpack2_OverlappingPartitioner_decl.hpp:78