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

fix off-by-one bug in the computation of u
parent 41bb981a
No related branches found
No related tags found
No related merge requests found
// $Id: meshGEdgeExtruded.cpp,v 1.1 2006-11-27 01:34:59 geuzaine Exp $
// $Id: meshGEdgeExtruded.cpp,v 1.2 2006-11-27 02:35:38 geuzaine Exp $
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
......@@ -35,7 +35,7 @@ void extrudeMesh(GVertex *from, GEdge *to)
double x = v->x(), y = v->y(), z = v->z();
ep->Extrude(j, k + 1, x, y, z);
if(j != ep->mesh.NbLayer - 1 || k != ep->mesh.NbElmLayer[j] - 1)
to->mesh_vertices.push_back(new MEdgeVertex(x, y, z, to, ep->u(j, k)));
to->mesh_vertices.push_back(new MEdgeVertex(x, y, z, to, ep->u(j, k + 1)));
}
}
}
......
// $Id: meshGFaceExtruded.cpp,v 1.5 2006-11-27 01:33:28 geuzaine Exp $
// $Id: meshGFaceExtruded.cpp,v 1.6 2006-11-27 02:35:38 geuzaine Exp $
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
......@@ -22,8 +22,11 @@
#include <set>
#include "ExtrudeParams.h"
#include "GModel.h"
#include "Context.h"
#include "Message.h"
extern Context_T CTX;
void extrudeMesh(GEdge *from, GFace *to,
std::set<MVertex*, MVertexLessThanLexicographic> &pos)
{
......@@ -150,6 +153,8 @@ int MeshExtrudedSurface(GFace *gf)
return 0;
// build a set with all the vertices on the boundary of gf
double old_tol = MVertexLessThanLexicographic::tolerance;
MVertexLessThanLexicographic::tolerance = 1.e-6 * CTX.lc;
std::set<MVertex*, MVertexLessThanLexicographic> pos;
std::list<GEdge*> edges = gf->edges();
std::list<GEdge*>::iterator it = edges.begin();
......@@ -175,5 +180,7 @@ int MeshExtrudedSurface(GFace *gf)
copyMesh(from, gf, pos);
}
MVertexLessThanLexicographic::tolerance = old_tol;
return 1;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment