diff --git a/Fltk/GUI_Projection.cpp b/Fltk/GUI_Projection.cpp index 638ee24d811bbfcb8bf6936c3a06048c91ac61e8..886340001dcd524b83591df54750edce10cb8b1b 100644 --- a/Fltk/GUI_Projection.cpp +++ b/Fltk/GUI_Projection.cpp @@ -1031,7 +1031,7 @@ void action_cb(Fl_Widget *w, void *data) for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++) if((*it)->getNativeType() == GEntity::FourierModel) id = std::max(id, (*it)->tag()); - if(id > 0) faces.push_back(m->getFace(id)); + if(id > 0) faces.push_back(m->getFaceByTag(id)); } else if(what == "delete_all" || what == "save_all"){ for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++) diff --git a/Geo/GEdge.cpp b/Geo/GEdge.cpp index 7ed1aaedd8bc3107acc75e2be30aa0c3607daf54..353fb983c38dd0455a26ee10aa3f8598cdbe3b2d 100644 --- a/Geo/GEdge.cpp +++ b/Geo/GEdge.cpp @@ -1,4 +1,4 @@ -// $Id: GEdge.cpp,v 1.42 2008-02-22 20:28:06 geuzaine Exp $ +// $Id: GEdge.cpp,v 1.43 2008-02-22 21:09:00 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -53,12 +53,12 @@ GEdge::~GEdge() delete lines[i]; } -int GEdge::getNumElements() +int GEdge::getNumMeshElements() { return lines.size(); } -MElement *GEdge::getElement(int index) +MElement *GEdge::getMeshElement(int index) { if(index < lines.size()) return lines[index]; diff --git a/Geo/GEdge.h b/Geo/GEdge.h index e206eee5d3c47db5549f06f64b92070095d6052d..5dd03364dce6380a16238d195004e8950a24714f 100644 --- a/Geo/GEdge.h +++ b/Geo/GEdge.h @@ -112,8 +112,8 @@ class GEdge : public GEntity { bool isMeshDegenerated() const{ return (v0 == v1 && mesh_vertices.size() < 2); } // Get number of elements in the mesh and get element by index - int getNumElements(); - MElement *getElement(int index); + int getNumMeshElements(); + MElement *getMeshElement(int index); // Resets the mesh attributes to default values virtual void resetMeshAttributes(); diff --git a/Geo/GFace.cpp b/Geo/GFace.cpp index c2d574b26129d1cf22e01e79034aba27cc17068a..52bd54278a7d9aaa736c3023ea2c54e69781950f 100644 --- a/Geo/GFace.cpp +++ b/Geo/GFace.cpp @@ -1,4 +1,4 @@ -// $Id: GFace.cpp,v 1.56 2008-02-22 20:29:56 geuzaine Exp $ +// $Id: GFace.cpp,v 1.57 2008-02-22 21:09:00 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -73,12 +73,12 @@ GFace::~GFace() delete va_geom_triangles; } -int GFace::getNumElements() +int GFace::getNumMeshElements() { return triangles.size() + quadrangles.size(); } -MElement *GFace::getElement(int index) +MElement *GFace::getMeshElement(int index) { if(index < triangles.size()) return triangles[index]; diff --git a/Geo/GFace.h b/Geo/GFace.h index b4453f6aedbdbee4c6cca7579ec1d5ed55c28b65..ae172cf1d15d7a01245626f3f1d03bdd5913a1ef 100644 --- a/Geo/GFace.h +++ b/Geo/GFace.h @@ -164,8 +164,8 @@ class GFace : public GEntity void getMeanPlaneData(double plan[3][3]) const; // Get number of elements in the mesh and get element by index - int getNumElements(); - MElement *getElement(int index); + int getNumMeshElements(); + MElement *getMeshElement(int index); // Resets the mesh attributes to default values virtual void resetMeshAttributes(); diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index 455cd689e3ec60a238a50dd8b8e383fb9f37cd86..bb08cc8fcd5d79f865362148e9de69c45470f6b4 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -1,4 +1,4 @@ -// $Id: GModel.cpp,v 1.65 2008-02-22 20:43:18 geuzaine Exp $ +// $Id: GModel.cpp,v 1.66 2008-02-22 21:09:00 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -104,7 +104,7 @@ void GModel::destroy() #endif } -GRegion *GModel::getRegion(int n) const +GRegion *GModel::getRegionByTag(int n) const { GEntity tmp((GModel*)this, n); std::set<GRegion*, GEntityLessThan>::const_iterator it = regions.find((GRegion*)&tmp); @@ -114,7 +114,7 @@ GRegion *GModel::getRegion(int n) const return 0; } -GFace *GModel::getFace(int n) const +GFace *GModel::getFaceByTag(int n) const { GEntity tmp((GModel*)this, n); std::set<GFace*, GEntityLessThan>::const_iterator it = faces.find((GFace*)&tmp); @@ -124,7 +124,7 @@ GFace *GModel::getFace(int n) const return 0; } -GEdge *GModel::getEdge(int n) const +GEdge *GModel::getEdgeByTag(int n) const { GEntity tmp((GModel*)this, n); std::set<GEdge*, GEntityLessThan>::const_iterator it = edges.find((GEdge*)&tmp); @@ -134,7 +134,7 @@ GEdge *GModel::getEdge(int n) const return 0; } -GVertex *GModel::getVertex(int n) const +GVertex *GModel::getVertexByTag(int n) const { GEntity tmp((GModel*)this, n); std::set<GVertex*, GEntityLessThan>::const_iterator it = vertices.find((GVertex*)&tmp); @@ -434,15 +434,15 @@ void GModel::invalidateMeshVertexCache() _vertexMapCache.clear(); } -MVertex *GModel::getMeshVertex(int num) +MVertex *GModel::getMeshVertexByTag(int n) { - if(num < 0) return 0; + if(n < 0) return 0; if(_vertexVectorCache.empty() && _vertexMapCache.empty()) buildMeshVertexCache(); - if(num < (int)_vertexVectorCache.size()) - return _vertexVectorCache[num]; + if(n < (int)_vertexVectorCache.size()) + return _vertexVectorCache[n]; else - return _vertexMapCache[num]; + return _vertexMapCache[n]; } template <class T> diff --git a/Geo/GModel.h b/Geo/GModel.h index 3c20afcf2669f877d1d0d64363d631b3de324834..c18b419ef55b0c99a7ec88a520a99c860e7e8ebf 100644 --- a/Geo/GModel.h +++ b/Geo/GModel.h @@ -98,10 +98,10 @@ class GModel viter lastVertex() { return vertices.end(); } // Find the entity with the given tag. - GRegion *getRegion(int n) const; - GFace *getFace(int n) const; - GEdge *getEdge(int n) const; - GVertex *getVertex(int n) const; + GRegion *getRegionByTag(int n) const; + GFace *getFaceByTag(int n) const; + GEdge *getEdgeByTag(int n) const; + GVertex *getVertexByTag(int n) const; // Add/remove an entity in the model void add(GRegion *r) { regions.insert(r); } @@ -157,8 +157,8 @@ class GModel void invalidateMeshVertexCache(); void buildMeshVertexCache(); - // Access a mesh vertex by number, using the vertex cache - MVertex *getMeshVertex(int num); + // Access a mesh vertex by tag, using the vertex cache + MVertex *getMeshVertexByTag(int n); // loop over all vertices connected to elements and associate geo entity void associateEntityWithMeshVertices(); diff --git a/Geo/GModelIO_Fourier.cpp b/Geo/GModelIO_Fourier.cpp index f81003357e96757ce9d17192cd71eec1ada80560..552f4b11cf212731a337d51d00106814990564ee 100644 --- a/Geo/GModelIO_Fourier.cpp +++ b/Geo/GModelIO_Fourier.cpp @@ -51,23 +51,23 @@ void makeGFace(FM::Patch* patch) FM::TopoEdge* eB = new FM::TopoEdge(++tagEdge, curveB, vLL, vLR); i1 = eB->GetStartPoint()->GetTag(); i2 = eB->GetEndPoint()->GetTag(); - m->add(new fourierEdge(m, eB, eB->GetTag(), m->getVertex(i1), - m->getVertex(i2))); + m->add(new fourierEdge(m, eB, eB->GetTag(), m->getVertexByTag(i1), + m->getVertexByTag(i2))); FM::TopoEdge* eR = new FM::TopoEdge(++tagEdge, curveR, vLR, vUR); i1 = eR->GetStartPoint()->GetTag(); i2 = eR->GetEndPoint()->GetTag(); - m->add(new fourierEdge(m, eR, eR->GetTag(), m->getVertex(i1), - m->getVertex(i2))); + m->add(new fourierEdge(m, eR, eR->GetTag(), m->getVertexByTag(i1), + m->getVertexByTag(i2))); FM::TopoEdge* eT = new FM::TopoEdge(++tagEdge, curveT, vUR, vUL); i1 = eT->GetStartPoint()->GetTag(); i2 = eT->GetEndPoint()->GetTag(); - m->add(new fourierEdge(m, eT, eT->GetTag(), m->getVertex(i1), - m->getVertex(i2))); + m->add(new fourierEdge(m, eT, eT->GetTag(), m->getVertexByTag(i1), + m->getVertexByTag(i2))); FM::TopoEdge* eL = new FM::TopoEdge(++tagEdge, curveL, vUL, vLL); i1 = eL->GetStartPoint()->GetTag(); i2 = eL->GetEndPoint()->GetTag(); - m->add(new fourierEdge(m, eL, eL->GetTag(), m->getVertex(i1), - m->getVertex(i2))); + m->add(new fourierEdge(m, eL, eL->GetTag(), m->getVertexByTag(i1), + m->getVertexByTag(i2))); FM::TopoFace* face = new FM::TopoFace(m->getNumFaces() + 1, patch); face->AddEdge(eB); face->AddEdge(eR); @@ -75,7 +75,7 @@ void makeGFace(FM::Patch* patch) std::list<GEdge*> l_edges; for (int j = 0; j < face->GetNumEdges(); j++) { int tag = face->GetEdge(j)->GetTag(); - l_edges.push_back(m->getEdge(tag)); + l_edges.push_back(m->getEdgeByTag(tag)); } m->add(new fourierFace(m, face, face->GetTag(), l_edges)); } diff --git a/Geo/GModelIO_Geo.cpp b/Geo/GModelIO_Geo.cpp index 705061f9e7282fd7a6e2eaa54232e81aece7fcb5..7d9124fd99cf2f9e3bc774e8297ee0ad7feb96d6 100644 --- a/Geo/GModelIO_Geo.cpp +++ b/Geo/GModelIO_Geo.cpp @@ -1,4 +1,4 @@ -// $Id: GModelIO_Geo.cpp,v 1.15 2008-02-20 09:20:44 geuzaine Exp $ +// $Id: GModelIO_Geo.cpp,v 1.16 2008-02-22 21:09:00 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -55,7 +55,7 @@ int GModel::importGEOInternals() for(int i = 0; i < List_Nbr(points); i++){ Vertex *p; List_Read(points, i, &p); - GVertex *v = getVertex(p->Num); + GVertex *v = getVertexByTag(p->Num); if(!v){ v = new gmshVertex(this, p); add(v); @@ -70,11 +70,11 @@ int GModel::importGEOInternals() Curve *c; List_Read(curves, i, &c); if(c->Num >= 0 && c->beg && c->end){ - GEdge *e = getEdge(c->Num); + GEdge *e = getEdgeByTag(c->Num); if(!e){ e = new gmshEdge(this, c, - getVertex(c->beg->Num), - getVertex(c->end->Num)); + getVertexByTag(c->beg->Num), + getVertexByTag(c->end->Num)); add(e); } else @@ -90,7 +90,7 @@ int GModel::importGEOInternals() for(int i = 0; i < List_Nbr(surfaces); i++){ Surface *s; List_Read(surfaces, i, &s); - GFace *f = getFace(s->Num); + GFace *f = getFaceByTag(s->Num); if(!f){ f = new gmshFace(this, s); add(f); @@ -107,7 +107,7 @@ int GModel::importGEOInternals() for(int i = 0; i < List_Nbr(volumes); i++){ Volume *v; List_Read(volumes, i, &v); - GRegion *r = getRegion(v->Num); + GRegion *r = getRegionByTag(v->Num); if(!r){ r = new gmshRegion(this, v); add(r); @@ -127,10 +127,10 @@ int GModel::importGEOInternals() List_Read(p->Entities, j, &num); GEntity *ge = 0; switch(p->Typ){ - case MSH_PHYSICAL_POINT: ge = getVertex(abs(num)); break; - case MSH_PHYSICAL_LINE: ge = getEdge(abs(num)); break; - case MSH_PHYSICAL_SURFACE: ge = getFace(abs(num)); break; - case MSH_PHYSICAL_VOLUME: ge = getRegion(abs(num)); break; + case MSH_PHYSICAL_POINT: ge = getVertexByTag(abs(num)); break; + case MSH_PHYSICAL_LINE: ge = getEdgeByTag(abs(num)); break; + case MSH_PHYSICAL_SURFACE: ge = getFaceByTag(abs(num)); break; + case MSH_PHYSICAL_VOLUME: ge = getRegionByTag(abs(num)); break; } int pnum = sign(num) * p->Num; if(ge && std::find(ge->physicals.begin(), ge->physicals.end(), pnum) == diff --git a/Geo/GModelIO_Mesh.cpp b/Geo/GModelIO_Mesh.cpp index ff1f870c972c64375bf2790615a425cf63ff3d60..857b9877557c2bbe59f988dd98928039b8b12121 100644 --- a/Geo/GModelIO_Mesh.cpp +++ b/Geo/GModelIO_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: GModelIO_Mesh.cpp,v 1.36 2008-02-22 07:59:00 geuzaine Exp $ +// $Id: GModelIO_Mesh.cpp,v 1.37 2008-02-22 21:09:00 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -65,7 +65,7 @@ static void storeElementsInEntities(GModel *m, switch(numEdges){ case 1: { - GEdge *e = m->getEdge(it->first); + GEdge *e = m->getEdgeByTag(it->first); if(!e){ e = new discreteEdge(m, it->first); m->add(e); @@ -75,7 +75,7 @@ static void storeElementsInEntities(GModel *m, break; case 3: case 4: { - GFace *f = m->getFace(it->first); + GFace *f = m->getFaceByTag(it->first); if(!f){ f = new discreteFace(m, it->first); m->add(f); @@ -86,7 +86,7 @@ static void storeElementsInEntities(GModel *m, break; case 6: case 12: case 9: case 8: { - GRegion *r = m->getRegion(it->first); + GRegion *r = m->getRegionByTag(it->first); if(!r){ r = new discreteRegion(m, it->first); m->add(r); @@ -135,10 +135,10 @@ static void storePhysicalTagsInEntities(GModel *m, int dim, for(; it != map.end(); ++it){ GEntity *ge = 0; switch(dim){ - case 0: ge = m->getVertex(it->first); break; - case 1: ge = m->getEdge(it->first); break; - case 2: ge = m->getFace(it->first); break; - case 3: ge = m->getRegion(it->first); break; + case 0: ge = m->getVertexByTag(it->first); break; + case 1: ge = m->getEdgeByTag(it->first); break; + case 2: ge = m->getFaceByTag(it->first); break; + case 3: ge = m->getRegionByTag(it->first); break; } if(ge){ std::map<int, std::string>::const_iterator it2 = it->second.begin(); @@ -510,7 +510,7 @@ int GModel::readMSH(const std::string &name) // treat points separately for(std::map<int, std::vector<MVertex*> >::iterator it = points.begin(); it != points.end(); ++it){ - GVertex *v = getVertex(it->first); + GVertex *v = getVertexByTag(it->first); if(!v){ v = new discreteVertex(this, it->first); add(v); diff --git a/Geo/GModelIO_OCC.cpp b/Geo/GModelIO_OCC.cpp index 6dc95de31f05d74f4cdd82b8fcd978bf7f40b5b5..f59080f18dbcb821d3165dd65133f47a08656e61 100644 --- a/Geo/GModelIO_OCC.cpp +++ b/Geo/GModelIO_OCC.cpp @@ -1,4 +1,4 @@ -// $Id: GModelIO_OCC.cpp,v 1.28 2008-02-21 07:48:49 geuzaine Exp $ +// $Id: GModelIO_OCC.cpp,v 1.29 2008-02-22 21:09:00 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -410,8 +410,8 @@ void OCC_Internals::buildGModel(GModel *model) TopoDS_Edge edge = TopoDS::Edge(emap(i)); int i1 = vmap.FindIndex(TopExp::FirstVertex(edge)); int i2 = vmap.FindIndex(TopExp::LastVertex(edge)); - GVertex *v1 = model->getVertex(i1); - GVertex *v2 = model->getVertex(i2); + GVertex *v1 = model->getVertexByTag(i1); + GVertex *v2 = model->getVertexByTag(i2); OCCEdge *e = new OCCEdge(model, edge, i, v1, v2); model->add(e); } diff --git a/Geo/GRegion.cpp b/Geo/GRegion.cpp index 3776095b148cf43dff399a509de293c3da8edaa6..2e58b6e2cab313bacceae3a5d815aa29c3a197a6 100644 --- a/Geo/GRegion.cpp +++ b/Geo/GRegion.cpp @@ -1,4 +1,4 @@ -// $Id: GRegion.cpp,v 1.24 2008-02-22 20:28:07 geuzaine Exp $ +// $Id: GRegion.cpp,v 1.25 2008-02-22 21:09:00 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -59,12 +59,12 @@ GRegion::~GRegion() delete pyramids[i]; } -int GRegion::getNumElements() +int GRegion::getNumMeshElements() { return tetrahedra.size() + hexahedra.size() + prisms.size() + pyramids.size(); } -MElement *GRegion::getElement(int index) +MElement *GRegion::getMeshElement(int index) { if(index < tetrahedra.size()) return tetrahedra[index]; diff --git a/Geo/GRegion.h b/Geo/GRegion.h index 09c80b92ca0502714264058cab41bbef8533443f..bc0fe4527ad8badcd3d1e26e28075538275f0aec 100644 --- a/Geo/GRegion.h +++ b/Geo/GRegion.h @@ -61,8 +61,8 @@ class GRegion : public GEntity { virtual std::string getAdditionalInfoString(); // Get number of elements in the mesh and get element by index - int getNumElements(); - MElement *getElement(int index); + int getNumMeshElements(); + MElement *getMeshElement(int index); // Resets the mesh attributes to default values virtual void resetMeshAttributes(); diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp index 18b5f5a0e1057429367c93ac5e0a16dad84fd7bf..6c0dada50c4437dcee46f8c3045caf662feaf4f6 100644 --- a/Geo/Geo.cpp +++ b/Geo/Geo.cpp @@ -1,4 +1,4 @@ -// $Id: Geo.cpp,v 1.104 2008-02-22 07:49:38 geuzaine Exp $ +// $Id: Geo.cpp,v 1.105 2008-02-22 21:09:00 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -3210,7 +3210,7 @@ void setVolumeSurfaces(Volume *v, List_T *loops) List_Add(v->SurfacesOrientations, &tmp); } else{ - GFace *gf = GModel::current()->getFace(abs(is)); + GFace *gf = GModel::current()->getFaceByTag(abs(is)); if(gf) { List_Add(v->SurfacesByTag, &is); } diff --git a/Geo/OCCFace.cpp b/Geo/OCCFace.cpp index a9b20d7f8e521729767acccb051151f9142e99c2..b34cadde525b645ae526c116f385a12849074ca9 100644 --- a/Geo/OCCFace.cpp +++ b/Geo/OCCFace.cpp @@ -1,4 +1,4 @@ -// $Id: OCCFace.cpp,v 1.36 2008-02-21 13:34:40 geuzaine Exp $ +// $Id: OCCFace.cpp,v 1.37 2008-02-22 21:09:00 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -52,11 +52,11 @@ OCCFace::OCCFace(GModel *m, TopoDS_Face _s, int num, TopTools_IndexedMapOfShape for(exp3.Init(wire, TopAbs_EDGE); exp3.More(); exp3.Next()){ TopoDS_Edge edge = TopoDS::Edge(exp3.Current()); int index = emap.FindIndex(edge); - GEdge *e = m->getEdge(index); + GEdge *e = m->getEdgeByTag(index); if(!e) throw; l_wire.push_back(e); l_oris.push_back(edge.Orientation()); - Msg(DEBUG2,"Edge %d ori %d",e->tag(),edge.Orientation()); + Msg(DEBUG2, "Edge %d ori %d", e->tag(), edge.Orientation()); e->addFace(this); if(!e->is3D()){ OCCEdge *occe = (OCCEdge*)e; @@ -80,15 +80,15 @@ OCCFace::OCCFace(GModel *m, TopoDS_Face _s, int num, TopTools_IndexedMapOfShape ShapeAnalysis::GetFaceUVBounds(_s, umin, umax, vmin, vmax); Msg(DEBUG2, "OCC Face %d with %d edges bounds (%g,%g)(%g,%g)", - num, l_edges.size(),umin,umax,vmin,vmax); - // we do that for the projections to converge on the - // borders of the surface - const double du = umax-umin; - const double dv = vmax-vmin; - umin -= fabs(du)/100.0; - vmin -= fabs(dv)/100.0; - umax += fabs(du)/100.0; - vmax += fabs(dv)/100.0; + num, l_edges.size(), umin, umax, vmin, vmax); + // we do that for the projections to converge on the borders of the + // surface + const double du = umax - umin; + const double dv = vmax - vmin; + umin -= fabs(du) / 100.0; + vmin -= fabs(dv) / 100.0; + umax += fabs(du) / 100.0; + vmax += fabs(dv) / 100.0; occface = BRep_Tool::Surface(s); buildSTLTriangulation(); } diff --git a/Geo/OCCRegion.cpp b/Geo/OCCRegion.cpp index cefa15c4895a1f4948630a72a378cd3ed637ef2a..ab9ba07ce0e7273817cadb9fd095ab18291efc2c 100644 --- a/Geo/OCCRegion.cpp +++ b/Geo/OCCRegion.cpp @@ -1,4 +1,4 @@ -// $Id: OCCRegion.cpp,v 1.9 2008-02-20 09:20:45 geuzaine Exp $ +// $Id: OCCRegion.cpp,v 1.10 2008-02-22 21:09:00 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -38,7 +38,7 @@ OCCRegion::OCCRegion(GModel *m, TopoDS_Solid _s, int num, TopTools_IndexedMapOfS for(exp3.Init(shell, TopAbs_FACE); exp3.More(); exp3.Next()){ TopoDS_Face face = TopoDS::Face(exp3.Current()); int index = fmap.FindIndex(face); - GFace *f = m->getFace(index); + GFace *f = m->getFaceByTag(index); if(!f) throw; l_faces.push_back(f); f->addRegion(this); diff --git a/Geo/findLinks.cpp b/Geo/findLinks.cpp index b9272d98fc209ce2e7c91c772137fd535175b8b1..ea991353b9d4e95a8b277c9336a37c1e31d6d951 100644 --- a/Geo/findLinks.cpp +++ b/Geo/findLinks.cpp @@ -1,4 +1,4 @@ -// $Id: findLinks.cpp,v 1.5 2008-02-20 09:20:45 geuzaine Exp $ +// $Id: findLinks.cpp,v 1.6 2008-02-22 21:09:00 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -48,7 +48,7 @@ static int complink(const void *a, const void *b) static void recurFindLinkedEdges(int ed, List_T *edges, Tree_T *points, Tree_T *links) { - GEdge *ge = GModel::current()->getEdge(ed); + GEdge *ge = GModel::current()->getEdgeByTag(ed); if(!ge){ Msg(GERROR, "Unknown curve %d", ed); return; @@ -123,7 +123,7 @@ static void orientAndSortEdges(List_T *edges, Tree_T *links) List_Read(temp, 0, &num); List_Add(edges, &num); - GEdge *ge0 = GModel::current()->getEdge(abs(num)); + GEdge *ge0 = GModel::current()->getEdgeByTag(abs(num)); if(!ge0){ Msg(GERROR, "Unknown curve %d", abs(num)); return; @@ -141,7 +141,7 @@ static void orientAndSortEdges(List_T *edges, Tree_T *links) nxa na; List_Read(lk.l, j, &na); if(ge0->tag() != na.a && List_Search(temp, &na.a, fcmp_absint)){ - GEdge *ge1 = GModel::current()->getEdge(abs(na.a)); + GEdge *ge1 = GModel::current()->getEdgeByTag(abs(na.a)); if(!ge1){ Msg(GERROR, "Unknown curve %d", abs(na.a)); return; @@ -176,7 +176,7 @@ int allEdgesLinked(int ed, List_T *edges) for(int i = 0; i < List_Nbr(edges); i++){ int num; List_Read(edges, i, &num); - GEdge *ge = GModel::current()->getEdge(abs(num)); + GEdge *ge = GModel::current()->getEdgeByTag(abs(num)); if(!ge){ Msg(GERROR, "Unknown curve %d", abs(num)); return 0; @@ -220,7 +220,7 @@ int allEdgesLinked(int ed, List_T *edges) static void recurFindLinkedFaces(int fac, List_T *faces, Tree_T *edges, Tree_T *links) { - GFace *gf = GModel::current()->getFace(abs(fac)); + GFace *gf = GModel::current()->getFaceByTag(abs(fac)); if(!gf){ Msg(GERROR, "Unknown surface %d", abs(fac)); return; @@ -288,7 +288,7 @@ int allFacesLinked(int fac, List_T *faces) for(int i = 0; i < List_Nbr(faces); i++){ int num; List_Read(faces, i, &num); - GFace *gf = GModel::current()->getFace(abs(num)); + GFace *gf = GModel::current()->getFaceByTag(abs(num)); if(!gf){ Msg(GERROR, "Unknown surface %d", abs(num)); return 0; diff --git a/Geo/gmshFace.cpp b/Geo/gmshFace.cpp index 6ccc91439404f8737e18254fdfef4d8c40cea72b..9b610518eb1018ece3b8f1f3b1cfb137017f63e8 100644 --- a/Geo/gmshFace.cpp +++ b/Geo/gmshFace.cpp @@ -1,4 +1,4 @@ -// $Id: gmshFace.cpp,v 1.49 2008-02-20 09:20:45 geuzaine Exp $ +// $Id: gmshFace.cpp,v 1.50 2008-02-22 21:09:00 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -32,7 +32,7 @@ gmshFace::gmshFace(GModel *m, Surface *face) for(int i = 0 ; i < List_Nbr(s->Generatrices); i++){ Curve *c; List_Read(s->Generatrices, i, &c); - GEdge *e = m->getEdge(abs(c->Num)); + GEdge *e = m->getEdgeByTag(abs(c->Num)); if(e){ l_edges.push_back(e); e->addFace(this); @@ -59,7 +59,7 @@ gmshFace::gmshFace(GModel *m, Surface *face) for(int i = 0 ; i < List_Nbr(s->EmbeddedCurves); i++){ Curve *c; List_Read(s->EmbeddedCurves, i, &c); - GEdge *e = m->getEdge(abs(c->Num)); + GEdge *e = m->getEdgeByTag(abs(c->Num)); if(e) embedded_edges.push_back(e); else @@ -70,7 +70,7 @@ gmshFace::gmshFace(GModel *m, Surface *face) for(int i = 0 ; i < List_Nbr(s->EmbeddedPoints); i++){ Vertex *v; List_Read(s->EmbeddedPoints, i, &v); - GVertex *gv = m->getVertex(v->Num); + GVertex *gv = m->getVertexByTag(v->Num); if(gv) embedded_vertices.push_back(gv); else @@ -110,7 +110,7 @@ void gmshFace::resetMeshAttributes() for(int i = 0; i < List_Nbr(s->TrsfPoints); i++){ Vertex *corn; List_Read(s->TrsfPoints, i, &corn); - GVertex *gv = model()->getVertex(corn->Num); + GVertex *gv = model()->getVertexByTag(corn->Num); if(gv) meshAttributes.corners.push_back(gv); else diff --git a/Geo/gmshRegion.cpp b/Geo/gmshRegion.cpp index 55ef08ac572a051771fa3738427381ea65da5d66..1d82195f9b4bcb991d93a267fd2c3a0c99b4fc12 100644 --- a/Geo/gmshRegion.cpp +++ b/Geo/gmshRegion.cpp @@ -1,4 +1,4 @@ -// $Id: gmshRegion.cpp,v 1.19 2008-02-20 09:20:45 geuzaine Exp $ +// $Id: gmshRegion.cpp,v 1.20 2008-02-22 21:09:00 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -32,7 +32,7 @@ gmshRegion::gmshRegion(GModel *m, ::Volume *volume) List_Read(v->Surfaces, i, &s); int ori; List_Read(v->SurfacesOrientations, i, &ori); - GFace *f = m->getFace(abs(s->Num)); + GFace *f = m->getFaceByTag(abs(s->Num)); if(f){ l_faces.push_back(f); l_dirs.push_back(ori); @@ -43,7 +43,7 @@ gmshRegion::gmshRegion(GModel *m, ::Volume *volume) for(int i = 0; i < List_Nbr(v->SurfacesByTag); i++){ int is; List_Read(v->SurfacesByTag, i, &is); - GFace *f = m->getFace(abs(is)); + GFace *f = m->getFaceByTag(abs(is)); if(f){ l_faces.push_back(f); l_dirs.push_back(sign(is)); @@ -64,7 +64,7 @@ void gmshRegion::resetMeshAttributes() for(int i = 0; i < List_Nbr(v->TrsfPoints); i++){ Vertex *corn; List_Read(v->TrsfPoints, i, &corn); - GVertex *gv = model()->getVertex(corn->Num); + GVertex *gv = model()->getVertexByTag(corn->Num); if(gv) meshAttributes.corners.push_back(gv); else diff --git a/Graphics/SelectBuffer.cpp b/Graphics/SelectBuffer.cpp index ab1a2642a18ac067d2b556d9e9af21bf04e51edc..33861bf5aefbb844d3cbbc6b2d18dbd7ea86bb7f 100644 --- a/Graphics/SelectBuffer.cpp +++ b/Graphics/SelectBuffer.cpp @@ -1,4 +1,4 @@ -// $Id: SelectBuffer.cpp,v 1.19 2008-02-20 09:20:45 geuzaine Exp $ +// $Id: SelectBuffer.cpp,v 1.20 2008-02-22 21:09:00 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -171,7 +171,7 @@ bool ProcessSelectionBuffer(int entityType, switch (hits[i].type) { case 0: { - GVertex *v = m->getVertex(hits[i].ient); + GVertex *v = m->getVertexByTag(hits[i].ient); if(!v){ Msg(GERROR, "Problem in point selection processing"); return false; @@ -182,7 +182,7 @@ bool ProcessSelectionBuffer(int entityType, break; case 1: { - GEdge *e = m->getEdge(hits[i].ient); + GEdge *e = m->getEdgeByTag(hits[i].ient); if(!e){ Msg(GERROR, "Problem in line selection processing"); return false; @@ -197,7 +197,7 @@ bool ProcessSelectionBuffer(int entityType, break; case 2: { - GFace *f = m->getFace(hits[i].ient); + GFace *f = m->getFaceByTag(hits[i].ient); if(!f){ Msg(GERROR, "Problem in surface selection processing"); return false; @@ -212,7 +212,7 @@ bool ProcessSelectionBuffer(int entityType, break; case 3: { - GRegion *r = m->getRegion(hits[i].ient); + GRegion *r = m->getRegionByTag(hits[i].ient); if(!r){ Msg(GERROR, "Problem in volume selection processing"); return false; @@ -244,19 +244,19 @@ void HighlightEntityNum(int v, int c, int s, int r) { GModel *m = GModel::current(); if(v) { - GVertex *pv = m->getVertex(v); + GVertex *pv = m->getVertexByTag(v); if(pv) HighlightEntity(pv); } if(c) { - GEdge *pc = m->getEdge(c); + GEdge *pc = m->getEdgeByTag(c); if(pc) HighlightEntity(pc); } if(s) { - GFace *ps = m->getFace(s); + GFace *ps = m->getFaceByTag(s); if(ps) HighlightEntity(ps); } if(r) { - GRegion *pr = m->getRegion(r); + GRegion *pr = m->getRegionByTag(r); if(pr) HighlightEntity(pr); } } @@ -278,19 +278,19 @@ void ZeroHighlightEntityNum(int v, int c, int s, int r) { GModel *m = GModel::current(); if(v) { - GVertex *pv = m->getVertex(v); + GVertex *pv = m->getVertexByTag(v); if(pv) ZeroHighlightEntity(pv); } if(c) { - GEdge *pc = m->getEdge(c); + GEdge *pc = m->getEdgeByTag(c); if(pc) ZeroHighlightEntity(pc); } if(s) { - GFace *ps = m->getFace(s); + GFace *ps = m->getFaceByTag(s); if(ps) ZeroHighlightEntity(ps); } if(r) { - GRegion *pr = m->getRegion(r); + GRegion *pr = m->getRegionByTag(r); if(pr) ZeroHighlightEntity(pr); } } diff --git a/Mesh/BoundaryLayer.cpp b/Mesh/BoundaryLayer.cpp index 401d58ffe62c9f1c4a3b808d507fc5cc6d1ea0ad..ba9293c2f7e7c11b12f30f47e9eb11864e751891 100644 --- a/Mesh/BoundaryLayer.cpp +++ b/Mesh/BoundaryLayer.cpp @@ -1,4 +1,4 @@ -// $Id: BoundaryLayer.cpp,v 1.9 2008-02-20 09:20:45 geuzaine Exp $ +// $Id: BoundaryLayer.cpp,v 1.10 2008-02-22 21:09:01 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -56,7 +56,7 @@ int Mesh2DWithBoundaryLayers(GModel *m) if(gf->geomType() == GEntity::BoundaryLayerSurface){ ExtrudeParams *ep = gf->meshAttributes.extrude; if(ep && ep->mesh.ExtrudeMesh && ep->geo.Mode == COPIED_ENTITY){ - GFace *from = m->getFace(std::abs(ep->geo.Source)); + GFace *from = m->getFaceByTag(std::abs(ep->geo.Source)); if(!from){ Msg(GERROR, "Unknown source face %d for boundary layer", ep->geo.Source); return 0; diff --git a/Mesh/meshGEdgeExtruded.cpp b/Mesh/meshGEdgeExtruded.cpp index fc073838a2794e4dbd1fdd0417dc1d774e249c78..56387e2e5a7c1320b6830d42386d8363c245de91 100644 --- a/Mesh/meshGEdgeExtruded.cpp +++ b/Mesh/meshGEdgeExtruded.cpp @@ -1,4 +1,4 @@ -// $Id: meshGEdgeExtruded.cpp,v 1.10 2008-02-20 09:20:45 geuzaine Exp $ +// $Id: meshGEdgeExtruded.cpp,v 1.11 2008-02-22 21:09:01 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -76,7 +76,7 @@ int MeshExtrudedCurve(GEdge *ge) } else { // curve is a copy of another curve (the "top" of the extrusion) - GEdge *from = ge->model()->getEdge(std::abs(ep->geo.Source)); + GEdge *from = ge->model()->getEdgeByTag(std::abs(ep->geo.Source)); if(!from){ Msg(GERROR, "Unknown source curve %d for extrusion", ep->geo.Source); return 0; diff --git a/Mesh/meshGFaceExtruded.cpp b/Mesh/meshGFaceExtruded.cpp index 5a9d59a3c6b12a351f4b08f4d5204e9931490aac..f26b13d56009129919988a5d0cef198e14097cdf 100644 --- a/Mesh/meshGFaceExtruded.cpp +++ b/Mesh/meshGFaceExtruded.cpp @@ -1,4 +1,4 @@ -// $Id: meshGFaceExtruded.cpp,v 1.26 2008-02-20 09:20:45 geuzaine Exp $ +// $Id: meshGFaceExtruded.cpp,v 1.27 2008-02-22 21:09:01 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -217,7 +217,7 @@ int MeshExtrudedSurface(GFace *gf, if(ep->geo.Mode == EXTRUDED_ENTITY) { // surface is extruded from a curve - GEdge *from = gf->model()->getEdge(std::abs(ep->geo.Source)); + GEdge *from = gf->model()->getEdgeByTag(std::abs(ep->geo.Source)); if(!from){ Msg(GERROR, "Unknown source curve %d for extrusion", ep->geo.Source); return 0; @@ -226,7 +226,7 @@ int MeshExtrudedSurface(GFace *gf, } else { // surface is a copy of another surface (the "top" of the extrusion) - GFace *from = gf->model()->getFace(std::abs(ep->geo.Source)); + GFace *from = gf->model()->getFaceByTag(std::abs(ep->geo.Source)); if(!from){ Msg(GERROR, "Unknown source surface %d for extrusion", ep->geo.Source); return 0; diff --git a/Mesh/meshGRegion.cpp b/Mesh/meshGRegion.cpp index e5164320be84c7fb59486e72ededc6fe0602f5c7..8abf311b23573c64579c3dc08a77eaf891548a8e 100644 --- a/Mesh/meshGRegion.cpp +++ b/Mesh/meshGRegion.cpp @@ -1,4 +1,4 @@ -// $Id: meshGRegion.cpp,v 1.42 2008-02-20 09:20:45 geuzaine Exp $ +// $Id: meshGRegion.cpp,v 1.43 2008-02-22 21:09:01 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -158,7 +158,7 @@ void TransferTetgenMesh(GRegion *gr, v[0] = numberedV[out.trifacelist[i * 3 + 0] - 1]; v[1] = numberedV[out.trifacelist[i * 3 + 1] - 1]; v[2] = numberedV[out.trifacelist[i * 3 + 2] - 1]; - GFace *gf = gr->model()->getFace(out.trifacemarkerlist[i]); + GFace *gf = gr->model()->getFaceByTag(out.trifacemarkerlist[i]); for(int j = 0; j < 3; j++){ if(v[j]->onWhat()->dim() == 3){ v[j]->onWhat()->mesh_vertices.erase diff --git a/Mesh/meshGRegionCarveHole.cpp b/Mesh/meshGRegionCarveHole.cpp index 081e785453d8c809a399eb05e97c308ed8006e9d..c70d0e69ae5c331122bb612165aae97cc7a33cf5 100644 --- a/Mesh/meshGRegionCarveHole.cpp +++ b/Mesh/meshGRegionCarveHole.cpp @@ -1,4 +1,4 @@ -// $Id: meshGRegionCarveHole.cpp,v 1.5 2008-02-20 09:20:45 geuzaine Exp $ +// $Id: meshGRegionCarveHole.cpp,v 1.6 2008-02-22 21:09:01 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -86,7 +86,7 @@ void carveHole(GRegion *gr, int num, double distance, std::vector<int> &surfaces // add all points from carving surfaces into kdtree int numnodes = 0; for(unsigned int i = 0; i < surfaces.size(); i++){ - GFace *gf = m->getFace(surfaces[i]); + GFace *gf = m->getFaceByTag(surfaces[i]); if(!gf){ Msg(GERROR, "Unknown carving surface %d", surfaces[i]); return; @@ -97,7 +97,7 @@ void carveHole(GRegion *gr, int num, double distance, std::vector<int> &surfaces ANNpointArray kdnodes = annAllocPts(numnodes, 4); int k = 0; for(unsigned int i = 0; i < surfaces.size(); i++){ - GFace *gf = m->getFace(surfaces[i]); + GFace *gf = m->getFaceByTag(surfaces[i]); for(unsigned int j = 0; j < gf->mesh_vertices.size(); j++){ kdnodes[k][0] = gf->mesh_vertices[j]->x(); kdnodes[k][1] = gf->mesh_vertices[j]->y(); @@ -122,7 +122,7 @@ void carveHole(GRegion *gr, int num, double distance, std::vector<int> &surfaces // intersections o see who's inside) // generate discrete boundary mesh of the carved hole - GFace *gf = m->getFace(num); + GFace *gf = m->getFaceByTag(num); if(!gf) return; std::set<MFace, Less_Face> faces; std::list<GFace*> f = gr->faces(); diff --git a/Mesh/meshGRegionExtruded.cpp b/Mesh/meshGRegionExtruded.cpp index 9465ebb985417097ba5d384a087583d9095c5940..95c9756f9852320652065a55200cd65020290700 100644 --- a/Mesh/meshGRegionExtruded.cpp +++ b/Mesh/meshGRegionExtruded.cpp @@ -1,4 +1,4 @@ -// $Id: meshGRegionExtruded.cpp,v 1.22 2008-02-20 09:20:45 geuzaine Exp $ +// $Id: meshGRegionExtruded.cpp,v 1.23 2008-02-22 21:09:01 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -212,7 +212,7 @@ void meshGRegionExtruded::operator() (GRegion *gr) insertAllVertices(gr, pos); // volume is extruded from a surface - GFace *from = gr->model()->getFace(std::abs(ep->geo.Source)); + GFace *from = gr->model()->getFaceByTag(std::abs(ep->geo.Source)); if(!from){ Msg(GERROR, "Unknown source surface %d for extrusion", ep->geo.Source); return; @@ -258,7 +258,7 @@ void phase1(GRegion *gr, std::set<std::pair<MVertex*, MVertex*> > &edges) { ExtrudeParams *ep = gr->meshAttributes.extrude; - GFace *from = gr->model()->getFace(std::abs(ep->geo.Source)); + GFace *from = gr->model()->getFaceByTag(std::abs(ep->geo.Source)); if(!from) return; for(unsigned int i = 0; i < from->triangles.size(); i++){ @@ -295,7 +295,7 @@ void phase2(GRegion *gr, int &swap) { ExtrudeParams *ep = gr->meshAttributes.extrude; - GFace *from = gr->model()->getFace(std::abs(ep->geo.Source)); + GFace *from = gr->model()->getFaceByTag(std::abs(ep->geo.Source)); if(!from) return; for(unsigned int i = 0; i < from->triangles.size(); i++){ @@ -361,7 +361,7 @@ void phase3(GRegion *gr, std::set<std::pair<MVertex*, MVertex*> > &edges) { ExtrudeParams *ep = gr->meshAttributes.extrude; - GFace *from = gr->model()->getFace(std::abs(ep->geo.Source)); + GFace *from = gr->model()->getFaceByTag(std::abs(ep->geo.Source)); if(!from) return; for(unsigned int i = 0; i < from->triangles.size(); i++){ diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 5d5d44d8ed04d07deee607b974e7f88ebac76e73..198801372089df5af746cabeed40bc76bbc6d007 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -336,7 +336,7 @@ /* Copy the first part of user declarations. */ #line 1 "Gmsh.y" -// $Id: Gmsh.tab.cpp,v 1.347 2008-02-20 09:20:45 geuzaine Exp $ +// $Id: Gmsh.tab.cpp,v 1.348 2008-02-22 21:09:01 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -357,6 +357,7 @@ // // Please report all bugs and problems to <gmsh@geuz.org>. +#include <string.h> #include <stdarg.h> #include <time.h> #include "Message.h" @@ -432,7 +433,7 @@ int PrintListOfDouble(char *format, List_T *list, char *buffer); #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 78 "Gmsh.y" +#line 79 "Gmsh.y" { char *c; int i; @@ -443,7 +444,7 @@ typedef union YYSTYPE List_T *l; } /* Line 193 of yacc.c. */ -#line 447 "Gmsh.tab.cpp" +#line 448 "Gmsh.tab.cpp" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -456,7 +457,7 @@ typedef union YYSTYPE /* Line 216 of yacc.c. */ -#line 460 "Gmsh.tab.cpp" +#line 461 "Gmsh.tab.cpp" #ifdef short # undef short @@ -995,42 +996,42 @@ static const yytype_int16 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 145, 145, 146, 151, 153, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 174, 178, 185, 190, 205, 218, 247, 264, 273, 286, - 289, 290, 291, 292, 293, 297, 299, 304, 306, 312, - 456, 311, 470, 475, 484, 483, 498, 503, 512, 511, - 525, 530, 541, 540, 552, 553, 554, 555, 556, 560, - 561, 568, 599, 638, 692, 709, 727, 738, 755, 762, - 776, 793, 819, 846, 860, 877, 892, 910, 930, 953, - 963, 978, 982, 995, 1017, 1033, 1054, 1061, 1072, 1087, - 1095, 1110, 1117, 1129, 1163, 1199, 1221, 1239, 1257, 1275, - 1301, 1319, 1345, 1365, 1383, 1401, 1427, 1444, 1463, 1481, - 1519, 1525, 1531, 1538, 1562, 1586, 1602, 1622, 1639, 1656, - 1677, 1682, 1687, 1692, 1697, 1708, 1714, 1723, 1724, 1729, - 1732, 1736, 1759, 1782, 1805, 1833, 1842, 1855, 1871, 1886, - 1900, 1906, 1912, 1921, 1935, 1983, 1999, 2015, 2034, 2044, - 2066, 2070, 2075, 2080, 2092, 2109, 2126, 2153, 2180, 2211, - 2219, 2225, 2232, 2236, 2245, 2253, 2261, 2270, 2269, 2282, - 2281, 2294, 2293, 2306, 2305, 2317, 2316, 2332, 2339, 2346, - 2353, 2360, 2367, 2374, 2381, 2388, 2396, 2395, 2407, 2406, - 2418, 2417, 2429, 2428, 2440, 2439, 2451, 2450, 2462, 2461, - 2473, 2472, 2484, 2483, 2498, 2501, 2507, 2516, 2536, 2559, - 2563, 2587, 2605, 2623, 2641, 2670, 2705, 2710, 2737, 2751, - 2764, 2781, 2787, 2793, 2796, 2805, 2815, 2816, 2817, 2818, - 2819, 2820, 2821, 2822, 2823, 2830, 2831, 2832, 2833, 2834, - 2835, 2836, 2837, 2838, 2839, 2840, 2841, 2842, 2843, 2844, - 2845, 2846, 2847, 2848, 2849, 2850, 2851, 2852, 2853, 2854, - 2855, 2856, 2857, 2858, 2859, 2860, 2861, 2863, 2864, 2865, - 2866, 2867, 2868, 2869, 2870, 2871, 2872, 2873, 2874, 2875, - 2876, 2877, 2878, 2879, 2880, 2881, 2882, 2883, 2892, 2893, - 2894, 2895, 2896, 2897, 2898, 2902, 2918, 2933, 2953, 2966, - 2979, 3002, 3020, 3038, 3056, 3074, 3082, 3086, 3090, 3094, - 3098, 3105, 3109, 3113, 3117, 3124, 3129, 3137, 3142, 3146, - 3151, 3155, 3163, 3174, 3182, 3190, 3196, 3207, 3227, 3237, - 3247, 3264, 3291, 3296, 3300, 3304, 3317, 3321, 3333, 3340, - 3361, 3365, 3380, 3385, 3392, 3396, 3403, 3407, 3415, 3423, - 3437, 3451, 3455, 3474, 3496 + 0, 146, 146, 147, 152, 154, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 175, 179, 186, 191, 206, 219, 248, 265, 274, 287, + 290, 291, 292, 293, 294, 298, 300, 305, 307, 313, + 457, 312, 471, 476, 485, 484, 499, 504, 513, 512, + 526, 531, 542, 541, 553, 554, 555, 556, 557, 561, + 562, 569, 600, 639, 693, 710, 728, 739, 756, 763, + 777, 794, 820, 847, 861, 878, 893, 911, 931, 954, + 964, 979, 983, 996, 1018, 1034, 1055, 1062, 1073, 1088, + 1096, 1111, 1118, 1130, 1164, 1200, 1222, 1240, 1258, 1276, + 1302, 1320, 1346, 1366, 1384, 1402, 1428, 1445, 1464, 1482, + 1520, 1526, 1532, 1539, 1563, 1587, 1603, 1623, 1640, 1657, + 1678, 1683, 1688, 1693, 1698, 1709, 1715, 1724, 1725, 1730, + 1733, 1737, 1760, 1783, 1806, 1834, 1843, 1856, 1872, 1887, + 1901, 1907, 1913, 1922, 1936, 1984, 2000, 2016, 2035, 2045, + 2067, 2071, 2076, 2081, 2093, 2110, 2127, 2154, 2181, 2212, + 2220, 2226, 2233, 2237, 2246, 2254, 2262, 2271, 2270, 2283, + 2282, 2295, 2294, 2307, 2306, 2318, 2317, 2333, 2340, 2347, + 2354, 2361, 2368, 2375, 2382, 2389, 2397, 2396, 2408, 2407, + 2419, 2418, 2430, 2429, 2441, 2440, 2452, 2451, 2463, 2462, + 2474, 2473, 2485, 2484, 2499, 2502, 2508, 2517, 2537, 2560, + 2564, 2588, 2606, 2624, 2642, 2671, 2706, 2711, 2738, 2752, + 2765, 2782, 2788, 2794, 2797, 2806, 2816, 2817, 2818, 2819, + 2820, 2821, 2822, 2823, 2824, 2831, 2832, 2833, 2834, 2835, + 2836, 2837, 2838, 2839, 2840, 2841, 2842, 2843, 2844, 2845, + 2846, 2847, 2848, 2849, 2850, 2851, 2852, 2853, 2854, 2855, + 2856, 2857, 2858, 2859, 2860, 2861, 2862, 2864, 2865, 2866, + 2867, 2868, 2869, 2870, 2871, 2872, 2873, 2874, 2875, 2876, + 2877, 2878, 2879, 2880, 2881, 2882, 2883, 2884, 2893, 2894, + 2895, 2896, 2897, 2898, 2899, 2903, 2919, 2934, 2954, 2967, + 2980, 3003, 3021, 3039, 3057, 3075, 3083, 3087, 3091, 3095, + 3099, 3106, 3110, 3114, 3118, 3125, 3130, 3138, 3143, 3147, + 3152, 3156, 3164, 3175, 3183, 3191, 3197, 3208, 3228, 3238, + 3248, 3265, 3292, 3297, 3301, 3305, 3318, 3322, 3334, 3341, + 3362, 3366, 3381, 3386, 3393, 3397, 3404, 3408, 3416, 3424, + 3438, 3452, 3456, 3475, 3497 }; #endif @@ -3777,96 +3778,96 @@ yyreduce: switch (yyn) { case 3: -#line 146 "Gmsh.y" +#line 147 "Gmsh.y" { yyerrok; return 1; ;} break; case 6: -#line 157 "Gmsh.y" +#line 158 "Gmsh.y" { return 1; ;} break; case 7: -#line 158 "Gmsh.y" +#line 159 "Gmsh.y" { return 1; ;} break; case 8: -#line 159 "Gmsh.y" +#line 160 "Gmsh.y" { return 1; ;} break; case 9: -#line 160 "Gmsh.y" +#line 161 "Gmsh.y" { return 1; ;} break; case 10: -#line 161 "Gmsh.y" +#line 162 "Gmsh.y" { List_Delete((yyvsp[(1) - (1)].l)); return 1; ;} break; case 11: -#line 162 "Gmsh.y" +#line 163 "Gmsh.y" { return 1; ;} break; case 12: -#line 163 "Gmsh.y" +#line 164 "Gmsh.y" { return 1; ;} break; case 13: -#line 164 "Gmsh.y" +#line 165 "Gmsh.y" { return 1; ;} break; case 14: -#line 165 "Gmsh.y" +#line 166 "Gmsh.y" { List_Delete((yyvsp[(1) - (1)].l)); return 1; ;} break; case 15: -#line 166 "Gmsh.y" +#line 167 "Gmsh.y" { return 1; ;} break; case 16: -#line 167 "Gmsh.y" +#line 168 "Gmsh.y" { return 1; ;} break; case 17: -#line 168 "Gmsh.y" +#line 169 "Gmsh.y" { return 1; ;} break; case 18: -#line 169 "Gmsh.y" +#line 170 "Gmsh.y" { return 1; ;} break; case 19: -#line 170 "Gmsh.y" +#line 171 "Gmsh.y" { return 1; ;} break; case 20: -#line 175 "Gmsh.y" +#line 176 "Gmsh.y" { (yyval.c) = "w"; ;} break; case 21: -#line 179 "Gmsh.y" +#line 180 "Gmsh.y" { (yyval.c) = "a"; ;} break; case 22: -#line 186 "Gmsh.y" +#line 187 "Gmsh.y" { Msg(DIRECT, (yyvsp[(3) - (5)].c)); Free((yyvsp[(3) - (5)].c)); @@ -3874,7 +3875,7 @@ yyreduce: break; case 23: -#line 191 "Gmsh.y" +#line 192 "Gmsh.y" { char tmpstring[1024]; FixRelativePath((yyvsp[(6) - (7)].c), tmpstring); @@ -3892,7 +3893,7 @@ yyreduce: break; case 24: -#line 206 "Gmsh.y" +#line 207 "Gmsh.y" { char tmpstring[1024]; int i = PrintListOfDouble((yyvsp[(3) - (7)].c), (yyvsp[(5) - (7)].l), tmpstring); @@ -3908,7 +3909,7 @@ yyreduce: break; case 25: -#line 219 "Gmsh.y" +#line 220 "Gmsh.y" { char tmpstring[1024]; int i = PrintListOfDouble((yyvsp[(3) - (9)].c), (yyvsp[(5) - (9)].l), tmpstring); @@ -3935,7 +3936,7 @@ yyreduce: break; case 26: -#line 248 "Gmsh.y" +#line 249 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (6)].c), "View") && ViewData->finalize()){ ViewData->setName((yyvsp[(2) - (6)].c)); @@ -3955,7 +3956,7 @@ yyreduce: break; case 27: -#line 265 "Gmsh.y" +#line 266 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (6)].c), "View")){ int index = (int)(yyvsp[(4) - (6)].d); @@ -3967,7 +3968,7 @@ yyreduce: break; case 28: -#line 274 "Gmsh.y" +#line 275 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (6)].c), "View")){ int index = (int)(yyvsp[(4) - (6)].d); @@ -3979,34 +3980,34 @@ yyreduce: break; case 29: -#line 286 "Gmsh.y" +#line 287 "Gmsh.y" { ViewData = new PViewDataList(true); ;} break; case 35: -#line 298 "Gmsh.y" +#line 299 "Gmsh.y" { ViewCoord[ViewCoordIdx++] = (yyvsp[(1) - (1)].d); ;} break; case 36: -#line 300 "Gmsh.y" +#line 301 "Gmsh.y" { ViewCoord[ViewCoordIdx++] = (yyvsp[(3) - (3)].d); ;} break; case 37: -#line 305 "Gmsh.y" +#line 306 "Gmsh.y" { if(ViewValueList) List_Add(ViewValueList, &(yyvsp[(1) - (1)].d)); ;} break; case 38: -#line 307 "Gmsh.y" +#line 308 "Gmsh.y" { if(ViewValueList) List_Add(ViewValueList, &(yyvsp[(3) - (3)].d)); ;} break; case 39: -#line 312 "Gmsh.y" +#line 313 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "SP")){ ViewValueList = ViewData->SP; ViewNumList = &ViewData->NbSP; @@ -4153,7 +4154,7 @@ yyreduce: break; case 40: -#line 456 "Gmsh.y" +#line 457 "Gmsh.y" { if(ViewValueList){ for(int i = 0; i < 3; i++) @@ -4164,14 +4165,14 @@ yyreduce: break; case 41: -#line 464 "Gmsh.y" +#line 465 "Gmsh.y" { if(ViewValueList) (*ViewNumList)++; ;} break; case 42: -#line 471 "Gmsh.y" +#line 472 "Gmsh.y" { for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c))+1; i++) List_Add(ViewData->T2C, &(yyvsp[(1) - (1)].c)[i]); Free((yyvsp[(1) - (1)].c)); @@ -4179,7 +4180,7 @@ yyreduce: break; case 43: -#line 476 "Gmsh.y" +#line 477 "Gmsh.y" { for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c))+1; i++) List_Add(ViewData->T2C, &(yyvsp[(3) - (3)].c)[i]); Free((yyvsp[(3) - (3)].c)); @@ -4187,7 +4188,7 @@ yyreduce: break; case 44: -#line 484 "Gmsh.y" +#line 485 "Gmsh.y" { List_Add(ViewData->T2D, &(yyvsp[(3) - (8)].d)); List_Add(ViewData->T2D, &(yyvsp[(5) - (8)].d)); @@ -4198,14 +4199,14 @@ yyreduce: break; case 45: -#line 492 "Gmsh.y" +#line 493 "Gmsh.y" { ViewData->NbT2++; ;} break; case 46: -#line 499 "Gmsh.y" +#line 500 "Gmsh.y" { for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c))+1; i++) List_Add(ViewData->T3C, &(yyvsp[(1) - (1)].c)[i]); Free((yyvsp[(1) - (1)].c)); @@ -4213,7 +4214,7 @@ yyreduce: break; case 47: -#line 504 "Gmsh.y" +#line 505 "Gmsh.y" { for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c))+1; i++) List_Add(ViewData->T3C, &(yyvsp[(3) - (3)].c)[i]); Free((yyvsp[(3) - (3)].c)); @@ -4221,7 +4222,7 @@ yyreduce: break; case 48: -#line 512 "Gmsh.y" +#line 513 "Gmsh.y" { List_Add(ViewData->T3D, &(yyvsp[(3) - (10)].d)); List_Add(ViewData->T3D, &(yyvsp[(5) - (10)].d)); List_Add(ViewData->T3D, &(yyvsp[(7) - (10)].d)); List_Add(ViewData->T3D, &(yyvsp[(9) - (10)].d)); @@ -4231,76 +4232,76 @@ yyreduce: break; case 49: -#line 519 "Gmsh.y" +#line 520 "Gmsh.y" { ViewData->NbT3++; ;} break; case 50: -#line 527 "Gmsh.y" +#line 528 "Gmsh.y" { ViewData->adaptive = new Adaptive_Post_View(ViewData, (yyvsp[(3) - (8)].l), (yyvsp[(6) - (8)].l)); ;} break; case 51: -#line 534 "Gmsh.y" +#line 535 "Gmsh.y" { ViewData->adaptive = new Adaptive_Post_View(ViewData, (yyvsp[(3) - (14)].l), (yyvsp[(6) - (14)].l), (yyvsp[(9) - (14)].l), (yyvsp[(12) - (14)].l)); ;} break; case 52: -#line 541 "Gmsh.y" +#line 542 "Gmsh.y" { ViewValueList = ViewData->Time; ;} break; case 53: -#line 545 "Gmsh.y" +#line 546 "Gmsh.y" { ;} break; case 54: -#line 552 "Gmsh.y" +#line 553 "Gmsh.y" { (yyval.i) = 0; ;} break; case 55: -#line 553 "Gmsh.y" +#line 554 "Gmsh.y" { (yyval.i) = 1; ;} break; case 56: -#line 554 "Gmsh.y" +#line 555 "Gmsh.y" { (yyval.i) = 2; ;} break; case 57: -#line 555 "Gmsh.y" +#line 556 "Gmsh.y" { (yyval.i) = 3; ;} break; case 58: -#line 556 "Gmsh.y" +#line 557 "Gmsh.y" { (yyval.i) = 4; ;} break; case 59: -#line 560 "Gmsh.y" +#line 561 "Gmsh.y" { (yyval.i) = 1; ;} break; case 60: -#line 561 "Gmsh.y" +#line 562 "Gmsh.y" { (yyval.i) = -1; ;} break; case 61: -#line 569 "Gmsh.y" +#line 570 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (4)].c); @@ -4334,7 +4335,7 @@ yyreduce: break; case 62: -#line 600 "Gmsh.y" +#line 601 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (7)].c); @@ -4376,7 +4377,7 @@ yyreduce: break; case 63: -#line 639 "Gmsh.y" +#line 640 "Gmsh.y" { if(List_Nbr((yyvsp[(4) - (9)].l)) != List_Nbr((yyvsp[(8) - (9)].l))){ yymsg(GERROR, "Incompatible array dimensions in affectation"); @@ -4433,7 +4434,7 @@ yyreduce: break; case 64: -#line 693 "Gmsh.y" +#line 694 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (6)].c); @@ -4453,7 +4454,7 @@ yyreduce: break; case 65: -#line 710 "Gmsh.y" +#line 711 "Gmsh.y" { // appends to the list Symbol TheSymbol; @@ -4474,7 +4475,7 @@ yyreduce: break; case 66: -#line 728 "Gmsh.y" +#line 729 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (3)].c); @@ -4488,7 +4489,7 @@ yyreduce: break; case 67: -#line 739 "Gmsh.y" +#line 740 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (6)].c); @@ -4507,14 +4508,14 @@ yyreduce: break; case 68: -#line 756 "Gmsh.y" +#line 757 "Gmsh.y" { Msg(WARNING, "Named string expressions not implemented yet"); ;} break; case 69: -#line 763 "Gmsh.y" +#line 764 "Gmsh.y" { char* (*pStrOpt)(int num, int action, char *value); StringXString *pStrCat; @@ -4531,7 +4532,7 @@ yyreduce: break; case 70: -#line 777 "Gmsh.y" +#line 778 "Gmsh.y" { char* (*pStrOpt)(int num, int action, char *value); StringXString *pStrCat; @@ -4548,7 +4549,7 @@ yyreduce: break; case 71: -#line 794 "Gmsh.y" +#line 795 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -4577,7 +4578,7 @@ yyreduce: break; case 72: -#line 820 "Gmsh.y" +#line 821 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -4607,7 +4608,7 @@ yyreduce: break; case 73: -#line 847 "Gmsh.y" +#line 848 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -4624,7 +4625,7 @@ yyreduce: break; case 74: -#line 861 "Gmsh.y" +#line 862 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -4641,7 +4642,7 @@ yyreduce: break; case 75: -#line 878 "Gmsh.y" +#line 879 "Gmsh.y" { unsigned int (*pColOpt)(int num, int action, unsigned int value); StringXColor *pColCat; @@ -4659,7 +4660,7 @@ yyreduce: break; case 76: -#line 893 "Gmsh.y" +#line 894 "Gmsh.y" { unsigned int (*pColOpt)(int num, int action, unsigned int value); StringXColor *pColCat; @@ -4677,7 +4678,7 @@ yyreduce: break; case 77: -#line 911 "Gmsh.y" +#line 912 "Gmsh.y" { GmshColorTable *ct = Get_ColorTable(0); if(!ct) @@ -4700,7 +4701,7 @@ yyreduce: break; case 78: -#line 931 "Gmsh.y" +#line 932 "Gmsh.y" { GmshColorTable *ct = Get_ColorTable((int)(yyvsp[(3) - (9)].d)); if(!ct) @@ -4723,7 +4724,7 @@ yyreduce: break; case 79: -#line 954 "Gmsh.y" +#line 955 "Gmsh.y" { try { GMSH_PluginManager::instance()->setPluginOption((yyvsp[(3) - (9)].c), (yyvsp[(6) - (9)].c), (yyvsp[(8) - (9)].d)); @@ -4736,7 +4737,7 @@ yyreduce: break; case 80: -#line 964 "Gmsh.y" +#line 965 "Gmsh.y" { try { GMSH_PluginManager::instance()->setPluginOption((yyvsp[(3) - (9)].c), (yyvsp[(6) - (9)].c), (yyvsp[(8) - (9)].c)); @@ -4749,14 +4750,14 @@ yyreduce: break; case 81: -#line 979 "Gmsh.y" +#line 980 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(1) - (1)].d); ;} break; case 82: -#line 983 "Gmsh.y" +#line 984 "Gmsh.y" { (yyval.i) = GModel::current()->setPhysicalName (std::string((yyvsp[(1) - (1)].c)), ++GModel::current()->getGEOInternals()->MaxPhysicalNum); @@ -4765,7 +4766,7 @@ yyreduce: break; case 83: -#line 996 "Gmsh.y" +#line 997 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindPoint(num)){ @@ -4790,7 +4791,7 @@ yyreduce: break; case 84: -#line 1018 "Gmsh.y" +#line 1019 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_POINT)){ @@ -4809,7 +4810,7 @@ yyreduce: break; case 85: -#line 1034 "Gmsh.y" +#line 1035 "Gmsh.y" { AttractorField *att = new AttractorField(); for(int i = 0; i < List_Nbr((yyvsp[(8) - (9)].l)); i++){ @@ -4819,7 +4820,7 @@ yyreduce: if(v) att->addPoint(v->Pos.X, v->Pos.Y, v->Pos.Z); else{ - GVertex *gv = GModel::current()->getVertex((int)d); + GVertex *gv = GModel::current()->getVertexByTag((int)d); if(gv) att->addPoint(gv->x(), gv->y(), gv->z()); } @@ -4833,7 +4834,7 @@ yyreduce: break; case 86: -#line 1055 "Gmsh.y" +#line 1056 "Gmsh.y" { fields.insert(new LatLonField(fields.get((int)(yyvsp[(7) - (8)].d))), (int)(yyvsp[(4) - (8)].d)); // dummy values @@ -4843,7 +4844,7 @@ yyreduce: break; case 87: -#line 1062 "Gmsh.y" +#line 1063 "Gmsh.y" { int index = (int)(yyvsp[(7) - (8)].d); if(index >= 0 && index < (int)PView::list.size()) @@ -4857,7 +4858,7 @@ yyreduce: break; case 88: -#line 1073 "Gmsh.y" +#line 1074 "Gmsh.y" { double pars[] = {0, CTX.lc/10, CTX.lc, CTX.lc/100, CTX.lc/20}; for(int i = 0; i < List_Nbr((yyvsp[(7) - (8)].l)); i++){ @@ -4875,7 +4876,7 @@ yyreduce: break; case 89: -#line 1088 "Gmsh.y" +#line 1089 "Gmsh.y" { std::list<Field*> *flist = new std::list<Field*>; fields.insert(new FunctionField(flist,(yyvsp[(7) - (8)].c)), (int)(yyvsp[(4) - (8)].d)); @@ -4886,7 +4887,7 @@ yyreduce: break; case 90: -#line 1096 "Gmsh.y" +#line 1097 "Gmsh.y" { std::list<Field*> *flist = new std::list<Field*>; flist->resize(0); @@ -4904,7 +4905,7 @@ yyreduce: break; case 91: -#line 1111 "Gmsh.y" +#line 1112 "Gmsh.y" { fields.insert(new StructuredField((yyvsp[(7) - (8)].c)), (int)(yyvsp[(4) - (8)].d)); // dummy values @@ -4914,7 +4915,7 @@ yyreduce: break; case 92: -#line 1118 "Gmsh.y" +#line 1119 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ double id; @@ -4928,7 +4929,7 @@ yyreduce: break; case 93: -#line 1130 "Gmsh.y" +#line 1131 "Gmsh.y" { double pars[] = { CTX.lc/10, CTX.lc/100., CTX.lc/20, 1, 3 }; for(int i = 0; i < List_Nbr((yyvsp[(5) - (6)].l)); i++){ @@ -4952,7 +4953,7 @@ yyreduce: if(v) attractor->addPoint(v->Pos.X, v->Pos.Y, v->Pos.Z); else{ - GVertex *gv = GModel::current()->getVertex((int)d); + GVertex *gv = GModel::current()->getVertexByTag((int)d); if(gv) attractor->addPoint(gv->x(), gv->y(), gv->z()); } @@ -4965,7 +4966,7 @@ yyreduce: break; case 94: -#line 1164 "Gmsh.y" +#line 1165 "Gmsh.y" { double pars[] = { CTX.lc/10, CTX.lc/100., CTX.lc/20, 10, 3 }; for(int i = 0; i < List_Nbr((yyvsp[(5) - (6)].l)); i++){ @@ -4990,7 +4991,7 @@ yyreduce: att->addCurve(c, (int)pars[3]); } else{ - GEdge *ge = GModel::current()->getEdge((int)d); + GEdge *ge = GModel::current()->getEdgeByTag((int)d); if(ge){ att->addGEdge(ge, (int)pars[3]); } @@ -5004,7 +5005,7 @@ yyreduce: break; case 95: -#line 1200 "Gmsh.y" +#line 1201 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ double d; @@ -5013,7 +5014,7 @@ yyreduce: if(v) v->lc = (yyvsp[(5) - (6)].d); else{ - GVertex *gv = GModel::current()->getVertex((int)d); + GVertex *gv = GModel::current()->getVertexByTag((int)d); if(gv) gv->setPrescribedMeshSizeAtVertex((yyvsp[(5) - (6)].d)); } @@ -5026,7 +5027,7 @@ yyreduce: break; case 96: -#line 1222 "Gmsh.y" +#line 1223 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -5047,7 +5048,7 @@ yyreduce: break; case 97: -#line 1240 "Gmsh.y" +#line 1241 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -5068,7 +5069,7 @@ yyreduce: break; case 98: -#line 1258 "Gmsh.y" +#line 1259 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -5089,7 +5090,7 @@ yyreduce: break; case 99: -#line 1276 "Gmsh.y" +#line 1277 "Gmsh.y" { int num = (int)(yyvsp[(3) - (9)].d); if(FindCurve(num)){ @@ -5118,7 +5119,7 @@ yyreduce: break; case 100: -#line 1302 "Gmsh.y" +#line 1303 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -5139,7 +5140,7 @@ yyreduce: break; case 101: -#line 1320 "Gmsh.y" +#line 1321 "Gmsh.y" { int num = (int)(yyvsp[(3) - (9)].d); if(FindCurve(num)){ @@ -5168,7 +5169,7 @@ yyreduce: break; case 102: -#line 1347 "Gmsh.y" +#line 1348 "Gmsh.y" { int num = (int)(yyvsp[(3) - (17)].d); if(FindCurve(num)){ @@ -5190,7 +5191,7 @@ yyreduce: break; case 103: -#line 1366 "Gmsh.y" +#line 1367 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -5211,7 +5212,7 @@ yyreduce: break; case 104: -#line 1384 "Gmsh.y" +#line 1385 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -5232,7 +5233,7 @@ yyreduce: break; case 105: -#line 1402 "Gmsh.y" +#line 1403 "Gmsh.y" { int num = (int)(yyvsp[(3) - (11)].d); if(List_Nbr((yyvsp[(6) - (11)].l)) + (int)(yyvsp[(10) - (11)].d) + 1 != List_Nbr((yyvsp[(8) - (11)].l))){ @@ -5261,7 +5262,7 @@ yyreduce: break; case 106: -#line 1428 "Gmsh.y" +#line 1429 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindEdgeLoop(num)){ @@ -5281,7 +5282,7 @@ yyreduce: break; case 107: -#line 1445 "Gmsh.y" +#line 1446 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_LINE)){ @@ -5300,7 +5301,7 @@ yyreduce: break; case 108: -#line 1464 "Gmsh.y" +#line 1465 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindSurface(num)){ @@ -5321,7 +5322,7 @@ yyreduce: break; case 109: -#line 1482 "Gmsh.y" +#line 1483 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d), type = 0; if(FindSurface(num)){ @@ -5362,7 +5363,7 @@ yyreduce: break; case 110: -#line 1520 "Gmsh.y" +#line 1521 "Gmsh.y" { myGmshSurface = 0; (yyval.s).Type = 0; @@ -5371,7 +5372,7 @@ yyreduce: break; case 111: -#line 1526 "Gmsh.y" +#line 1527 "Gmsh.y" { myGmshSurface = gmshSurface::getSurface((int)(yyvsp[(3) - (4)].d)); (yyval.s).Type = 0; @@ -5380,7 +5381,7 @@ yyreduce: break; case 112: -#line 1532 "Gmsh.y" +#line 1533 "Gmsh.y" { int num = (int)(yyvsp[(4) - (10)].d); myGmshSurface = gmshParametricSurface::NewParametricSurface(num, (yyvsp[(7) - (10)].c), (yyvsp[(8) - (10)].c), (yyvsp[(9) - (10)].c)); @@ -5390,7 +5391,7 @@ yyreduce: break; case 113: -#line 1539 "Gmsh.y" +#line 1540 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if (List_Nbr((yyvsp[(6) - (7)].l)) != 2){ @@ -5417,7 +5418,7 @@ yyreduce: break; case 114: -#line 1563 "Gmsh.y" +#line 1564 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if (List_Nbr((yyvsp[(6) - (7)].l)) != 2){ @@ -5444,7 +5445,7 @@ yyreduce: break; case 115: -#line 1587 "Gmsh.y" +#line 1588 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindSurfaceLoop(num)){ @@ -5463,7 +5464,7 @@ yyreduce: break; case 116: -#line 1603 "Gmsh.y" +#line 1604 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){ @@ -5482,7 +5483,7 @@ yyreduce: break; case 117: -#line 1623 "Gmsh.y" +#line 1624 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindVolume(num)){ @@ -5502,7 +5503,7 @@ yyreduce: break; case 118: -#line 1640 "Gmsh.y" +#line 1641 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindVolume(num)){ @@ -5522,7 +5523,7 @@ yyreduce: break; case 119: -#line 1657 "Gmsh.y" +#line 1658 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME)){ @@ -5541,7 +5542,7 @@ yyreduce: break; case 120: -#line 1678 "Gmsh.y" +#line 1679 "Gmsh.y" { TranslateShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(4) - (5)].l)); (yyval.l) = (yyvsp[(4) - (5)].l); @@ -5549,7 +5550,7 @@ yyreduce: break; case 121: -#line 1683 "Gmsh.y" +#line 1684 "Gmsh.y" { RotateShapes((yyvsp[(3) - (11)].v)[0], (yyvsp[(3) - (11)].v)[1], (yyvsp[(3) - (11)].v)[2], (yyvsp[(5) - (11)].v)[0], (yyvsp[(5) - (11)].v)[1], (yyvsp[(5) - (11)].v)[2], (yyvsp[(7) - (11)].d), (yyvsp[(10) - (11)].l)); (yyval.l) = (yyvsp[(10) - (11)].l); @@ -5557,7 +5558,7 @@ yyreduce: break; case 122: -#line 1688 "Gmsh.y" +#line 1689 "Gmsh.y" { SymmetryShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(2) - (5)].v)[3], (yyvsp[(4) - (5)].l)); (yyval.l) = (yyvsp[(4) - (5)].l); @@ -5565,7 +5566,7 @@ yyreduce: break; case 123: -#line 1693 "Gmsh.y" +#line 1694 "Gmsh.y" { DilatShapes((yyvsp[(3) - (9)].v)[0], (yyvsp[(3) - (9)].v)[1], (yyvsp[(3) - (9)].v)[2], (yyvsp[(5) - (9)].d), (yyvsp[(8) - (9)].l)); (yyval.l) = (yyvsp[(8) - (9)].l); @@ -5573,7 +5574,7 @@ yyreduce: break; case 124: -#line 1698 "Gmsh.y" +#line 1699 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ @@ -5587,7 +5588,7 @@ yyreduce: break; case 125: -#line 1709 "Gmsh.y" +#line 1710 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); IntersectCurvesWithSurface((yyvsp[(4) - (9)].l), (int)(yyvsp[(8) - (9)].d), (yyval.l)); @@ -5596,7 +5597,7 @@ yyreduce: break; case 126: -#line 1715 "Gmsh.y" +#line 1716 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); BoundaryShapes((yyvsp[(3) - (4)].l), (yyval.l)); @@ -5605,31 +5606,31 @@ yyreduce: break; case 127: -#line 1723 "Gmsh.y" +#line 1724 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 128: -#line 1724 "Gmsh.y" +#line 1725 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 129: -#line 1729 "Gmsh.y" +#line 1730 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); ;} break; case 130: -#line 1733 "Gmsh.y" +#line 1734 "Gmsh.y" { List_Add((yyval.l), &(yyvsp[(2) - (2)].s)); ;} break; case 131: -#line 1737 "Gmsh.y" +#line 1738 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -5642,7 +5643,7 @@ yyreduce: List_Add((yyval.l), &TheShape); } else{ - GVertex *gv = GModel::current()->getVertex(TheShape.Num); + GVertex *gv = GModel::current()->getVertexByTag(TheShape.Num); if(gv){ TheShape.Type = MSH_POINT_FROM_GMODEL; List_Add((yyval.l), &TheShape); @@ -5655,7 +5656,7 @@ yyreduce: break; case 132: -#line 1760 "Gmsh.y" +#line 1761 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -5668,7 +5669,7 @@ yyreduce: List_Add((yyval.l), &TheShape); } else{ - GEdge *ge = GModel::current()->getEdge(TheShape.Num); + GEdge *ge = GModel::current()->getEdgeByTag(TheShape.Num); if(ge){ TheShape.Type = MSH_SEGM_FROM_GMODEL; List_Add((yyval.l), &TheShape); @@ -5681,7 +5682,7 @@ yyreduce: break; case 133: -#line 1783 "Gmsh.y" +#line 1784 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -5694,7 +5695,7 @@ yyreduce: List_Add((yyval.l), &TheShape); } else{ - GFace *gf = GModel::current()->getFace(TheShape.Num); + GFace *gf = GModel::current()->getFaceByTag(TheShape.Num); if(gf){ TheShape.Type = MSH_SURF_FROM_GMODEL; List_Add((yyval.l), &TheShape); @@ -5707,7 +5708,7 @@ yyreduce: break; case 134: -#line 1806 "Gmsh.y" +#line 1807 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -5720,7 +5721,7 @@ yyreduce: List_Add((yyval.l), &TheShape); } else{ - GRegion *gr = GModel::current()->getRegion(TheShape.Num); + GRegion *gr = GModel::current()->getRegionByTag(TheShape.Num); if(gr){ TheShape.Type = MSH_VOLUME_FROM_GMODEL; List_Add((yyval.l), &TheShape); @@ -5733,7 +5734,7 @@ yyreduce: break; case 135: -#line 1834 "Gmsh.y" +#line 1835 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -5745,7 +5746,7 @@ yyreduce: break; case 136: -#line 1843 "Gmsh.y" +#line 1844 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (6)].c), "View")){ int index = (int)(yyvsp[(4) - (6)].d); @@ -5761,7 +5762,7 @@ yyreduce: break; case 137: -#line 1856 "Gmsh.y" +#line 1857 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){ GModel::current()->destroy(); @@ -5780,7 +5781,7 @@ yyreduce: break; case 138: -#line 1872 "Gmsh.y" +#line 1873 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (4)].c), "Empty") && !strcmp((yyvsp[(3) - (4)].c), "Views")){ for(int i = PView::list.size() - 1; i >= 0; i--) @@ -5793,7 +5794,7 @@ yyreduce: break; case 139: -#line 1887 "Gmsh.y" +#line 1888 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ Shape TheShape; @@ -5805,7 +5806,7 @@ yyreduce: break; case 140: -#line 1901 "Gmsh.y" +#line 1902 "Gmsh.y" { for(int i = 0; i < 4; i++) VisibilityShape((yyvsp[(2) - (3)].c), i, 1); @@ -5814,7 +5815,7 @@ yyreduce: break; case 141: -#line 1907 "Gmsh.y" +#line 1908 "Gmsh.y" { for(int i = 0; i < 4; i++) VisibilityShape((yyvsp[(2) - (3)].c), i, 0); @@ -5823,7 +5824,7 @@ yyreduce: break; case 142: -#line 1913 "Gmsh.y" +#line 1914 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -5835,7 +5836,7 @@ yyreduce: break; case 143: -#line 1922 "Gmsh.y" +#line 1923 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -5847,7 +5848,7 @@ yyreduce: break; case 144: -#line 1936 "Gmsh.y" +#line 1937 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Include")){ char tmpstring[1024]; @@ -5898,7 +5899,7 @@ yyreduce: break; case 145: -#line 1984 "Gmsh.y" +#line 1985 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (7)].c), "Save") && !strcmp((yyvsp[(2) - (7)].c), "View")){ int index = (int)(yyvsp[(4) - (7)].d); @@ -5917,7 +5918,7 @@ yyreduce: break; case 146: -#line 2000 "Gmsh.y" +#line 2001 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (7)].c), "Background") && !strcmp((yyvsp[(2) - (7)].c), "Mesh") && !strcmp((yyvsp[(3) - (7)].c), "View")){ int index = (int)(yyvsp[(5) - (7)].d); @@ -5936,7 +5937,7 @@ yyreduce: break; case 147: -#line 2016 "Gmsh.y" +#line 2017 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){ SleepInSeconds((yyvsp[(2) - (3)].d)); @@ -5958,7 +5959,7 @@ yyreduce: break; case 148: -#line 2035 "Gmsh.y" +#line 2036 "Gmsh.y" { try { GMSH_PluginManager::instance()->action((yyvsp[(3) - (7)].c), (yyvsp[(6) - (7)].c), 0); @@ -5971,7 +5972,7 @@ yyreduce: break; case 149: -#line 2045 "Gmsh.y" +#line 2046 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "ElementsFromAllViews")) PView::combine(false, 1, CTX.post.combine_remove_orig); @@ -5996,14 +5997,14 @@ yyreduce: break; case 150: -#line 2067 "Gmsh.y" +#line 2068 "Gmsh.y" { exit(0); ;} break; case 151: -#line 2071 "Gmsh.y" +#line 2072 "Gmsh.y" { CTX.forced_bbox = 0; SetBoundingBox(); @@ -6011,7 +6012,7 @@ yyreduce: break; case 152: -#line 2076 "Gmsh.y" +#line 2077 "Gmsh.y" { CTX.forced_bbox = 1; SetBoundingBox((yyvsp[(3) - (15)].d), (yyvsp[(5) - (15)].d), (yyvsp[(7) - (15)].d), (yyvsp[(9) - (15)].d), (yyvsp[(11) - (15)].d), (yyvsp[(13) - (15)].d)); @@ -6019,7 +6020,7 @@ yyreduce: break; case 153: -#line 2081 "Gmsh.y" +#line 2082 "Gmsh.y" { #if defined(HAVE_FLTK) Draw(); @@ -6028,7 +6029,7 @@ yyreduce: break; case 154: -#line 2093 "Gmsh.y" +#line 2094 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (6)].d); @@ -6048,7 +6049,7 @@ yyreduce: break; case 155: -#line 2110 "Gmsh.y" +#line 2111 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (8)].d); @@ -6068,7 +6069,7 @@ yyreduce: break; case 156: -#line 2127 "Gmsh.y" +#line 2128 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (8)].d); @@ -6098,7 +6099,7 @@ yyreduce: break; case 157: -#line 2154 "Gmsh.y" +#line 2155 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (10)].d); @@ -6128,7 +6129,7 @@ yyreduce: break; case 158: -#line 2181 "Gmsh.y" +#line 2182 "Gmsh.y" { if(ImbricatedLoop <= 0){ yymsg(GERROR, "Invalid For/EndFor loop"); @@ -6162,7 +6163,7 @@ yyreduce: break; case 159: -#line 2212 "Gmsh.y" +#line 2213 "Gmsh.y" { if(!FunctionManager::Instance()->createFunction((yyvsp[(2) - (2)].c), gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -6173,7 +6174,7 @@ yyreduce: break; case 160: -#line 2220 "Gmsh.y" +#line 2221 "Gmsh.y" { if(!FunctionManager::Instance()->leaveFunction(&gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -6182,7 +6183,7 @@ yyreduce: break; case 161: -#line 2226 "Gmsh.y" +#line 2227 "Gmsh.y" { if(!FunctionManager::Instance()->enterFunction((yyvsp[(2) - (3)].c), &gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -6192,20 +6193,20 @@ yyreduce: break; case 162: -#line 2233 "Gmsh.y" +#line 2234 "Gmsh.y" { if(!(yyvsp[(3) - (4)].d)) skip_until("If", "EndIf"); ;} break; case 163: -#line 2237 "Gmsh.y" +#line 2238 "Gmsh.y" { ;} break; case 164: -#line 2246 "Gmsh.y" +#line 2247 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (5)].l), @@ -6216,7 +6217,7 @@ yyreduce: break; case 165: -#line 2254 "Gmsh.y" +#line 2255 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, (yyvsp[(10) - (11)].l), @@ -6227,7 +6228,7 @@ yyreduce: break; case 166: -#line 2262 "Gmsh.y" +#line 2263 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (13)].l), @@ -6238,14 +6239,14 @@ yyreduce: break; case 167: -#line 2270 "Gmsh.y" +#line 2271 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 168: -#line 2274 "Gmsh.y" +#line 2275 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (7)].l), @@ -6256,14 +6257,14 @@ yyreduce: break; case 169: -#line 2282 "Gmsh.y" +#line 2283 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 170: -#line 2286 "Gmsh.y" +#line 2287 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, (yyvsp[(10) - (13)].l), @@ -6274,14 +6275,14 @@ yyreduce: break; case 171: -#line 2294 "Gmsh.y" +#line 2295 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 172: -#line 2298 "Gmsh.y" +#line 2299 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (15)].l), @@ -6292,14 +6293,14 @@ yyreduce: break; case 173: -#line 2306 "Gmsh.y" +#line 2307 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 174: -#line 2310 "Gmsh.y" +#line 2311 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(BOUNDARY_LAYER, (yyvsp[(3) - (6)].l), 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., @@ -6309,14 +6310,14 @@ yyreduce: break; case 175: -#line 2317 "Gmsh.y" +#line 2318 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 176: -#line 2321 "Gmsh.y" +#line 2322 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); extr.mesh.ViewIndex = (int)(yyvsp[(4) - (10)].d); @@ -6329,7 +6330,7 @@ yyreduce: break; case 177: -#line 2333 "Gmsh.y" +#line 2334 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (8)].d), @@ -6339,7 +6340,7 @@ yyreduce: break; case 178: -#line 2340 "Gmsh.y" +#line 2341 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (8)].d), @@ -6349,7 +6350,7 @@ yyreduce: break; case 179: -#line 2347 "Gmsh.y" +#line 2348 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (8)].d), @@ -6359,7 +6360,7 @@ yyreduce: break; case 180: -#line 2354 "Gmsh.y" +#line 2355 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), @@ -6369,7 +6370,7 @@ yyreduce: break; case 181: -#line 2361 "Gmsh.y" +#line 2362 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), @@ -6379,7 +6380,7 @@ yyreduce: break; case 182: -#line 2368 "Gmsh.y" +#line 2369 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), @@ -6389,7 +6390,7 @@ yyreduce: break; case 183: -#line 2375 "Gmsh.y" +#line 2376 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (14)].d), @@ -6399,7 +6400,7 @@ yyreduce: break; case 184: -#line 2382 "Gmsh.y" +#line 2383 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (14)].d), @@ -6409,7 +6410,7 @@ yyreduce: break; case 185: -#line 2389 "Gmsh.y" +#line 2390 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (14)].d), @@ -6419,14 +6420,14 @@ yyreduce: break; case 186: -#line 2396 "Gmsh.y" +#line 2397 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 187: -#line 2400 "Gmsh.y" +#line 2401 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), @@ -6436,14 +6437,14 @@ yyreduce: break; case 188: -#line 2407 "Gmsh.y" +#line 2408 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 189: -#line 2411 "Gmsh.y" +#line 2412 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), @@ -6453,14 +6454,14 @@ yyreduce: break; case 190: -#line 2418 "Gmsh.y" +#line 2419 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 191: -#line 2422 "Gmsh.y" +#line 2423 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), @@ -6470,14 +6471,14 @@ yyreduce: break; case 192: -#line 2429 "Gmsh.y" +#line 2430 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 193: -#line 2433 "Gmsh.y" +#line 2434 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (16)].d), @@ -6487,14 +6488,14 @@ yyreduce: break; case 194: -#line 2440 "Gmsh.y" +#line 2441 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 195: -#line 2444 "Gmsh.y" +#line 2445 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (16)].d), @@ -6504,14 +6505,14 @@ yyreduce: break; case 196: -#line 2451 "Gmsh.y" +#line 2452 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 197: -#line 2455 "Gmsh.y" +#line 2456 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (16)].d), @@ -6521,14 +6522,14 @@ yyreduce: break; case 198: -#line 2462 "Gmsh.y" +#line 2463 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 199: -#line 2466 "Gmsh.y" +#line 2467 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (18)].d), @@ -6538,14 +6539,14 @@ yyreduce: break; case 200: -#line 2473 "Gmsh.y" +#line 2474 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 201: -#line 2477 "Gmsh.y" +#line 2478 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (18)].d), @@ -6555,14 +6556,14 @@ yyreduce: break; case 202: -#line 2484 "Gmsh.y" +#line 2485 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 203: -#line 2488 "Gmsh.y" +#line 2489 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (18)].d), @@ -6572,19 +6573,19 @@ yyreduce: break; case 204: -#line 2499 "Gmsh.y" +#line 2500 "Gmsh.y" { ;} break; case 205: -#line 2502 "Gmsh.y" +#line 2503 "Gmsh.y" { ;} break; case 206: -#line 2508 "Gmsh.y" +#line 2509 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; extr.mesh.NbLayer = 1; @@ -6596,7 +6597,7 @@ yyreduce: break; case 207: -#line 2517 "Gmsh.y" +#line 2518 "Gmsh.y" { double d; extr.mesh.ExtrudeMesh = true; @@ -6619,7 +6620,7 @@ yyreduce: break; case 208: -#line 2537 "Gmsh.y" +#line 2538 "Gmsh.y" { yymsg(GERROR, "Explicit region numbers in layers are deprecated"); double d; @@ -6645,14 +6646,14 @@ yyreduce: break; case 209: -#line 2560 "Gmsh.y" +#line 2561 "Gmsh.y" { extr.mesh.Recombine = true; ;} break; case 210: -#line 2564 "Gmsh.y" +#line 2565 "Gmsh.y" { int num = (int)(yyvsp[(3) - (9)].d); if(FindSurface(num)){ @@ -6674,7 +6675,7 @@ yyreduce: break; case 211: -#line 2588 "Gmsh.y" +#line 2589 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ double d; @@ -6695,7 +6696,7 @@ yyreduce: break; case 212: -#line 2606 "Gmsh.y" +#line 2607 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (9)].l)); i++){ double d; @@ -6716,7 +6717,7 @@ yyreduce: break; case 213: -#line 2624 "Gmsh.y" +#line 2625 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (9)].l)); i++){ double d; @@ -6737,7 +6738,7 @@ yyreduce: break; case 214: -#line 2642 "Gmsh.y" +#line 2643 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(4) - (8)].d)); if(!s) @@ -6769,7 +6770,7 @@ yyreduce: break; case 215: -#line 2671 "Gmsh.y" +#line 2672 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(4) - (9)].d)); if(!s) @@ -6807,7 +6808,7 @@ yyreduce: break; case 216: -#line 2706 "Gmsh.y" +#line 2707 "Gmsh.y" { yymsg(WARNING, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)"); List_Delete((yyvsp[(7) - (8)].l)); @@ -6815,7 +6816,7 @@ yyreduce: break; case 217: -#line 2711 "Gmsh.y" +#line 2712 "Gmsh.y" { Volume *v = FindVolume((int)(yyvsp[(4) - (8)].d)); if(!v) @@ -6845,7 +6846,7 @@ yyreduce: break; case 218: -#line 2738 "Gmsh.y" +#line 2739 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ double d; @@ -6862,7 +6863,7 @@ yyreduce: break; case 219: -#line 2752 "Gmsh.y" +#line 2753 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ double d; @@ -6878,7 +6879,7 @@ yyreduce: break; case 220: -#line 2765 "Gmsh.y" +#line 2766 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ double d; @@ -6892,7 +6893,7 @@ yyreduce: break; case 221: -#line 2782 "Gmsh.y" +#line 2783 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); if(s) @@ -6901,7 +6902,7 @@ yyreduce: break; case 222: -#line 2788 "Gmsh.y" +#line 2789 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); if(s) @@ -6910,66 +6911,66 @@ yyreduce: break; case 223: -#line 2794 "Gmsh.y" +#line 2795 "Gmsh.y" { ;} break; case 224: -#line 2797 "Gmsh.y" +#line 2798 "Gmsh.y" { ;} break; case 225: -#line 2806 "Gmsh.y" +#line 2807 "Gmsh.y" { ReplaceAllDuplicates(); ;} break; case 226: -#line 2815 "Gmsh.y" +#line 2816 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 227: -#line 2816 "Gmsh.y" +#line 2817 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (3)].d); ;} break; case 228: -#line 2817 "Gmsh.y" +#line 2818 "Gmsh.y" { (yyval.d) = -(yyvsp[(2) - (2)].d); ;} break; case 229: -#line 2818 "Gmsh.y" +#line 2819 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (2)].d); ;} break; case 230: -#line 2819 "Gmsh.y" +#line 2820 "Gmsh.y" { (yyval.d) = !(yyvsp[(2) - (2)].d); ;} break; case 231: -#line 2820 "Gmsh.y" +#line 2821 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d); ;} break; case 232: -#line 2821 "Gmsh.y" +#line 2822 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d); ;} break; case 233: -#line 2822 "Gmsh.y" +#line 2823 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d); ;} break; case 234: -#line 2824 "Gmsh.y" +#line 2825 "Gmsh.y" { if(!(yyvsp[(3) - (3)].d)) yymsg(GERROR, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); @@ -6979,307 +6980,307 @@ yyreduce: break; case 235: -#line 2830 "Gmsh.y" +#line 2831 "Gmsh.y" { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d); ;} break; case 236: -#line 2831 "Gmsh.y" +#line 2832 "Gmsh.y" { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); ;} break; case 237: -#line 2832 "Gmsh.y" +#line 2833 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d); ;} break; case 238: -#line 2833 "Gmsh.y" +#line 2834 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d); ;} break; case 239: -#line 2834 "Gmsh.y" +#line 2835 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d); ;} break; case 240: -#line 2835 "Gmsh.y" +#line 2836 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d); ;} break; case 241: -#line 2836 "Gmsh.y" +#line 2837 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d); ;} break; case 242: -#line 2837 "Gmsh.y" +#line 2838 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d); ;} break; case 243: -#line 2838 "Gmsh.y" +#line 2839 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d); ;} break; case 244: -#line 2839 "Gmsh.y" +#line 2840 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d); ;} break; case 245: -#line 2840 "Gmsh.y" +#line 2841 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (5)].d)? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); ;} break; case 246: -#line 2841 "Gmsh.y" +#line 2842 "Gmsh.y" { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; case 247: -#line 2842 "Gmsh.y" +#line 2843 "Gmsh.y" { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; case 248: -#line 2843 "Gmsh.y" +#line 2844 "Gmsh.y" { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; case 249: -#line 2844 "Gmsh.y" +#line 2845 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; case 250: -#line 2845 "Gmsh.y" +#line 2846 "Gmsh.y" { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; case 251: -#line 2846 "Gmsh.y" +#line 2847 "Gmsh.y" { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; case 252: -#line 2847 "Gmsh.y" +#line 2848 "Gmsh.y" { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; case 253: -#line 2848 "Gmsh.y" +#line 2849 "Gmsh.y" { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; case 254: -#line 2849 "Gmsh.y" +#line 2850 "Gmsh.y" { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; case 255: -#line 2850 "Gmsh.y" +#line 2851 "Gmsh.y" { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; case 256: -#line 2851 "Gmsh.y" +#line 2852 "Gmsh.y" { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} break; case 257: -#line 2852 "Gmsh.y" +#line 2853 "Gmsh.y" { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; case 258: -#line 2853 "Gmsh.y" +#line 2854 "Gmsh.y" { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; case 259: -#line 2854 "Gmsh.y" +#line 2855 "Gmsh.y" { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; case 260: -#line 2855 "Gmsh.y" +#line 2856 "Gmsh.y" { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; case 261: -#line 2856 "Gmsh.y" +#line 2857 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; case 262: -#line 2857 "Gmsh.y" +#line 2858 "Gmsh.y" { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; case 263: -#line 2858 "Gmsh.y" +#line 2859 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 264: -#line 2859 "Gmsh.y" +#line 2860 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 265: -#line 2860 "Gmsh.y" +#line 2861 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (6)].d)*(yyvsp[(3) - (6)].d)+(yyvsp[(5) - (6)].d)*(yyvsp[(5) - (6)].d)); ;} break; case 266: -#line 2861 "Gmsh.y" +#line 2862 "Gmsh.y" { (yyval.d) = (yyvsp[(3) - (4)].d)*(double)rand()/(double)RAND_MAX; ;} break; case 267: -#line 2863 "Gmsh.y" +#line 2864 "Gmsh.y" { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; case 268: -#line 2864 "Gmsh.y" +#line 2865 "Gmsh.y" { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; case 269: -#line 2865 "Gmsh.y" +#line 2866 "Gmsh.y" { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; case 270: -#line 2866 "Gmsh.y" +#line 2867 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; case 271: -#line 2867 "Gmsh.y" +#line 2868 "Gmsh.y" { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; case 272: -#line 2868 "Gmsh.y" +#line 2869 "Gmsh.y" { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; case 273: -#line 2869 "Gmsh.y" +#line 2870 "Gmsh.y" { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; case 274: -#line 2870 "Gmsh.y" +#line 2871 "Gmsh.y" { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; case 275: -#line 2871 "Gmsh.y" +#line 2872 "Gmsh.y" { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; case 276: -#line 2872 "Gmsh.y" +#line 2873 "Gmsh.y" { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; case 277: -#line 2873 "Gmsh.y" +#line 2874 "Gmsh.y" { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} break; case 278: -#line 2874 "Gmsh.y" +#line 2875 "Gmsh.y" { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; case 279: -#line 2875 "Gmsh.y" +#line 2876 "Gmsh.y" { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; case 280: -#line 2876 "Gmsh.y" +#line 2877 "Gmsh.y" { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; case 281: -#line 2877 "Gmsh.y" +#line 2878 "Gmsh.y" { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; case 282: -#line 2878 "Gmsh.y" +#line 2879 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; case 283: -#line 2879 "Gmsh.y" +#line 2880 "Gmsh.y" { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; case 284: -#line 2880 "Gmsh.y" +#line 2881 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 285: -#line 2881 "Gmsh.y" +#line 2882 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 286: -#line 2882 "Gmsh.y" +#line 2883 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (6)].d)*(yyvsp[(3) - (6)].d)+(yyvsp[(5) - (6)].d)*(yyvsp[(5) - (6)].d)); ;} break; case 287: -#line 2883 "Gmsh.y" +#line 2884 "Gmsh.y" { (yyval.d) = (yyvsp[(3) - (4)].d)*(double)rand()/(double)RAND_MAX; ;} break; case 288: -#line 2892 "Gmsh.y" +#line 2893 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 289: -#line 2893 "Gmsh.y" +#line 2894 "Gmsh.y" { (yyval.d) = 3.141592653589793; ;} break; case 290: -#line 2894 "Gmsh.y" +#line 2895 "Gmsh.y" { (yyval.d) = ParUtil::Instance()->rank(); ;} break; case 291: -#line 2895 "Gmsh.y" +#line 2896 "Gmsh.y" { (yyval.d) = ParUtil::Instance()->size(); ;} break; case 292: -#line 2896 "Gmsh.y" +#line 2897 "Gmsh.y" { (yyval.d) = Get_GmshMajorVersion(); ;} break; case 293: -#line 2897 "Gmsh.y" +#line 2898 "Gmsh.y" { (yyval.d) = Get_GmshMinorVersion(); ;} break; case 294: -#line 2898 "Gmsh.y" +#line 2899 "Gmsh.y" { (yyval.d) = Get_GmshPatchVersion(); ;} break; case 295: -#line 2903 "Gmsh.y" +#line 2904 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (1)].c); @@ -7295,7 +7296,7 @@ yyreduce: break; case 296: -#line 2919 "Gmsh.y" +#line 2920 "Gmsh.y" { char tmpstring[1024]; sprintf(tmpstring, "%s_%d", (yyvsp[(1) - (5)].c), (int)(yyvsp[(4) - (5)].d)) ; @@ -7313,7 +7314,7 @@ yyreduce: break; case 297: -#line 2934 "Gmsh.y" +#line 2935 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (4)].c); @@ -7336,7 +7337,7 @@ yyreduce: break; case 298: -#line 2954 "Gmsh.y" +#line 2955 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(2) - (4)].c); @@ -7352,7 +7353,7 @@ yyreduce: break; case 299: -#line 2967 "Gmsh.y" +#line 2968 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (2)].c); @@ -7368,7 +7369,7 @@ yyreduce: break; case 300: -#line 2980 "Gmsh.y" +#line 2981 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (5)].c); @@ -7391,7 +7392,7 @@ yyreduce: break; case 301: -#line 3003 "Gmsh.y" +#line 3004 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -7412,7 +7413,7 @@ yyreduce: break; case 302: -#line 3021 "Gmsh.y" +#line 3022 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -7433,7 +7434,7 @@ yyreduce: break; case 303: -#line 3039 "Gmsh.y" +#line 3040 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -7454,7 +7455,7 @@ yyreduce: break; case 304: -#line 3057 "Gmsh.y" +#line 3058 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -7475,7 +7476,7 @@ yyreduce: break; case 305: -#line 3075 "Gmsh.y" +#line 3076 "Gmsh.y" { (yyval.d) = GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d)); Free((yyvsp[(3) - (6)].c)); @@ -7483,70 +7484,70 @@ yyreduce: break; case 306: -#line 3083 "Gmsh.y" +#line 3084 "Gmsh.y" { memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double)); ;} break; case 307: -#line 3087 "Gmsh.y" +#line 3088 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i]; ;} break; case 308: -#line 3091 "Gmsh.y" +#line 3092 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i]; ;} break; case 309: -#line 3095 "Gmsh.y" +#line 3096 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i]; ;} break; case 310: -#line 3099 "Gmsh.y" +#line 3100 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i]; ;} break; case 311: -#line 3106 "Gmsh.y" +#line 3107 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (11)].d); (yyval.v)[1] = (yyvsp[(4) - (11)].d); (yyval.v)[2] = (yyvsp[(6) - (11)].d); (yyval.v)[3] = (yyvsp[(8) - (11)].d); (yyval.v)[4] = (yyvsp[(10) - (11)].d); ;} break; case 312: -#line 3110 "Gmsh.y" +#line 3111 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (9)].d); (yyval.v)[1] = (yyvsp[(4) - (9)].d); (yyval.v)[2] = (yyvsp[(6) - (9)].d); (yyval.v)[3] = (yyvsp[(8) - (9)].d); (yyval.v)[4] = 1.0; ;} break; case 313: -#line 3114 "Gmsh.y" +#line 3115 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (7)].d); (yyval.v)[1] = (yyvsp[(4) - (7)].d); (yyval.v)[2] = (yyvsp[(6) - (7)].d); (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0; ;} break; case 314: -#line 3118 "Gmsh.y" +#line 3119 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (7)].d); (yyval.v)[1] = (yyvsp[(4) - (7)].d); (yyval.v)[2] = (yyvsp[(6) - (7)].d); (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0; ;} break; case 315: -#line 3125 "Gmsh.y" +#line 3126 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(List_T*)); List_Add((yyval.l), &((yyvsp[(1) - (1)].l))); @@ -7554,14 +7555,14 @@ yyreduce: break; case 316: -#line 3130 "Gmsh.y" +#line 3131 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].l))); ;} break; case 317: -#line 3138 "Gmsh.y" +#line 3139 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); @@ -7569,14 +7570,14 @@ yyreduce: break; case 318: -#line 3143 "Gmsh.y" +#line 3144 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 319: -#line 3147 "Gmsh.y" +#line 3148 "Gmsh.y" { // creates an empty list (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -7584,14 +7585,14 @@ yyreduce: break; case 320: -#line 3152 "Gmsh.y" +#line 3153 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); ;} break; case 321: -#line 3156 "Gmsh.y" +#line 3157 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -7602,7 +7603,7 @@ yyreduce: break; case 322: -#line 3164 "Gmsh.y" +#line 3165 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (5)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -7613,7 +7614,7 @@ yyreduce: break; case 323: -#line 3175 "Gmsh.y" +#line 3176 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -7624,7 +7625,7 @@ yyreduce: break; case 324: -#line 3183 "Gmsh.y" +#line 3184 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (3)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -7635,7 +7636,7 @@ yyreduce: break; case 325: -#line 3191 "Gmsh.y" +#line 3192 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); for(double d = (yyvsp[(1) - (3)].d); ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d <= (yyvsp[(3) - (3)].d)) : (d >= (yyvsp[(3) - (3)].d)); ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d += 1.) : (d -= 1.)) @@ -7644,7 +7645,7 @@ yyreduce: break; case 326: -#line 3197 "Gmsh.y" +#line 3198 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!(yyvsp[(5) - (5)].d) || ((yyvsp[(1) - (5)].d) < (yyvsp[(3) - (5)].d) && (yyvsp[(5) - (5)].d) < 0) || ((yyvsp[(1) - (5)].d) > (yyvsp[(3) - (5)].d) && (yyvsp[(5) - (5)].d) > 0)){ @@ -7658,7 +7659,7 @@ yyreduce: break; case 327: -#line 3208 "Gmsh.y" +#line 3209 "Gmsh.y" { // Returns the coordinates of a point and fills a list with it. // This allows to ensure e.g. that relative point positions are @@ -7681,7 +7682,7 @@ yyreduce: break; case 328: -#line 3228 "Gmsh.y" +#line 3229 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){ @@ -7694,7 +7695,7 @@ yyreduce: break; case 329: -#line 3238 "Gmsh.y" +#line 3239 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){ @@ -7707,7 +7708,7 @@ yyreduce: break; case 330: -#line 3248 "Gmsh.y" +#line 3249 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); Symbol TheSymbol; @@ -7727,7 +7728,7 @@ yyreduce: break; case 331: -#line 3265 "Gmsh.y" +#line 3266 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); Symbol TheSymbol; @@ -7754,7 +7755,7 @@ yyreduce: break; case 332: -#line 3292 "Gmsh.y" +#line 3293 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); @@ -7762,21 +7763,21 @@ yyreduce: break; case 333: -#line 3297 "Gmsh.y" +#line 3298 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 334: -#line 3301 "Gmsh.y" +#line 3302 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].d))); ;} break; case 335: -#line 3305 "Gmsh.y" +#line 3306 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){ double d; @@ -7788,21 +7789,21 @@ yyreduce: break; case 336: -#line 3318 "Gmsh.y" +#line 3319 "Gmsh.y" { (yyval.u) = CTX.PACK_COLOR((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d)); ;} break; case 337: -#line 3322 "Gmsh.y" +#line 3323 "Gmsh.y" { (yyval.u) = CTX.PACK_COLOR((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255); ;} break; case 338: -#line 3334 "Gmsh.y" +#line 3335 "Gmsh.y" { int flag; (yyval.u) = Get_ColorForString(ColorString, -1, (yyvsp[(1) - (1)].c), &flag); @@ -7812,7 +7813,7 @@ yyreduce: break; case 339: -#line 3341 "Gmsh.y" +#line 3342 "Gmsh.y" { unsigned int (*pColOpt)(int num, int action, unsigned int value); StringXColor *pColCat; @@ -7833,14 +7834,14 @@ yyreduce: break; case 340: -#line 3362 "Gmsh.y" +#line 3363 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); ;} break; case 341: -#line 3366 "Gmsh.y" +#line 3367 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); GmshColorTable *ct = Get_ColorTable((int)(yyvsp[(3) - (6)].d)); @@ -7855,7 +7856,7 @@ yyreduce: break; case 342: -#line 3381 "Gmsh.y" +#line 3382 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); List_Add((yyval.l), &((yyvsp[(1) - (1)].u))); @@ -7863,35 +7864,35 @@ yyreduce: break; case 343: -#line 3386 "Gmsh.y" +#line 3387 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].u))); ;} break; case 344: -#line 3393 "Gmsh.y" +#line 3394 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 345: -#line 3397 "Gmsh.y" +#line 3398 "Gmsh.y" { Msg(WARNING, "Named string expressions not implemented yet"); ;} break; case 346: -#line 3404 "Gmsh.y" +#line 3405 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 347: -#line 3408 "Gmsh.y" +#line 3409 "Gmsh.y" { (yyval.c) = (char *)Malloc(32*sizeof(char)); time_t now; @@ -7902,7 +7903,7 @@ yyreduce: break; case 348: -#line 3416 "Gmsh.y" +#line 3417 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (6)].c))+strlen((yyvsp[(5) - (6)].c))+1)*sizeof(char)); strcpy((yyval.c), (yyvsp[(3) - (6)].c)); @@ -7913,7 +7914,7 @@ yyreduce: break; case 349: -#line 3424 "Gmsh.y" +#line 3425 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c))+1)*sizeof(char)); int i; @@ -7930,7 +7931,7 @@ yyreduce: break; case 350: -#line 3438 "Gmsh.y" +#line 3439 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c))+1)*sizeof(char)); int i; @@ -7947,14 +7948,14 @@ yyreduce: break; case 351: -#line 3452 "Gmsh.y" +#line 3453 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); ;} break; case 352: -#line 3456 "Gmsh.y" +#line 3457 "Gmsh.y" { char tmpstring[1024]; int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring); @@ -7976,7 +7977,7 @@ yyreduce: break; case 353: -#line 3475 "Gmsh.y" +#line 3476 "Gmsh.y" { char* (*pStrOpt)(int num, int action, char *value); StringXString *pStrCat; @@ -8001,7 +8002,7 @@ yyreduce: break; case 354: -#line 3497 "Gmsh.y" +#line 3498 "Gmsh.y" { char* (*pStrOpt)(int num, int action, char *value); StringXString *pStrCat; @@ -8027,7 +8028,7 @@ yyreduce: /* Line 1267 of yacc.c. */ -#line 8031 "Gmsh.tab.cpp" +#line 8032 "Gmsh.tab.cpp" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -8241,7 +8242,7 @@ yyreturn: } -#line 3520 "Gmsh.y" +#line 3521 "Gmsh.y" void DeleteSymbol(void *a, void *b){ diff --git a/Parser/Gmsh.tab.hpp b/Parser/Gmsh.tab.hpp index 24e104d6d781a67acff03666d81bc7487317f37b..5d7f03da049da01c0d7a8b13a0c864a9bf139c21 100644 --- a/Parser/Gmsh.tab.hpp +++ b/Parser/Gmsh.tab.hpp @@ -300,7 +300,7 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 78 "Gmsh.y" +#line 79 "Gmsh.y" { char *c; int i; diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index 8476effd275717315d9d87b195975b09fee56663..027e5724dd0f23d57d03415544b4d5cc61893dce 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -1,5 +1,5 @@ %{ -// $Id: Gmsh.y,v 1.300 2008-02-22 07:59:00 geuzaine Exp $ +// $Id: Gmsh.y,v 1.301 2008-02-22 21:09:02 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -1041,7 +1041,7 @@ Shape : if(v) att->addPoint(v->Pos.X, v->Pos.Y, v->Pos.Z); else{ - GVertex *gv = GModel::current()->getVertex((int)d); + GVertex *gv = GModel::current()->getVertexByTag((int)d); if(gv) att->addPoint(gv->x(), gv->y(), gv->z()); } @@ -1151,7 +1151,7 @@ Shape : if(v) attractor->addPoint(v->Pos.X, v->Pos.Y, v->Pos.Z); else{ - GVertex *gv = GModel::current()->getVertex((int)d); + GVertex *gv = GModel::current()->getVertexByTag((int)d); if(gv) attractor->addPoint(gv->x(), gv->y(), gv->z()); } @@ -1186,7 +1186,7 @@ Shape : att->addCurve(c, (int)pars[3]); } else{ - GEdge *ge = GModel::current()->getEdge((int)d); + GEdge *ge = GModel::current()->getEdgeByTag((int)d); if(ge){ att->addGEdge(ge, (int)pars[3]); } @@ -1206,7 +1206,7 @@ Shape : if(v) v->lc = $5; else{ - GVertex *gv = GModel::current()->getVertex((int)d); + GVertex *gv = GModel::current()->getVertexByTag((int)d); if(gv) gv->setPrescribedMeshSizeAtVertex($5); } @@ -1747,7 +1747,7 @@ ListOfShapes : List_Add($$, &TheShape); } else{ - GVertex *gv = GModel::current()->getVertex(TheShape.Num); + GVertex *gv = GModel::current()->getVertexByTag(TheShape.Num); if(gv){ TheShape.Type = MSH_POINT_FROM_GMODEL; List_Add($$, &TheShape); @@ -1770,7 +1770,7 @@ ListOfShapes : List_Add($$, &TheShape); } else{ - GEdge *ge = GModel::current()->getEdge(TheShape.Num); + GEdge *ge = GModel::current()->getEdgeByTag(TheShape.Num); if(ge){ TheShape.Type = MSH_SEGM_FROM_GMODEL; List_Add($$, &TheShape); @@ -1793,7 +1793,7 @@ ListOfShapes : List_Add($$, &TheShape); } else{ - GFace *gf = GModel::current()->getFace(TheShape.Num); + GFace *gf = GModel::current()->getFaceByTag(TheShape.Num); if(gf){ TheShape.Type = MSH_SURF_FROM_GMODEL; List_Add($$, &TheShape); @@ -1816,7 +1816,7 @@ ListOfShapes : List_Add($$, &TheShape); } else{ - GRegion *gr = GModel::current()->getRegion(TheShape.Num); + GRegion *gr = GModel::current()->getRegionByTag(TheShape.Num); if(gr){ TheShape.Type = MSH_VOLUME_FROM_GMODEL; List_Add($$, &TheShape); diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp index 85468a536f362873abe4e31c11dec5654733c059..0e8f7e4a076a6b360725d276a4498f9588be2252 100644 --- a/Parser/Gmsh.yy.cpp +++ b/Parser/Gmsh.yy.cpp @@ -852,7 +852,7 @@ int gmsh_yy_flex_debug = 0; char *gmsh_yytext; #line 1 "Gmsh.l" #line 2 "Gmsh.l" -// $Id: Gmsh.yy.cpp,v 1.347 2008-02-20 09:20:47 geuzaine Exp $ +// $Id: Gmsh.yy.cpp,v 1.348 2008-02-22 21:09:02 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // diff --git a/Post/PViewDataGModel.cpp b/Post/PViewDataGModel.cpp index 41f2124bbeb4cc9add80e8b46665d9b0d89c274f..8ed9ad62589a834389549b1584cd528f792ef6e1 100644 --- a/Post/PViewDataGModel.cpp +++ b/Post/PViewDataGModel.cpp @@ -1,4 +1,4 @@ -// $Id: PViewDataGModel.cpp,v 1.12 2008-02-20 09:24:41 geuzaine Exp $ +// $Id: PViewDataGModel.cpp,v 1.13 2008-02-22 21:09:02 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -29,7 +29,7 @@ bool PViewDataGModel::readMSH(FILE *fp) { Msg(INFO, "Filling PViewDataGModel..."); - MVertex *v = _model->getMeshVertex(10); + MVertex *v = _model->getMeshVertexByTag(10); if(v){ printf("vertex 10 in mesh is %p\n", v); }