Skip to content
Snippets Groups Projects
Commit dbed7f28 authored by Emilie Marchandise's avatar Emilie Marchandise
Browse files

bamg with compound edges

parent b2f795c3
No related branches found
No related tags found
No related merge requests found
......@@ -83,7 +83,6 @@ void meshGFaceBamg(GFace *gf){
}
edges.clear();
edges.insert(edges.begin(), mySet.begin(), mySet.end());
std::set<MVertex*> bcVertex;
for (std::list<GEdge*>::iterator it = edges.begin(); it != edges.end(); it++){
for (unsigned int i = 0; i < (*it)->lines.size(); i++){
......@@ -100,8 +99,9 @@ void meshGFaceBamg(GFace *gf){
all.insert(gf->triangles[i]->getVertex(j));
}
Vertex2 *bamgVertices = new Vertex2[bcVertex.size()+all.size()]; //all.size()];
//FIXME EMI: how should we define bamgVertices when we have remeshed compound edges not with lines not belonging to triangles of the compound face
int numVertices = all.size()+bcVertex.size();
Vertex2 *bamgVertices = new Vertex2[numVertices];
int index = 0;
// for(std::set<MVertex*>::iterator it = all.begin(); it!=all.end(); ++it){
// if ((*it)->onWhat()->dim() <= 1){
......@@ -115,7 +115,6 @@ void meshGFaceBamg(GFace *gf){
(*it)->setIndex(index++);
//}
}
int nbFixedVertices = index;
for(std::set<MVertex*>::iterator it = all.begin(); it!=all.end(); ++it){
//FIXME : SEAMS should have to be taken into account here !!!
......@@ -128,7 +127,6 @@ int nbFixedVertices = index;
(*it)->setIndex(index++);
}
}
Triangle2 *bamgTriangles = new Triangle2[gf->triangles.size()];
for (unsigned int i = 0; i < gf->triangles.size(); i++){
int nodes [3] = {gf->triangles[i]->getVertex(0)->getIndex(),
......@@ -148,6 +146,7 @@ int nbFixedVertices = index;
}
bamgTriangles[i].init(bamgVertices, nodes, gf->tag());
}
int numEdges = 0;
for (std::list<GEdge*>::iterator it = edges.begin(); it != edges.end(); ++it){
numEdges += (*it)->lines.size();
......@@ -164,8 +163,6 @@ int nbFixedVertices = index;
}
}
// Seg *bamgBoundary = NULL;
// numEdges = 0;
Mesh2 *bamgMesh = new Mesh2 (all.size(), gf->triangles.size(), numEdges,
bamgVertices, bamgTriangles, bamgBoundary);
......
......@@ -569,7 +569,7 @@ Mesh2 *Bamg(Mesh2 *Thh, double * args,double *mm11,double *mm12,double *mm22, bo
for (int iv=0;iv < Th.nbv;iv++)
Th[iv].m = M;
//nTh->Write("bamg.mesh",bamg::Triangles::AutoMesh);
nTh->Write("bamg.mesh",bamg::Triangles::AutoMesh);
Mesh2 * g= bamg2msh(nTh,true);
delete nTh;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment