mirror of
https://github.com/NGSolve/netgen.git
synced 2025-03-15 20:21:26 +05:00
metis partition
This commit is contained in:
parent
561a7b4a81
commit
492cff546d
15
ng/ngpkg.cpp
15
ng/ngpkg.cpp
@ -2650,6 +2650,21 @@ namespace netgen
|
|||||||
Tcl_Interp * interp,
|
Tcl_Interp * interp,
|
||||||
int argc, tcl_const char *argv[])
|
int argc, tcl_const char *argv[])
|
||||||
{
|
{
|
||||||
|
if (!mesh)
|
||||||
|
{
|
||||||
|
Tcl_SetResult (interp, err_needsmesh, TCL_STATIC);
|
||||||
|
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() );
|
||||||
|
|
||||||
#ifdef METISold
|
#ifdef METISold
|
||||||
|
|
||||||
if (!mesh)
|
if (!mesh)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user