mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 13:30:34 +05:00
metis partition
This commit is contained in:
parent
257e76c083
commit
0a9b74185f
23
ng/ngpkg.cpp
23
ng/ngpkg.cpp
@ -2650,14 +2650,33 @@ namespace netgen
|
|||||||
Tcl_Interp * interp,
|
Tcl_Interp * interp,
|
||||||
int argc, tcl_const char *argv[])
|
int argc, tcl_const char *argv[])
|
||||||
{
|
{
|
||||||
#ifdef METISold
|
#ifdef PARALLEL
|
||||||
|
|
||||||
if (!mesh)
|
if (!mesh)
|
||||||
{
|
{
|
||||||
Tcl_SetResult (interp, err_needsmesh, TCL_STATIC);
|
Tcl_SetResult (interp, err_needsmesh, TCL_STATIC);
|
||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int nparts = atoi (argv[1]);
|
||||||
|
ntasks = nparts+1;
|
||||||
|
cout << "calling metis ... " << flush;
|
||||||
|
mesh->ParallelMetis();
|
||||||
|
cout << "done" << endl;
|
||||||
|
ntasks = 1;
|
||||||
|
for (ElementIndex ei = 0; ei < mesh->GetNE(); ei++)
|
||||||
|
(*mesh)[ei].SetIndex ( (*mesh)[ei].GetPartition() );
|
||||||
|
|
||||||
|
return TCL_OK;
|
||||||
|
|
||||||
|
#else
|
||||||
|
Tcl_SetResult (interp, (char*)"metis not available", TCL_STATIC);
|
||||||
|
return TCL_ERROR;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef OLDOLD
|
||||||
// METIS Partitioning
|
// METIS Partitioning
|
||||||
|
|
||||||
if (mesh->GetDimension() == 3)
|
if (mesh->GetDimension() == 3)
|
||||||
|
Loading…
Reference in New Issue
Block a user