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"
52template<
class GraphType>
59template<
class GraphType>
63template<
class GraphType>
69template<
class GraphType>
80 const int mod = as<int> (this->Graph_->getLocalNumRows () /
81 this->NumLocalParts_);
82 for (
size_t i = 0; i < this->Graph_->getLocalNumRows (); ++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 > >;
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
void computePartitions()
Compute the partitions.
Definition: Ifpack2_LinearPartitioner_def.hpp:70
Create overlapping partitions of a local graph.
Definition: Ifpack2_OverlappingPartitioner_decl.hpp:78
Preconditioners and smoothers for Tpetra sparse matrices.
Definition: Ifpack2_AdditiveSchwarz_decl.hpp:74