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

Don't optimize 3D_Mesh.
parent a74b6792
No related branches found
No related tags found
No related merge requests found
// $Id: 2D_Mesh_Triangle.cpp,v 1.3 2003-03-21 00:52:41 geuzaine Exp $ // $Id: 2D_Mesh_Triangle.cpp,v 1.4 2003-06-20 00:07:34 geuzaine Exp $
// //
// Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
// //
...@@ -211,7 +211,7 @@ int Mesh_Shewchuk(Surface * s) ...@@ -211,7 +211,7 @@ int Mesh_Shewchuk(Surface * s)
val += mid.pointattributelist[k]; val += mid.pointattributelist[k];
} }
val /= mid.numberofcorners; val /= mid.numberofcorners;
val = val * val / 2.; // we generate isotropic meshes val = val * val / 1.5; // approx (we want isotropic meshes)
mid.trianglearealist[i] = val; mid.trianglearealist[i] = val;
} }
......
// $Id: 3D_Mesh.cpp,v 1.55 2003-06-14 16:41:12 geuzaine Exp $ // $Id: 3D_Mesh.cpp,v 1.56 2003-06-20 00:07:34 geuzaine Exp $
// //
// Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
// //
...@@ -60,9 +60,7 @@ int Alerte_Point_Scabreux; ...@@ -60,9 +60,7 @@ int Alerte_Point_Scabreux;
inline void cgsmpl(Simplex * s, double &x, double &y, double &z) inline void cgsmpl(Simplex * s, double &x, double &y, double &z)
{ {
//compiler sous linux avec -O2 et faire tourner bench/3d/sphere2.geo // this inlining crashes with gcc -O2...
//->boum. Ne se produit pas si on accede a V[3] avant!
//if(!s->V[3]) Msg(GERROR, "oups");
x = 0.25 * (s->V[0]->Pos.X + x = 0.25 * (s->V[0]->Pos.X +
s->V[1]->Pos.X + s->V[2]->Pos.X + s->V[3]->Pos.X); s->V[1]->Pos.X + s->V[2]->Pos.X + s->V[3]->Pos.X);
......
# $Id: Makefile,v 1.51 2003-03-21 00:52:41 geuzaine Exp $ # $Id: Makefile,v 1.52 2003-06-20 00:07:34 geuzaine Exp $
# #
# Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle # Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
# #
...@@ -81,6 +81,10 @@ ${LIB}: ${OBJ} ...@@ -81,6 +81,10 @@ ${LIB}: ${OBJ}
.cpp.o: .cpp.o:
${CXX} ${CFLAGS} -c $< ${CXX} ${CFLAGS} -c $<
# Don't optimize 3D_Mesh: it sometimes mysteriously crashes on Linux
3D_Mesh.o:
${CXX} ${FLAGS} ${INCLUDE} -c $<
clean: clean:
rm -f *.o rm -f *.o
......
# $Id: Makefile,v 1.15 2003-03-21 00:52:46 geuzaine Exp $ # $Id: Makefile,v 1.16 2003-06-20 00:07:34 geuzaine Exp $
# #
# Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle # Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
# #
...@@ -23,9 +23,9 @@ include ../variables ...@@ -23,9 +23,9 @@ include ../variables
LIB = ../lib/libGmshTriangle.a LIB = ../lib/libGmshTriangle.a
# Do not optimize triangle: it crashes badly on Linux # Don't optimize triangle: it crashes on Linux
OPTIM = -O0 # CFLAGS = ${OPTIM} ${FLAGS} -DTRILIBRARY
CFLAGS = ${OPTIM} ${FLAGS} -DTRILIBRARY CFLAGS = ${FLAGS} -DTRILIBRARY
SRC = triangle.c SRC = triangle.c
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment