Skip to content
Snippets Groups Projects
Commit 770efe07 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix problem with redefinition of log2 on cygwin (Laurent told me that he had
a warning on Mac 10.3 also)
parent 412864a5
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* Started 7/28/97 * Started 7/28/97
* George * George
* *
* $Id: kmetis.c,v 1.1 2005-09-21 17:29:37 geuzaine Exp $ * $Id: kmetis.c,v 1.2 2005-09-26 18:11:23 geuzaine Exp $
* *
*/ */
...@@ -66,7 +66,7 @@ void METIS_WPartGraphKway(int *nvtxs, idxtype *xadj, idxtype *adjncy, idxtype *v ...@@ -66,7 +66,7 @@ void METIS_WPartGraphKway(int *nvtxs, idxtype *xadj, idxtype *adjncy, idxtype *v
ctrl.dbglvl = options[OPTION_DBGLVL]; ctrl.dbglvl = options[OPTION_DBGLVL];
} }
ctrl.optype = OP_KMETIS; ctrl.optype = OP_KMETIS;
ctrl.CoarsenTo = amax((*nvtxs)/(40*log2(*nparts)), 20*(*nparts)); ctrl.CoarsenTo = amax((*nvtxs)/(40*METISlog2(*nparts)), 20*(*nparts)); /* Gmsh: log2 */
ctrl.maxvwgt = 1.5*((graph.vwgt ? idxsum(*nvtxs, graph.vwgt) : (*nvtxs))/ctrl.CoarsenTo); ctrl.maxvwgt = 1.5*((graph.vwgt ? idxsum(*nvtxs, graph.vwgt) : (*nvtxs))/ctrl.CoarsenTo);
InitRandom(-1); InitRandom(-1);
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* Started 7/28/97 * Started 7/28/97
* George * George
* *
* $Id: kvmetis.c,v 1.1 2005-09-21 17:29:37 geuzaine Exp $ * $Id: kvmetis.c,v 1.2 2005-09-26 18:11:23 geuzaine Exp $
* *
*/ */
...@@ -66,7 +66,7 @@ void METIS_WPartGraphVKway(int *nvtxs, idxtype *xadj, idxtype *adjncy, idxtype * ...@@ -66,7 +66,7 @@ void METIS_WPartGraphVKway(int *nvtxs, idxtype *xadj, idxtype *adjncy, idxtype *
ctrl.dbglvl = options[OPTION_DBGLVL]; ctrl.dbglvl = options[OPTION_DBGLVL];
} }
ctrl.optype = OP_KVMETIS; ctrl.optype = OP_KVMETIS;
ctrl.CoarsenTo = amax((*nvtxs)/(40*log2(*nparts)), 20*(*nparts)); ctrl.CoarsenTo = amax((*nvtxs)/(40*METISlog2(*nparts)), 20*(*nparts)); /* Gmsh: log2 */
ctrl.maxvwgt = 1.5*((graph.vwgt ? idxsum(*nvtxs, graph.vwgt) : (*nvtxs))/ctrl.CoarsenTo); ctrl.maxvwgt = 1.5*((graph.vwgt ? idxsum(*nvtxs, graph.vwgt) : (*nvtxs))/ctrl.CoarsenTo);
InitRandom(-1); InitRandom(-1);
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* Started 7/28/97 * Started 7/28/97
* George * George
* *
* $Id: mkmetis.c,v 1.1 2005-09-21 17:29:38 geuzaine Exp $ * $Id: mkmetis.c,v 1.2 2005-09-26 18:11:23 geuzaine Exp $
* *
*/ */
...@@ -47,7 +47,7 @@ void METIS_mCPartGraphKway(int *nvtxs, int *ncon, idxtype *xadj, idxtype *adjncy ...@@ -47,7 +47,7 @@ void METIS_mCPartGraphKway(int *nvtxs, int *ncon, idxtype *xadj, idxtype *adjncy
ctrl.dbglvl = options[OPTION_DBGLVL]; ctrl.dbglvl = options[OPTION_DBGLVL];
} }
ctrl.optype = OP_KMETIS; ctrl.optype = OP_KMETIS;
ctrl.CoarsenTo = amax((*nvtxs)/(20*log2(*nparts)), 30*(*nparts)); ctrl.CoarsenTo = amax((*nvtxs)/(20*METISlog2(*nparts)), 30*(*nparts)); /* Gmsh: log2 */
ctrl.nmaxvwgt = 1.5/(1.0*ctrl.CoarsenTo); ctrl.nmaxvwgt = 1.5/(1.0*ctrl.CoarsenTo);
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Started 10/19/95 * Started 10/19/95
* George * George
* *
* $Id: proto.h,v 1.1 2005-09-21 17:29:38 geuzaine Exp $ * $Id: proto.h,v 1.2 2005-09-26 18:11:23 geuzaine Exp $
* *
*/ */
...@@ -459,7 +459,7 @@ double drand48(); ...@@ -459,7 +459,7 @@ double drand48();
void srand48(long); void srand48(long);
int ispow2(int); int ispow2(int);
void InitRandom(int); void InitRandom(int);
//int log2(int); int METISlog2(int); /* Gmsh: changed fron log2 */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Started 10/2/97 * Started 10/2/97
* George * George
* *
* $Id: rename.h,v 1.1 2005-09-21 17:29:38 geuzaine Exp $ * $Id: rename.h,v 1.2 2005-09-26 18:11:23 geuzaine Exp $
* *
*/ */
...@@ -410,7 +410,7 @@ ...@@ -410,7 +410,7 @@
#define RandomPermute __RandomPermute #define RandomPermute __RandomPermute
#define ispow2 __ispow2 #define ispow2 __ispow2
#define InitRandom __InitRandom #define InitRandom __InitRandom
#define log2 __log2 #define METISlog2 __METISlog2 /* Gmsh: changed from log2 */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Started 9/28/95 * Started 9/28/95
* George * George
* *
* $Id: util.c,v 1.1 2005-09-21 17:29:38 geuzaine Exp $ * $Id: util.c,v 1.2 2005-09-26 18:11:23 geuzaine Exp $
*/ */
#include <metis.h> #include <metis.h>
...@@ -509,7 +509,7 @@ void InitRandom(int seed) ...@@ -509,7 +509,7 @@ void InitRandom(int seed)
/************************************************************************* /*************************************************************************
* This function returns the log2(x) * This function returns the log2(x)
**************************************************************************/ **************************************************************************/
int log2(int a) int METISlog2(int a) /* Gmsh: changed from log2 */
{ {
int i; int i;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment