diff -rupN gmsh-2.8.5-source/Geo/GEdge.cpp gmsh-2.8.5-source-new/Geo/GEdge.cpp
--- gmsh-2.8.5-source/Geo/GEdge.cpp 2014-05-06 01:06:33.000000000 +0200
+++ gmsh-2.8.5-source-new/Geo/GEdge.cpp 2014-07-23 16:30:15.732777298 +0200
@@ -182,7 +182,7 @@ std::string GEdge::getAdditionalInfoStri
sstream << " transfinite (" << meshAttributes.nbPointsTransfinite;
int type = meshAttributes.typeTransfinite;
if(std::abs(type) == 1)
- sstream << ", progression " << sign(type) * meshAttributes.coeffTransfinite;
+ sstream << ", progression " << SIGN(type) * meshAttributes.coeffTransfinite;
else if(std::abs(type) == 2)
sstream << ", bump " << meshAttributes.coeffTransfinite;
sstream << ")";
diff -rupN gmsh-2.8.5-source/Geo/Geo.cpp gmsh-2.8.5-source-new/Geo/Geo.cpp
--- gmsh-2.8.5-source/Geo/Geo.cpp 2014-07-09 09:28:07.000000000 +0200
+++ gmsh-2.8.5-source-new/Geo/Geo.cpp 2014-07-23 16:26:26.099787502 +0200
@@ -4462,7 +4462,7 @@ void setSurfaceGeneratrices(Surface *s,
(i != 0 && iLoop < 0)){ // hole
for(int j = 0; j < List_Nbr(el->Curves); j++) {
List_Read(el->Curves, j, &ic);
- ic *= sign(iLoop);
+ ic *= SIGN(iLoop);
if(i != 0) ic *= -1; // hole
if(!(c = FindCurve(ic)))
fromModel.push_back(ic);
@@ -4473,7 +4473,7 @@ void setSurfaceGeneratrices(Surface *s,
else{
for(int j = List_Nbr(el->Curves)-1; j >= 0; j--) {
List_Read(el->Curves, j, &ic);
- ic *= sign(iLoop);
+ ic *= SIGN(iLoop);
if(i != 0) ic *= -1; // hole
if(!(c = FindCurve(ic)))
fromModel.push_back(ic);
@@ -4519,7 +4519,7 @@ void setVolumeSurfaces(Volume *v, List_T
// create "negative" surfaces. So we just store the signs in
// another list
List_Add(v->Surfaces, &s);
- int tmp = sign(is) * sign(il);
+ int tmp = SIGN(is) * SIGN(il);
if(i > 0) tmp *= -1; // this is a hole
List_Add(v->SurfacesOrientations, &tmp);
}
diff -rupN gmsh-2.8.5-source/Geo/GModelIO_GEO.cpp gmsh-2.8.5-source-new/Geo/GModelIO_GEO.cpp
--- gmsh-2.8.5-source/Geo/GModelIO_GEO.cpp 2014-07-09 09:28:07.000000000 +0200
+++ gmsh-2.8.5-source-new/Geo/GModelIO_GEO.cpp 2014-07-23 16:26:26.100787502 +0200
@@ -311,7 +311,7 @@ int GModel::importGEOInternals()
case MSH_PHYSICAL_SURFACE: ge = getFaceByTag(tag); break;
case MSH_PHYSICAL_VOLUME: ge = getRegionByTag(tag); break;
}
- int pnum = CTX::instance()->geom.orientedPhysicals ? (sign(num) * p->Num) : p->Num;
+ int pnum = CTX::instance()->geom.orientedPhysicals ? (SIGN(num) * p->Num) : p->Num;
if(ge && std::find(ge->physicals.begin(), ge->physicals.end(), pnum) ==
ge->physicals.end())
ge->physicals.push_back(pnum);
diff -rupN gmsh-2.8.5-source/Geo/gmshEdge.cpp gmsh-2.8.5-source-new/Geo/gmshEdge.cpp
--- gmsh-2.8.5-source/Geo/gmshEdge.cpp 2014-07-09 09:28:07.000000000 +0200
+++ gmsh-2.8.5-source-new/Geo/gmshEdge.cpp 2014-07-23 16:29:59.807778006 +0200
@@ -97,7 +97,7 @@ std::string gmshEdge::getAdditionalInfoS
sstream << " transfinite (" << meshAttributes.nbPointsTransfinite;
int type = meshAttributes.typeTransfinite;
if(std::abs(type) == 1)
- sstream << ", progression " << sign(type) * meshAttributes.coeffTransfinite;
+ sstream << ", progression " << SIGN(type) * meshAttributes.coeffTransfinite;
else if(std::abs(type) == 2)
sstream << ", bump " << meshAttributes.coeffTransfinite;
sstream << ")";
diff -rupN gmsh-2.8.5-source/Geo/gmshRegion.cpp gmsh-2.8.5-source-new/Geo/gmshRegion.cpp
--- gmsh-2.8.5-source/Geo/gmshRegion.cpp 2014-02-07 08:31:21.000000000 +0100
+++ gmsh-2.8.5-source-new/Geo/gmshRegion.cpp 2014-07-23 16:26:26.100787502 +0200
@@ -32,7 +32,7 @@ gmshRegion::gmshRegion(GModel *m, ::Volu
GFace *f = m->getFaceByTag(abs(is));
if(f){
l_faces.push_back(f);
- l_dirs.push_back(sign(is));
+ l_dirs.push_back(SIGN(is));
f->addRegion(this);
}
else
diff -rupN gmsh-2.8.5-source/Mesh/meshGEdge.cpp gmsh-2.8.5-source-new/Mesh/meshGEdge.cpp
--- gmsh-2.8.5-source/Mesh/meshGEdge.cpp 2014-05-31 10:50:55.000000000 +0200
+++ gmsh-2.8.5-source-new/Mesh/meshGEdge.cpp 2014-07-23 16:26:26.100787502 +0200
@@ -168,7 +168,7 @@ static double F_Transfinite(GEdge *ge, d
case 1: // Geometric progression ar^i; Sum of n terms = length = a (r^n-1)/(r-1)
{
- double r = (sign(type) >= 0) ? coef : 1. / coef;
+ double r = (SIGN(type) >= 0) ? coef : 1. / coef;
double a = length * (r - 1.) / (pow(r, nbpt - 1.) - 1.);
int i = (int)(log(t * length / a * (r - 1.) + 1.) / log(r));
val = d / (a * pow(r, (double)i));
diff -rupN gmsh-2.8.5-source/Numeric/Numeric.h gmsh-2.8.5-source-new/Numeric/Numeric.h
--- gmsh-2.8.5-source/Numeric/Numeric.h 2014-05-31 10:50:56.000000000 +0200
+++ gmsh-2.8.5-source-new/Numeric/Numeric.h 2014-07-23 16:26:26.100787502 +0200
@@ -13,7 +13,7 @@
#include "SVector3.h"
#define myhypot(a,b) (sqrt((a)*(a)+(b)*(b)))
-#define sign(x) (((x)>=0)?1:-1)
+#define SIGN(x) (((x)>=0)?1:-1)
#define SQU(a) ((a)*(a))
struct mean_plane
diff -rupN gmsh-2.8.5-source/Parser/Gmsh.tab.cpp gmsh-2.8.5-source-new/Parser/Gmsh.tab.cpp
--- gmsh-2.8.5-source/Parser/Gmsh.tab.cpp 2014-05-23 08:45:41.000000000 +0200
+++ gmsh-2.8.5-source-new/Parser/Gmsh.tab.cpp 2014-07-23 16:26:26.102787502 +0200
@@ -8305,7 +8305,7 @@ yyreduce:
if(c){
c->Method = MESH_TRANSFINITE;
c->nbPointsTransfinite = ((yyvsp[(5) - (7)].d) > 2) ? (int)(yyvsp[(5) - (7)].d) : 2;
- c->typeTransfinite = type * sign(d);
+ c->typeTransfinite = type * SIGN(d);
c->coeffTransfinite = coef;
}
else{
@@ -8313,7 +8313,7 @@ yyreduce:
if(ge){
ge->meshAttributes.method = MESH_TRANSFINITE;
ge->meshAttributes.nbPointsTransfinite = ((yyvsp[(5) - (7)].d) > 2) ? (int)(yyvsp[(5) - (7)].d) : 2;
- ge->meshAttributes.typeTransfinite = type * sign(d);
+ ge->meshAttributes.typeTransfinite = type * SIGN(d);
ge->meshAttributes.coeffTransfinite = coef;
}
else if(sign > 0)
diff -rupN gmsh-2.8.5-source/Parser/Gmsh.y gmsh-2.8.5-source-new/Parser/Gmsh.y
--- gmsh-2.8.5-source/Parser/Gmsh.y 2014-05-23 08:45:41.000000000 +0200
+++ gmsh-2.8.5-source-new/Parser/Gmsh.y 2014-07-23 16:30:23.377776958 +0200
@@ -3499,7 +3499,7 @@ Constraints :
if(c){
c->Method = MESH_TRANSFINITE;
c->nbPointsTransfinite = ($5 > 2) ? (int)$5 : 2;
- c->typeTransfinite = type * sign(d);
+ c->typeTransfinite = type * SIGN(d);
c->coeffTransfinite = coef;
}
else{
@@ -3507,7 +3507,7 @@ Constraints :
if(ge){
ge->meshAttributes.method = MESH_TRANSFINITE;
ge->meshAttributes.nbPointsTransfinite = ($5 > 2) ? (int)$5 : 2;
- ge->meshAttributes.typeTransfinite = type * sign(d);
+ ge->meshAttributes.typeTransfinite = type * SIGN(d);
ge->meshAttributes.coeffTransfinite = coef;
}
else if(sign > 0)
diff -rupN gmsh-2.8.5-source/Plugin/FaultZone.cpp gmsh-2.8.5-source-new/Plugin/FaultZone.cpp
--- gmsh-2.8.5-source/Plugin/FaultZone.cpp 2014-02-07 08:31:16.000000000 +0100
+++ gmsh-2.8.5-source-new/Plugin/FaultZone.cpp 2014-07-23 16:26:26.103787502 +0200
@@ -418,7 +418,7 @@ void GMSH_FaultZoneMesher::ComputeHeavis
lsn = dot(vectsNor[j], vectsNor[i])*heav[i];
assert(fabs(lsn) > tolerance || heav[i] == 0);
}
- heav[j] = sign(lsn);
+ heav[j] = SIGN(lsn);
}
if (heav[i] != 0){
@@ -494,7 +494,7 @@ std::vector < int > GMSH_FaultZoneMesher
assert(dot(vectPoint, vectTan) > 0);
lsn = 0;
}
- heav.push_back(sign(lsn));
+ heav.push_back(SIGN(lsn));
}
else if (_nodesByJunctionNode.find( mVert ) != _nodesByJunctionNode.end()){ // if it is a junction node
std::vector < GEdge* > fissures = _fissuresByJunctionNode[mVert];
@@ -503,7 +503,7 @@ std::vector < int > GMSH_FaultZoneMesher
SVector3 vectNorm = _vectNormByFissure[fissures[i]];
double lsn = dot(vectPoint, vectNorm);
if (fabs(lsn) > tolerance) // tolerance seems to be ok
- heav.push_back(sign(lsn));
+ heav.push_back(SIGN(lsn));
else
heav.push_back(0);
}