diff --git a/Geo/GFaceCompound.cpp b/Geo/GFaceCompound.cpp index ce44d704434c7bce2fd4c89064167ac9f115d476..c2a9e97c84a8d4e536873a09c2a2aeb7fd2ad978 100644 --- a/Geo/GFaceCompound.cpp +++ b/Geo/GFaceCompound.cpp @@ -1965,12 +1965,12 @@ double GFaceCompound::locCurvature(MTriangle *t, double u, double v) const SPoint2 GFaceCompound::parFromVertex(MVertex *v) const { double U=0.0,V=0.0; - if(v->onWhat()->dim()==2 && meshStatistics.status == GFace::DONE) { + if(v->onWhat()->dim()==2){// && meshStatistics.status == GFace::DONE) { v->getParameter(0, U); v->getParameter(1, V); } - if ( v->onWhat()->dim()==1 || - (v->onWhat()->dim()==2 && U == -1 && V==-1)){ //if MFaceVertex created on edge in bunin + if (v->onWhat()->dim()==1 || + (v->onWhat()->dim()==2 && U == -1 && V==-1)){ //if MFaceVertex created on edge in bunin SPoint2 sp = getCoordinates(v); U = sp.x(); V = sp.y(); diff --git a/Geo/GModelFactory.cpp b/Geo/GModelFactory.cpp index 2f9e941d9a4a057fce967d8d52769c3561da7e01..da7c615ab6a5a944ccb6f437a34f80083283d652 100644 --- a/Geo/GModelFactory.cpp +++ b/Geo/GModelFactory.cpp @@ -322,25 +322,23 @@ GEntity* GeoFactory::extrudeBoundaryLayer(GModel *gm, GEntity *e, int nbLayers, else if (e->dim() == 2){ ((GFace*)e)->meshAttributes.extrude = &ep; Surface *s = FindSurface(e->tag()); - - Msg::Info("Geo internal model has:"); - List_T *points = Tree2List(gm->getGEOInternals()->Points); - List_T *curves = Tree2List(gm->getGEOInternals()->Curves); - List_T *surfaces = Tree2List(gm->getGEOInternals()->Surfaces); - Msg::Info("%d Vertices", List_Nbr(points)); - Msg::Info("%d Edges", List_Nbr(curves)); - Msg::Info("%d Faces", List_Nbr(surfaces)); - for(int i = 0; i < List_Nbr(surfaces); i++) { - Surface *s; - List_Read(surfaces, i, &s); - printf("surface %d \n", s->Num); - } + // Msg::Info("Geo internal model has:"); + // List_T *points = Tree2List(gm->getGEOInternals()->Points); + // List_T *curves = Tree2List(gm->getGEOInternals()->Curves); + // List_T *surfaces = Tree2List(gm->getGEOInternals()->Surfaces); + // Msg::Info("%d Vertices", List_Nbr(points)); + // Msg::Info("%d Edges", List_Nbr(curves)); + // Msg::Info("%d Faces", List_Nbr(surfaces)); + // for(int i = 0; i < List_Nbr(surfaces); i++) { + // Surface *s; + // List_Read(surfaces, i, &s); + // printf("surface %d \n", s->Num); + // } if(!s) { printf("surface %d NOT found \n", e->tag()); exit(1); } - else printf("surface %d found type =%d\n", e->tag(), s->Typ); - + shape.Num = s->Num; shape.Type = s->Typ; } @@ -356,19 +354,6 @@ GEntity* GeoFactory::extrudeBoundaryLayer(GModel *gm, GEntity *e, int nbLayers, &ep, list_out); - Msg::Info("AFTER EXTRUDE Geo internal model has:"); - List_T *points = Tree2List(gm->getGEOInternals()->Points); - List_T *curves = Tree2List(gm->getGEOInternals()->Curves); - List_T *surfaces = Tree2List(gm->getGEOInternals()->Surfaces); - Msg::Info("%d Vertices", List_Nbr(points)); - Msg::Info("%d Edges", List_Nbr(curves)); - Msg::Info("%d Faces", List_Nbr(surfaces)); - for(int i = 0; i < List_Nbr(surfaces); i++) { - Surface *s; - List_Read(surfaces, i, &s); - printf("surface %d \n", s->Num); - } - //create GEntities gm->importGEOInternals(); diff --git a/Geo/MVertex.cpp b/Geo/MVertex.cpp index 79858217fb92944fe2a19cf61dfa326989224193..5a4f724a8156bb90f18e952d9ede0662d7ea162d 100644 --- a/Geo/MVertex.cpp +++ b/Geo/MVertex.cpp @@ -367,22 +367,12 @@ bool reparamMeshVertexOnFace(MVertex *v, const GFace *gf, SPoint2 ¶m, bool onSurface) { - //To use Lloyds algorithm with compound faces, - //comment the first paragraph and decomment the second one - if (gf->geomType() == GEntity::CompoundSurface ){ GFaceCompound *gfc = (GFaceCompound*) gf; param = gfc->parFromVertex(v); return true; } - /*if (gf->geomType() == GEntity::CompoundSurface && - v->onWhat()->dim() < 2){ - GFaceCompound *gfc = (GFaceCompound*) gf; - param = gfc->getCoordinates(const_cast<MVertex*>(v)); - return true; - }*/ - if(v->onWhat()->geomType() == GEntity::DiscreteCurve || v->onWhat()->geomType() == GEntity::BoundaryLayerCurve){ param = gf->parFromPoint(SPoint3(v->x(), v->y(), v->z()), onSurface); @@ -414,7 +404,7 @@ bool reparamMeshVertexOnFace(MVertex *v, const GFace *gf, SPoint2 ¶m, else{ double uu, vv; if(v->onWhat() == gf && v->getParameter(0, uu) && v->getParameter(1, vv)){ - // printf("%d face %d pos %g %g\n",v->getNum(),gf->tag(),uu,vv); + //printf("%d face %d pos %g %g\n",v->getNum(),gf->tag(),uu,vv); param = SPoint2(uu, vv); } else { diff --git a/Mesh/BackgroundMesh.cpp b/Mesh/BackgroundMesh.cpp index d5516a3600f07fa6eb6e1e452d10d3ad1b18ec5e..742377dc654a543510d4e1c40e4a6099cc12f220 100644 --- a/Mesh/BackgroundMesh.cpp +++ b/Mesh/BackgroundMesh.cpp @@ -802,6 +802,7 @@ double backgroundMesh::operator() (double u, double v, double w) const #if defined(HAVE_ANN) //printf("BGM octree not found --> find in kdtree \n"); double pt[3] = {u,v,0.0}; + uv_kdtree->annkSearch(pt, 2, index, dist); SPoint3 p1(nodes[index[0]][0], nodes[index[0]][1], nodes[index[0]][2]); SPoint3 p2(nodes[index[1]][0], nodes[index[1]][1], nodes[index[1]][2]); diff --git a/Mesh/CenterlineField.cpp b/Mesh/CenterlineField.cpp index f936b76b4f0d0881c97ad629b7da177af123c2c0..dcba3231a16d397f2a506a1225dcd408b347e504 100644 --- a/Mesh/CenterlineField.cpp +++ b/Mesh/CenterlineField.cpp @@ -836,7 +836,7 @@ void Centerline::createClosedVolume(){ void Centerline::extrudeBoundaryLayerWall(){ - printf("extrude boundary layer wall %d %g \n", nbElemLayer, hLayer); + Msg::Info("Centerline: extrude boundary layer wall %d %g ", nbElemLayer, hLayer); for (int i= 0; i< NF; i++){ GFace *gf = current->getFaceByTag(NF+i+1);//at this moment compound is not meshed yet exist yet diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp index 62087e6044324f5bbf42e5fed9c0d4a5ac7a191c..578fea9eb65543742b75444deb81527b3bf80980 100644 --- a/Mesh/Generator.cpp +++ b/Mesh/Generator.cpp @@ -484,7 +484,7 @@ static void Mesh2D(GModel *m) smm.optimize_face(*it); int rec = 1;//(CTX::instance()->mesh.recombineAll || (*it)->meshAttributes.recombine); m->writeMSH("afterLLoyd.msh"); - if(rec){printf("recombine\n"); recombineIntoQuads(*it);} + if(rec) recombineIntoQuads(*it); m->writeMSH("afterRecombine.msh"); } }