mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
metisDecomp: Update to support 64-bit labels
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1920
This commit is contained in:
@ -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")
|
||||
{
|
||||
|
||||
@ -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
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user