metisDecomp: Update to support 64-bit labels

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1920
This commit is contained in:
Henry Weller
2015-11-20 14:29:27 +00:00
parent f900abd83b
commit dab33cce52
2 changed files with 6 additions and 11 deletions

View File

@ -30,8 +30,8 @@ License
extern "C"
{
#define OMPI_SKIP_MPICXX
# include "metis.h"
#define OMPI_SKIP_MPICXX
#include "metis.h"
}
@ -40,14 +40,12 @@ extern "C"
namespace Foam
{
defineTypeNameAndDebug(metisDecomp, 0);
addToRunTimeSelectionTable(decompositionMethod, metisDecomp, dictionary);
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// Call Metis with options from dictionary.
Foam::label Foam::metisDecomp::decompose
(
const List<label>& adjncy,
@ -57,9 +55,6 @@ Foam::label Foam::metisDecomp::decompose
List<label>& finalDecomp
)
{
// C style numbering
//int numFlag = 0;
// Method of decomposition
// recursive: multi-level recursive bisection (default)
// k-way: multi-level k-way
@ -187,15 +182,15 @@ Foam::label Foam::metisDecomp::decompose
//}
}
int ncon = 1;
label ncon = 1;
int nProcs = nProcessors_;
label nProcs = nProcessors_;
// output: cell -> processor addressing
finalDecomp.setSize(numCells);
// output: number of cut edges
int edgeCut = 0;
label edgeCut = 0;
if (method == "recursive")
{

View File

@ -51,6 +51,7 @@ class metisDecomp
// Private Member Functions
//- Call Metis with options from dictionary.
label decompose
(
const List<label>& adjncy,
@ -131,7 +132,6 @@ public:
const pointField& cc,
const scalarField& cWeights
);
};