fix metis warnings

This commit is contained in:
Joachim Schoeberl 2024-01-06 18:19:11 +01:00
parent 87b65fb5ff
commit 8362349bb8
3 changed files with 10 additions and 6 deletions

View File

@ -80,7 +80,7 @@ namespace ngcore
// 1 libngcore.dylib 0x000000010ddb298c _ZL21ngcore_signal_handleri + 316 // 1 libngcore.dylib 0x000000010ddb298c _ZL21ngcore_signal_handleri + 316
constexpr char reset_shell[] = "\033[0m"; constexpr char reset_shell[] = "\033[0m";
constexpr char green[] = "\033[32m"; constexpr char green[] = "\033[32m";
constexpr char yellow[] = "\033[33m"; [[maybe_unused]] constexpr char yellow[] = "\033[33m";
std::istringstream in(s); std::istringstream in(s);

View File

@ -10,7 +10,6 @@
namespace ngcore namespace ngcore
{ {
NGCORE_API std::string GetBackTrace(); NGCORE_API std::string GetBackTrace();
// Exception for code that shouldn't be executed // Exception for code that shouldn't be executed

View File

@ -1856,13 +1856,15 @@ namespace netgen
void Mesh :: PartHybridMesh () void Mesh :: PartHybridMesh ()
{ {
#ifdef METIS throw Exception("PartHybridMesh not supported");
#ifdef METISxxx
int ne = GetNE(); int ne = GetNE();
int nn = GetNP(); int nn = GetNP();
int nedges = topology.GetNEdges(); int nedges = topology.GetNEdges();
idxtype *xadj, * adjacency, *v_weights = NULL, *e_weights = NULL; idxtype *xadj, * adjacency;
// idxtype *v_weights = NULL, *e_weights = NULL;
int weightflag = 0; int weightflag = 0;
int numflag = 0; int numflag = 0;
@ -1953,6 +1955,8 @@ namespace netgen
void Mesh :: PartDualHybridMesh ( ) // NgArray<int> & neloc ) void Mesh :: PartDualHybridMesh ( ) // NgArray<int> & neloc )
{ {
throw Exception("PartDualHybridMesh not supported");
#ifdef OLD
#ifdef METIS #ifdef METIS
int ne = GetNE(); int ne = GetNE();
@ -2064,6 +2068,7 @@ namespace netgen
delete [] adjacency; delete [] adjacency;
#else #else
cout << "partdualmesh not available" << endl; cout << "partdualmesh not available" << endl;
#endif
#endif #endif
} }
@ -2131,7 +2136,6 @@ namespace netgen
idxtype *v_weights = NULL, *e_weights = NULL; idxtype *v_weights = NULL, *e_weights = NULL;
idxtype weightflag = 0;
// int numflag = 0; // int numflag = 0;
idxtype nparts = ntasks - 1; idxtype nparts = ntasks - 1;
@ -2142,6 +2146,7 @@ namespace netgen
BubbleSort (adjacency.Range (xadj[el], xadj[el+1])); BubbleSort (adjacency.Range (xadj[el], xadj[el+1]));
#ifdef METIS4 #ifdef METIS4
idxtype weightflag = 0;
int options[5]; int options[5];
options[0] = 0; options[0] = 0;
METIS_PartGraphKway ( &ne, &xadj[0], &adjacency[0], v_weights, e_weights, &weightflag, METIS_PartGraphKway ( &ne, &xadj[0], &adjacency[0], v_weights, e_weights, &weightflag,