From 5dfa723018f51e4ebc2d914ab8b47e4fffb10f7a Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Fri, 17 Dec 2004 05:12:01 +0000 Subject: [PATCH] - fix cast in a couple of error msg - more fixes in elliptic algorithm (surf->TrsfVertices and surf->Vertices were incomplete) --- Mesh/2D_Elliptic.cpp | 14 ++++++++++---- Parser/Gmsh.tab.cpp | 8 ++++---- Parser/Gmsh.y | 8 ++++---- Parser/Gmsh.yy.cpp | 4 ++-- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/Mesh/2D_Elliptic.cpp b/Mesh/2D_Elliptic.cpp index f3225c0fa4..eb7d152caf 100644 --- a/Mesh/2D_Elliptic.cpp +++ b/Mesh/2D_Elliptic.cpp @@ -1,4 +1,4 @@ -// $Id: 2D_Elliptic.cpp,v 1.20 2004-12-17 04:12:13 geuzaine Exp $ +// $Id: 2D_Elliptic.cpp,v 1.21 2004-12-17 05:11:59 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -121,12 +121,17 @@ int MeshEllipticSurface(Surface * sur) (S[2]->lc * (1 - u) * (1. - v)) + (S[3]->lc * (1 + u) * (1. - v))); list[i + N1 * j] = Create_Vertex(++THEM->MaxPointNum, x, y, z, lc, 0.0); - Tree_Insert(sur->Vertices, &list[i + N1 * j]); - List_Add(sur->TrsfVertices, &list[i + N1 * j]); } } } + for(int i = 0; i < N1; i++){ + for(int j = 0; j < N2; j++){ + Tree_Insert(sur->Vertices, &list[i + N1 * j]); + List_Add(sur->TrsfVertices, &list[i + N1 * j]); + } + } + List_Delete(l1); List_Delete(l2); List_Delete(l3); @@ -157,7 +162,7 @@ int MeshEllipticSurface(Surface * sur) (v23->Pos.X - v21->Pos.X) + (v32->Pos.Y - v12->Pos.Y) * (v23->Pos.Y - v21->Pos.Y)); - + v22->Pos.X = 0.5 * (alpha * (v32->Pos.X + v12->Pos.X) + gamma * (v23->Pos.X + v21->Pos.X) - 2. * beta * (v33->Pos.X - v13->Pos.X - @@ -176,6 +181,7 @@ int MeshEllipticSurface(Surface * sur) } } } + for(int i = 0; i < N1 - 1; i++) { for(int j = 0; j < N2 - 1; j++) { if(sur->Recombine) { diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 9767974c21..133392e89a 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -194,7 +194,7 @@ #line 1 "Gmsh.y" -// $Id: Gmsh.tab.cpp,v 1.213 2004-12-13 15:57:29 geuzaine Exp $ +// $Id: Gmsh.tab.cpp,v 1.214 2004-12-17 05:11:59 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -7963,7 +7963,7 @@ case 343: int k = List_Nbr(yyvsp[-1].l); if(k != 3 && k != 4){ yymsg(GERROR, "Wrong definition of Transfinite Surface %d: " - "%d points instead of 3 or 4" , yyvsp[-4].d, k); + "%d points instead of 3 or 4" , (int)yyvsp[-4].d, k); } else{ for(int i = 0; i < k; i++){ @@ -7992,7 +7992,7 @@ case 344: int k = List_Nbr(yyvsp[-1].l); if(k != 4) yymsg(GERROR, "Wrong definition of Elliptic Surface %d: " - "%d points instead of 4" , yyvsp[-4].d, k); + "%d points instead of 4" , (int)yyvsp[-4].d, k); else{ for(int i = 0; i < k; i++){ double d; @@ -8020,7 +8020,7 @@ case 345: int k = List_Nbr(yyvsp[-1].l); if(k != 6 && k != 8) yymsg(GERROR, "Wrong definition of Transfinite Volume %d: " - "%d points instead of 6 or 8" , yyvsp[-4].d, k); + "%d points instead of 6 or 8" , (int)yyvsp[-4].d, k); else{ for(int i = 0; i < k; i++){ double d; diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index b7ef066626..d9767e6c91 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -1,5 +1,5 @@ %{ -// $Id: Gmsh.y,v 1.186 2004-12-13 15:57:35 geuzaine Exp $ +// $Id: Gmsh.y,v 1.187 2004-12-17 05:12:01 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -3244,7 +3244,7 @@ Transfinite : int k = List_Nbr($7); if(k != 3 && k != 4){ yymsg(GERROR, "Wrong definition of Transfinite Surface %d: " - "%d points instead of 3 or 4" , $4, k); + "%d points instead of 3 or 4" , (int)$4, k); } else{ for(int i = 0; i < k; i++){ @@ -3271,7 +3271,7 @@ Transfinite : int k = List_Nbr($7); if(k != 4) yymsg(GERROR, "Wrong definition of Elliptic Surface %d: " - "%d points instead of 4" , $4, k); + "%d points instead of 4" , (int)$4, k); else{ for(int i = 0; i < k; i++){ double d; @@ -3297,7 +3297,7 @@ Transfinite : int k = List_Nbr($7); if(k != 6 && k != 8) yymsg(GERROR, "Wrong definition of Transfinite Volume %d: " - "%d points instead of 6 or 8" , $4, k); + "%d points instead of 6 or 8" , (int)$4, k); else{ for(int i = 0; i < k; i++){ double d; diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp index 015147dd59..4e60fc46e0 100644 --- a/Parser/Gmsh.yy.cpp +++ b/Parser/Gmsh.yy.cpp @@ -2,7 +2,7 @@ /* A lexical scanner generated by flex */ /* Scanner skeleton version: - * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.212 2004-12-13 15:57:35 geuzaine Exp $ + * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.213 2004-12-17 05:12:01 geuzaine Exp $ */ #define FLEX_SCANNER @@ -1029,7 +1029,7 @@ char *yytext; #line 1 "Gmsh.l" #define INITIAL 0 #line 2 "Gmsh.l" -// $Id: Gmsh.yy.cpp,v 1.212 2004-12-13 15:57:35 geuzaine Exp $ +// $Id: Gmsh.yy.cpp,v 1.213 2004-12-17 05:12:01 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // -- GitLab