IFPACK Development
|
Public Member Functions | |
Ifpack_OverlappingPartitioner (const Ifpack_Graph *Graph) | |
Constructor. | |
virtual | ~Ifpack_OverlappingPartitioner () |
Destructor. | |
int | NumLocalParts () const |
Returns the number of computed local partitions. | |
int | OverlappingLevel () const |
Returns the overlapping level. | |
int | operator() (int MyRow) const |
Returns the local non-overlapping partition ID of the specified row. | |
int | operator() (int i, int j) const |
Returns the local overlapping partition ID of the j-th node in partition i. | |
int | NumRowsInPart (const int Part) const |
Returns the number of rows contained in specified partition. | |
int | RowsInPart (const int Part, int *List) const |
Copies into List the rows in the (overlapping) partition Part. | |
const int * | NonOverlappingPartition () const |
Returns a pointer to the integer vector containing the non-overlapping partition ID of each local row. | |
virtual int | SetParameters (Teuchos::ParameterList &List) |
Sets all the parameters for the partitioner. | |
virtual int | SetPartitionParameters (Teuchos::ParameterList &List)=0 |
Sets all the parameters for the partitioner. | |
virtual int | Compute () |
Computes the partitions. Returns 0 if successful. | |
virtual int | ComputePartitions ()=0 |
Computes the partitions. Returns 0 if successful. | |
virtual int | ComputeOverlappingPartitions () |
Computes the partitions. Returns 0 if successful. | |
bool | IsComputed () |
Returns true if partitions have been computed successfully. | |
virtual std::ostream & | Print (std::ostream &os) const |
Prints basic information on iostream. This function is used by operator<<. | |
![]() | |
virtual | ~Ifpack_Partitioner () |
Destructor. | |
virtual int | NumLocalParts () const =0 |
Returns the number of computed local partitions. | |
virtual int | OverlappingLevel () const =0 |
Returns the overlapping level. | |
virtual int | operator() (int MyRow) const =0 |
Returns the local non-overlapping partition ID of the specified row. | |
virtual int | operator() (int i, int j) const =0 |
Returns the local overlapping partition ID of the j-th node in partition i. | |
virtual int | NumRowsInPart (const int Part) const =0 |
Returns the number of rows contained in specified partition. | |
virtual int | RowsInPart (const int Part, int *List) const =0 |
Copies into List the rows in the (overlapping) partition Part. | |
virtual const int * | NonOverlappingPartition () const =0 |
Returns a pointer to the integer vector containing the non-overlapping partition ID of each local row. | |
virtual int | SetParameters (Teuchos::ParameterList &List)=0 |
Sets all the parameters for the partitioner. | |
virtual int | Compute ()=0 |
Computes the partitions. Returns 0 if successful. | |
virtual bool | IsComputed ()=0 |
Returns true if partitions have been computed successfully. | |
virtual std::ostream & | Print (std::ostream &os) const =0 |
Prints basic information about the partitioning object. | |
Protected Member Functions | |
int | NumMyRows () const |
Returns the number of local rows. | |
int | NumMyNonzeros () const |
Returns the number of local nonzero elements. | |
int | NumGlobalRows () const |
Returns the number of global rows. | |
long long | NumGlobalRows64 () const |
int | MaxNumEntries () const |
Returns the max number of local entries in a row. | |
const Epetra_Comm & | Comm () const |
Returns the communicator object of Graph. | |
Protected Attributes | |
int | NumLocalParts_ |
Number of local subgraphs. | |
std::vector< int > | Partition_ |
Partition_[i] contains the ID of non-overlapping part it belongs to. | |
std::vector< std::vector< int > > | Parts_ |
Parts_[i][j] is the ID of the j-th row contained in the (overlapping) | |
const Ifpack_Graph * | Graph_ |
Reference to the graph to be partitioned. | |
int | OverlappingLevel_ |
Overlapping level. | |
bool | IsComputed_ |
If true , the graph has been successfully partitioned. | |
bool | verbose_ |
If true , information are reported on cout. | |
Definition at line 81 of file Ifpack_OverlappingPartitioner.h.
Ifpack_OverlappingPartitioner::Ifpack_OverlappingPartitioner | ( | const Ifpack_Graph * | Graph | ) |
Constructor.
Definition at line 56 of file Ifpack_OverlappingPartitioner.cpp.
|
virtual |
Destructor.
Definition at line 67 of file Ifpack_OverlappingPartitioner.cpp.
|
protected |
Returns the communicator object of Graph.
Definition at line 283 of file Ifpack_OverlappingPartitioner.cpp.
References Ifpack_Graph::Comm(), and Graph_.
|
virtual |
Computes the partitions. Returns 0 if successful.
Implements Ifpack_Partitioner.
Definition at line 97 of file Ifpack_OverlappingPartitioner.cpp.
References Comm(), ComputeOverlappingPartitions(), ComputePartitions(), Ifpack_Graph::Filled(), Graph_, IsComputed_, NumLocalParts(), NumLocalParts_, NumMyRows(), Epetra_Comm::NumProc(), OverlappingLevel_, Partition_, Parts_, and verbose_.
|
virtual |
Computes the partitions. Returns 0 if successful.
Definition at line 149 of file Ifpack_OverlappingPartitioner.cpp.
References Ifpack_Graph::ExtractMyRowCopy(), Graph_, Ifpack_Graph::MaxMyNumEntries(), NumLocalParts_, NumMyRows(), OverlappingLevel_, Partition_, and Parts_.
Referenced by Compute().
|
pure virtual |
Computes the partitions. Returns 0 if successful.
Implemented in Ifpack_EquationPartitioner, Ifpack_GreedyPartitioner, Ifpack_LinearPartitioner, Ifpack_LinePartitioner, Ifpack_METISPartitioner, and Ifpack_UserPartitioner.
Referenced by Compute().
|
inlinevirtual |
Returns true if partitions have been computed successfully.
Implements Ifpack_Partitioner.
Definition at line 175 of file Ifpack_OverlappingPartitioner.h.
References IsComputed_.
|
protected |
Returns the max number of local entries in a row.
Definition at line 277 of file Ifpack_OverlappingPartitioner.cpp.
References Graph_, and Ifpack_Graph::MaxMyNumEntries().
Referenced by Ifpack_GreedyPartitioner::ComputePartitions(), and Ifpack_METISPartitioner::ComputePartitions().
|
inlinevirtual |
Returns a pointer to the integer vector containing the non-overlapping partition ID of each local row.
Implements Ifpack_Partitioner.
Definition at line 145 of file Ifpack_OverlappingPartitioner.h.
References Partition_.
|
protected |
Returns the number of global rows.
Definition at line 266 of file Ifpack_OverlappingPartitioner.cpp.
References Graph_, and Ifpack_Graph::NumGlobalRows().
|
protected |
Definition at line 272 of file Ifpack_OverlappingPartitioner.cpp.
|
inlinevirtual |
Returns the number of computed local partitions.
Implements Ifpack_Partitioner.
Definition at line 92 of file Ifpack_OverlappingPartitioner.h.
References NumLocalParts_.
Referenced by Compute(), Ifpack_GreedyPartitioner::ComputePartitions(), Ifpack_METISPartitioner::ComputePartitions(), Ifpack_UserPartitioner::ComputePartitions(), and operator()().
|
protected |
Returns the number of local nonzero elements.
Definition at line 259 of file Ifpack_OverlappingPartitioner.cpp.
References Graph_, and Ifpack_Graph::NumMyNonzeros().
Referenced by Ifpack_METISPartitioner::ComputePartitions().
|
protected |
Returns the number of local rows.
Definition at line 253 of file Ifpack_OverlappingPartitioner.cpp.
References Graph_, and Ifpack_Graph::NumMyRows().
Referenced by Compute(), ComputeOverlappingPartitions(), Ifpack_EquationPartitioner::ComputePartitions(), Ifpack_GreedyPartitioner::ComputePartitions(), Ifpack_LinearPartitioner::ComputePartitions(), Ifpack_LinePartitioner::ComputePartitions(), Ifpack_METISPartitioner::ComputePartitions(), Ifpack_UserPartitioner::ComputePartitions(), and operator()().
|
inlinevirtual |
Returns the number of rows contained in specified partition.
Implements Ifpack_Partitioner.
Definition at line 132 of file Ifpack_OverlappingPartitioner.h.
References Parts_.
Referenced by RowsInPart().
|
inlinevirtual |
Returns the local overlapping partition ID of the j-th node in partition i.
Implements Ifpack_Partitioner.
Definition at line 120 of file Ifpack_OverlappingPartitioner.h.
References NumLocalParts(), and Parts_.
|
inlinevirtual |
Returns the local non-overlapping partition ID of the specified row.
Returns the non-overlapping partition ID of the specified row.
MyRow | - (In) local row numbe |
Implements Ifpack_Partitioner.
Definition at line 111 of file Ifpack_OverlappingPartitioner.h.
References NumMyRows(), and Partition_.
|
inlinevirtual |
Returns the overlapping level.
Implements Ifpack_Partitioner.
Definition at line 98 of file Ifpack_OverlappingPartitioner.h.
References OverlappingLevel_.
|
virtual |
Prints basic information on iostream. This function is used by operator<<.
Implements Ifpack_Partitioner.
Definition at line 289 of file Ifpack_OverlappingPartitioner.cpp.
References Comm(), Graph_, IsComputed_, NumLocalParts_, Ifpack_Graph::NumMyRows(), and OverlappingLevel_.
|
inlinevirtual |
Copies into List the rows in the (overlapping) partition Part.
Implements Ifpack_Partitioner.
Definition at line 137 of file Ifpack_OverlappingPartitioner.h.
References NumRowsInPart(), and Parts_.
|
virtual |
Sets all the parameters for the partitioner.
The supported parameters are:
"partitioner: overlap"
(int, default = 0)."partitioner: local parts"
(int, default = 1)."partitioner: print level"
(int, default = 0). Implements Ifpack_Partitioner.
Definition at line 72 of file Ifpack_OverlappingPartitioner.cpp.
References Graph_, NumLocalParts_, Ifpack_Graph::NumMyRows(), OverlappingLevel_, SetPartitionParameters(), and verbose_.
|
pure virtual |
Sets 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 Ifpack_EquationPartitioner, Ifpack_LinearPartitioner, Ifpack_GreedyPartitioner, Ifpack_LinePartitioner, Ifpack_METISPartitioner, and Ifpack_UserPartitioner.
Referenced by SetParameters().
|
protected |
Reference to the graph to be partitioned.
Definition at line 206 of file Ifpack_OverlappingPartitioner.h.
Referenced by Comm(), Compute(), ComputeOverlappingPartitions(), Ifpack_GreedyPartitioner::ComputePartitions(), Ifpack_METISPartitioner::ComputePartitions(), MaxNumEntries(), NumGlobalRows(), NumMyNonzeros(), NumMyRows(), Print(), and SetParameters().
|
protected |
If true
, the graph has been successfully partitioned.
Definition at line 210 of file Ifpack_OverlappingPartitioner.h.
Referenced by Compute(), IsComputed(), and Print().
|
protected |
Number of local subgraphs.
Definition at line 199 of file Ifpack_OverlappingPartitioner.h.
Referenced by Compute(), ComputeOverlappingPartitions(), Ifpack_EquationPartitioner::ComputePartitions(), Ifpack_GreedyPartitioner::ComputePartitions(), Ifpack_LinearPartitioner::ComputePartitions(), Ifpack_LinePartitioner::ComputePartitions(), Ifpack_METISPartitioner::ComputePartitions(), Ifpack_UserPartitioner::ComputePartitions(), NumLocalParts(), Print(), and SetParameters().
|
protected |
Overlapping level.
Definition at line 208 of file Ifpack_OverlappingPartitioner.h.
Referenced by Compute(), ComputeOverlappingPartitions(), OverlappingLevel(), Print(), and SetParameters().
|
protected |
Partition_[i] contains the ID of non-overlapping part it belongs to.
Definition at line 201 of file Ifpack_OverlappingPartitioner.h.
Referenced by Compute(), ComputeOverlappingPartitions(), Ifpack_EquationPartitioner::ComputePartitions(), Ifpack_GreedyPartitioner::ComputePartitions(), Ifpack_LinearPartitioner::ComputePartitions(), Ifpack_LinePartitioner::ComputePartitions(), Ifpack_METISPartitioner::ComputePartitions(), Ifpack_UserPartitioner::ComputePartitions(), NonOverlappingPartition(), and operator()().
|
protected |
Parts_[i][j] is the ID of the j-th row contained in the (overlapping)
Definition at line 204 of file Ifpack_OverlappingPartitioner.h.
Referenced by Compute(), ComputeOverlappingPartitions(), Ifpack_LinePartitioner::ComputePartitions(), Ifpack_UserPartitioner::ComputePartitions(), NumRowsInPart(), operator()(), and RowsInPart().
|
protected |
If true
, information are reported on cout.
Definition at line 212 of file Ifpack_OverlappingPartitioner.h.
Referenced by Compute(), and SetParameters().