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>
54 OverlappingPartitioner<GraphType>(Graph)
59 template<
class GraphType>
66 template<
class GraphType>
72 template<
class GraphType>
76 int mod = this->Graph_->getNodeNumRows() / this->NumLocalParts_;
77 for (
size_t i = 0 ; i < this->Graph_->getNodeNumRows() ; ++i) {
78 this->Partition_[i] = i / mod;
79 if (this->Partition_[i] >= this->NumLocalParts_)
80 this->Partition_[i] = this->NumLocalParts_ - 1;
87 #endif // IFPACK2_LINEARPARTITIONER_DEF_HPP
virtual ~LinearPartitioner()
Destructor.
Definition: Ifpack2_LinearPartitioner_def.hpp:60
LinearPartitioner(const Teuchos::RCP< const Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node > > &Graph)
Constructor.
Definition: Ifpack2_LinearPartitioner_def.hpp:53
void setPartitionParameters(Teuchos::ParameterList &List)
Sets all the parameters for the partitioner (none for linear partioning).
Definition: Ifpack2_LinearPartitioner_def.hpp:67
Ifpack2::LinearPartitioner: A class to define linear partitions.
Definition: Ifpack2_LinearPartitioner_decl.hpp:54