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

1D transfinite mesh algo was completely broken.

sigh.
parent 23f2c1fc
No related branches found
No related tags found
No related merge requests found
// $Id: meshGEdge.cpp,v 1.33 2007-04-16 11:46:27 remacle Exp $
// $Id: meshGEdge.cpp,v 1.34 2007-04-21 22:26:51 geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
......@@ -244,10 +244,11 @@ void meshGEdge::operator() (GEdge *ge)
// not connecting any other curve. So, the mesh vertex and its associated geom vertex
// are not necessary at the same location
GPoint beg_p,end_p;
if (ge->getBeginVertex() == ge->getEndVertex() && ge->getBeginVertex()->edges().size() == 1)
{
if(ge->getBeginVertex() == ge->getEndVertex() &&
ge->getBeginVertex()->edges().size() == 1){
end_p = beg_p = ge->point(t_begin);
}else{
}
else{
beg_p = GPoint(v0->x(), v0->y(), v0->z());
end_p = GPoint(v1->x(), v1->y(), v1->z());
}
......@@ -269,12 +270,19 @@ void meshGEdge::operator() (GEdge *ge)
double dp = P2.p - P1.p;
double t = P1.t + dt / dp * (d - P1.p);
GPoint V = ge->point(t);
if(ge->meshAttributes.Method == TRANSFINI){
ge->mesh_vertices[NUMP2 - 1] = new MEdgeVertex(V.x(), V.y(), V.z(), ge, t);
NUMP2++;
}
else{
double lc = BGM_MeshSize(ge, t, 0, V.x(), V.y(), V.z());
if(GPointDist(V,last_p)>0.7*lc && !(NUMP==N-2 && GPointDist(V,end_p)<0.7*lc)){
if(GPointDist(V, last_p) > 0.7 * lc &&
!(NUMP == N - 2 && GPointDist(V, end_p) < 0.7 * lc)){
last_p = V;
ge->mesh_vertices[NUMP2 - 1] = new MEdgeVertex(V.x(), V.y(), V.z(), ge, t);
NUMP2++;
}
}
NUMP++;
}
else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment