diff --git a/Geo/GEdge.h b/Geo/GEdge.h index f84953701b7325c5187c948b558c11d31967e32b..f3992b9be0947e1f878fd677a5f17c65a9542bfb 100644 --- a/Geo/GEdge.h +++ b/Geo/GEdge.h @@ -25,7 +25,7 @@ class GEdgeCompound; class closestPointFinder; // A model edge. -class GEdge : public GEntity{ +class GEdge : public GEntity { private: double _length; bool _tooSmall; diff --git a/Geo/GFace.h b/Geo/GFace.h index 8920e110c5c29cf03af8bcad33b22dd5a97f54bf..2f699c089ed87966b89eb5960da8eada0c907cc2 100644 --- a/Geo/GFace.h +++ b/Geo/GFace.h @@ -34,7 +34,7 @@ struct surface_params class GRegion; // A model face. -class GFace : public GEntity{ +class GFace : public GEntity { protected: // edge loops might replace what follows (list of all the edges of // the face + directions) diff --git a/Geo/GModel.h b/Geo/GModel.h index c811833b2040cb1cdfd9dc19eda5305c590b113b..30d57788d888e10b57df8e854eb5d04896c2e091 100644 --- a/Geo/GModel.h +++ b/Geo/GModel.h @@ -34,8 +34,7 @@ class MElementOctree; class GModelFactory; // A geometric model. The model is a "not yet" non-manifold B-Rep. -class GModel -{ +class GModel { private: friend class OCCFactory; std::multimap<std::pair<std::vector<int>, std::vector<int> >, diff --git a/Geo/GModelFactory.cpp b/Geo/GModelFactory.cpp index d6eea1333a9c84abbbd33c9cc2c12583564eaa58..6c8cc1f58a1e59f8ea28fda1e4506b14fe1bdb49 100644 --- a/Geo/GModelFactory.cpp +++ b/Geo/GModelFactory.cpp @@ -32,7 +32,7 @@ GVertex *GeoFactory::addVertex(GModel *gm, double x, double y, double z, double lc *= CTX::instance()->geom.scalingFactor; if(lc == 0.) lc = MAX_LC; // no mesh size given at the point Vertex *p; - p = Create_Vertex(num, x, y, z, lc, 1.0); + p = CreateVertex(num, x, y, z, lc, 1.0); Tree_Add(gm->getGEOInternals()->Points, &p); p->Typ = MSH_POINT; p->Num = num; @@ -52,7 +52,7 @@ GEdge *GeoFactory::addLine(GModel *gm, GVertex *start, GVertex *end) List_Add(iList, &tagBeg); List_Add(iList, &tagEnd); - Curve *c = Create_Curve(num, MSH_SEGM_LINE, 1, iList, NULL, + Curve *c = CreateCurve(num, MSH_SEGM_LINE, 1, iList, NULL, -1, -1, 0., 1.); Tree_Add(gm->getGEOInternals()->Curves, &c); CreateReversedCurve(c); @@ -106,7 +106,7 @@ GRegion* GeoFactory::addVolume (GModel *gm, std::vector<std::vector<GFace *> > f numfl++; if (!FindSurfaceLoop(numfl)) break; } - SurfaceLoop *l = Create_SurfaceLoop(numfl, temp); + SurfaceLoop *l = CreateSurfaceLoop(numfl, temp); vecLoops.push_back(l); Tree_Add(gm->getGEOInternals()->SurfaceLoops, &l); List_Delete(temp); @@ -114,7 +114,7 @@ GRegion* GeoFactory::addVolume (GModel *gm, std::vector<std::vector<GFace *> > f //create volume int numv = gm->getMaxElementaryNumber(3) + 1; - Volume *v = Create_Volume(numv, MSH_VOLUME); + Volume *v = CreateVolume(numv, MSH_VOLUME); List_T *temp = List_Create(nLoops, nLoops, sizeof(int)); for (unsigned int i = 0; i < vecLoops.size(); i++){ int numl = vecLoops[i]->Num; @@ -145,7 +145,7 @@ GEdge* GeoFactory::addCircleArc(GModel *gm,GVertex *begin, GVertex *center, GVer List_Add(iList, &tagMiddle); List_Add(iList, &tagEnd); - Curve *c = Create_Curve(num, MSH_SEGM_CIRC, 1, iList, NULL, + Curve *c = CreateCurve(num, MSH_SEGM_CIRC, 1, iList, NULL, -1, -1, 0., 1.); Tree_Add(gm->getGEOInternals()->Curves, &c); CreateReversedCurve(c); @@ -178,7 +178,7 @@ std::vector<GFace *> GeoFactory::addRuledFaces(GModel *gm, List_Add(temp, &numEdge); } SortEdgesInLoop(numl, temp); - EdgeLoop *l = Create_EdgeLoop(numl, temp); + EdgeLoop *l = CreateEdgeLoop(numl, temp); vecLoops.push_back(l); Tree_Add(gm->getGEOInternals()->EdgeLoops, &l); l->Num = numl; @@ -187,14 +187,14 @@ std::vector<GFace *> GeoFactory::addRuledFaces(GModel *gm, //create plane surfaces int numf = gm->getMaxElementaryNumber(2) + 1; - Surface *s = Create_Surface(numf, MSH_SURF_TRIC); + Surface *s = CreateSurface(numf, MSH_SURF_TRIC); List_T *iList = List_Create(nLoops, nLoops, sizeof(int)); for (unsigned int i=0; i< vecLoops.size(); i++){ int numl = vecLoops[i]->Num; List_Add(iList, &numl); } SetSurfaceGeneratrices(s, iList); - End_Surface(s); + EndSurface(s); Tree_Add(gm->getGEOInternals()->Surfaces, &s); s->Typ= MSH_SURF_TRIC; s->Num = numf; @@ -380,14 +380,14 @@ GFace *GeoFactory::_addPlanarFace(GModel *gm, const std::vector<std::vector<GEdg Vertex *vertb = FindPoint(abs(gvb->tag())); Vertex *verte = FindPoint(abs(gve->tag())); if (!vertb){ - vertb = Create_Vertex(gvb->tag(), gvb->x(), gvb->y(), gvb->z(), + vertb = CreateVertex(gvb->tag(), gvb->x(), gvb->y(), gvb->z(), gvb->prescribedMeshSizeAtVertex(), 1.0); Tree_Add(gm->getGEOInternals()->Points, &vertb); vertb->Typ = MSH_POINT; vertb->Num = gvb->tag(); } if (!verte){ - verte = Create_Vertex(gve->tag(), gve->x(), gve->y(), gve->z(), + verte = CreateVertex(gve->tag(), gve->x(), gve->y(), gve->z(), gve->prescribedMeshSizeAtVertex(), 1.0); Tree_Add(gm->getGEOInternals()->Points, &verte); verte->Typ = MSH_POINT; @@ -395,19 +395,19 @@ GFace *GeoFactory::_addPlanarFace(GModel *gm, const std::vector<std::vector<GEdg } if (ge->geomType() == GEntity::Line){ - c = Create_Curve(numEdge, MSH_SEGM_LINE, 1, NULL, NULL, -1, -1, 0., 1.); + c = CreateCurve(numEdge, MSH_SEGM_LINE, 1, NULL, NULL, -1, -1, 0., 1.); } else if (ge->geomType() == GEntity::DiscreteCurve){ - c = Create_Curve(numEdge, MSH_SEGM_DISCRETE, 1, NULL, NULL, -1, -1, 0., 1.); + c = CreateCurve(numEdge, MSH_SEGM_DISCRETE, 1, NULL, NULL, -1, -1, 0., 1.); } else if(ge->geomType() == GEntity::CompoundCurve){ - c = Create_Curve(numEdge, MSH_SEGM_COMPOUND, 1, NULL, NULL, -1, -1, 0., 1.); + c = CreateCurve(numEdge, MSH_SEGM_COMPOUND, 1, NULL, NULL, -1, -1, 0., 1.); std::vector<GEdge*> gec = ((GEdgeCompound*)ge)->getCompounds(); for(unsigned int i = 0; i < gec.size(); i++) c->compound.push_back(gec[i]->tag()); } else{ - c = Create_Curve(numEdge, MSH_SEGM_DISCRETE, 1, NULL, NULL, -1, -1, 0., 1.); + c = CreateCurve(numEdge, MSH_SEGM_DISCRETE, 1, NULL, NULL, -1, -1, 0., 1.); } c->Control_Points = List_Create(2, 1, sizeof(Vertex *)); @@ -415,7 +415,7 @@ GFace *GeoFactory::_addPlanarFace(GModel *gm, const std::vector<std::vector<GEdg List_Add(c->Control_Points, &verte); c->beg = vertb; c->end = verte; - End_Curve(c); + EndCurve(c); Tree_Add(gm->getGEOInternals()->Curves, &c); CreateReversedCurve(c); @@ -430,7 +430,7 @@ GFace *GeoFactory::_addPlanarFace(GModel *gm, const std::vector<std::vector<GEdg if (!FindEdgeLoop(numl)) break; } SortEdgesInLoop(numl, temp, orientEdges); - EdgeLoop *l = Create_EdgeLoop(numl, temp); + EdgeLoop *l = CreateEdgeLoop(numl, temp); vecLoops.push_back(l); Tree_Add(gm->getGEOInternals()->EdgeLoops, &l); l->Num = numl; @@ -439,7 +439,7 @@ GFace *GeoFactory::_addPlanarFace(GModel *gm, const std::vector<std::vector<GEdg //create surface int numf = gm->getMaxElementaryNumber(2)+1; - Surface *s = Create_Surface(numf, MSH_SURF_PLAN); + Surface *s = CreateSurface(numf, MSH_SURF_PLAN); List_T *temp = List_Create(nLoops, nLoops, sizeof(int)); for (int i = 0; i < nLoops; i++){ int numl = vecLoops[i]->Num; @@ -448,7 +448,7 @@ GFace *GeoFactory::_addPlanarFace(GModel *gm, const std::vector<std::vector<GEdg SetSurfaceGeneratrices(s, temp); List_Delete(temp); - End_Surface(s); + EndSurface(s); Tree_Add(gm->getGEOInternals()->Surfaces, &s); //gmsh surface diff --git a/Geo/GModelIO_GEO.cpp b/Geo/GModelIO_GEO.cpp index 63738e83368bebf8659d1e81b48f8665dabc4234..06db036756a2ecd1c27b43f63b8281608326e226 100644 --- a/Geo/GModelIO_GEO.cpp +++ b/Geo/GModelIO_GEO.cpp @@ -33,19 +33,19 @@ void GEO_Internals::_allocateAll() MaxPointNum = MaxLineNum = MaxLineLoopNum = MaxSurfaceNum = 0; MaxSurfaceLoopNum = MaxVolumeNum = MaxPhysicalNum = 0; - Points = Tree_Create(sizeof(Vertex *), compareVertex); - Curves = Tree_Create(sizeof(Curve *), compareCurve); - EdgeLoops = Tree_Create(sizeof(EdgeLoop *), compareEdgeLoop); - Surfaces = Tree_Create(sizeof(Surface *), compareSurface); - SurfaceLoops = Tree_Create(sizeof(SurfaceLoop *), compareSurfaceLoop); - Volumes = Tree_Create(sizeof(Volume *), compareVolume); + Points = Tree_Create(sizeof(Vertex *), CompareVertex); + Curves = Tree_Create(sizeof(Curve *), CompareCurve); + EdgeLoops = Tree_Create(sizeof(EdgeLoop *), CompareEdgeLoop); + Surfaces = Tree_Create(sizeof(Surface *), CompareSurface); + SurfaceLoops = Tree_Create(sizeof(SurfaceLoop *), CompareSurfaceLoop); + Volumes = Tree_Create(sizeof(Volume *), CompareVolume); PhysicalGroups = List_Create(5, 5, sizeof(PhysicalGroup *)); - DelPoints = Tree_Create(sizeof(Vertex *), compareVertex); - DelCurves = Tree_Create(sizeof(Curve *), compareCurve); - DelSurfaces = Tree_Create(sizeof(Surface *), compareSurface); - DelVolumes = Tree_Create(sizeof(Volume *), compareVolume); + DelPoints = Tree_Create(sizeof(Vertex *), CompareVertex); + DelCurves = Tree_Create(sizeof(Curve *), CompareCurve); + DelSurfaces = Tree_Create(sizeof(Surface *), CompareSurface); + DelVolumes = Tree_Create(sizeof(Volume *), CompareVolume); _changed = true; } @@ -55,19 +55,19 @@ void GEO_Internals::_freeAll() MaxPointNum = MaxLineNum = MaxLineLoopNum = MaxSurfaceNum = 0; MaxSurfaceLoopNum = MaxVolumeNum = MaxPhysicalNum = 0; - Tree_Action(Points, Free_Vertex); Tree_Delete(Points); - Tree_Action(Curves, Free_Curve); Tree_Delete(Curves); - Tree_Action(EdgeLoops, Free_EdgeLoop); Tree_Delete(EdgeLoops); - Tree_Action(Surfaces, Free_Surface); Tree_Delete(Surfaces); - Tree_Action(SurfaceLoops, Free_SurfaceLoop); Tree_Delete(SurfaceLoops); - Tree_Action(Volumes, Free_Volume); Tree_Delete(Volumes); + Tree_Action(Points, FreeVertex); Tree_Delete(Points); + Tree_Action(Curves, FreeCurve); Tree_Delete(Curves); + Tree_Action(EdgeLoops, FreeEdgeLoop); Tree_Delete(EdgeLoops); + Tree_Action(Surfaces, FreeSurface); Tree_Delete(Surfaces); + Tree_Action(SurfaceLoops, FreeSurfaceLoop); Tree_Delete(SurfaceLoops); + Tree_Action(Volumes, FreeVolume); Tree_Delete(Volumes); - Tree_Action(DelPoints, Free_Vertex); Tree_Delete(DelPoints); - Tree_Action(DelCurves, Free_Curve); Tree_Delete(DelCurves); - Tree_Action(DelSurfaces, Free_Surface); Tree_Delete(DelSurfaces); - Tree_Action(DelVolumes, Free_Volume); Tree_Delete(DelVolumes); + Tree_Action(DelPoints, FreeVertex); Tree_Delete(DelPoints); + Tree_Action(DelCurves, FreeCurve); Tree_Delete(DelCurves); + Tree_Action(DelSurfaces, FreeSurface); Tree_Delete(DelSurfaces); + Tree_Action(DelVolumes, FreeVolume); Tree_Delete(DelVolumes); - List_Action(PhysicalGroups, Free_PhysicalGroup); List_Delete(PhysicalGroups); + List_Action(PhysicalGroups, FreePhysicalGroup); List_Delete(PhysicalGroups); _changed = true; } @@ -103,7 +103,7 @@ void GEO_Internals::addVertex(int num, double x, double y, double z, double lc) Msg::Error("GEO vertex with tag %d already exists", num); return; } - Vertex *v = Create_Vertex(num, x, y, z, lc, 1.0); + Vertex *v = CreateVertex(num, x, y, z, lc, 1.0); Tree_Add(Points, &v); _changed = true; } @@ -115,7 +115,7 @@ void GEO_Internals::addVertex(int num, double x, double y, gmshSurface *surface, Msg::Error("GEO vertex with tag %d already exists", num); return; } - Vertex *v = Create_Vertex(num, x, y, surface, lc); + Vertex *v = CreateVertex(num, x, y, surface, lc); Tree_Add(Points, &v); _changed = true; } @@ -138,7 +138,7 @@ void GEO_Internals::addLine(int num, std::vector<int> vertexTags) List_T *tmp = List_Create(2, 2, sizeof(int)); for(unsigned int i = 0; i < vertexTags.size(); i++) List_Add(tmp, &vertexTags[i]); - Curve *c = Create_Curve(num, MSH_SEGM_LINE, 1, tmp, NULL, -1, -1, 0., 1.); + Curve *c = CreateCurve(num, MSH_SEGM_LINE, 1, tmp, NULL, -1, -1, 0., 1.); Tree_Add(Curves, &c); CreateReversedCurve(c); List_Delete(tmp); @@ -156,12 +156,12 @@ void GEO_Internals::addCircleArc(int num, int startTag, int centerTag, int endTa List_Add(tmp, &startTag); List_Add(tmp, ¢erTag); List_Add(tmp, &endTag); - Curve *c = Create_Curve(num, MSH_SEGM_CIRC, 2, tmp, NULL, -1, -1, 0., 1.); + Curve *c = CreateCurve(num, MSH_SEGM_CIRC, 2, tmp, NULL, -1, -1, 0., 1.); if(nx || ny || nz){ c->Circle.n[0] = nx; c->Circle.n[1] = ny; c->Circle.n[2] = nz; - End_Curve(c); + EndCurve(c); } Tree_Add(Curves, &c); Curve *rc = CreateReversedCurve(c); @@ -169,7 +169,7 @@ void GEO_Internals::addCircleArc(int num, int startTag, int centerTag, int endTa rc->Circle.n[0] = nx; rc->Circle.n[1] = ny; rc->Circle.n[2] = nz; - End_Curve(rc); + EndCurve(rc); } List_Delete(tmp); _changed = true; @@ -187,12 +187,12 @@ void GEO_Internals::addEllipseArc(int num, int startTag, int centerTag, int majo List_Add(tmp, ¢erTag); List_Add(tmp, &majorTag); List_Add(tmp, &endTag); - Curve *c = Create_Curve(num, MSH_SEGM_ELLI, 2, tmp, NULL, -1, -1, 0., 1.); + Curve *c = CreateCurve(num, MSH_SEGM_ELLI, 2, tmp, NULL, -1, -1, 0., 1.); if(nx || ny || nz){ c->Circle.n[0] = nx; c->Circle.n[1] = ny; c->Circle.n[2] = nz; - End_Curve(c); + EndCurve(c); } Tree_Add(Curves, &c); Curve *rc = CreateReversedCurve(c); @@ -200,7 +200,7 @@ void GEO_Internals::addEllipseArc(int num, int startTag, int centerTag, int majo rc->Circle.n[0] = nx; rc->Circle.n[1] = ny; rc->Circle.n[2] = nz; - End_Curve(rc); + EndCurve(rc); } List_Delete(tmp); _changed = true; @@ -215,7 +215,7 @@ void GEO_Internals::addSpline(int num, std::vector<int> vertexTags) List_T *tmp = List_Create(2, 2, sizeof(int)); for(unsigned int i = 0; i < vertexTags.size(); i++) List_Add(tmp, &vertexTags[i]); - Curve *c = Create_Curve(num, MSH_SEGM_SPLN, 3, tmp, NULL, -1, -1, 0., 1.); + Curve *c = CreateCurve(num, MSH_SEGM_SPLN, 3, tmp, NULL, -1, -1, 0., 1.); Tree_Add(Curves, &c); CreateReversedCurve(c); List_Delete(tmp); @@ -231,7 +231,7 @@ void GEO_Internals::addBSpline(int num, std::vector<int> vertexTags) List_T *tmp = List_Create(2, 2, sizeof(int)); for(unsigned int i = 0; i < vertexTags.size(); i++) List_Add(tmp, &vertexTags[i]); - Curve *c = Create_Curve(num, MSH_SEGM_BSPLN, 2, tmp, NULL, -1, -1, 0., 1.); + Curve *c = CreateCurve(num, MSH_SEGM_BSPLN, 2, tmp, NULL, -1, -1, 0., 1.); Tree_Add(Curves, &c); CreateReversedCurve(c); List_Delete(tmp); @@ -247,7 +247,7 @@ void GEO_Internals::addBezier(int num, std::vector<int> vertexTags) List_T *tmp = List_Create(2, 2, sizeof(int)); for(unsigned int i = 0; i < vertexTags.size(); i++) List_Add(tmp, &vertexTags[i]); - Curve *c = Create_Curve(num, MSH_SEGM_BEZIER, 2, tmp, NULL, -1, -1, 0., 1.); + Curve *c = CreateCurve(num, MSH_SEGM_BEZIER, 2, tmp, NULL, -1, -1, 0., 1.); Tree_Add(Curves, &c); CreateReversedCurve(c); List_Delete(tmp); @@ -268,7 +268,7 @@ void GEO_Internals::addNurbs(int num, std::vector<int> vertexTags, List_T *knotsList = List_Create(2, 2, sizeof(double)); for(unsigned int i = 0; i < knots.size(); i++) List_Add(knotsList, &knots[i]); - Curve *c = Create_Curve(num, MSH_SEGM_NURBS, order, tmp, knotsList, -1, -1, 0., 1.); + Curve *c = CreateCurve(num, MSH_SEGM_NURBS, order, tmp, knotsList, -1, -1, 0., 1.); Tree_Add(Curves, &c); CreateReversedCurve(c); List_Delete(tmp); @@ -282,9 +282,9 @@ void GEO_Internals::addCompoundLine(int num, std::vector<int> edgeTags) return; } - Curve *c = Create_Curve(num, MSH_SEGM_COMPOUND, 1, NULL, NULL, -1, -1, 0., 1.); + Curve *c = CreateCurve(num, MSH_SEGM_COMPOUND, 1, NULL, NULL, -1, -1, 0., 1.); c->compound = edgeTags; - End_Curve(c); + EndCurve(c); Tree_Add(Curves, &c); CreateReversedCurve(c); _changed = true; @@ -300,7 +300,7 @@ void GEO_Internals::addLineLoop(int num, std::vector<int> edgeTags) for(unsigned int i = 0; i < edgeTags.size(); i++) List_Add(tmp, &edgeTags[i]); SortEdgesInLoop(num, tmp); - EdgeLoop *l = Create_EdgeLoop(num, tmp); + EdgeLoop *l = CreateEdgeLoop(num, tmp); Tree_Add(EdgeLoops, &l); List_Delete(tmp); _changed = true; @@ -319,10 +319,10 @@ void GEO_Internals::addPlaneSurface(int num, std::vector<int> wireTags) List_T *tmp = List_Create(2, 2, sizeof(int)); for(unsigned int i = 0; i < wireTags.size(); i++) List_Add(tmp, &wireTags[i]); - Surface *s = Create_Surface(num, MSH_SURF_PLAN); + Surface *s = CreateSurface(num, MSH_SURF_PLAN); SetSurfaceGeneratrices(s, tmp); List_Delete(tmp); - End_Surface(s); + EndSurface(s); Tree_Add(Surfaces, &s); _changed = true; } @@ -333,7 +333,7 @@ void GEO_Internals::addDiscreteSurface(int num) Msg::Error("GEO face with tag %d already exists", num); return; } - Surface *s = Create_Surface(num, MSH_SURF_DISCRETE); + Surface *s = CreateSurface(num, MSH_SURF_DISCRETE); Tree_Add(Surfaces, &s); _changed = true; } @@ -366,10 +366,10 @@ void GEO_Internals::addSurfaceFilling(int num, std::vector<int> wireTags, List_T *tmp = List_Create(2, 2, sizeof(int)); for(unsigned int i = 0; i < wireTags.size(); i++) List_Add(tmp, &wireTags[i]); - Surface *s = Create_Surface(num, type); + Surface *s = CreateSurface(num, type); SetSurfaceGeneratrices(s, tmp); List_Delete(tmp); - End_Surface(s); + EndSurface(s); if(sphereCenterTag >= 0){ s->InSphereCenter = FindPoint(sphereCenterTag); if(!s->InSphereCenter) @@ -387,7 +387,7 @@ void GEO_Internals::addCompoundSurface(int num, std::vector<int> faceTags, return; } - Surface *s = Create_Surface(num, MSH_SURF_COMPOUND); + Surface *s = CreateSurface(num, MSH_SURF_COMPOUND); s->compound = faceTags; if(edgeTags){ for(int i = 0; i < 4; i++) @@ -408,7 +408,7 @@ void GEO_Internals::addSurfaceLoop(int num, std::vector<int> faceTags) List_T *tmp = List_Create(2, 2, sizeof(int)); for(unsigned int i = 0; i < faceTags.size(); i++) List_Add(tmp, &faceTags[i]); - SurfaceLoop *l = Create_SurfaceLoop(num, tmp); + SurfaceLoop *l = CreateSurfaceLoop(num, tmp); Tree_Add(SurfaceLoops, &l); List_Delete(tmp); _changed = true; @@ -424,7 +424,7 @@ void GEO_Internals::addVolume(int num, std::vector<int> shellTags) List_T *tmp = List_Create(2, 2, sizeof(int)); for(unsigned int i = 0; i < shellTags.size(); i++) List_Add(tmp, &shellTags[i]); - Volume *v = Create_Volume(num, MSH_VOLUME); + Volume *v = CreateVolume(num, MSH_VOLUME); SetVolumeSurfaces(v, tmp); List_Delete(tmp); Tree_Add(Volumes, &v); @@ -438,7 +438,7 @@ void GEO_Internals::addCompoundVolume(int num, std::vector<int> regionTags) return; } - Volume *v = Create_Volume(num, MSH_VOLUME_COMPOUND); + Volume *v = CreateVolume(num, MSH_VOLUME_COMPOUND); v->compound = regionTags; Tree_Add(Volumes, &v); _changed = true; @@ -548,7 +548,7 @@ void GEO_Internals::remove(int dim, int tag) void GEO_Internals::resetPhysicalGroups() { - List_Action(PhysicalGroups, Free_PhysicalGroup); + List_Action(PhysicalGroups, FreePhysicalGroup); List_Reset(PhysicalGroups); _changed = true; } @@ -575,7 +575,7 @@ void GEO_Internals::modifyPhysicalGroup(int dim, int num, int op, std::vector<in List_T *tmp = List_Create(10, 10, sizeof(int)); for(unsigned int i = 0; i < tags.size(); i++) List_Add(tmp, &tags[i]); - p = Create_PhysicalGroup(num, type, tmp); + p = CreatePhysicalGroup(num, type, tmp); List_Delete(tmp); List_Add(PhysicalGroups, &p); } @@ -1330,14 +1330,14 @@ int GModel::exportDiscreteGEOInternals() _geo_internals = new GEO_Internals; for(viter it = firstVertex(); it != lastVertex(); it++){ - Vertex *v = Create_Vertex((*it)->tag(), (*it)->x(), (*it)->y(), (*it)->z(), + Vertex *v = CreateVertex((*it)->tag(), (*it)->x(), (*it)->y(), (*it)->z(), (*it)->prescribedMeshSizeAtVertex(), 1.0); Tree_Add(_geo_internals->Points, &v); } for(eiter it = firstEdge(); it != lastEdge(); it++){ if((*it)->geomType() == GEntity::DiscreteCurve){ - Curve *c = Create_Curve((*it)->tag(), MSH_SEGM_DISCRETE, 1, + Curve *c = CreateCurve((*it)->tag(), MSH_SEGM_DISCRETE, 1, NULL, NULL, -1, -1, 0., 1.); List_T *points = Tree2List(_geo_internals->Points); GVertex *gvb = (*it)->getBeginVertex(); @@ -1356,7 +1356,7 @@ int GModel::exportDiscreteGEOInternals() c->end = v; } } - End_Curve(c); + EndCurve(c); Tree_Add(_geo_internals->Curves, &c); CreateReversedCurve(c); List_Delete(points); @@ -1365,7 +1365,7 @@ int GModel::exportDiscreteGEOInternals() for(fiter it = firstFace(); it != lastFace(); it++){ if((*it)->geomType() == GEntity::DiscreteSurface){ - Surface *s = Create_Surface((*it)->tag(), MSH_SURF_DISCRETE); + Surface *s = CreateSurface((*it)->tag(), MSH_SURF_DISCRETE); std::list<GEdge*> edges = (*it)->edges(); s->Generatrices = List_Create(edges.size(), 1, sizeof(Curve *)); List_T *curves = Tree2List(_geo_internals->Curves); diff --git a/Geo/GModelIO_GEO.h b/Geo/GModelIO_GEO.h index d158004c03f1bb2dea173791a6898ad8a12fc692..3eca3918725be5d219b565ca5a7910401bcdf523 100644 --- a/Geo/GModelIO_GEO.h +++ b/Geo/GModelIO_GEO.h @@ -17,11 +17,11 @@ class GEO_Internals{ // FIXME: all of this will become private once the refactoring of the old code // is complete Tree_T *Points, *Curves, *EdgeLoops, *Surfaces, *SurfaceLoops, *Volumes; + Tree_T *DelPoints, *DelCurves, *DelSurfaces, *DelVolumes; List_T *PhysicalGroups; int MaxPointNum, MaxLineNum, MaxLineLoopNum, MaxSurfaceNum; int MaxSurfaceLoopNum, MaxVolumeNum, MaxPhysicalNum; std::multimap<int, std::vector<int> > meshCompounds; - Tree_T *DelPoints, *DelCurves, *DelSurfaces, *DelVolumes; private: void _allocateAll(); void _freeAll(); diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp index 2b30ac9cc140d0acfd460b6143672a3bfd0e8067..3df656f4c0cf9a7c65b8526e454158d82a5e4343 100644 --- a/Geo/Geo.cpp +++ b/Geo/Geo.cpp @@ -19,14 +19,14 @@ static List_T *ListOfTransformedPoints = NULL; // Comparison routines -int compareVertex(const void *a, const void *b) +int CompareVertex(const void *a, const void *b) { Vertex *q = *(Vertex **)a; Vertex *w = *(Vertex **)b; return abs(q->Num) - abs(w->Num); } -static int comparePosition(const void *a, const void *b) +static int ComparePosition(const void *a, const void *b) { Vertex *q = *(Vertex **)a; Vertex *w = *(Vertex **)b; @@ -43,42 +43,42 @@ static int comparePosition(const void *a, const void *b) return 0; } -int compareSurfaceLoop(const void *a, const void *b) +int CompareSurfaceLoop(const void *a, const void *b) { SurfaceLoop *q = *(SurfaceLoop **)a; SurfaceLoop *w = *(SurfaceLoop **)b; return q->Num - w->Num; } -int compareEdgeLoop(const void *a, const void *b) +int CompareEdgeLoop(const void *a, const void *b) { EdgeLoop *q = *(EdgeLoop **)a; EdgeLoop *w = *(EdgeLoop **)b; return q->Num - w->Num; } -int compareCurve(const void *a, const void *b) +int CompareCurve(const void *a, const void *b) { Curve *q = *(Curve **)a; Curve *w = *(Curve **)b; return q->Num - w->Num; } -int compareSurface(const void *a, const void *b) +int CompareSurface(const void *a, const void *b) { Surface *q = *(Surface **)a; Surface *w = *(Surface **)b; return q->Num - w->Num; } -int compareVolume(const void *a, const void *b) +int CompareVolume(const void *a, const void *b) { Volume *q = *(Volume **)a; Volume *w = *(Volume **)b; return q->Num - w->Num; } -int comparePhysicalGroup(const void *a, const void *b) +int ComparePhysicalGroup(const void *a, const void *b) { PhysicalGroup *q = *(PhysicalGroup **)a; PhysicalGroup *w = *(PhysicalGroup **)b; @@ -101,7 +101,7 @@ void Projette(Vertex *v, double mat[3][3]) // Basic entity creation/deletion functions -Vertex *Create_Vertex(int Num, double X, double Y, double Z, double lc, double u) +Vertex *CreateVertex(int Num, double X, double Y, double Z, double lc, double u) { Vertex *pV = new Vertex(X, Y, Z, lc); pV->w = 1.0; @@ -113,7 +113,7 @@ Vertex *Create_Vertex(int Num, double X, double Y, double Z, double lc, double u return pV; } -Vertex *Create_Vertex(int Num, double u, double v, gmshSurface *surf, double lc) +Vertex *CreateVertex(int Num, double u, double v, gmshSurface *surf, double lc) { SPoint3 p = surf->point(u, v); Vertex *pV = new Vertex(p.x(), p.y(), p.z(), lc); @@ -128,7 +128,7 @@ Vertex *Create_Vertex(int Num, double u, double v, gmshSurface *surf, double lc) return pV; } -void Free_Vertex(void *a, void *b) +void FreeVertex(void *a, void *b) { Vertex *v = *(Vertex **)a; if(v) { @@ -137,7 +137,7 @@ void Free_Vertex(void *a, void *b) } } -PhysicalGroup *Create_PhysicalGroup(int Num, int typ, List_T *intlist) +PhysicalGroup *CreatePhysicalGroup(int Num, int typ, List_T *intlist) { PhysicalGroup *p = new PhysicalGroup; p->Entities = List_Create(List_Nbr(intlist), 1, sizeof(int)); @@ -153,7 +153,7 @@ PhysicalGroup *Create_PhysicalGroup(int Num, int typ, List_T *intlist) return p; } -void Free_PhysicalGroup(void *a, void *b) +void FreePhysicalGroup(void *a, void *b) { PhysicalGroup *p = *(PhysicalGroup **)a; if(p) { @@ -163,7 +163,7 @@ void Free_PhysicalGroup(void *a, void *b) } } -EdgeLoop *Create_EdgeLoop(int Num, List_T *intlist) +EdgeLoop *CreateEdgeLoop(int Num, List_T *intlist) { EdgeLoop *l = new EdgeLoop; l->Curves = List_Create(List_Nbr(intlist), 1, sizeof(int)); @@ -178,7 +178,7 @@ EdgeLoop *Create_EdgeLoop(int Num, List_T *intlist) return l; } -void Free_EdgeLoop(void *a, void *b) +void FreeEdgeLoop(void *a, void *b) { EdgeLoop *l = *(EdgeLoop **)a; if(l) { @@ -188,7 +188,7 @@ void Free_EdgeLoop(void *a, void *b) } } -SurfaceLoop *Create_SurfaceLoop(int Num, List_T *intlist) +SurfaceLoop *CreateSurfaceLoop(int Num, List_T *intlist) { SurfaceLoop *l = new SurfaceLoop; l->Surfaces = List_Create(List_Nbr(intlist), 1, sizeof(int)); @@ -203,7 +203,7 @@ SurfaceLoop *Create_SurfaceLoop(int Num, List_T *intlist) return l; } -void Free_SurfaceLoop(void *a, void *b) +void FreeSurfaceLoop(void *a, void *b) { SurfaceLoop *l = *(SurfaceLoop **)a; if(l) { @@ -220,7 +220,7 @@ static void direction(Vertex *v1, Vertex *v2, double d[3]) d[2] = v2->Pos.Z - v1->Pos.Z; } -void End_Curve(Curve *c) +void EndCurve(Curve *c) { // if all control points of a curve are on the same geometry, then the curve // is also on the geometry @@ -492,7 +492,7 @@ void End_Curve(Curve *c) } } -void End_Surface(Surface *s) +void EndSurface(Surface *s) { // if all generatrices of a surface are on the same geometry, then // the surface is also on the geometry @@ -511,7 +511,7 @@ void End_Surface(Surface *s) } } -Curve *Create_Curve(int Num, int Typ, int Order, List_T *Liste, +Curve *CreateCurve(int Num, int Typ, int Order, List_T *Liste, List_T *Knots, int p1, int p2, double u1, double u2) { double matcr[4][4] = { {-0.5, 1.5, -1.5, 0.5}, @@ -618,13 +618,13 @@ Curve *Create_Curve(int Num, int Typ, int Order, List_T *Liste, Msg::Error("Unknown control point %d in Curve %d (c)", p2, pC->Num); } } - End_Curve(pC); + EndCurve(pC); } return pC; } -void Free_Curve(void *a, void *b) +void FreeCurve(void *a, void *b) { Curve *pC = *(Curve **)a; if(pC) { @@ -636,7 +636,7 @@ void Free_Curve(void *a, void *b) } } -Surface *Create_Surface(int Num, int Typ) +Surface *CreateSurface(int Num, int Typ) { Surface *pS = new Surface; pS->Num = Num; @@ -660,7 +660,7 @@ Surface *Create_Surface(int Num, int Typ) return (pS); } -void Free_Surface(void *a, void *b) +void FreeSurface(void *a, void *b) { Surface *pS = *(Surface **)a; if(pS) { @@ -673,7 +673,7 @@ void Free_Surface(void *a, void *b) } } -Volume *Create_Volume(int Num, int Typ) +Volume *CreateVolume(int Num, int Typ) { Volume *pV = new Volume; pV->Recombine3D = 0; @@ -691,7 +691,7 @@ Volume *Create_Volume(int Num, int Typ) return pV; } -void Free_Volume(void *a, void *b) +void FreeVolume(void *a, void *b) { Volume *pV = *(Volume **)a; if(pV) { @@ -705,7 +705,7 @@ void Free_Volume(void *a, void *b) } } -static int compare2Lists(List_T *List1, List_T *List2, +static int Compare2Lists(List_T *List1, List_T *List2, int (*fcmp) (const void *a, const void *b)) { int i, found; @@ -826,7 +826,7 @@ PhysicalGroup *FindPhysicalGroup(int num, int type) pp->Typ = type; if((ppp = (PhysicalGroup **) List_PQuery(GModel::current()->getGEOInternals()->PhysicalGroups, &pp, - comparePhysicalGroup))) { + ComparePhysicalGroup))) { return *ppp; } return NULL; @@ -844,13 +844,13 @@ static void CopyVertex(Vertex *v, Vertex *vv) Vertex *DuplicateVertex(Vertex *v) { if(!v) return NULL; - Vertex *pv = Create_Vertex(NEWPOINT(), 0, 0, 0, 0, 0); + Vertex *pv = CreateVertex(NEWPOINT(), 0, 0, 0, 0, 0); CopyVertex(v, pv); Tree_Insert(GModel::current()->getGEOInternals()->Points, &pv); return pv; } -static int compareAbsCurve(const void *a, const void *b) +static int CompareAbsCurve(const void *a, const void *b) { Curve *q = *(Curve **)a; Curve *w = *(Curve **)b; @@ -877,12 +877,12 @@ static void CopyCurve(Curve *c, Curve *cc) cc->uend = c->uend; cc->Control_Points = List_Create(List_Nbr(c->Control_Points), 1, sizeof(Vertex *)); List_Copy(c->Control_Points, cc->Control_Points); - End_Curve(cc); + EndCurve(cc); } Curve *DuplicateCurve(Curve *c) { - Curve *pc = Create_Curve(NEWLINE(), 0, 1, NULL, NULL, -1, -1, 0., 1.); + Curve *pc = CreateCurve(NEWLINE(), 0, 1, NULL, NULL, -1, -1, 0., 1.); CopyCurve(c, pc); Tree_Insert(GModel::current()->getGEOInternals()->Curves, &pc); for(int i = 0; i < List_Nbr(c->Control_Points); i++) { @@ -917,12 +917,12 @@ static void CopySurface(Surface *s, Surface *ss) ss->InSphereCenter = s->InSphereCenter; // FIXME: hack... List_Copy(s->Generatrices, ss->Generatrices); List_Copy(s->GeneratricesByTag, ss->GeneratricesByTag); - End_Surface(ss); + EndSurface(ss); } Surface *DuplicateSurface(Surface *s) { - Surface *ps = Create_Surface(NEWSURFACE(), 0); + Surface *ps = CreateSurface(NEWSURFACE(), 0); CopySurface(s, ps); Tree_Insert(GModel::current()->getGEOInternals()->Surfaces, &ps); for(int i = 0; i < List_Nbr(ps->Generatrices); i++) { @@ -951,7 +951,7 @@ static void CopyVolume(Volume *v, Volume *vv) Volume *DuplicateVolume(Volume *v) { - Volume *pv = Create_Volume(NEWVOLUME(), 0); + Volume *pv = CreateVolume(NEWVOLUME(), 0); CopyVolume(v, pv); Tree_Insert(GModel::current()->getGEOInternals()->Volumes, &pv); for(int i = 0; i < List_Nbr(pv->Surfaces); i++) { @@ -973,7 +973,7 @@ void DeletePoint(int ip) Curve *c; List_Read(Curves, i, &c); for(int j = 0; j < List_Nbr(c->Control_Points); j++) { - if(!compareVertex(List_Pointer(c->Control_Points, j), &v)){ + if(!CompareVertex(List_Pointer(c->Control_Points, j), &v)){ List_Delete(Curves); // cannot delete: it's a control point of a curve return; @@ -999,7 +999,7 @@ void DeleteCurve(int ip) Surface *s; List_Read(Surfs, i, &s); for(int j = 0; j < List_Nbr(s->Generatrices); j++) { - if(!compareAbsCurve(List_Pointer(s->Generatrices, j), &c)){ + if(!CompareAbsCurve(List_Pointer(s->Generatrices, j), &c)){ List_Delete(Surfs); // cannot delete: it's on the boundary of a surface return; @@ -1025,7 +1025,7 @@ void DeleteSurface(int is) Volume *v; List_Read(Vols, i, &v); for(int j = 0; j < List_Nbr(v->Surfaces); j++) { - if(!compareSurface(List_Pointer(v->Surfaces, j), &s)){ + if(!CompareSurface(List_Pointer(v->Surfaces, j), &s)){ List_Delete(Vols); // cannot delete: it's on the boundary of a volume return; @@ -1059,8 +1059,8 @@ void DeletePhysicalPoint(int num) PhysicalGroup *p = FindPhysicalGroup(num, MSH_PHYSICAL_POINT); if(p){ List_Suppress(GModel::current()->getGEOInternals()->PhysicalGroups, &p, - comparePhysicalGroup); - Free_PhysicalGroup(&p, NULL); + ComparePhysicalGroup); + FreePhysicalGroup(&p, NULL); } GModel::current()->deletePhysicalGroup(0, num); } @@ -1070,8 +1070,8 @@ void DeletePhysicalLine(int num) PhysicalGroup *p = FindPhysicalGroup(num, MSH_PHYSICAL_LINE); if(p){ List_Suppress(GModel::current()->getGEOInternals()->PhysicalGroups, &p, - comparePhysicalGroup); - Free_PhysicalGroup(&p, NULL); + ComparePhysicalGroup); + FreePhysicalGroup(&p, NULL); } GModel::current()->deletePhysicalGroup(1, num); } @@ -1081,8 +1081,8 @@ void DeletePhysicalSurface(int num) PhysicalGroup *p = FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE); if(p){ List_Suppress(GModel::current()->getGEOInternals()->PhysicalGroups, &p, - comparePhysicalGroup); - Free_PhysicalGroup(&p, NULL); + ComparePhysicalGroup); + FreePhysicalGroup(&p, NULL); } GModel::current()->deletePhysicalGroup(2, num); } @@ -1092,8 +1092,8 @@ void DeletePhysicalVolume(int num) PhysicalGroup *p = FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME); if(p){ List_Suppress(GModel::current()->getGEOInternals()->PhysicalGroups, &p, - comparePhysicalGroup); - Free_PhysicalGroup(&p, NULL); + ComparePhysicalGroup); + FreePhysicalGroup(&p, NULL); } GModel::current()->deletePhysicalGroup(3, num); } @@ -1159,7 +1159,7 @@ void SetPartition(int Type, int Num, int Partition) Curve *CreateReversedCurve(Curve *c) { - Curve *newc = Create_Curve(-c->Num, c->Typ, 1, NULL, NULL, -1, -1, 0., 1.); + Curve *newc = CreateCurve(-c->Num, c->Typ, 1, NULL, NULL, -1, -1, 0., 1.); if(List_Nbr(c->Control_Points)){ newc->Control_Points = @@ -1208,11 +1208,11 @@ Curve *CreateReversedCurve(Curve *c) newc->degre = c->degre; newc->ubeg = 1. - c->uend; newc->uend = 1. - c->ubeg; - End_Curve(newc); + EndCurve(newc); Curve **pc; if((pc = (Curve **)Tree_PQuery(GModel::current()->getGEOInternals()->Curves, &newc))) { - Free_Curve(&newc, NULL); + FreeCurve(&newc, NULL); return *pc; } else{ @@ -1229,7 +1229,7 @@ int RecognizeLineLoop(List_T *liste, int *loop) for(int i = 0; i < List_Nbr(temp); i++) { EdgeLoop *pe; List_Read(temp, i, &pe); - if(!compare2Lists(pe->Curves, liste, fcmp_absint)) { + if(!Compare2Lists(pe->Curves, liste, fcmp_absint)) { res = 1; *loop = pe->Num; break; @@ -1247,7 +1247,7 @@ int RecognizeSurfaceLoop(List_T *liste, int *loop) for(int i = 0; i < List_Nbr(temp); i++) { EdgeLoop *pe; List_Read(temp, i, &pe); - if(!compare2Lists(pe->Curves, liste, fcmp_absint)) { + if(!Compare2Lists(pe->Curves, liste, fcmp_absint)) { res = 1; *loop = pe->Num; break; @@ -1469,7 +1469,7 @@ static void ApplyTransformationToPoint(double matrix[4][4], Vertex *v, for(int j = 0; j < List_Nbr(c->Control_Points); j++) { Vertex *pv = *(Vertex **)List_Pointer(c->Control_Points, j); if(pv->Num == v->Num){ - End_Curve(c); + EndCurve(c); break; } } @@ -1493,7 +1493,7 @@ static void ApplyTransformationToCurve(double matrix[4][4], Curve *c) List_Read(c->Control_Points, i, &v); ApplyTransformationToPoint(matrix, v); } - End_Curve(c); + EndCurve(c); } static void ApplyTransformationToSurface(double matrix[4][4], Surface *s) @@ -1504,7 +1504,7 @@ static void ApplyTransformationToSurface(double matrix[4][4], Surface *s) Curve *cc = FindCurve(abs(c->Num)); ApplyTransformationToCurve(matrix, cc); } - End_Surface(s); + EndSurface(s); } static void ApplyTransformationToVolume(double matrix[4][4], Volume *v) @@ -1725,8 +1725,8 @@ static List_T *GetCompoundUniqueEdges(Surface *ps) Curve *c_tmp2 = FindCurve( -itmap2->first ); if( itmap != itmap2 && - ( !compareTwoCurves( &c_tmp1, &c ) || - !compareTwoCurves( &c_tmp2, &c ) ) ){ + ( !CompareTwoCurves( &c_tmp1, &c ) || + !CompareTwoCurves( &c_tmp2, &c ) ) ){ unique_flag = false; break; } @@ -1809,7 +1809,7 @@ static List_T* GetOrderedUniqueEdges(Surface *s) // Duplicate removal -static int compareTwoPoints(const void *a, const void *b) +static int CompareTwoPoints(const void *a, const void *b) { Vertex *q = *(Vertex **)a; Vertex *w = *(Vertex **)b; @@ -1820,10 +1820,10 @@ static int compareTwoPoints(const void *a, const void *b) if(q->boundaryLayerIndex != w->boundaryLayerIndex) return q->boundaryLayerIndex - w->boundaryLayerIndex; - return comparePosition(a, b); + return ComparePosition(a, b); } -static int compareTwoCurves(const void *a, const void *b) +static int CompareTwoCurves(const void *a, const void *b) { Curve *c1 = *(Curve **)a; Curve *c2 = *(Curve **)b; @@ -1846,12 +1846,12 @@ static int compareTwoCurves(const void *a, const void *b) if(!List_Nbr(c1->Control_Points)){ if(!c1->beg || !c2->beg) return 1; - comp = compareVertex(&c1->beg, &c2->beg); + comp = CompareVertex(&c1->beg, &c2->beg); if(comp) return comp; if(!c1->end || !c2->end) return 1; - comp = compareVertex(&c1->end, &c2->end); + comp = CompareVertex(&c1->end, &c2->end); if(comp) return comp; } @@ -1860,7 +1860,7 @@ static int compareTwoCurves(const void *a, const void *b) Vertex *v1, *v2; List_Read(c1->Control_Points, i, &v1); List_Read(c2->Control_Points, i, &v2); - comp = compareVertex(&v1, &v2); + comp = CompareVertex(&v1, &v2); if(comp) return comp; } @@ -1868,12 +1868,12 @@ static int compareTwoCurves(const void *a, const void *b) return 0; } -static int compareTwoSurfaces(const void *a, const void *b) +static int CompareTwoSurfaces(const void *a, const void *b) { Surface *s1 = *(Surface **)a; Surface *s2 = *(Surface **)b; - // checking types is the "right thing" to do (see e.g. compareTwoCurves) + // checking types is the "right thing" to do (see e.g. CompareTwoCurves) // but it would break backward compatibility (see e.g. tutorial/t2.geo), // so let's just do it for boundary layer surfaces for now: if(s1->Typ == MSH_SURF_BND_LAYER || s2->Typ == MSH_SURF_BND_LAYER || @@ -1886,7 +1886,7 @@ static int compareTwoSurfaces(const void *a, const void *b) if(!List_Nbr(s1->Generatrices) && !List_Nbr(s2->Generatrices)) return 1; - return compare2Lists(s1->Generatrices, s2->Generatrices, compareAbsCurve); + return Compare2Lists(s1->Generatrices, s2->Generatrices, CompareAbsCurve); } static void MaxNumPoint(void *a, void *b) @@ -2007,7 +2007,7 @@ static void ReplaceDuplicatePointsNew(double tol = -1.) for(unsigned int i = 0; i < unused.size(); i++){ Vertex *V = v2V[unused[i]]; Tree_Suppress(GModel::current()->getGEOInternals()->Points, &V); - Free_Vertex(&V, NULL); + FreeVertex(&V, NULL); delete unused[i]; } for(unsigned int i = 0; i < used.size(); i++){ @@ -2019,7 +2019,7 @@ static void ReplaceDuplicatePointsNew(double tol = -1.) static void ReplaceDuplicatePoints(std::map<int, int> * v_report = 0) { - // This routine is logically wrong: the compareTwoPoints() function used in + // This routine is logically wrong: the CompareTwoPoints() function used in // the avl tree is not an appropriate comparison function. Fixing the routine // is easy (we need to a multi-dimensional tree), but it would break backward // compatibility with old .geo files (the point ids after "Coherence" would @@ -2032,8 +2032,8 @@ static void ReplaceDuplicatePoints(std::map<int, int> * v_report = 0) Curve *c; Surface *s; Volume *vol; - Tree_T *points2delete = Tree_Create(sizeof(Vertex *), compareVertex); - Tree_T *allNonDuplicatedPoints = Tree_Create(sizeof(Vertex *), compareTwoPoints); + Tree_T *points2delete = Tree_Create(sizeof(Vertex *), CompareVertex); + Tree_T *allNonDuplicatedPoints = Tree_Create(sizeof(Vertex *), CompareTwoPoints); // Create unique points int start = Tree_Nbr(GModel::current()->getGEOInternals()->Points); @@ -2182,7 +2182,7 @@ static void ReplaceDuplicatePoints(std::map<int, int> * v_report = 0) } } - Tree_Action(points2delete, Free_Vertex); + Tree_Action(points2delete, FreeVertex); Tree_Delete(points2delete); Tree_Delete(allNonDuplicatedPoints); @@ -2193,8 +2193,8 @@ static void ReplaceDuplicateCurves(std::map<int, int> * c_report = 0) { Curve *c, *c2, **pc, **pc2; Surface *s; - Tree_T *curves2delete = Tree_Create(sizeof(Curve *), compareCurve); - Tree_T *allNonDuplicatedCurves = Tree_Create(sizeof(Curve *), compareTwoCurves); + Tree_T *curves2delete = Tree_Create(sizeof(Curve *), CompareCurve); + Tree_T *allNonDuplicatedCurves = Tree_Create(sizeof(Curve *), CompareTwoCurves); // Create unique curves int start = Tree_Nbr(GModel::current()->getGEOInternals()->Curves); @@ -2208,7 +2208,7 @@ static void ReplaceDuplicateCurves(std::map<int, int> * c_report = 0) if(!(c2 = FindCurve(-c->Num))) { Msg::Error("Unknown curve %d", -c->Num); List_Delete(All); - Tree_Action(curves2delete, Free_Curve); + Tree_Action(curves2delete, FreeCurve); Tree_Delete(curves2delete); Tree_Delete(allNonDuplicatedCurves); return; @@ -2247,7 +2247,7 @@ static void ReplaceDuplicateCurves(std::map<int, int> * c_report = 0) int end = Tree_Nbr(GModel::current()->getGEOInternals()->Curves); if(start == end) { - Tree_Action(curves2delete, Free_Curve); + Tree_Action(curves2delete, FreeCurve); Tree_Delete(curves2delete); Tree_Delete(allNonDuplicatedCurves); return; @@ -2288,8 +2288,8 @@ static void ReplaceDuplicateCurves(std::map<int, int> * c_report = 0) Msg::Error("Could not replace curve %d in Coherence", (*pc)->Num); else { List_Write(s->Generatrices, j, pc2); - // arghhh: check compareTwoCurves! - End_Curve(*pc2); + // arghhh: check CompareTwoCurves! + EndCurve(*pc2); } } // replace extrusion sources @@ -2324,7 +2324,7 @@ static void ReplaceDuplicateCurves(std::map<int, int> * c_report = 0) } } - Tree_Action(curves2delete, Free_Curve); + Tree_Action(curves2delete, FreeCurve); Tree_Delete(curves2delete); Tree_Delete(allNonDuplicatedCurves); } @@ -2463,7 +2463,7 @@ static void RemoveDegenerateSurfaces() v->Surfaces = List_Create(1, 2, sizeof(Surface *)); v->SurfacesOrientations = List_Create(1, 2, sizeof(int)); for(int j = 0; j < List_Nbr(ll); j++) { - if(compareSurface(List_Pointer(ll, j), &s)){ + if(CompareSurface(List_Pointer(ll, j), &s)){ List_Add(v->Surfaces, List_Pointer(ll, j)); List_Add(v->SurfacesOrientations, List_Pointer(ll2, j)); } @@ -2492,8 +2492,8 @@ static void ReplaceDuplicateSurfaces(std::map<int, int> *s_report = 0) { Surface *s, *s2, **ps, **ps2; Volume *vol; - Tree_T *surfaces2delete = Tree_Create(sizeof(Surface *), compareSurface); - Tree_T *allNonDuplicatedSurfaces = Tree_Create(sizeof(Surface *), compareTwoSurfaces); + Tree_T *surfaces2delete = Tree_Create(sizeof(Surface *), CompareSurface); + Tree_T *allNonDuplicatedSurfaces = Tree_Create(sizeof(Surface *), CompareTwoSurfaces); // Create unique surfaces int start = Tree_Nbr(GModel::current()->getGEOInternals()->Surfaces); @@ -2525,7 +2525,7 @@ static void ReplaceDuplicateSurfaces(std::map<int, int> *s_report = 0) int end = Tree_Nbr(GModel::current()->getGEOInternals()->Surfaces); if(start == end) { - Tree_Action(surfaces2delete, Free_Surface); + Tree_Action(surfaces2delete, FreeSurface); Tree_Delete(surfaces2delete); Tree_Delete(allNonDuplicatedSurfaces); return; @@ -2599,7 +2599,7 @@ static void ReplaceDuplicateSurfaces(std::map<int, int> *s_report = 0) } } - Tree_Action(surfaces2delete, Free_Surface); + Tree_Action(surfaces2delete, FreeSurface); Tree_Delete(surfaces2delete); Tree_Delete(allNonDuplicatedSurfaces); } @@ -2676,12 +2676,12 @@ void ProtudeXYZ(double &x, double &y, double &z, ExtrudeParams *e) List_Reset(ListOfTransformedPoints); } -int Extrude_ProtudePoint(int type, int ip, - double T0, double T1, double T2, - double A0, double A1, double A2, - double X0, double X1, double X2, double alpha, - Curve **pc, Curve **prc, int final, - ExtrudeParams *e) +int ExtrudePoint(int type, int ip, + double T0, double T1, double T2, + double A0, double A1, double A2, + double X0, double X1, double X2, double alpha, + Curve **pc, Curve **prc, int final, + ExtrudeParams *e) { double matrix[4][4], T[3], Ax[3], d; Vertex V, *pv, *newp, *chapeau; @@ -2706,9 +2706,9 @@ int Extrude_ProtudePoint(int type, int ip, SetTranslationMatrix(matrix, T); List_Reset(ListOfTransformedPoints); ApplyTransformationToPoint(matrix, chapeau); - if(!comparePosition(&pv, &chapeau)) + if(!ComparePosition(&pv, &chapeau)) return pv->Num; - c = Create_Curve(NEWLINE(), MSH_SEGM_LINE, 1, NULL, NULL, -1, -1, 0., 1.); + c = CreateCurve(NEWLINE(), MSH_SEGM_LINE, 1, NULL, NULL, -1, -1, 0., 1.); c->Control_Points = List_Create(2, 1, sizeof(Vertex *)); c->Extrude = new ExtrudeParams; c->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha); @@ -2722,7 +2722,7 @@ int Extrude_ProtudePoint(int type, int ip, case BOUNDARY_LAYER: chapeau->Typ = MSH_POINT_BND_LAYER; if(e) chapeau->boundaryLayerIndex = e->mesh.BoundaryLayerIndex; - c = Create_Curve(NEWLINE(), MSH_SEGM_BND_LAYER, 1, NULL, NULL, -1, -1, 0., 1.); + c = CreateCurve(NEWLINE(), MSH_SEGM_BND_LAYER, 1, NULL, NULL, -1, -1, 0., 1.); c->Control_Points = List_Create(2, 1, sizeof(Vertex *)); c->Extrude = new ExtrudeParams; c->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha); @@ -2751,9 +2751,9 @@ int Extrude_ProtudePoint(int type, int ip, SetTranslationMatrix(matrix, T); List_Reset(ListOfTransformedPoints); ApplyTransformationToPoint(matrix, chapeau); - if(!comparePosition(&pv, &chapeau)) + if(!ComparePosition(&pv, &chapeau)) return pv->Num; - c = Create_Curve(NEWLINE(), MSH_SEGM_CIRC, 1, NULL, NULL, -1, -1, 0., 1.); + c = CreateCurve(NEWLINE(), MSH_SEGM_CIRC, 1, NULL, NULL, -1, -1, 0., 1.); c->Control_Points = List_Create(3, 1, sizeof(Vertex *)); c->Extrude = new ExtrudeParams; c->Extrude->fill(type, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha); @@ -2781,7 +2781,7 @@ int Extrude_ProtudePoint(int type, int ip, case TRANSLATE_ROTATE: d = CTX::instance()->geom.extrudeSplinePoints; d = d ? d : 1; - c = Create_Curve(NEWLINE(), MSH_SEGM_SPLN, 1, NULL, NULL, -1, -1, 0., 1.); + c = CreateCurve(NEWLINE(), MSH_SEGM_SPLN, 1, NULL, NULL, -1, -1, 0., 1.); c->Control_Points = List_Create(CTX::instance()->geom.extrudeSplinePoints + 1, 1, sizeof(Vertex *)); c->Extrude = new ExtrudeParams; @@ -2826,7 +2826,7 @@ int Extrude_ProtudePoint(int type, int ip, return pv->Num; } - End_Curve(c); + EndCurve(c); Tree_Add(GModel::current()->getGEOInternals()->Curves, &c); CreateReversedCurve(c); *pc = c; @@ -2853,12 +2853,12 @@ int Extrude_ProtudePoint(int type, int ip, return chap_num; } -int Extrude_ProtudeCurve(int type, int ic, - double T0, double T1, double T2, - double A0, double A1, double A2, - double X0, double X1, double X2, double alpha, - Surface **ps, int final, - ExtrudeParams *e) +int ExtrudeCurve(int type, int ic, + double T0, double T1, double T2, + double A0, double A1, double A2, + double X0, double X1, double X2, double alpha, + Surface **ps, int final, + ExtrudeParams *e) { double matrix[4][4], T[3], Ax[3]; Curve *CurveBeg, *CurveEnd; @@ -2967,12 +2967,12 @@ int Extrude_ProtudeCurve(int type, int ic, return pc->Num; } - Extrude_ProtudePoint(type, pc->beg->Num, T0, T1, T2, - A0, A1, A2, X0, X1, X2, alpha, - &CurveBeg, &ReverseBeg, 0, e); - Extrude_ProtudePoint(type, pc->end->Num, T0, T1, T2, - A0, A1, A2, X0, X1, X2, alpha, - &CurveEnd, &ReverseEnd, 0, e); + ExtrudePoint(type, pc->beg->Num, T0, T1, T2, + A0, A1, A2, X0, X1, X2, alpha, + &CurveBeg, &ReverseBeg, 0, e); + ExtrudePoint(type, pc->end->Num, T0, T1, T2, + A0, A1, A2, X0, X1, X2, alpha, + &CurveEnd, &ReverseEnd, 0, e); if(!CurveBeg && !CurveEnd){ return pc->Num; @@ -2984,11 +2984,11 @@ int Extrude_ProtudeCurve(int type, int ic, // handle this case. if(type == BOUNDARY_LAYER) - s = Create_Surface(NEWSURFACE(), MSH_SURF_BND_LAYER); + s = CreateSurface(NEWSURFACE(), MSH_SURF_BND_LAYER); else if(!CurveBeg || !CurveEnd) - s = Create_Surface(NEWSURFACE(), MSH_SURF_TRIC); + s = CreateSurface(NEWSURFACE(), MSH_SURF_TRIC); else - s = Create_Surface(NEWSURFACE(), MSH_SURF_REGL); + s = CreateSurface(NEWSURFACE(), MSH_SURF_REGL); s->Generatrices = List_Create(4, 1, sizeof(Curve *)); s->Extrude = new ExtrudeParams; @@ -3016,7 +3016,7 @@ int Extrude_ProtudeCurve(int type, int ic, List_Add(s->Generatrices, &ReverseBeg); } - End_Surface(s); + EndSurface(s); Tree_Add(GModel::current()->getGEOInternals()->Surfaces, &s); List_Reset(ListOfTransformedPoints); @@ -3044,11 +3044,11 @@ int Extrude_ProtudeCurve(int type, int ic, } -int Extrude_ProtudeSurface(int type, int is, - double T0, double T1, double T2, - double A0, double A1, double A2, - double X0, double X1, double X2, double alpha, - Volume **pv, ExtrudeParams *e) +int ExtrudeSurface(int type, int is, + double T0, double T1, double T2, + double A0, double A1, double A2, + double X0, double X1, double X2, double alpha, + Volume **pv, ExtrudeParams *e) { double matrix[4][4], T[3], Ax[3]; Curve *c, *c2; @@ -3102,7 +3102,7 @@ int Extrude_ProtudeSurface(int type, int is, // number, that will not interfere with the other numbers... int tmp = CTX::instance()->geom.oldNewreg; CTX::instance()->geom.oldNewreg = 0; - Volume *v = Create_Volume(NEWVOLUME(), MSH_VOLUME); + Volume *v = CreateVolume(NEWVOLUME(), MSH_VOLUME); CTX::instance()->geom.oldNewreg = tmp; v->Extrude = new ExtrudeParams; @@ -3119,8 +3119,8 @@ int Extrude_ProtudeSurface(int type, int is, for(i = 0; i < List_Nbr(ps->Generatrices); i++) { List_Read(ps->Generatrices, i, &c); - Extrude_ProtudeCurve(type, c->Num, T0, T1, T2, A0, A1, A2, X0, X1, X2, - alpha, &s, 0, e); + ExtrudeCurve(type, c->Num, T0, T1, T2, A0, A1, A2, X0, X1, X2, + alpha, &s, 0, e); if(s){ if(c->Num < 0) ori = -1; @@ -3281,9 +3281,9 @@ void ExtrudeShapes(int type, List_T *list_in, { Curve *pc = 0, *prc = 0; Shape top; - top.Num = Extrude_ProtudePoint(type, shape.Num, T0, T1, T2, - A0, A1, A2, X0, X1, X2, alpha, - &pc, &prc, 1, e); + top.Num = ExtrudePoint(type, shape.Num, T0, T1, T2, + A0, A1, A2, X0, X1, X2, alpha, + &pc, &prc, 1, e); top.Type = MSH_POINT; List_Add(list_out, &top); if(pc){ @@ -3306,7 +3306,7 @@ void ExtrudeShapes(int type, List_T *list_in, { Surface *ps = 0; Shape top; - top.Num = Extrude_ProtudeCurve(type, shape.Num, T0, T1, T2, + top.Num = ExtrudeCurve(type, shape.Num, T0, T1, T2, A0, A1, A2, X0, X1, X2, alpha, &ps, 1, e); Curve *pc = FindCurve(top.Num); @@ -3348,9 +3348,9 @@ void ExtrudeShapes(int type, List_T *list_in, Volume *pv = 0; Shape top; - top.Num = Extrude_ProtudeSurface(type, shape.Num, T0, T1, T2, - A0, A1, A2, X0, X1, X2, alpha, - &pv, e); + top.Num = ExtrudeSurface(type, shape.Num, T0, T1, T2, + A0, A1, A2, X0, X1, X2, alpha, + &pv, e); Surface *ps = FindSurface(top.Num); top.Type = ps ? ps->Typ : 0; @@ -3484,13 +3484,13 @@ static Curve *_create_splitted_curve(Curve *c,List_T *nodes) Curve *cnew = NULL; switch(c->Typ){ case MSH_SEGM_LINE: - cnew = Create_Curve(id, c->Typ, 1, nodes, NULL, -1, -1, 0., 1.); + cnew = CreateCurve(id, c->Typ, 1, nodes, NULL, -1, -1, 0., 1.); break; case MSH_SEGM_SPLN: - cnew = Create_Curve(id, c->Typ, 3, nodes, NULL, -1, -1, 0., 1.); + cnew = CreateCurve(id, c->Typ, 3, nodes, NULL, -1, -1, 0., 1.); break; case MSH_SEGM_BSPLN: - cnew = Create_Curve(id, c->Typ, 2, nodes, NULL, -1, -1, 0., 1.); + cnew = CreateCurve(id, c->Typ, 2, nodes, NULL, -1, -1, 0., 1.); break; default : //should never reach this point... Msg::Error("Cannot split a curve with type %i", c->Typ); @@ -3648,7 +3648,7 @@ bool IntersectCurvesWithSurface(List_T *curve_ids, int surface_id, List_T *shape uvt(2) = 0.5; if(newton_fd(intersectCS, uvt, &cs)){ Vertex p = InterpolateCurve(c, uvt(2), 0); - Vertex *v = Create_Vertex(NEWPOINT(), p.Pos.X, p.Pos.Y, p.Pos.Z, p.lc, p.u); + Vertex *v = CreateVertex(NEWPOINT(), p.Pos.X, p.Pos.Y, p.Pos.Z, p.lc, p.u); Tree_Insert(GModel::current()->getGEOInternals()->Points, &v); Shape sh; sh.Type = MSH_POINT; diff --git a/Geo/Geo.h b/Geo/Geo.h index 8ee37daee539ec8e0b37c4cd1a3978ddf54eb43f..cc34bbd259af82c9cbb6c1188acd47a927ed14d9 100644 --- a/Geo/Geo.h +++ b/Geo/Geo.h @@ -18,7 +18,7 @@ #include "ExtrudeParams.h" #include "findLinks.h" -struct Coord{ +struct Coord { double X, Y, Z; }; @@ -59,14 +59,14 @@ class Vertex { } }; -class CircParam{ +class CircParam { public: double t1, t2, f1, f2, incl; double invmat[3][3]; double n[3]; }; -class Curve{ +class Curve { public: int Num; int Typ; @@ -96,13 +96,13 @@ class Curve{ } }; -class EdgeLoop{ +class EdgeLoop { public: int Num; List_T *Curves; }; -class Surface{ +class Surface { public: int Num; int Typ; @@ -127,7 +127,7 @@ class Surface{ bool degenerate() const; }; -class SurfaceLoop{ +class SurfaceLoop { public: int Num; List_T *Surfaces; @@ -148,44 +148,44 @@ class Volume { std::vector<int> compound; }; -class PhysicalGroup{ +class PhysicalGroup { public: int Num; int Typ; List_T *Entities; }; -int compareVertex(const void *a, const void *b); -int compareSurfaceLoop(const void *a, const void *b); -int compareEdgeLoop(const void *a, const void *b); -int compareCurve(const void *a, const void *b); -int compareSurface(const void *a, const void *b); -int compareVolume(const void *a, const void *b); -int comparePhysicalGroup(const void *a, const void *b); +int CompareVertex(const void *a, const void *b); +int CompareSurfaceLoop(const void *a, const void *b); +int CompareEdgeLoop(const void *a, const void *b); +int CompareCurve(const void *a, const void *b); +int CompareSurface(const void *a, const void *b); +int CompareVolume(const void *a, const void *b); +int ComparePhysicalGroup(const void *a, const void *b); -void Free_Vertex(void *a, void *b); -void Free_PhysicalGroup(void *a, void *b); -void Free_EdgeLoop(void *a, void *b); -void Free_SurfaceLoop(void *a, void *b); -void Free_Curve(void *a, void *b); -void Free_Surface(void *a, void *b); -void Free_Volume(void *a, void *b); +void FreeVertex(void *a, void *b); +void FreePhysicalGroup(void *a, void *b); +void FreeEdgeLoop(void *a, void *b); +void FreeSurfaceLoop(void *a, void *b); +void FreeCurve(void *a, void *b); +void FreeSurface(void *a, void *b); +void FreeVolume(void *a, void *b); void Projette(Vertex *v, double mat[3][3]); -Vertex *Create_Vertex(int Num, double X, double Y, double Z, double lc, double u); -Vertex *Create_Vertex(int Num, double u, double v, gmshSurface *s, double lc); -Curve *Create_Curve(int Num, int Typ, int Order, List_T *Liste, +Vertex *CreateVertex(int Num, double X, double Y, double Z, double lc, double u); +Vertex *CreateVertex(int Num, double u, double v, gmshSurface *s, double lc); +Curve *CreateCurve(int Num, int Typ, int Order, List_T *Liste, List_T *Knots, int p1, int p2, double u1, double u2); Curve *CreateReversedCurve(Curve *c); -Surface *Create_Surface(int Num, int Typ); -Volume *Create_Volume(int Num, int Typ); -EdgeLoop *Create_EdgeLoop(int Num, List_T *intlist); -SurfaceLoop *Create_SurfaceLoop(int Num, List_T *intlist); -PhysicalGroup *Create_PhysicalGroup(int Num, int typ, List_T *intlist); +Surface *CreateSurface(int Num, int Typ); +Volume *CreateVolume(int Num, int Typ); +EdgeLoop *CreateEdgeLoop(int Num, List_T *intlist); +SurfaceLoop *CreateSurfaceLoop(int Num, List_T *intlist); +PhysicalGroup *CreatePhysicalGroup(int Num, int typ, List_T *intlist); -void End_Curve(Curve *c); -void End_Surface(Surface *s); +void EndCurve(Curve *c); +void EndSurface(Surface *s); Vertex *FindPoint(int inum); Curve *FindCurve(int inum); @@ -218,36 +218,35 @@ void DeletePhysicalVolume(int Num); void SetPartition(int Type, int Num, int Partition); +void ExtrudeShapes(int extrude_type, List_T *in, + double T0, double T1, double T2, + double A0, double A1, double A2, + double X0, double X1, double X2, double alpha, + ExtrudeParams *e, + List_T *out); void ExtrudeShape(int extrude_type, int shape_type, int shape_num, double T0, double T1, double T2, double A0, double A1, double A2, double X0, double X1, double X2, double alpha, ExtrudeParams *e, List_T *out); -void ExtrudeShapes(int extrude_type, List_T *in, +int ExtrudePoint(int type, int ip, + double T0, double T1, double T2, + double A0, double A1, double A2, + double X0, double X1, double X2, double alpha, + Curve **pc, Curve **prc, int final, + ExtrudeParams *e); +int ExtrudeCurve(int type, int ic, + double T0, double T1, double T2, + double A0, double A1, double A2, + double X0, double X1, double X2, double alpha, + Surface **ps, int final, + ExtrudeParams *e); +int ExtrudeSurface(int type, int is, double T0, double T1, double T2, double A0, double A1, double A2, double X0, double X1, double X2, double alpha, - ExtrudeParams *e, - List_T *out); - -int Extrude_ProtudePoint(int type, int ip, - double T0, double T1, double T2, - double A0, double A1, double A2, - double X0, double X1, double X2, double alpha, - Curve **pc, Curve **prc, int final, - ExtrudeParams *e); -int Extrude_ProtudeCurve(int type, int ic, - double T0, double T1, double T2, - double A0, double A1, double A2, - double X0, double X1, double X2, double alpha, - Surface **ps, int final, - ExtrudeParams *e); -int Extrude_ProtudeSurface(int type, int is, - double T0, double T1, double T2, - double A0, double A1, double A2, - double X0, double X1, double X2, double alpha, - Volume **pv, ExtrudeParams *e); + Volume **pv, ExtrudeParams *e); void ProtudeXYZ(double &x, double &y, double &z, ExtrudeParams *e); void ReplaceAllDuplicates(); diff --git a/Geo/GeoInterpolation.cpp b/Geo/GeoInterpolation.cpp index 017d86dab083737eb13c12b3af429c89f9b99968..8bdc0aa2b448b8efc33e442515326758d3400df2 100644 --- a/Geo/GeoInterpolation.cpp +++ b/Geo/GeoInterpolation.cpp @@ -682,7 +682,7 @@ bool iSRuledSurfaceASphere(Surface *s, SPoint3 ¢er, double &radius) else{ Vertex *tmp; List_Read(C[i]->Control_Points, 1, &tmp); - if(compareVertex(&O, &tmp)) + if(CompareVertex(&O, &tmp)) isSphere = false; } } @@ -732,7 +732,7 @@ static Vertex InterpolateRuledSurface(Surface *s, double u, double v) else{ Vertex *tmp; List_Read(C[i]->Control_Points, 1, &tmp); - if(compareVertex(&O, &tmp)) + if(CompareVertex(&O, &tmp)) isSphere = false; } } diff --git a/Geo/discreteEdge.cpp b/Geo/discreteEdge.cpp index 23ba032bb413b041bbcc7e6df411ab5b6ce8577e..29b53f1bab4ae0226e7bf5b6a91fb6b825f2ae90 100644 --- a/Geo/discreteEdge.cpp +++ b/Geo/discreteEdge.cpp @@ -32,7 +32,7 @@ discreteEdge::discreteEdge(GModel *model, int num, GVertex *_v0, GVertex *_v1) : GEdge(model, num, _v0, _v1) { createdTopo = false; - Curve *c = Create_Curve(num, MSH_SEGM_DISCRETE, 0, 0, 0, -1, -1, 0., 1.); + Curve *c = CreateCurve(num, MSH_SEGM_DISCRETE, 0, 0, 0, -1, -1, 0., 1.); Tree_Add(model->getGEOInternals()->Curves, &c); CreateReversedCurve(c); } diff --git a/Geo/discreteFace.cpp b/Geo/discreteFace.cpp index 961933c7d6dea900766cbb0f2baa23e292bc396b..cb5906d65b9400f604f79373be948ff528d0d201 100644 --- a/Geo/discreteFace.cpp +++ b/Geo/discreteFace.cpp @@ -80,7 +80,7 @@ static inline void crouzeixRaviart(const std::vector<double> &U,std::vector<doub discreteFace::discreteFace(GModel *model, int num) : GFace(model, num) { - Surface *s = Create_Surface(num, MSH_SURF_DISCRETE); + Surface *s = CreateSurface(num, MSH_SURF_DISCRETE); Tree_Add(model->getGEOInternals()->Surfaces, &s); meshStatistics.status = GFace::DONE; } diff --git a/Geo/discreteRegion.cpp b/Geo/discreteRegion.cpp index e4c2c8e374289050dbf563c511617a927f445f87..4c1f574b793de653c2536a4e7aab9e9f0b8f44a4 100644 --- a/Geo/discreteRegion.cpp +++ b/Geo/discreteRegion.cpp @@ -17,7 +17,7 @@ discreteRegion::discreteRegion(GModel *model, int num) : GRegion(model, num) { - ::Volume *v = Create_Volume(num, MSH_VOLUME_DISCRETE); + ::Volume *v = CreateVolume(num, MSH_VOLUME_DISCRETE); Tree_Add(model->getGEOInternals()->Volumes, &v); } diff --git a/Plugin/FaultZone.cpp b/Plugin/FaultZone.cpp index 6d834f9e9fe5fdbb4b20838baac8a79c9959855f..6da59d69e33ecce040a2a6f136a10a03722fd181 100644 --- a/Plugin/FaultZone.cpp +++ b/Plugin/FaultZone.cpp @@ -655,7 +655,7 @@ void GMSH_FaultZoneMesher::CreateJointElements(GModel* gModel, GFace* gFace, sufix << p->Num; int num = gModel->setPhysicalName (prefix+sufix.str(), 2, ++GModel::current()->getGEOInternals()->MaxPhysicalNum); - PhysicalGroup *pnew = Create_PhysicalGroup(num, MSH_PHYSICAL_SURFACE, faceEntities); + PhysicalGroup *pnew = CreatePhysicalGroup(num, MSH_PHYSICAL_SURFACE, faceEntities); List_Add(gModel->getGEOInternals()->PhysicalGroups, &pnew); for(int j = 0; j < List_Nbr(faceEntities); j++){ int num;