| 1 |
// @HEADER |
| 2 |
// ***************************************************************************** |
| 3 |
// Trilinos: An Object-Oriented Solver Framework |
| 4 |
// |
| 5 |
// Copyright 2001-2024 NTESS and the Trilinos contributors. |
| 6 |
// SPDX-License-Identifier: BSD-3-Clause |
| 7 |
// ***************************************************************************** |
| 8 |
// @HEADER |
| 9 |
|
| 10 |
#ifndef EPETRAEXT_ISORROPIA_CRSGRAPH_H |
| 11 |
#define EPETRAEXT_ISORROPIA_CRSGRAPH_H |
| 12 |
|
| 13 |
#include <EpetraExt_Transform.h> |
| 14 |
|
| 15 |
#include <Teuchos_RCP.hpp> |
| 16 |
#include <Teuchos_ParameterList.hpp> |
| 17 |
|
| 18 |
class Epetra_CrsGraph; |
| 19 |
class Epetra_Map; |
| 20 |
|
| 21 |
namespace EpetraExt { |
| 22 |
|
| 23 |
/// |
| 24 |
/** Generates an Epetra_CrsGraph based on the repartitioning algorithms of Isorropia |
| 25 |
*/ |
| 26 |
class Isorropia_CrsGraph : public StructuralSameTypeTransform<Epetra_CrsGraph> { |
| 27 |
|
| 28 |
// Parameter list to specify partitioning algorithm for Isorropia. |
| 29 |
Teuchos::ParameterList partitionList_; |
| 30 |
|
| 31 |
// New graph for the repartitioned matrix. |
| 32 |
Teuchos::RCP<Epetra_CrsGraph> NewGraph_; |
| 33 |
|
| 34 |
public: |
| 35 |
|
| 36 |
/// |
| 37 |
/* Destructor |
| 38 |
*/ |
| 39 |
~Isorropia_CrsGraph(); |
| 40 |
|
| 41 |
/// |
| 42 |
/* Constructor |
| 43 |
* input param part_method - type of Isorropia partitioning to use |
| 44 |
*/ |
| 45 |
Isorropia_CrsGraph( Teuchos::ParameterList& partitionList ) |
| 46 |
: partitionList_(partitionList) |
| 47 |
{} |
| 48 |
|
| 49 |
/// |
| 50 |
/* Generates the Isorropia partitioned Epetra_CrsGraph from the input object. |
| 51 |
*/ |
| 52 |
NewTypeRef operator()( OriginalTypeRef orig ); |
| 53 |
|
| 54 |
}; |
| 55 |
|
| 56 |
} //namespace EpetraExt |
| 57 |
|
| 58 |
#endif //EPETRAEXT_ISORROPIA_CRSGRAPH_H |