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

@ -40,14 +40,12 @@ extern "C"
namespace Foam namespace Foam
{ {
defineTypeNameAndDebug(metisDecomp, 0); defineTypeNameAndDebug(metisDecomp, 0);
addToRunTimeSelectionTable(decompositionMethod, metisDecomp, dictionary); addToRunTimeSelectionTable(decompositionMethod, metisDecomp, dictionary);
} }
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// Call Metis with options from dictionary.
Foam::label Foam::metisDecomp::decompose Foam::label Foam::metisDecomp::decompose
( (
const List<label>& adjncy, const List<label>& adjncy,
@ -57,9 +55,6 @@ Foam::label Foam::metisDecomp::decompose
List<label>& finalDecomp List<label>& finalDecomp
) )
{ {
// C style numbering
//int numFlag = 0;
// Method of decomposition // Method of decomposition
// recursive: multi-level recursive bisection (default) // recursive: multi-level recursive bisection (default)
// k-way: multi-level k-way // 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 // output: cell -> processor addressing
finalDecomp.setSize(numCells); finalDecomp.setSize(numCells);
// output: number of cut edges // output: number of cut edges
int edgeCut = 0; label edgeCut = 0;
if (method == "recursive") if (method == "recursive")
{ {

View File

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