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

pp

parent ea106a21
Branches
Tags
No related merge requests found
...@@ -58,9 +58,6 @@ static void copyMesh (GFace *source, GFace *target) ...@@ -58,9 +58,6 @@ static void copyMesh (GFace *source, GFace *target)
source_e = target->edgeCounterparts[-(*it)->tag()]; source_e = target->edgeCounterparts[-(*it)->tag()];
} }
// printf("face %d = %d vs %d (%d counterparts)\n",source->tag(),(*it)->tag(),source_e,target->edgeCounterparts.size());
GEdge *se = source->model()->getEdgeByTag(abs(source_e)); GEdge *se = source->model()->getEdgeByTag(abs(source_e));
GEdge *te = *it; GEdge *te = *it;
if (source_e * sign > 0){ if (source_e * sign > 0){
...@@ -569,7 +566,8 @@ static bool meshGenerator(GFace *gf, int RECUR_ITER, ...@@ -569,7 +566,8 @@ static bool meshGenerator(GFace *gf, int RECUR_ITER,
++ite; ++ite;
} }
Msg::Debug("Recovering %d mesh Edges %d not recovered", edgesToRecover.size(),edgesNotRecovered.size() ); Msg::Debug("Recovering %d mesh Edges (%d not recovered)", edgesToRecover.size(),
edgesNotRecovered.size());
// effectively recover the medge // effectively recover the medge
ite = edges.begin(); ite = edges.begin();
...@@ -629,7 +627,8 @@ static bool meshGenerator(GFace *gf, int RECUR_ITER, ...@@ -629,7 +627,8 @@ static bool meshGenerator(GFace *gf, int RECUR_ITER,
Msg::Debug("Boundary Edges recovered for surface %d", gf->tag()); Msg::Debug("Boundary Edges recovered for surface %d", gf->tag());
// LOOK FOR A TRIANGLE THAT HAS A NEGATIVE NODE // look for a triangle that has a negative node and recursively
// tag all exterior triangles
{ {
std::list<BDS_Face*>::iterator itt = m->triangles.begin(); std::list<BDS_Face*>::iterator itt = m->triangles.begin();
while (itt != m->triangles.end()){ while (itt != m->triangles.end()){
...@@ -650,7 +649,8 @@ static bool meshGenerator(GFace *gf, int RECUR_ITER, ...@@ -650,7 +649,8 @@ static bool meshGenerator(GFace *gf, int RECUR_ITER,
} }
} }
// Now find an edge that has one of the tag triangles CLASS_EXTERIOR // now find an edge that has belongs to one of the exterior
// triangles
{ {
std::list<BDS_Edge*>::iterator ite = m->edges.begin(); std::list<BDS_Edge*>::iterator ite = m->edges.begin();
while (ite != m->edges.end()){ while (ite != m->edges.end()){
...@@ -674,7 +674,6 @@ static bool meshGenerator(GFace *gf, int RECUR_ITER, ...@@ -674,7 +674,6 @@ static bool meshGenerator(GFace *gf, int RECUR_ITER,
} }
} }
{ {
std::list<BDS_Edge*>::iterator ite = m->edges.begin(); std::list<BDS_Edge*>::iterator ite = m->edges.begin();
while (ite != m->edges.end()){ while (ite != m->edges.end()){
...@@ -1289,7 +1288,8 @@ static bool meshGeneratorPeriodic(GFace *gf, bool debug = true) ...@@ -1289,7 +1288,8 @@ static bool meshGeneratorPeriodic(GFace *gf, bool debug = true)
} }
} }
// LOOK FOR A TRIANGLE THAT HAS A NEGATIVE NODE // look for a triangle that has a negative node and recursively
// tag all exterior triangles
{ {
std::list<BDS_Face*>::iterator itt = m->triangles.begin(); std::list<BDS_Face*>::iterator itt = m->triangles.begin();
while (itt != m->triangles.end()){ while (itt != m->triangles.end()){
...@@ -1310,7 +1310,8 @@ static bool meshGeneratorPeriodic(GFace *gf, bool debug = true) ...@@ -1310,7 +1310,8 @@ static bool meshGeneratorPeriodic(GFace *gf, bool debug = true)
} }
} }
// Now find an edge that has one of the tag triangles CLASS_E // now find an edge that has belongs to one of the exterior
// triangles
{ {
std::list<BDS_Edge*>::iterator ite = m->edges.begin(); std::list<BDS_Edge*>::iterator ite = m->edges.begin();
while (ite != m->edges.end()){ while (ite != m->edges.end()){
...@@ -1476,7 +1477,7 @@ void deMeshGFace::operator() (GFace *gf) ...@@ -1476,7 +1477,7 @@ void deMeshGFace::operator() (GFace *gf)
gf->meshStatistics.nbTriangle = gf->meshStatistics.nbEdge = 0; gf->meshStatistics.nbTriangle = gf->meshStatistics.nbEdge = 0;
} }
//For Debugging, change value from -1 to -100; // for debugging, change value from -1 to -100;
int debugSurface = -1; int debugSurface = -1;
void meshGFace::operator() (GFace *gf) void meshGFace::operator() (GFace *gf)
...@@ -1533,7 +1534,8 @@ void meshGFace::operator() (GFace *gf) ...@@ -1533,7 +1534,8 @@ void meshGFace::operator() (GFace *gf)
Msg::Debug("Computing edge loops"); Msg::Debug("Computing edge loops");
Msg::Debug("Generating the mesh"); Msg::Debug("Generating the mesh");
if ((gf->getNativeType() != GEntity::AcisModel || (!gf->periodic(0) &&!gf->periodic(1)))&& if ((gf->getNativeType() != GEntity::AcisModel ||
(!gf->periodic(0) && !gf->periodic(1))) &&
(noSeam(gf) || gf->getNativeType() == GEntity::GmshModel || (noSeam(gf) || gf->getNativeType() == GEntity::GmshModel ||
gf->edgeLoops.empty())){ gf->edgeLoops.empty())){
meshGenerator(gf, 0, repairSelfIntersecting1dMesh, meshGenerator(gf, 0, repairSelfIntersecting1dMesh,
...@@ -1632,7 +1634,8 @@ void partitionAndRemesh(GFaceCompound *gf) ...@@ -1632,7 +1634,8 @@ void partitionAndRemesh(GFaceCompound *gf)
gf->model()->createTopologyFromFaces(pFaces); gf->model()->createTopologyFromFaces(pFaces);
double tmult = Cpu(); double tmult = Cpu();
Msg::Info("Multiscale Partition SUCCESSFULLY PERFORMED : %d parts (%g s)", NF , tmult -tbegin); Msg::Info("Multiscale Partition SUCCESSFULLY PERFORMED : %d parts (%g s)",
NF, tmult - tbegin);
gf->model()->writeMSH("multiscalePARTS.msh", 2.2, false, true); gf->model()->writeMSH("multiscalePARTS.msh", 2.2, false, true);
//Remesh new faces (Compound Lines and Compound Surfaces) //Remesh new faces (Compound Lines and Compound Surfaces)
...@@ -1736,7 +1739,6 @@ void partitionAndRemesh(GFaceCompound *gf) ...@@ -1736,7 +1739,6 @@ void partitionAndRemesh(GFaceCompound *gf)
//----------------------------------------------------- //-----------------------------------------------------
std::list<GEdge*> l_edges = gf->edges(); std::list<GEdge*> l_edges = gf->edges();
for(std::list<GEdge*>::iterator it = l_edges.begin(); it != l_edges.end(); it++){ for(std::list<GEdge*>::iterator it = l_edges.begin(); it != l_edges.end(); it++){
//printf("boundary edge of face %d =%d size=%d\n", gf->tag(),(*it)->tag(), l_edges.size());
std::vector<MVertex*> edge_vertices = (*it)->mesh_vertices; std::vector<MVertex*> edge_vertices = (*it)->mesh_vertices;
std::vector<MVertex*>::const_iterator itv = edge_vertices.begin(); std::vector<MVertex*>::const_iterator itv = edge_vertices.begin();
for(; itv != edge_vertices.end(); itv++){ for(; itv != edge_vertices.end(); itv++){
...@@ -1775,7 +1777,8 @@ void partitionAndRemesh(GFaceCompound *gf) ...@@ -1775,7 +1777,8 @@ void partitionAndRemesh(GFaceCompound *gf)
} }
double t3 = Cpu(); double t3 = Cpu();
Msg::Info("*** Mesh of surface %d done by assembly remeshed faces (%g s)", gf->tag(), t3-t2); Msg::Info("*** Mesh of surface %d done by assembly remeshed faces (%g s)",
gf->tag(), t3-t2);
Msg::Info("-----------------------------------------------------------"); Msg::Info("-----------------------------------------------------------");
gf->coherenceNormals(); gf->coherenceNormals();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment