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

bamg with compound edges

parent 06805aa7
No related branches found
No related tags found
No related merge requests found
......@@ -67,8 +67,6 @@ static void computeMeshMetricsForBamg(GFace *gf, int numV,
void meshGFaceBamg(GFace *gf){
//printf("meshGFaceBamg face=%d \n",gf->tag());
//Replace edges by their compounds
std::list<GEdge*> edges = gf->edges();
std::set<GEdge*> mySet;
......@@ -94,14 +92,16 @@ void meshGFaceBamg(GFace *gf){
}
}
//fill mesh data fo bamg (bamgVertices, bamgTriangles, bamgBoundary)
std::set<MVertex*> all;
std::map<int,MVertex*> recover;
for (unsigned int i = 0; i < gf->triangles.size(); i++){
for (unsigned int j = 0; j < 3; j++)
all.insert(gf->triangles[i]->getVertex(j));
}
printf("all.size=%d \n", all.size());
Vertex2 *bamgVertices = new Vertex2[all.size()];
Vertex2 *bamgVertices = new Vertex2[bcVertex.size()+all.size()]; //all.size()];
int index = 0;
//for(std::set<MVertex*>::iterator it = all.begin(); it!=all.end(); ++it){
// if ((*it)->onWhat()->dim() <= 1){
......@@ -113,8 +113,8 @@ void meshGFaceBamg(GFace *gf){
bamgVertices[index].lab = index;
recover[index] = *it;
(*it)->setIndex(index++);
}
//}
}
int nbFixedVertices = index;
for(std::set<MVertex*>::iterator it = all.begin(); it!=all.end(); ++it){
......@@ -148,7 +148,6 @@ void meshGFaceBamg(GFace *gf){
}
bamgTriangles[i].init(bamgVertices, nodes, gf->tag());
}
//std::list<GEdge*> edges = gf->edges();
int numEdges = 0;
for (std::list<GEdge*>::iterator it = edges.begin(); it != edges.end(); ++it){
numEdges += (*it)->lines.size();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment