Ifpack2 Templated Preconditioning Package
Version 1.0
|
Create overlapping partitions of a local graph. More...
#include <Ifpack2_OverlappingPartitioner_decl.hpp>
Public Member Functions | |
OverlappingPartitioner (const Teuchos::RCP< const row_graph_type > &graph) | |
Constructor. More... | |
virtual | ~OverlappingPartitioner () |
Destructor. More... | |
int | numLocalParts () const |
Number of computed local partitions. More... | |
int | overlappingLevel () const |
The number of levels of overlap. More... | |
local_ordinal_type | operator() (const local_ordinal_type MyRow) const |
Local index of the nonoverlapping partition of the given row. More... | |
local_ordinal_type | operator() (const local_ordinal_type i, const local_ordinal_type j) const |
Local index of the overlapping partition of the j-th vertex in partition i. More... | |
size_t | numRowsInPart (const local_ordinal_type Part) const |
the number of rows contained in the given partition. More... | |
void | rowsInPart (const local_ordinal_type Part, Teuchos::ArrayRCP< local_ordinal_type > &List) const |
Fill List with the local indices of the rows in the (overlapping) partition Part . More... | |
virtual Teuchos::ArrayView < const local_ordinal_type > | nonOverlappingPartition () const |
A view of the local indices of the nonoverlapping partitions of each local row. More... | |
virtual void | setParameters (Teuchos::ParameterList &List) |
Set all the parameters for the partitioner. More... | |
virtual void | setPartitionParameters (Teuchos::ParameterList &List)=0 |
Set all the parameters for the partitioner. More... | |
virtual void | compute () |
Computes the partitions. Returns 0 if successful. More... | |
virtual void | computePartitions ()=0 |
Computes the partitions. Returns 0 if successful. More... | |
virtual void | computeOverlappingPartitions () |
Computes the partitions. Returns 0 if successful. More... | |
virtual bool | isComputed () const |
Returns true if partitions have been computed successfully. More... | |
virtual std::ostream & | print (std::ostream &os) const |
Prints basic information on iostream. This function is used by operator<<. More... | |
Implementation of Teuchos::Describable | |
std::string | description () const |
Return a simple one-line description of this object. More... | |
void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const |
Print the object with some verbosity level to an FancyOStream object. More... | |
Public Member Functions inherited from Ifpack2::Partitioner< GraphType > | |
virtual | ~Partitioner () |
Destructor. More... | |
Protected Attributes | |
int | NumLocalParts_ |
Number of local subgraphs. More... | |
Teuchos::Array < local_ordinal_type > | Partition_ |
Mapping from local row to partition number. More... | |
Teuchos::Array < Teuchos::ArrayRCP < local_ordinal_type > > | Parts_ |
Mapping from partition to all rows it contains. More... | |
Teuchos::RCP< const row_graph_type > | Graph_ |
The graph to be partitioned. More... | |
int | OverlappingLevel_ |
Level of overlap. More... | |
bool | IsComputed_ |
If true , the graph has been successfully partitioned. More... | |
bool | verbose_ |
If true , information are reported to stdout. More... | |
bool | maintainSparsity_ |
If true , only add row to partition (block) if doing so won't add new columns to the column map. More... | |
Create overlapping partitions of a local graph.
GraphType | Specialization of Tpetra::CrsGraph or Tpetra::RowGraph. |
This class enables the extension of nonoverlapping partitions to an arbitrary amount of constant overlap. "Overlap" here refers to the overlap among the local parts, and not the overlap among the processes.
For partitions with varying overlap, use UserPartitioner, which inherits from OverlappingPartitioner.
Supported parameters are:
local_ordinal_type
): the number of local partitions. Default is one (one local partition, which means "do not partition locally").This class implements common functionality for derived classes like LinearPartitioner. Graphs given as input to any derived class must contain no singletons. Usually, this means that the graph is the graph of a Tpetra::RowMatrix that has been filtered using SingletonFilter.
Ifpack2::OverlappingPartitioner< GraphType >::OverlappingPartitioner | ( | const Teuchos::RCP< const row_graph_type > & | graph | ) |
Constructor.
|
virtual |
Destructor.
|
virtual |
Number of computed local partitions.
This is a (signed) int
because negative values are significant. We can't use local_ordinal_type
here, because that type may be either signed or unsigned.
Implements Ifpack2::Partitioner< GraphType >.
|
virtual |
The number of levels of overlap.
Implements Ifpack2::Partitioner< GraphType >.
|
virtual |
Local index of the nonoverlapping partition of the given row.
MyRow | [in] Local index of the row. |
Implements Ifpack2::Partitioner< GraphType >.
|
virtual |
Local index of the overlapping partition of the j-th vertex in partition i.
Implements Ifpack2::Partitioner< GraphType >.
|
virtual |
the number of rows contained in the given partition.
Implements Ifpack2::Partitioner< GraphType >.
|
virtual |
Fill List
with the local indices of the rows in the (overlapping) partition Part
.
Implements Ifpack2::Partitioner< GraphType >.
|
virtual |
A view of the local indices of the nonoverlapping partitions of each local row.
Implements Ifpack2::Partitioner< GraphType >.
|
virtual |
Set all the parameters for the partitioner.
The supported parameters are:
"partitioner: overlap"
(int, default = 0)."partitioner: local parts"
(int, default = 1)."partitioner: print level"
(bool, default = false). Implements Ifpack2::Partitioner< GraphType >.
|
pure virtual |
Set all the parameters for the partitioner.
This function is used by derived classes to set their own parameters. These classes should not derive SetParameters(), so that common parameters can be set just once.
Implemented in Ifpack2::Details::UserPartitioner< GraphType >, Ifpack2::LinePartitioner< GraphType, Scalar >, and Ifpack2::LinearPartitioner< GraphType >.
|
virtual |
Computes the partitions. Returns 0 if successful.
Implements Ifpack2::Partitioner< GraphType >.
|
pure virtual |
Computes the partitions. Returns 0 if successful.
Implemented in Ifpack2::Details::UserPartitioner< GraphType >, Ifpack2::LinePartitioner< GraphType, Scalar >, and Ifpack2::LinearPartitioner< GraphType >.
|
virtual |
Computes the partitions. Returns 0 if successful.
|
virtual |
Returns true if partitions have been computed successfully.
Implements Ifpack2::Partitioner< GraphType >.
|
virtual |
Prints basic information on iostream. This function is used by operator<<.
Implements Ifpack2::Partitioner< GraphType >.
|
virtual |
Return a simple one-line description of this object.
Reimplemented from Teuchos::Describable.
|
virtual |
Print the object with some verbosity level to an FancyOStream object.
Reimplemented from Teuchos::Describable.
|
protected |
Number of local subgraphs.
This is a (signed) int
because negative values are significant. We can't use local_ordinal_type
here, because that type may be either signed or unsigned.
|
protected |
Mapping from local row to partition number.
Partition_
[i] contains the local index of the nonoverlapping partition to which local row i belongs. If the application has explicitly defined Parts_
, then Partition_
is unused.
|
protected |
Mapping from partition to all rows it contains.
Used
with 'partitioner: parts' (or 'partitioner: global ID parts') Parts_
[i][j] is the local (or global) index of the j-th row contained in the (overlapping) partition i.
|
protected |
The graph to be partitioned.
|
protected |
Level of overlap.
|
protected |
If true
, the graph has been successfully partitioned.
|
protected |
If true
, information are reported to stdout.
|
protected |
If true
, only add row to partition (block) if doing so won't add new columns to the column map.
Default is false. This option should decrease computational cost of the apply, but convergence will likely degrade.