IFPACK Development
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Ifpack_OverlappingPartitioner Class Referenceabstract
Inheritance diagram for Ifpack_OverlappingPartitioner:
Inheritance graph
[legend]
Collaboration diagram for Ifpack_OverlappingPartitioner:
Collaboration graph
[legend]

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<<.
 
- Public Member Functions inherited from Ifpack_Partitioner
virtual ~Ifpack_Partitioner ()
 Destructor.
 

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_CommComm () 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_GraphGraph_
 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.
 

Detailed Description

Definition at line 81 of file Ifpack_OverlappingPartitioner.h.

Constructor & Destructor Documentation

◆ Ifpack_OverlappingPartitioner()

Ifpack_OverlappingPartitioner::Ifpack_OverlappingPartitioner ( const Ifpack_Graph * Graph)

Constructor.

Definition at line 56 of file Ifpack_OverlappingPartitioner.cpp.

◆ ~Ifpack_OverlappingPartitioner()

Ifpack_OverlappingPartitioner::~Ifpack_OverlappingPartitioner ( )
virtual

Destructor.

Definition at line 67 of file Ifpack_OverlappingPartitioner.cpp.

Member Function Documentation

◆ Comm()

const Epetra_Comm & Ifpack_OverlappingPartitioner::Comm ( ) const
protected

Returns the communicator object of Graph.

Definition at line 283 of file Ifpack_OverlappingPartitioner.cpp.

References Ifpack_Graph::Comm(), and Graph_.

Referenced by Compute(), and Print().

◆ Compute()

int Ifpack_OverlappingPartitioner::Compute ( )
virtual

◆ ComputeOverlappingPartitions()

int Ifpack_OverlappingPartitioner::ComputeOverlappingPartitions ( )
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().

◆ ComputePartitions()

virtual int Ifpack_OverlappingPartitioner::ComputePartitions ( )
pure virtual

◆ IsComputed()

bool Ifpack_OverlappingPartitioner::IsComputed ( )
inlinevirtual

Returns true if partitions have been computed successfully.

Implements Ifpack_Partitioner.

Definition at line 175 of file Ifpack_OverlappingPartitioner.h.

References IsComputed_.

◆ MaxNumEntries()

int Ifpack_OverlappingPartitioner::MaxNumEntries ( ) const
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().

◆ NonOverlappingPartition()

const int * Ifpack_OverlappingPartitioner::NonOverlappingPartition ( ) const
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_.

◆ NumGlobalRows()

int Ifpack_OverlappingPartitioner::NumGlobalRows ( ) const
protected

Returns the number of global rows.

Definition at line 266 of file Ifpack_OverlappingPartitioner.cpp.

References Graph_, and Ifpack_Graph::NumGlobalRows().

◆ NumGlobalRows64()

long long Ifpack_OverlappingPartitioner::NumGlobalRows64 ( ) const
protected

Definition at line 272 of file Ifpack_OverlappingPartitioner.cpp.

◆ NumLocalParts()

int Ifpack_OverlappingPartitioner::NumLocalParts ( ) const
inlinevirtual

◆ NumMyNonzeros()

int Ifpack_OverlappingPartitioner::NumMyNonzeros ( ) const
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().

◆ NumMyRows()

int Ifpack_OverlappingPartitioner::NumMyRows ( ) const
protected

◆ NumRowsInPart()

int Ifpack_OverlappingPartitioner::NumRowsInPart ( const int Part) const
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().

◆ operator()() [1/2]

int Ifpack_OverlappingPartitioner::operator() ( int i,
int j ) const
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_.

◆ operator()() [2/2]

int Ifpack_OverlappingPartitioner::operator() ( int MyRow) const
inlinevirtual

Returns the local non-overlapping partition ID of the specified row.

Returns the non-overlapping partition ID of the specified row.

Parameters
MyRow- (In) local row numbe
Returns
Local ID of non-overlapping partition for \t MyRow.

Implements Ifpack_Partitioner.

Definition at line 111 of file Ifpack_OverlappingPartitioner.h.

References NumMyRows(), and Partition_.

◆ OverlappingLevel()

int Ifpack_OverlappingPartitioner::OverlappingLevel ( ) const
inlinevirtual

Returns the overlapping level.

Implements Ifpack_Partitioner.

Definition at line 98 of file Ifpack_OverlappingPartitioner.h.

References OverlappingLevel_.

◆ Print()

std::ostream & Ifpack_OverlappingPartitioner::Print ( std::ostream & os) const
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_.

◆ RowsInPart()

int Ifpack_OverlappingPartitioner::RowsInPart ( const int Part,
int * List ) const
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_.

◆ SetParameters()

int Ifpack_OverlappingPartitioner::SetParameters ( Teuchos::ParameterList & List)
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_.

◆ SetPartitionParameters()

virtual int Ifpack_OverlappingPartitioner::SetPartitionParameters ( Teuchos::ParameterList & List)
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().

Member Data Documentation

◆ Graph_

const Ifpack_Graph* Ifpack_OverlappingPartitioner::Graph_
protected

◆ IsComputed_

bool Ifpack_OverlappingPartitioner::IsComputed_
protected

If true, the graph has been successfully partitioned.

Definition at line 210 of file Ifpack_OverlappingPartitioner.h.

Referenced by Compute(), IsComputed(), and Print().

◆ NumLocalParts_

int Ifpack_OverlappingPartitioner::NumLocalParts_
protected

◆ OverlappingLevel_

int Ifpack_OverlappingPartitioner::OverlappingLevel_
protected

Overlapping level.

Definition at line 208 of file Ifpack_OverlappingPartitioner.h.

Referenced by Compute(), ComputeOverlappingPartitions(), OverlappingLevel(), Print(), and SetParameters().

◆ Partition_

std::vector<int> Ifpack_OverlappingPartitioner::Partition_
protected

◆ Parts_

std::vector<std::vector<int> > Ifpack_OverlappingPartitioner::Parts_
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().

◆ verbose_

bool Ifpack_OverlappingPartitioner::verbose_
protected

If true, information are reported on cout.

Definition at line 212 of file Ifpack_OverlappingPartitioner.h.

Referenced by Compute(), and SetParameters().


The documentation for this class was generated from the following files: