diff --git a/Fltk/fieldWindow.cpp b/Fltk/fieldWindow.cpp index f440d8d1dea6ed6133fca344b239ea7d85c79f0f..3ffa96103413d2a048929b216bc07bf04bec5c4e 100644 --- a/Fltk/fieldWindow.cpp +++ b/Fltk/fieldWindow.cpp @@ -220,7 +220,7 @@ void fieldWindow::loadFieldList() i_entry++; Field *field = it->second; std::ostringstream sstream; - if(it->first == fields.background_field) + if(it->first == fields.getBackgroundField()) sstream << "@b"; sstream << it->first << " " << field->getName(); browser->add(sstream.str().c_str(), field); @@ -281,11 +281,11 @@ void fieldWindow::saveFieldOptions() } int is_bg_field = background_btn->value(); FieldManager &fields = *GModel::current()->getFields(); - if(is_bg_field && fields.background_field != f->id){ + if(is_bg_field && fields.getBackgroundField() != f->id){ set_background_field(f->id, GModel::current()->getFileName()); loadFieldList(); } - if(!is_bg_field && fields.background_field == f->id){ + if(!is_bg_field && fields.getBackgroundField() == f->id){ set_background_field(-1, GModel::current()->getFileName()); loadFieldList(); } @@ -326,7 +326,7 @@ void fieldWindow::loadFieldOptions() (*input)->clear_changed(); input++; } - background_btn->value(GModel::current()->getFields()->background_field == f->id); + background_btn->value(GModel::current()->getFields()->getBackgroundField() == f->id); } void fieldWindow::editField(Field *f) diff --git a/Fltk/statisticsWindow.cpp b/Fltk/statisticsWindow.cpp index c559b3e9a362599a7113d7af5c1181a401aa9380..71ebfbc725bf32c27bdd12b74c90679f16603382 100644 --- a/Fltk/statisticsWindow.cpp +++ b/Fltk/statisticsWindow.cpp @@ -274,8 +274,7 @@ void statisticsWindow::compute(bool elementQuality) std::vector<int> qualE; int nbS = 50; qualE.resize(nbS); - if(fields->background_field > 0){ - printf("found field \n"); + if(fields.getBackgroundField() > 0){ std::set<MEdge, Less_Edge>::iterator it = edges.begin(); double sum = 0; for (; it !=edges.end();++it){ @@ -346,14 +345,14 @@ void statisticsWindow::compute(bool elementQuality) if (nbElems > 0) printf("Stats degree vertices: dMin=%d , dMax=%d, d4=%g \n", dMin, dMax, (double)d4/nbElems); FieldManager *fields = GModel::current()->getFields(); - Field *f = fields->get(fields->background_field); + Field *f = fields->get(fields.getBackgroundField()); int nbEdges = edges.size(); system("rm qualEdges.txt"); FILE *fp = fopen("qualEdges.txt", "w"); std::vector<int> qualE; int nbS = 50; qualE.resize(nbS); - if(fields->background_field > 0){ + if(fields.getBackgroundField() > 0){ std::set<MEdge, Less_Edge>::iterator it = edges.begin(); double sum = 0; for (; it !=edges.end();++it){ diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index 8236a46c119f86f28d1a08f4394c49e68acbc747..e2752279f5d69ab43c507ff5d019ff9275616008 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -544,9 +544,10 @@ int GModel::adaptMesh(int technique, simpleFunction<double> *f, Msg::Info("-- adaptMesh (allDim) ITER =%d ", ITER); fields->reset(); - int id = fields->newId(); - (*fields)[id] = new meshMetric(this, technique, f, parameters);; - fields->background_field = id; + fields->setBackgroundField(new meshMetric(this, technique, f, parameters)); + // int id = fields->newId(); + // (*fields)[id] = new meshMetric(this, technique, f, parameters); + // fields->background_field = id; opt_mesh_lc_integration_precision(0, GMSH_SET, 1.e-4); opt_mesh_algo2d(0, GMSH_SET, 7.0); //bamg @@ -596,9 +597,10 @@ int GModel::adaptMesh(int technique, simpleFunction<double> *f, if (elements.size() == 0)return -1; fields->reset(); - int id = fields->newId(); - (*fields)[id] = new meshMetric(this, technique, f, parameters); - fields->background_field = id; + fields->setBackgroundField(new meshMetric(this, technique, f, parameters)); + // int id = fields->newId(); + // (*fields)[id] = new meshMetric(this, technique, f, parameters); + // fields->background_field = id; if (getDim() == 2){ for (fiter fit = firstFace(); fit != lastFace(); ++fit){ @@ -1550,8 +1552,6 @@ void GModel::createTopologyFromMesh(int ignoreHoles) discFaces.push_back((discreteFace*) *it); createTopologyFromFaces(discFaces, ignoreHoles); - printf("goind to export GEO internals \n"); - //create old format (necessary e.g. for old-style extruded boundary layers) exportDiscreteGEOInternals(); diff --git a/Geo/GModelIO_Geo.cpp b/Geo/GModelIO_Geo.cpp index 2b353d77ffbe38f40f19c340526c28102a97897b..c8453df8833ec40009eea055c1e883a6cd620264 100644 --- a/Geo/GModelIO_Geo.cpp +++ b/Geo/GModelIO_Geo.cpp @@ -408,8 +408,8 @@ int GModel::writeGEO(const std::string &name, bool printLabels) writePhysicalGroupGEO(fp, i, printLabels, labels, physicalNames)); std::for_each(getFields()->begin(), getFields()->end(), writeFieldGEO(fp)); - if(getFields()->background_field > 0) - fprintf(fp, "Background Field = %i;\n", getFields()->background_field); + if(getFields()->getBackgroundField() > 0) + fprintf(fp, "Background Field = %i;\n", getFields()->getBackgroundField()); if(fp) fclose(fp); return 1; diff --git a/Geo/MVertex.cpp b/Geo/MVertex.cpp index 206a3f5c9fe4efcd54a11734be00291222e63b90..5ff5db93e80cf1885480eb45dbba48f14ea6ab8d 100644 --- a/Geo/MVertex.cpp +++ b/Geo/MVertex.cpp @@ -181,6 +181,7 @@ void MVertex::writeMESH(FILE *fp, double scalingFactor) _ge ? _ge->tag() : 0); } + static void double_to_char8(double val, char *str) { if(val >= 1.e6) diff --git a/Geo/MVertex.h b/Geo/MVertex.h index 365130c08d1e002d29e0c7ff07e3136551bf9252..b34676b630620495c238123f51c0a3bf5a9fe3e3 100644 --- a/Geo/MVertex.h +++ b/Geo/MVertex.h @@ -8,6 +8,7 @@ #include <stdio.h> #include <set> +#include <map> #include "SPoint2.h" #include "SPoint3.h" #include "MVertexBoundaryLayerData.h" @@ -90,6 +91,7 @@ class MVertex{ inline int getIndex() const { return _index; } inline void setIndex(int index) { _index = index; } + // get/set ith parameter virtual bool getParameter(int i, double &par) const { par = 0.; return false; } virtual bool setParameter(int i, double par){ return false; } diff --git a/Mesh/BackgroundMesh.cpp b/Mesh/BackgroundMesh.cpp index 4787d8071e2088d1ffb26424f5e82fa199210d38..e0c01c4ba12380ec1269653703f23a03dcd14f78 100644 --- a/Mesh/BackgroundMesh.cpp +++ b/Mesh/BackgroundMesh.cpp @@ -319,8 +319,8 @@ double BGM_MeshSize(GEntity *ge, double U, double V, // lc from fields double l4 = MAX_LC; FieldManager *fields = ge->model()->getFields(); - if(fields->background_field > 0){ - Field *f = fields->get(fields->background_field); + if(fields->getBackgroundField() > 0){ + Field *f = fields->get(fields->getBackgroundField()); if(f) l4 = (*f)(X, Y, Z, ge); } @@ -365,8 +365,8 @@ SMetric3 BGM_MeshMetric(GEntity *ge, // lc from fields SMetric3 l4(1./(MAX_LC*MAX_LC)); FieldManager *fields = ge->model()->getFields(); - if(fields->background_field > 0){ - Field *f = fields->get(fields->background_field); + if(fields->getBackgroundField() > 0){ + Field *f = fields->get(fields->getBackgroundField()); if(f){ if (!f->isotropic()){ (*f)(X, Y, Z, l4,ge); diff --git a/Mesh/CenterlineField.cpp b/Mesh/CenterlineField.cpp index cf6086be35377d8b23718be12f3700eb6e9213fd..e7fbda629dbb4121ac84303aacc01c1b3c61cc22 100644 --- a/Mesh/CenterlineField.cpp +++ b/Mesh/CenterlineField.cpp @@ -32,6 +32,7 @@ #include "meshGFace.h" #include "meshGEdge.h" #include "MQuadrangle.h" +#include "MElement.h" #if defined(HAVE_ANN) #include <ANN/ANN.h> @@ -235,78 +236,82 @@ void cutTriangle(MTriangle *tri, std::map<MEdge,MVertex*,Less_Edge> :: iterator it = cutEdges.find(ed); if (it != cutEdges.end()){ c[j] = it->second; + } } + MVertex *old_v0 = tri->getVertex(0); + MVertex *old_v1 = tri->getVertex(1); + MVertex *old_v2 = tri->getVertex(2); if (c[0] && c[1]){ - newTris.push_back(new MTriangle (c[0],tri->getVertex(1),c[1])); - newTris.push_back(new MTriangle (tri->getVertex(0),c[0],tri->getVertex(2))); - newTris.push_back(new MTriangle (tri->getVertex(2),c[0],c[1])); + newTris.push_back(new MTriangle (c[0],old_v1,c[1])); + newTris.push_back(new MTriangle (old_v0,c[0],old_v2)); + newTris.push_back(new MTriangle (old_v2,c[0],c[1])); newCut.insert(MEdge(c[0],c[1])); } else if (c[0] && c[2]){ - newTris.push_back(new MTriangle (tri->getVertex(0),c[0],c[2])); - newTris.push_back(new MTriangle (c[0],tri->getVertex(1),tri->getVertex(2))); - newTris.push_back(new MTriangle (tri->getVertex(2),c[2],c[0])); + newTris.push_back(new MTriangle (old_v0,c[0],c[2])); + newTris.push_back(new MTriangle (c[0],old_v1,old_v2)); + newTris.push_back(new MTriangle (old_v2,c[2],c[0])); newCut.insert(MEdge(c[0],c[2])); } else if (c[1] && c[2]){ - newTris.push_back(new MTriangle (tri->getVertex(2),c[2],c[1])); - newTris.push_back(new MTriangle (tri->getVertex(0),tri->getVertex(1),c[2])); - newTris.push_back(new MTriangle (c[2],tri->getVertex(1),c[1])); + newTris.push_back(new MTriangle (old_v2,c[2],c[1])); + newTris.push_back(new MTriangle (old_v0,old_v1,c[2])); + newTris.push_back(new MTriangle (c[2],old_v1,c[1])); newCut.insert(MEdge(c[1],c[2])); } else if (c[0]){ - newTris.push_back(new MTriangle (tri->getVertex(0),c[0],tri->getVertex(2))); - newTris.push_back(new MTriangle (tri->getVertex(2),c[0],tri->getVertex(1))); - if (cutVertices.find (tri->getVertex(0)) != cutVertices.end()){ - newCut.insert(MEdge(c[0],tri->getVertex(0))); + newTris.push_back(new MTriangle (old_v0,c[0],old_v2)); + newTris.push_back(new MTriangle (old_v2,c[0],old_v1)); + if (cutVertices.find (old_v0) != cutVertices.end()){ + newCut.insert(MEdge(c[0],old_v0)); } - else if (cutVertices.find (tri->getVertex(1)) != cutVertices.end()) { - newCut.insert(MEdge(c[0],tri->getVertex(1))); + else if (cutVertices.find (old_v1) != cutVertices.end()) { + newCut.insert(MEdge(c[0],old_v1)); } - else if (cutVertices.find (tri->getVertex(2)) != cutVertices.end()){ - newCut.insert(MEdge(c[0],tri->getVertex(2))); + else if (cutVertices.find (old_v2) != cutVertices.end()){ + newCut.insert(MEdge(c[0],old_v2)); } } else if (c[1]){ - newTris.push_back(new MTriangle (tri->getVertex(1),c[1],tri->getVertex(0))); - newTris.push_back(new MTriangle (tri->getVertex(0),c[1],tri->getVertex(2))); - if (cutVertices.find (tri->getVertex(0)) != cutVertices.end()){ - newCut.insert(MEdge(c[1],tri->getVertex(0))); + newTris.push_back(new MTriangle (old_v1,c[1],old_v0)); + newTris.push_back(new MTriangle (old_v0,c[1],old_v2)); + if (cutVertices.find (old_v0) != cutVertices.end()){ + newCut.insert(MEdge(c[1],old_v0)); } - else if (cutVertices.find (tri->getVertex(1)) != cutVertices.end()) { - newCut.insert(MEdge(tri->getVertex(1), c[1])); + else if (cutVertices.find (old_v1) != cutVertices.end()) { + newCut.insert(MEdge(old_v1, c[1])); } - else if (cutVertices.find (tri->getVertex(2)) != cutVertices.end()){ - newCut.insert(MEdge(c[1],tri->getVertex(2))); + else if (cutVertices.find (old_v2) != cutVertices.end()){ + newCut.insert(MEdge(c[1],old_v2)); } } else if (c[2]){ - newTris.push_back(new MTriangle (tri->getVertex(0),tri->getVertex(1), c[2])); - newTris.push_back(new MTriangle (tri->getVertex(1),tri->getVertex(2), c[2])); - if (cutVertices.find (tri->getVertex(0)) != cutVertices.end()){ - newCut.insert(MEdge(c[2],tri->getVertex(0))); + newTris.push_back(new MTriangle (old_v0,old_v1, c[2])); + newTris.push_back(new MTriangle (old_v1,old_v2, c[2])); + if (cutVertices.find (old_v0) != cutVertices.end()){ + newCut.insert(MEdge(c[2],old_v0)); } - else if (cutVertices.find (tri->getVertex(1)) != cutVertices.end()) { - newCut.insert(MEdge(c[2], tri->getVertex(1))); + else if (cutVertices.find (old_v1) != cutVertices.end()) { + newCut.insert(MEdge(c[2], old_v1)); } - else if (cutVertices.find (tri->getVertex(2)) != cutVertices.end()){ - newCut.insert(MEdge(c[2], tri->getVertex(2))); + else if (cutVertices.find (old_v2) != cutVertices.end()){ + newCut.insert(MEdge(c[2], old_v2)); } } else { newTris.push_back(tri); - if (cutVertices.find (tri->getVertex(0)) != cutVertices.end() && - cutVertices.find (tri->getVertex(1)) != cutVertices.end()) - newCut.insert(MEdge(tri->getVertex(0),tri->getVertex(1))); - else if (cutVertices.find (tri->getVertex(1)) != cutVertices.end() && - cutVertices.find (tri->getVertex(2)) != cutVertices.end()) - newCut.insert(MEdge(tri->getVertex(1),tri->getVertex(2))); - else if (cutVertices.find (tri->getVertex(2)) != cutVertices.end() && - cutVertices.find (tri->getVertex(0)) != cutVertices.end()) - newCut.insert(MEdge(tri->getVertex(2),tri->getVertex(0))); + //newTris.push_back(new MTriangle (old_v0, old_v1,old_v2)); + if (cutVertices.find (old_v0) != cutVertices.end() && + cutVertices.find (old_v1) != cutVertices.end()) + newCut.insert(MEdge(old_v0,old_v1)); + else if (cutVertices.find (old_v1) != cutVertices.end() && + cutVertices.find (old_v2) != cutVertices.end()) + newCut.insert(MEdge(old_v1,old_v2)); + else if (cutVertices.find (old_v2) != cutVertices.end() && + cutVertices.find (old_v0) != cutVertices.end()) + newCut.insert(MEdge(old_v2,old_v0)); } - } Centerline::Centerline(std::string fileName): kdtree(0), nodes(0){ @@ -321,6 +326,7 @@ Centerline::Centerline(std::string fileName): kdtree(0), nodes(0){ buildKdTree(); update_needed = false; + is_cut = false; } Centerline::Centerline(): kdtree(0), nodes(0){ @@ -333,18 +339,13 @@ Centerline::Centerline(): kdtree(0), nodes(0){ options["FileName"] = new FieldOptionString (fileName, "File name for the centerlines", &update_needed); callbacks["cutMesh"] = new FieldCallbackGeneric<Centerline>(this, &Centerline::cutMesh, "Cut the initial mesh in different mesh partitions using the centerlines \n"); + + is_cut = false; } Centerline::~Centerline(){ - printf("mod=%p \n", mod); - printf("split=%p \n", split); - printf("current=%p \n", current); - printf("delete mod \n"); if (mod) delete mod; - printf("delete split \n"); - if (split) delete split; - printf("delete anns stuff \n"); if(kdtree) delete kdtree; if(nodes) annDeallocPts(nodes); delete[]index; @@ -354,54 +355,49 @@ Centerline::~Centerline(){ void Centerline::importFile(std::string fileName){ current = GModel::current(); - std::vector<GEntity*> entities ; - current->getEntities(entities) ; - for(unsigned int i = 0; i < entities.size(); i++){ - if(entities[i]->dim() != 2) continue; - GFace *gf = ((GFace*)entities[i]); - recombine = std::max(recombine, (double)(gf->meshAttributes.recombine)); - for(int j = 0; j < entities[i]->getNumMeshElements(); j++){ - MElement *e = entities[i]->getMeshElement(j); - if (e->getType() != TYPE_TRI){ - Msg::Error("Centerline split only implemented for tri meshes so far ..."); - exit(1); - } - else{ - triangles.push_back((MTriangle*)e); - } + std::vector<GFace*> currentFaces = current->bindingsGetFaces(); + for (int i = 0; i < currentFaces.size(); i++){ + GFace *gf = currentFaces[i]; + if (gf->geomType() == GEntity::DiscreteSurface){ + for(unsigned int j = 0; j < gf->triangles.size(); j++) + triangles.push_back(gf->triangles[j]); + gf->triangles.clear(); + gf->deleteVertexArrays(); + current->remove(gf); } - } - entities.clear(); + if(triangles.empty()){ + Msg::Error("Current GModel has no triangles ..."); + exit(1); + } + mod = new GModel(); mod->readVTK(fileName.c_str()); mod->removeDuplicateMeshVertices(1.e-8); - mod->getEntities(entities); current->setAsCurrent(); int maxN = 0.0; - for(unsigned int i = 0; i < entities.size(); i++){ - if( entities[i]->dim() == 1){ - for(unsigned int ele = 0; ele < entities[i]->getNumMeshElements(); ele++){ - MLine *l = (MLine*) entities[i]->getMeshElement(ele); - MVertex *v0 = l->getVertex(0); - MVertex *v1 = l->getVertex(1); - std::map<MVertex*, int>::iterator it0 = colorp.find(v0); - std::map<MVertex*, int>::iterator it1 = colorp.find(v1); - if (it0 == colorp.end() || it1 == colorp.end()){ - lines.push_back(l); - colorl.insert(std::make_pair(l, entities[i]->tag())); - maxN = std::max(maxN, entities[i]->tag()); + std::vector<GEdge*> modEdges = mod->bindingsGetEdges(); + for (int i = 0; i < modEdges.size(); i++){ + GEdge *ge = modEdges[i]; + for(unsigned int j = 0; j < ge->lines.size(); j++){ + MLine *l = ge->lines[j]; + MVertex *v0 = l->getVertex(0); + MVertex *v1 = l->getVertex(1); + std::map<MVertex*, int>::iterator it0 = colorp.find(v0); + std::map<MVertex*, int>::iterator it1 = colorp.find(v1); + if (it0 == colorp.end() || it1 == colorp.end()){ + lines.push_back(l); + colorl.insert(std::make_pair(l, ge->tag())); + maxN = std::max(maxN, ge->tag()); } - if (it0 == colorp.end()) colorp.insert(std::make_pair(v0, entities[i]->tag())); - if (it1 == colorp.end()) colorp.insert(std::make_pair(v1, entities[i]->tag())); - } - } + if (it0 == colorp.end()) colorp.insert(std::make_pair(v0, ge->tag())); + if (it1 == colorp.end()) colorp.insert(std::make_pair(v1, ge->tag())); + } } createBranches(maxN); - } @@ -535,7 +531,6 @@ void Centerline::distanceToLines(){ std::set<MVertex*> allVS; for(int j = 0; j < triangles.size(); j++) for(int k = 0; k<3; k++) allVS.insert(triangles[j]->getVertex(k)); - int nbSNodes = allVS.size(); nodesR = annAllocPts(nbSNodes, 3); int ind = 0; @@ -548,7 +543,7 @@ void Centerline::distanceToLines(){ itp++; ind++; } kdtreeR = new ANNkd_tree(nodesR, nbSNodes, 3); - + for(unsigned int i = 0; i < lines.size(); i++){ MLine *l = lines[i]; MVertex *v1 = l->getVertex(0); @@ -665,76 +660,100 @@ void Centerline::buildKdTree(){ } -void Centerline::remeshSplitMesh(){ +void Centerline::createSplitCompounds(){ - int NV = split->getMaxElementaryNumber(0); - int NE = split->getMaxElementaryNumber(1); - int NF = split->getMaxElementaryNumber(2); - - std::set<MVertex*> allNod; - std::list<GEdge*> U0; - printf("face =%d \n", split->getMaxElementaryNumber(2)); - discreteFace *mySplitMesh = new discreteFace(split, 2*NF+1); - split->add(mySplitMesh); - printf("face after =%d \n", split->getMaxElementaryNumber(2)); + NV = current->getMaxElementaryNumber(0); + NE = current->getMaxElementaryNumber(1); + NF = current->getMaxElementaryNumber(2); // Remesh new faces (Compound Lines and Compound Surfaces) Msg::Info("*** Starting parametrize compounds:"); double t0 = Cpu(); //Parametrize Compound Lines - printf("NF =%d NE=%d NV=%d \n", split->getMaxElementaryNumber(2), NE, NV); for (int i=0; i < NE; i++){ std::vector<GEdge*>e_compound; - GEdge *pe = split->getEdgeByTag(i+1);//split edge + GEdge *pe = current->getEdgeByTag(i+1);//current edge e_compound.push_back(pe); int num_gec = NE+i+1; Msg::Info("Parametrize Compound Line (%d) = %d discrete edge", num_gec, pe->tag()); - GEdgeCompound *gec = new GEdgeCompound(split, num_gec, e_compound); - split->add(gec); - gec->parametrize(); + GEdgeCompound *gec = new GEdgeCompound(current, num_gec, e_compound); + current->add(gec); + //gec->parametrize(); } // Parametrize Compound surfaces + std::list<GEdge*> U0; for (int i=0; i < NF; i++){ std::list<GFace*> f_compound; - GFace *pf = split->getFaceByTag(i+1);//split face + GFace *pf = current->getFaceByTag(i+1);//current face f_compound.push_back(pf); int num_gfc = NF+i+1; Msg::Info("Parametrize Compound Surface (%d) = %d discrete face", num_gfc, pf->tag()); GFaceCompound::typeOfMapping typ = GFaceCompound::CONFORMAL; - GFaceCompound *gfc = new GFaceCompound(split, num_gfc, f_compound, U0, + GFaceCompound *gfc = new GFaceCompound(current, num_gfc, f_compound, U0, typ, 0); gfc->meshAttributes.recombine = recombine; - split->add(gfc); - gfc->parametrize(); + current->add(gfc); + //gfc->parametrize(); } - double t1 = Cpu(); - Msg::Info("*** Parametrize compounds done (%g s)", t1-t0); - + +} + +void Centerline::cleanMesh(){ + + if (!is_cut) return; + + std::set<MVertex*> allNod; + std::list<GEdge*> U0; + discreteFace *mySplitMesh = new discreteFace(current, 2*NF+1); + current->add(mySplitMesh); + //set centerline field - FieldManager *fields = split->getFields(); - fields->reset(); - int id = fields->newId(); - (*fields)[id] = this; - fields->background_field = id; - - Msg::Info("*** Starting meshing 1D edges ...:"); - for (int i = 0; i < NE; i++){ - GEdge *gec = split->getEdgeByTag(NE+i+1); - meshGEdge mge; - mge(gec); - } - double t2 = Cpu(); - Msg::Info("*** Meshing 1D edges done (%gs)", t2-t1); + // FieldManager *fields = current->getFields(); + // fields->reset(); + // field->setBackgroundField(this); + // Msg::Info("*** Starting meshing 1D edges ...:"); + // printf("NE=%d \n", NE); + // for (int i = 0; i < NE; i++){ + // printf("getting %d \n", NE+i+1); + // GEdge *gec = current->getEdgeByTag(NE+i+1); + // printf("edge (%p) =%d lines =%d \n", gec, gec->tag(), gec->lines.size()); + // meshGEdge mge; + // mge(gec); + // } + // double t2 = Cpu(); + // Msg::Info("*** Meshing 1D edges done (%gs)", t2-t1); + + // Msg::Info("*** Starting mesh of surface "); + // for (int i=0; i < NF; i++){ + // GFace *gfc = current->getFaceByTag(NF+i+1); + // meshGFace mgf; + // mgf(gfc); + // for(unsigned int j = 0; j < gfc->triangles.size(); ++j){ + // MTriangle *t = gfc->triangles[j]; + // std::vector<MVertex *> v(3); + // for(int k = 0; k < 3; k++){ + // v[k] = t->getVertex(k); + // allNod.insert(v[k]); + // } + // mySplitMesh->triangles.push_back(new MTriangle(v[0], v[1], v[2])); + // } + // for(unsigned int j = 0; j < gfc->quadrangles.size(); ++j){ + // MQuadrangle *q = gfc->quadrangles[j]; + // std::vector<MVertex *> v(4); + // for(int k = 0; k < 4; k++){ + // v[k] = q->getVertex(k); + // allNod.insert(v[k]); + // } + // mySplitMesh->quadrangles.push_back(new MQuadrangle(v[0], v[1], v[2], v[3])); + // } + // } - Msg::Info("*** Starting mesh of surface "); for (int i=0; i < NF; i++){ - GFace *gfc = split->getFaceByTag(NF+i+1); - meshGFace mgf; - mgf(gfc); + GFace *gfc = current->getFaceByTag(NF+i+1); for(unsigned int j = 0; j < gfc->triangles.size(); ++j){ MTriangle *t = gfc->triangles[j]; std::vector<MVertex *> v(3); @@ -755,30 +774,30 @@ void Centerline::remeshSplitMesh(){ } } - // Removing discrete Vertices - Edges - Faces + //Removing discrete Vertices - Edges - Faces printf("NV=%d NE=%d NF=%d \n", NV, NE, NF); for (int i=0; i < NV; i++){ - GVertex *gv = split->getVertexByTag(i+1); - split->remove(gv); + GVertex *gv = current->getVertexByTag(i+1); + current->remove(gv); } for (int i=0; i < NE; i++){ - GEdge *ge = split->getEdgeByTag(i+1); - GEdge *gec = split->getEdgeByTag(NE+i+1); - split->remove(ge); - split->remove(gec); + GEdge *ge = current->getEdgeByTag(i+1); + GEdge *gec = current->getEdgeByTag(NE+i+1); + current->remove(ge); + current->remove(gec); } for (int i=0; i < NF; i++){ - GFace *gf = split->getFaceByTag(i+1); - GFace *gfc = split->getFaceByTag(NF+i+1); - split->remove(gf); - split->remove(gfc); + GFace *gf = current->getFaceByTag(i+1); + GFace *gfc = current->getFaceByTag(NF+i+1); + current->remove(gf); + current->remove(gfc); } //Put new mesh in a new discreteFace for(std::set<MVertex*>::iterator it = allNod.begin(); it != allNod.end(); ++it){ mySplitMesh->mesh_vertices.push_back(*it); } - split->createTopologyFromMesh(); + current->createTopologyFromMesh(); mySplitMesh->meshStatistics.status = GFace::DONE; @@ -788,11 +807,9 @@ void Centerline::createFaces(){ std::vector<std::vector<MTriangle*> > faces; std::multimap<MEdge, MTriangle*, Less_Edge> e2e; - for(unsigned int i = 0; i < triangles.size(); ++i){ - for(int j = 0; j < 3; j++){ + for(unsigned int i = 0; i < triangles.size(); ++i) + for(int j = 0; j < 3; j++) e2e.insert(std::make_pair(triangles[i]->getEdge(j), triangles[i])); - } - } int iGroup = 0; while(!e2e.empty()){ std::set<MTriangle*> group; @@ -816,12 +833,12 @@ void Centerline::createFaces(){ printf("%d faces created \n", faces.size()); //create discFaces - int numBef = split->getMaxElementaryNumber(2) + 1; + int numBef = current->getMaxElementaryNumber(2) + 1; for(unsigned int i = 0; i < faces.size(); ++i){ - int numF = split->getMaxElementaryNumber(2) + 1; + int numF = current->getMaxElementaryNumber(2) + 1; printf("creating discrete face %d \n", numF); - discreteFace *f = new discreteFace(split, numF); - split->add(f); + discreteFace *f = new discreteFace(current, numF); + current->add(f); discFaces.push_back(f); std::set<MVertex*> myVertices; std::vector<MTriangle*> myFace = faces[i]; @@ -840,14 +857,15 @@ void Centerline::createFaces(){ } void Centerline::cutMesh(){ - + + is_cut = true; + if (update_needed){ std::ifstream input; input.open(fileName.c_str()); if(StatFile(fileName)) Msg::Fatal("Centerline file '%s' does not exist", fileName.c_str()); importFile(fileName); buildKdTree(); - printf("fileName =%s , recombine =%g \n", fileName.c_str(), recombine); update_needed = false; } @@ -864,7 +882,6 @@ void Centerline::cutMesh(){ // } Msg::Info("Splitting surface mesh (%d tris) with centerline %s ", triangles.size(), fileName.c_str()); - split = new GModel(); //splitMesh for(unsigned int i = 0; i < edges.size(); i++){ @@ -906,38 +923,16 @@ void Centerline::cutMesh(){ //create discreteFaces createFaces(); - split->createTopologyFromFaces(discFaces); + current->createTopologyFromFaces(discFaces); //write Msg::Info("Writing splitted mesh 'myPARTS.msh'"); - split->writeMSH("myPARTS.msh", 2.2, false, true); - - //remesh splitted mesh - remeshSplitMesh(); - Msg::Info("Writing new mesh 'myMESH.msh'"); - split->writeMSH("myMESH.msh", 2.2, false, true); - - //print - // FILE * f2 = fopen("myCUTLINES.pos","w"); - // fprintf(f2, "View \"\"{\n"); - // std::set<MEdge,Less_Edge>::iterator itp = theCut.begin(); - // while (itp != theCut.end()){ - // MEdge l = *itp; - // fprintf(f2, "SL(%g,%g,%g,%g,%g,%g){%g,%g};\n", - // l.getVertex(0)->x(), l.getVertex(0)->y(), l.getVertex(0)->z(), - // l.getVertex(1)->x(), l.getVertex(1)->y(), l.getVertex(1)->z(), - // 1.0,1.0); - // itp++; - // } - // fprintf(f2,"};\n"); - // fclose(f2); + current->writeMSH("myPARTS.msh", 2.2, false, true); + //create compounds + createSplitCompounds(); Msg::Info("Splitting mesh by centerlines done "); - printf("mod=%p \n", mod); - printf("split=%p \n", split); - printf("current=%p \n", current); - //exit(1); } @@ -951,10 +946,9 @@ void Centerline::cutByDisk(SVector3 &PT, SVector3 &NORM, double &maxRad){ const double EPS = 0.007; std::set<MEdge,Less_Edge> allEdges; - for(unsigned int i = 0; i < triangles.size(); i++){ + for(unsigned int i = 0; i < triangles.size(); i++) for ( unsigned int j= 0; j < 3; j++) allEdges.insert(triangles[i]->getEdge(j)); - } bool closedCut = false; int step = 0; while (!closedCut && step < 20){ @@ -1020,33 +1014,35 @@ void Centerline::cutByDisk(SVector3 &PT, SVector3 &NORM, double &maxRad){ } } + + return; } double Centerline::operator() (double x, double y, double z, GEntity *ge){ - if (update_needed){ - std::ifstream input; - input.open(fileName.c_str()); - if(StatFile(fileName)) Msg::Fatal("Centerline file '%s' does not exist", fileName.c_str()); - importFile(fileName); - buildKdTree(); - printf("fileName =%s , recombine =%g \n", fileName.c_str(), recombine); - exit(1); - update_needed = false; - } + if (update_needed){ + std::ifstream input; + input.open(fileName.c_str()); + if(StatFile(fileName)) Msg::Fatal("Centerline file '%s' does not exist", fileName.c_str()); + importFile(fileName); + buildKdTree(); + update_needed = false; + } - double xyz[3] = {x,y,z }; - int num_neighbours = 1; - kdtree->annkSearch(xyz, num_neighbours, index, dist); - double d = sqrt(dist[0]); - double lc = 2*M_PI*d/30.0; //30 mesh elements along circle - return lc; + double xyz[3] = {x,y,z }; + int num_neighbours = 1; + kdtree->annkSearch(xyz, num_neighbours, index, dist); + double d = sqrt(dist[0]); + double lc = 2*M_PI*d/30.0; //30 mesh elements along circle + return lc; } void Centerline::operator() (double x, double y, double z, SMetric3 &metr, GEntity *ge){ + printf("in operator xyz centerline BADDD \n"); + Msg::Error("This anisotropic operator of CenterlineField is not implemnted yet "); return; } @@ -1086,7 +1082,7 @@ void Centerline::printSplit() const{ for(unsigned int i = 0; i < lines.size(); ++i){ MLine *l = lines[i]; std::map<MLine*,double>::const_iterator itc = radiusl.find(l); - fprintf(f, "SL(%g,%g,%g,%g,%g,%g){%g,%g};\n", + fprintf(f4, "SL(%g,%g,%g,%g,%g,%g){%g,%g};\n", l->getVertex(0)->x(), l->getVertex(0)->y(), l->getVertex(0)->z(), l->getVertex(1)->x(), l->getVertex(1)->y(), l->getVertex(1)->z(), itc->second,itc->second); diff --git a/Mesh/CenterlineField.h b/Mesh/CenterlineField.h index 0032adce5fb9defab8259d18e1af128e7f699e4e..bb0f70fad5d109c32f15c01bfc02d4223ea89eea 100644 --- a/Mesh/CenterlineField.h +++ b/Mesh/CenterlineField.h @@ -15,6 +15,7 @@ #include <string> #include "Field.h" #include "MEdge.h" +#include "meshGFaceDelaunayInsertion.h" class GModel; class GFace; class MLine; @@ -23,6 +24,7 @@ class GEntity; class MTriangle; class discreteEdge; class discreteFace; +class MElement; #if defined(HAVE_ANN) #include <ANN/ANN.h> @@ -59,6 +61,8 @@ class Centerline : public Field{ ANNdistArray dist; std::string fileName; double recombine; + int NF, NV, NE; + bool is_cut; //all (unique) lines of centerlines std::vector<MLine*> lines; @@ -72,9 +76,9 @@ class Centerline : public Field{ std::map<MVertex*,int> colorp; std::map<MLine*,int> colorl; - std::vector<GFace*> currentGFC; //the tubular surface mesh std::vector<MTriangle*> triangles; + //the lines cut of the tubular mesh by planes std::set<MEdge,Less_Edge> theCut; std::set<MVertex*> theCutV; @@ -101,6 +105,8 @@ class Centerline : public Field{ " using the following script:\n\n" "vmtk vmtkcenterlines -seedselector openprofiles -ifile mysurface.stl -ofile centerlines.vtp --pipe vmtksurfacewriter -ifile centerlines.vtp -ofile centerlines.vtk\n"; } + + void cleanMesh(); //isotropic operator for mesh size field function of distance to centerline double operator() (double x, double y, double z, GEntity *ge=0); @@ -135,7 +141,7 @@ class Centerline : public Field{ //create discrete faces void createFaces(); - void remeshSplitMesh(); + void createSplitCompounds(); //Print for debugging void printSplit() const; diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp index e624fffebfc4c0397efeac135ebfef9e38b8bc86..192e9b1cb5a2b1e4afe3582901698ba97d652e63 100644 --- a/Mesh/Field.cpp +++ b/Mesh/Field.cpp @@ -2031,8 +2031,8 @@ FieldManager::FieldManager() map_type_name["AttractorAnisoCurve"] = new FieldFactoryT<AttractorAnisoCurveField>(); #endif map_type_name["MaxEigenHessian"] = new FieldFactoryT<MaxEigenHessianField>(); - background_field = -1; - boundaryLayer_field = -1; + _background_field = -1; + _boundaryLayer_field = -1; } FieldManager::~FieldManager() @@ -2042,6 +2042,13 @@ FieldManager::~FieldManager() delete it->second; } +void FieldManager::setBackgroundField(Field* BGF) +{ + int id = newId(); + (*this)[id] = BGF; + _background_field = id; +} + void Field::putOnNewView() { #if defined(HAVE_POST) @@ -2096,5 +2103,5 @@ void FieldManager::setBackgroundMesh(int iView) Field *f = newField(id, "PostView"); f->options["IView"]->numericalValue(iView); (*this)[id] = f; - background_field = id; + _background_field = id; } diff --git a/Mesh/Field.h b/Mesh/Field.h index 025af8d967e377377594f9f3203737b3e0a824fa..4dd8860fe2df6cc952d7531405d05cf932db9eb4 100644 --- a/Mesh/Field.h +++ b/Mesh/Field.h @@ -103,6 +103,9 @@ class FieldFactory { }; class FieldManager : public std::map<int, Field*> { + private: + int _background_field; + int _boundaryLayer_field; public: std::map<std::string, FieldFactory*> map_type_name; void reset(); @@ -113,10 +116,14 @@ class FieldManager : public std::map<int, Field*> { int maxId(); FieldManager(); ~FieldManager(); - int background_field; - int boundaryLayer_field; // compatibility with -bgm void setBackgroundMesh(int iView); + // set and get background field + void setBackgroundField(Field* BGF); + inline void setBackgroundFieldId(int id){_background_field = id;}; + inline void setBoundaryLayerFieldId(int id){_boundaryLayer_field = id;}; + inline int getBackgroundField(){return _background_field;} + inline int getBoundaryLayerField(){return _boundaryLayer_field;} }; // Boundary Layer Field (used both for anisotropic meshing and BL diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp index 906eafab757a7e0fa5f72e9cc787aefadb34fae8..0c06e14be5e1d1ca97c56bac05537857d280a403 100644 --- a/Mesh/Generator.cpp +++ b/Mesh/Generator.cpp @@ -28,6 +28,8 @@ #include "HighOrder.h" #include "Generator.h" #include "meshGFaceLloyd.h" +#include "CenterlineField.h" +#include "Field.h" #if defined(HAVE_POST) #include "PView.h" @@ -500,6 +502,15 @@ static void Mesh2D(GModel *m) #endif // collapseSmallEdges(*m); + + //For centerline field, clean the cut parts + Centerline *center = 0; + FieldManager *fields = GModel::current()->getFields(); + if (fields->getBackgroundField() > 0 ){ + Field *myField = fields->get(fields->getBackgroundField()); + center = dynamic_cast<Centerline*> (myField); + } + if (center) center->cleanMesh(); double t2 = Cpu(); CTX::instance()->meshTimer[1] = t2 - t1; diff --git a/Mesh/meshGEdge.cpp b/Mesh/meshGEdge.cpp index 088898a79b20b3fae4b21f591cf16b3c81e8bf38..73c2a71ff826d76e509167ff4f98e9b1ccb4d6cf 100644 --- a/Mesh/meshGEdge.cpp +++ b/Mesh/meshGEdge.cpp @@ -312,8 +312,8 @@ void meshGEdge::operator() (GEdge *ge) #if defined(HAVE_ANN) FieldManager *fields = ge->model()->getFields(); BoundaryLayerField *blf = 0; - if(fields->background_field > 0){ - Field *bl_field = fields->get(fields->background_field); + if(fields->getBackgroundField() > 0){ + Field *bl_field = fields->get(fields->getBackgroundField()); blf = dynamic_cast<BoundaryLayerField*> (bl_field); } #else diff --git a/Mesh/meshGFaceBoundaryLayers.cpp b/Mesh/meshGFaceBoundaryLayers.cpp index a946f0b7b65902ef47a4cce52a17ad9362721013..889cd5ffc08f76afceab67e8b150afa9af8d917d 100644 --- a/Mesh/meshGFaceBoundaryLayers.cpp +++ b/Mesh/meshGFaceBoundaryLayers.cpp @@ -102,10 +102,10 @@ BoundaryLayerColumns* buidAdditionalPoints2D (GFace *gf, double _treshold) return 0; #else FieldManager *fields = gf->model()->getFields(); - if(fields->boundaryLayer_field <= 0){ + if(fields->getBoundaryLayerField() <= 0){ return 0; } - Field *bl_field = fields->get(fields->boundaryLayer_field); + Field *bl_field = fields->get(fields->getBoundaryLayerField()); BoundaryLayerField *blf = dynamic_cast<BoundaryLayerField*> (bl_field); if (!blf)return 0; diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 5b7065b2c482649467b64f8c07ffd42d2aad5f61..fa42fd9f454b474950123159d3e3135ef204fe92 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -1,9 +1,8 @@ -/* A Bison parser, made by GNU Bison 2.4.3. */ +/* A Bison parser, made by GNU Bison 2.5. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -45,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.3" +#define YYBISON_VERSION "2.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -74,7 +73,7 @@ /* Copy the first part of user declarations. */ -/* Line 189 of yacc.c */ +/* Line 268 of yacc.c */ #line 1 "Gmsh.y" // Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle @@ -162,8 +161,8 @@ int PrintListOfDouble(char *format, List_T *list, char *buffer); fullMatrix<double> ListOfListOfDouble2Matrix(List_T *list); -/* Line 189 of yacc.c */ -#line 167 "Gmsh.tab.cpp" +/* Line 268 of yacc.c */ +#line 166 "Gmsh.tab.cpp" /* Enabling traces. */ #ifndef YYDEBUG @@ -334,7 +333,7 @@ fullMatrix<double> ListOfListOfDouble2Matrix(List_T *list); typedef union YYSTYPE { -/* Line 214 of yacc.c */ +/* Line 293 of yacc.c */ #line 87 "Gmsh.y" char *c; @@ -347,8 +346,8 @@ typedef union YYSTYPE -/* Line 214 of yacc.c */ -#line 352 "Gmsh.tab.cpp" +/* Line 293 of yacc.c */ +#line 351 "Gmsh.tab.cpp" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -359,8 +358,8 @@ typedef union YYSTYPE /* Copy the second part of user declarations. */ -/* Line 264 of yacc.c */ -#line 364 "Gmsh.tab.cpp" +/* Line 343 of yacc.c */ +#line 363 "Gmsh.tab.cpp" #ifdef short # undef short @@ -463,11 +462,11 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # endif @@ -490,24 +489,24 @@ YYID (yyi) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined _STDLIB_H \ +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif @@ -536,23 +535,7 @@ union yyalloc ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of @@ -572,6 +555,26 @@ union yyalloc #endif +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + /* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ @@ -1144,8 +1147,8 @@ static const yytype_uint8 yyr2[] = 6, 4, 4, 4, 6 }; -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint16 yydefact[] = { @@ -1474,8 +1477,7 @@ static const yytype_int16 yypgoto[] = /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ + number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -5 static const yytype_int16 yytable[] = { @@ -2241,6 +2243,12 @@ static const yytype_int16 yytable[] = 348, 0, 0, 0, 0, 349 }; +#define yypact_value_is_default(yystate) \ + ((yystate) == (-1059)) + +#define yytable_value_is_error(yytable_value) \ + YYID (0) + static const yytype_int16 yycheck[] = { 6, 399, 400, 205, 6, 1063, 3, 5, 321, 70, @@ -3187,7 +3195,6 @@ do \ { \ yychar = (Token); \ yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ @@ -3229,19 +3236,10 @@ while (YYID (0)) #endif -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ +/* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif @@ -3433,7 +3431,6 @@ int yydebug; # define YYMAXDEPTH 10000 #endif - #if YYERROR_VERBOSE @@ -3536,115 +3533,142 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = 0; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } - if (yysize_overflow) - return YYSIZE_MAXIMUM; + yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; } #endif /* YYERROR_VERBOSE */ - /*-----------------------------------------------. | Release the memory associated to this symbol. | @@ -3677,6 +3701,7 @@ yydestruct (yymsg, yytype, yyvaluep) } } + /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus @@ -3703,10 +3728,9 @@ YYSTYPE yylval; int yynerrs; - -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ +/*----------. +| yyparse. | +`----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -3730,8 +3754,6 @@ yyparse () #endif #endif { - - int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; @@ -3886,7 +3908,7 @@ yybackup: /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ @@ -3917,8 +3939,8 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; + if (yytable_value_is_error (yyn)) + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -3973,161 +3995,161 @@ yyreduce: { case 3: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 159 "Gmsh.y" - { yyerrok; return 1; ;} + { yyerrok; return 1; } break; case 6: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 170 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 7: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 171 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 8: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 172 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 9: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 173 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 10: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 174 "Gmsh.y" - { List_Delete((yyvsp[(1) - (1)].l)); return 1; ;} + { List_Delete((yyvsp[(1) - (1)].l)); return 1; } break; case 11: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 175 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 12: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 176 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 13: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 177 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 14: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 178 "Gmsh.y" - { List_Delete((yyvsp[(1) - (1)].l)); return 1; ;} + { List_Delete((yyvsp[(1) - (1)].l)); return 1; } break; case 15: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 179 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 16: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 180 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 17: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 181 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 18: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 182 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 19: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 183 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 20: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 184 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 21: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 185 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 22: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 186 "Gmsh.y" - { return 1; ;} + { return 1; } break; case 23: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 191 "Gmsh.y" { (yyval.c) = (char*)"w"; - ;} + } break; case 24: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 195 "Gmsh.y" { (yyval.c) = (char*)"a"; - ;} + } break; case 25: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 202 "Gmsh.y" { Msg::Direct((yyvsp[(3) - (5)].c)); Free((yyvsp[(3) - (5)].c)); - ;} + } break; case 26: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 207 "Gmsh.y" { std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(6) - (7)].c)); @@ -4141,12 +4163,12 @@ yyreduce: } Free((yyvsp[(3) - (7)].c)); Free((yyvsp[(6) - (7)].c)); - ;} + } break; case 27: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 221 "Gmsh.y" { char tmpstring[1024]; @@ -4159,12 +4181,12 @@ yyreduce: Msg::Direct(tmpstring); Free((yyvsp[(3) - (7)].c)); List_Delete((yyvsp[(5) - (7)].l)); - ;} + } break; case 28: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 234 "Gmsh.y" { char tmpstring[1024]; @@ -4187,12 +4209,12 @@ yyreduce: Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(8) - (9)].c)); List_Delete((yyvsp[(5) - (9)].l)); - ;} + } break; case 29: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 262 "Gmsh.y" { #if defined(HAVE_POST) @@ -4206,12 +4228,12 @@ yyreduce: delete ViewData; #endif Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(2) - (6)].c)); - ;} + } break; case 30: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 276 "Gmsh.y" { #if defined(HAVE_POST) @@ -4222,12 +4244,12 @@ yyreduce: } #endif Free((yyvsp[(2) - (6)].c)); - ;} + } break; case 31: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 287 "Gmsh.y" { #if defined(HAVE_POST) @@ -4238,51 +4260,51 @@ yyreduce: } #endif Free((yyvsp[(2) - (6)].c)); - ;} + } break; case 32: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 301 "Gmsh.y" { #if defined(HAVE_POST) ViewData = new PViewDataList(); #endif - ;} + } break; case 38: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 315 "Gmsh.y" - { ViewCoord.push_back((yyvsp[(1) - (1)].d)); ;} + { ViewCoord.push_back((yyvsp[(1) - (1)].d)); } break; case 39: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 317 "Gmsh.y" - { ViewCoord.push_back((yyvsp[(3) - (3)].d)); ;} + { ViewCoord.push_back((yyvsp[(3) - (3)].d)); } break; case 40: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 322 "Gmsh.y" - { if(ViewValueList) ViewValueList->push_back((yyvsp[(1) - (1)].d)); ;} + { if(ViewValueList) ViewValueList->push_back((yyvsp[(1) - (1)].d)); } break; case 41: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 324 "Gmsh.y" - { if(ViewValueList) ViewValueList->push_back((yyvsp[(3) - (3)].d)); ;} + { if(ViewValueList) ViewValueList->push_back((yyvsp[(3) - (3)].d)); } break; case 42: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 329 "Gmsh.y" { #if defined(HAVE_POST) @@ -4386,12 +4408,12 @@ yyreduce: #endif ViewCoord.clear(); Free((yyvsp[(1) - (1)].c)); - ;} + } break; case 43: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 433 "Gmsh.y" { #if defined(HAVE_POST) @@ -4401,47 +4423,47 @@ yyreduce: ViewValueList->push_back(ViewCoord[3 * j + i]); } #endif - ;} + } break; case 44: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 443 "Gmsh.y" { #if defined(HAVE_POST) if(ViewValueList) (*ViewNumList)++; #endif - ;} + } break; case 45: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 452 "Gmsh.y" { #if defined(HAVE_POST) for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c)) + 1; i++) ViewData->T2C.push_back((yyvsp[(1) - (1)].c)[i]); #endif Free((yyvsp[(1) - (1)].c)); - ;} + } break; case 46: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 459 "Gmsh.y" { #if defined(HAVE_POST) for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c)) + 1; i++) ViewData->T2C.push_back((yyvsp[(3) - (3)].c)[i]); #endif Free((yyvsp[(3) - (3)].c)); - ;} + } break; case 47: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 469 "Gmsh.y" { #if defined(HAVE_POST) @@ -4450,47 +4472,47 @@ yyreduce: ViewData->T2D.push_back((yyvsp[(7) - (8)].d)); ViewData->T2D.push_back(ViewData->T2C.size()); #endif - ;} + } break; case 48: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 478 "Gmsh.y" { #if defined(HAVE_POST) ViewData->NbT2++; #endif - ;} + } break; case 49: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 487 "Gmsh.y" { #if defined(HAVE_POST) for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c)) + 1; i++) ViewData->T3C.push_back((yyvsp[(1) - (1)].c)[i]); #endif Free((yyvsp[(1) - (1)].c)); - ;} + } break; case 50: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 494 "Gmsh.y" { #if defined(HAVE_POST) for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c)) + 1; i++) ViewData->T3C.push_back((yyvsp[(3) - (3)].c)[i]); #endif Free((yyvsp[(3) - (3)].c)); - ;} + } break; case 51: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 504 "Gmsh.y" { #if defined(HAVE_POST) @@ -4498,23 +4520,23 @@ yyreduce: ViewData->T3D.push_back((yyvsp[(7) - (10)].d)); ViewData->T3D.push_back((yyvsp[(9) - (10)].d)); ViewData->T3D.push_back(ViewData->T3C.size()); #endif - ;} + } break; case 52: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 512 "Gmsh.y" { #if defined(HAVE_POST) ViewData->NbT3++; #endif - ;} + } break; case 53: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 522 "Gmsh.y" { #if defined(HAVE_POST) @@ -4530,12 +4552,12 @@ yyreduce: ViewData->setInterpolationMatrices(type, ListOfListOfDouble2Matrix((yyvsp[(3) - (8)].l)), ListOfListOfDouble2Matrix((yyvsp[(6) - (8)].l))); #endif - ;} + } break; case 54: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 541 "Gmsh.y" { #if defined(HAVE_POST) @@ -4551,80 +4573,80 @@ yyreduce: ListOfListOfDouble2Matrix((yyvsp[(9) - (14)].l)), ListOfListOfDouble2Matrix((yyvsp[(12) - (14)].l))); #endif - ;} + } break; case 55: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 560 "Gmsh.y" { #if defined(HAVE_POST) ViewValueList = &ViewData->Time; #endif - ;} + } break; case 56: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 566 "Gmsh.y" { - ;} + } break; case 57: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 573 "Gmsh.y" - { (yyval.i) = 0; ;} + { (yyval.i) = 0; } break; case 58: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 574 "Gmsh.y" - { (yyval.i) = 1; ;} + { (yyval.i) = 1; } break; case 59: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 575 "Gmsh.y" - { (yyval.i) = 2; ;} + { (yyval.i) = 2; } break; case 60: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 576 "Gmsh.y" - { (yyval.i) = 3; ;} + { (yyval.i) = 3; } break; case 61: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 577 "Gmsh.y" - { (yyval.i) = 4; ;} + { (yyval.i) = 4; } break; case 62: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 581 "Gmsh.y" - { (yyval.i) = 1; ;} + { (yyval.i) = 1; } break; case 63: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 582 "Gmsh.y" - { (yyval.i) = -1; ;} + { (yyval.i) = -1; } break; case 65: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 591 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c)) && (yyvsp[(2) - (4)].i) && List_Nbr((yyvsp[(3) - (4)].l)) == 1){ @@ -4684,12 +4706,12 @@ yyreduce: } Free((yyvsp[(1) - (4)].c)); List_Delete((yyvsp[(3) - (4)].l)); - ;} + } break; case 66: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 654 "Gmsh.y" { gmsh_yysymbol &s(gmsh_yysymbols[(yyvsp[(1) - (6)].c)]); @@ -4718,12 +4740,12 @@ yyreduce: } Free((yyvsp[(1) - (6)].c)); List_Delete((yyvsp[(5) - (6)].l)); - ;} + } break; case 67: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 684 "Gmsh.y" { int index = (int)(yyvsp[(3) - (7)].d); @@ -4756,12 +4778,12 @@ yyreduce: yymsg(0, "Variable '%s' is not a list", (yyvsp[(1) - (7)].c)); } Free((yyvsp[(1) - (7)].c)); - ;} + } break; case 68: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 717 "Gmsh.y" { if(List_Nbr((yyvsp[(4) - (9)].l)) != List_Nbr((yyvsp[(8) - (9)].l))){ @@ -4807,12 +4829,12 @@ yyreduce: Free((yyvsp[(1) - (9)].c)); List_Delete((yyvsp[(4) - (9)].l)); List_Delete((yyvsp[(8) - (9)].l)); - ;} + } break; case 69: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 763 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c))) @@ -4827,12 +4849,12 @@ yyreduce: yymsg(0, "Variable '%s' is a list", (yyvsp[(1) - (3)].c)); } Free((yyvsp[(1) - (3)].c)); - ;} + } break; case 70: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 778 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c))) @@ -4848,23 +4870,23 @@ yyreduce: yymsg(0, "Variable '%s' is not a list", (yyvsp[(1) - (6)].c)); } Free((yyvsp[(1) - (6)].c)); - ;} + } break; case 71: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 794 "Gmsh.y" { gmsh_yystringsymbols[(yyvsp[(1) - (4)].c)] = std::string((yyvsp[(3) - (4)].c)); Free((yyvsp[(1) - (4)].c)); Free((yyvsp[(3) - (4)].c)); - ;} + } break; case 72: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 803 "Gmsh.y" { std::string tmp((yyvsp[(5) - (6)].c)); @@ -4875,7 +4897,7 @@ yyreduce: case 73: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 809 "Gmsh.y" { std::string tmp((yyvsp[(8) - (9)].c)); @@ -4886,7 +4908,7 @@ yyreduce: case 74: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 818 "Gmsh.y" { double d = 0.; @@ -4904,12 +4926,12 @@ yyreduce: NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (6)].c), 0, (yyvsp[(3) - (6)].c), d); } Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(3) - (6)].c)); - ;} + } break; case 75: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 836 "Gmsh.y" { double d = 0.; @@ -4927,12 +4949,12 @@ yyreduce: NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c), d); } Free((yyvsp[(1) - (9)].c)); Free((yyvsp[(6) - (9)].c)); - ;} + } break; case 76: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 854 "Gmsh.y" { double d = 0.; @@ -4941,12 +4963,12 @@ yyreduce: NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (5)].c), 0, (yyvsp[(3) - (5)].c), d); } Free((yyvsp[(1) - (5)].c)); Free((yyvsp[(3) - (5)].c)); - ;} + } break; case 77: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 863 "Gmsh.y" { double d = 0.; @@ -4955,32 +4977,32 @@ yyreduce: NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (8)].c), (int)(yyvsp[(3) - (8)].d), (yyvsp[(6) - (8)].c), d); } Free((yyvsp[(1) - (8)].c)); Free((yyvsp[(6) - (8)].c)); - ;} + } break; case 78: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 875 "Gmsh.y" { ColorOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (8)].c), 0, (yyvsp[(5) - (8)].c), (yyvsp[(7) - (8)].u)); Free((yyvsp[(1) - (8)].c)); Free((yyvsp[(5) - (8)].c)); - ;} + } break; case 79: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 880 "Gmsh.y" { ColorOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (11)].c), (int)(yyvsp[(3) - (11)].d), (yyvsp[(8) - (11)].c), (yyvsp[(10) - (11)].u)); Free((yyvsp[(1) - (11)].c)); Free((yyvsp[(8) - (11)].c)); - ;} + } break; case 80: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 888 "Gmsh.y" { GmshColorTable *ct = GetColorTable(0); @@ -5000,12 +5022,12 @@ yyreduce: } Free((yyvsp[(1) - (6)].c)); List_Delete((yyvsp[(5) - (6)].l)); - ;} + } break; case 81: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 908 "Gmsh.y" { GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (9)].d)); @@ -5025,28 +5047,28 @@ yyreduce: } Free((yyvsp[(1) - (9)].c)); List_Delete((yyvsp[(8) - (9)].l)); - ;} + } break; case 82: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 931 "Gmsh.y" { #if defined(HAVE_MESH) if(!strcmp((yyvsp[(1) - (5)].c),"Background")) - GModel::current()->getFields()->background_field = (int)(yyvsp[(4) - (5)].d); + GModel::current()->getFields()->setBackgroundFieldId((int)(yyvsp[(4) - (5)].d)); else if(!strcmp((yyvsp[(1) - (5)].c),"BoundaryLayer")) - GModel::current()->getFields()->boundaryLayer_field = (int)(yyvsp[(4) - (5)].d); + GModel::current()->getFields()->setBoundaryLayerFieldId((int)(yyvsp[(4) - (5)].d)); else yymsg(0, "Unknown command %s Field", (yyvsp[(1) - (5)].c)); #endif - ;} + } break; case 83: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 942 "Gmsh.y" { #if defined(HAVE_MESH) @@ -5054,12 +5076,12 @@ yyreduce: yymsg(0, "Cannot create field %i of type '%s'", (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c)); #endif Free((yyvsp[(6) - (7)].c)); - ;} + } break; case 84: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 950 "Gmsh.y" { #if defined(HAVE_MESH) @@ -5081,12 +5103,12 @@ yyreduce: yymsg(0, "No field with id %i", (int)(yyvsp[(3) - (9)].d)); #endif Free((yyvsp[(6) - (9)].c)); - ;} + } break; case 85: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 972 "Gmsh.y" { #if defined(HAVE_MESH) @@ -5109,12 +5131,12 @@ yyreduce: #endif Free((yyvsp[(6) - (9)].c)); Free((yyvsp[(8) - (9)].c)); - ;} + } break; case 86: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 995 "Gmsh.y" { #if defined(HAVE_MESH) @@ -5139,12 +5161,12 @@ yyreduce: #endif Free((yyvsp[(6) - (11)].c)); List_Delete((yyvsp[(9) - (11)].l)); - ;} + } break; case 87: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1020 "Gmsh.y" { #if defined(HAVE_MESH) @@ -5162,12 +5184,12 @@ yyreduce: yymsg(0, "No field with id %i", (int)(yyvsp[(3) - (7)].d)); #endif Free((yyvsp[(6) - (7)].c)); - ;} + } break; case 88: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1041 "Gmsh.y" { #if defined(HAVE_PLUGINS) @@ -5179,12 +5201,12 @@ yyreduce: } #endif Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(6) - (9)].c)); - ;} + } break; case 89: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1053 "Gmsh.y" { #if defined(HAVE_PLUGINS) @@ -5196,12 +5218,12 @@ yyreduce: } #endif Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(6) - (9)].c)); Free((yyvsp[(8) - (9)].c)); - ;} + } break; case 93: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1071 "Gmsh.y" { std::string key((yyvsp[(3) - (3)].c)); @@ -5212,12 +5234,12 @@ yyreduce: gmsh_yysymbols[key].value = val; } Free((yyvsp[(3) - (3)].c)); - ;} + } break; case 94: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1082 "Gmsh.y" { std::string key((yyvsp[(3) - (5)].c)); @@ -5228,19 +5250,19 @@ yyreduce: gmsh_yysymbols[key].value = val; } Free((yyvsp[(3) - (5)].c)); - ;} + } break; case 95: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1093 "Gmsh.y" - { floatOptions.clear(); charOptions.clear(); ;} + { floatOptions.clear(); charOptions.clear(); } break; case 96: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1095 "Gmsh.y" { std::string key((yyvsp[(3) - (9)].c)); @@ -5249,12 +5271,12 @@ yyreduce: Msg::ExchangeOnelabParameter(key, val, floatOptions, charOptions); gmsh_yysymbols[key].value = val; } - ;} + } break; case 99: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1111 "Gmsh.y" { std::string key((yyvsp[(2) - (3)].c)); @@ -5265,12 +5287,12 @@ yyreduce: } Free((yyvsp[(2) - (3)].c)); List_Delete((yyvsp[(3) - (3)].l)); - ;} + } break; case 100: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1122 "Gmsh.y" { std::string key((yyvsp[(2) - (3)].c)); @@ -5278,42 +5300,42 @@ yyreduce: charOptions[key].push_back(val); Free((yyvsp[(2) - (3)].c)); Free((yyvsp[(3) - (3)].c)); - ;} + } break; case 101: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1135 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(1) - (1)].d); - ;} + } break; case 102: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1139 "Gmsh.y" { (yyval.i) = GModel::current()->setPhysicalName (std::string((yyvsp[(1) - (1)].c)), curPhysDim, ++GModel::current()->getGEOInternals()->MaxPhysicalNum); Free((yyvsp[(1) - (1)].c)); - ;} + } break; case 103: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1149 "Gmsh.y" { (yyval.l) = 0; - ;} + } break; case 104: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1153 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(Vertex*)); @@ -5323,30 +5345,30 @@ yyreduce: else{ List_Add((yyval.l), &v); } - ;} + } break; case 105: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1165 "Gmsh.y" { for(int i = 0; i < 4; i++) (yyval.v)[i] = 0.; - ;} + } break; case 106: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1169 "Gmsh.y" { for(int i = 0; i < 4; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i]; - ;} + } break; case 107: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1179 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5369,21 +5391,21 @@ yyreduce: } (yyval.s).Type = MSH_POINT; (yyval.s).Num = num; - ;} + } break; case 108: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1202 "Gmsh.y" { curPhysDim = 0; - ;} + } break; case 109: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1206 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); @@ -5399,12 +5421,12 @@ yyreduce: List_Delete((yyvsp[(8) - (9)].l)); (yyval.s).Type = MSH_PHYSICAL_POINT; (yyval.s).Num = num; - ;} + } break; case 110: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1222 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ @@ -5423,12 +5445,12 @@ yyreduce: // dummy values (yyval.s).Type = 0; (yyval.s).Num = 0; - ;} + } break; case 111: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1244 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5446,12 +5468,12 @@ yyreduce: List_Delete((yyvsp[(6) - (7)].l)); (yyval.s).Type = MSH_SEGM_LINE; (yyval.s).Num = num; - ;} + } break; case 112: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1262 "Gmsh.y" { for (int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ @@ -5472,12 +5494,12 @@ yyreduce: } } } - ;} + } break; case 113: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1283 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5495,12 +5517,12 @@ yyreduce: List_Delete((yyvsp[(6) - (7)].l)); (yyval.s).Type = MSH_SEGM_SPLN; (yyval.s).Num = num; - ;} + } break; case 114: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1301 "Gmsh.y" { int num = (int)(yyvsp[(3) - (8)].d); @@ -5530,12 +5552,12 @@ yyreduce: List_Delete((yyvsp[(6) - (8)].l)); (yyval.s).Type = MSH_SEGM_CIRC; (yyval.s).Num = num; - ;} + } break; case 115: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1331 "Gmsh.y" { int num = (int)(yyvsp[(3) - (8)].d); @@ -5565,12 +5587,12 @@ yyreduce: List_Delete((yyvsp[(6) - (8)].l)); (yyval.s).Type = MSH_SEGM_ELLI; (yyval.s).Num = num; - ;} + } break; case 116: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1361 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5588,12 +5610,12 @@ yyreduce: List_Delete((yyvsp[(6) - (7)].l)); (yyval.s).Type = MSH_SEGM_BSPLN; (yyval.s).Num = num; - ;} + } break; case 117: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1379 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5611,12 +5633,12 @@ yyreduce: List_Delete((yyvsp[(6) - (7)].l)); (yyval.s).Type = MSH_SEGM_BEZIER; (yyval.s).Num = num; - ;} + } break; case 118: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1397 "Gmsh.y" { int num = (int)(yyvsp[(3) - (11)].d); @@ -5642,12 +5664,12 @@ yyreduce: List_Delete((yyvsp[(8) - (11)].l)); (yyval.s).Type = MSH_SEGM_NURBS; (yyval.s).Num = num; - ;} + } break; case 119: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1423 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -5665,12 +5687,12 @@ yyreduce: Free((yyvsp[(2) - (8)].c)); (yyval.s).Type = MSH_SEGM_LOOP; (yyval.s).Num = num; - ;} + } break; case 120: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1441 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -5688,21 +5710,21 @@ yyreduce: List_Delete((yyvsp[(7) - (8)].l)); (yyval.s).Type = MSH_SEGM_COMPOUND; (yyval.s).Num = num; - ;} + } break; case 121: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1459 "Gmsh.y" { curPhysDim = 1; - ;} + } break; case 122: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1463 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); @@ -5718,12 +5740,12 @@ yyreduce: List_Delete((yyvsp[(8) - (9)].l)); (yyval.s).Type = MSH_PHYSICAL_LINE; (yyval.s).Num = num; - ;} + } break; case 123: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1482 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -5741,12 +5763,12 @@ yyreduce: List_Delete((yyvsp[(7) - (8)].l)); (yyval.s).Type = MSH_SURF_PLAN; (yyval.s).Num = num; - ;} + } break; case 124: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1500 "Gmsh.y" { int num = (int)(yyvsp[(4) - (9)].d), type = 0; @@ -5785,46 +5807,46 @@ yyreduce: List_Delete((yyvsp[(7) - (9)].l)); (yyval.s).Type = type; (yyval.s).Num = num; - ;} + } break; case 125: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1539 "Gmsh.y" { myGmshSurface = 0; (yyval.s).Type = 0; (yyval.s).Num = 0; - ;} + } break; case 126: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1545 "Gmsh.y" { myGmshSurface = gmshSurface::getSurface((int)(yyvsp[(3) - (4)].d)); (yyval.s).Type = 0; (yyval.s).Num = 0; - ;} + } break; case 127: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1551 "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)); (yyval.s).Type = 0; (yyval.s).Num = num; - ;} + } break; case 128: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1558 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5849,12 +5871,12 @@ yyreduce: } (yyval.s).Type = 0; (yyval.s).Num = num; - ;} + } break; case 129: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1583 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5879,12 +5901,12 @@ yyreduce: } (yyval.s).Type = 0; (yyval.s).Num = num; - ;} + } break; case 130: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1608 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -5901,12 +5923,12 @@ yyreduce: Free((yyvsp[(2) - (8)].c)); (yyval.s).Type = MSH_SURF_LOOP; (yyval.s).Num = num; - ;} + } break; case 131: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1625 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -5923,12 +5945,12 @@ yyreduce: List_Delete((yyvsp[(7) - (8)].l)); (yyval.s).Type = MSH_SURF_COMPOUND; (yyval.s).Num = num; - ;} + } break; case 132: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1643 "Gmsh.y" { int num = (int)(yyvsp[(4) - (12)].d); @@ -5958,21 +5980,21 @@ yyreduce: Free((yyvsp[(8) - (12)].c)); (yyval.s).Type = MSH_SURF_COMPOUND; (yyval.s).Num = num; - ;} + } break; case 133: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1673 "Gmsh.y" { curPhysDim = 2; - ;} + } break; case 134: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1677 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); @@ -5988,12 +6010,12 @@ yyreduce: List_Delete((yyvsp[(8) - (9)].l)); (yyval.s).Type = MSH_PHYSICAL_SURFACE; (yyval.s).Num = num; - ;} + } break; case 135: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1697 "Gmsh.y" { yymsg(0, "'Complex Volume' command is deprecated: use 'Volume' instead"); @@ -6011,12 +6033,12 @@ yyreduce: List_Delete((yyvsp[(7) - (8)].l)); (yyval.s).Type = MSH_VOLUME; (yyval.s).Num = num; - ;} + } break; case 136: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1715 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -6033,12 +6055,12 @@ yyreduce: List_Delete((yyvsp[(6) - (7)].l)); (yyval.s).Type = MSH_VOLUME; (yyval.s).Num = num; - ;} + } break; case 137: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1732 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -6054,21 +6076,21 @@ yyreduce: List_Delete((yyvsp[(7) - (8)].l)); (yyval.s).Type = MSH_VOLUME_COMPOUND; (yyval.s).Num = num; - ;} + } break; case 138: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1748 "Gmsh.y" { curPhysDim = 3; - ;} + } break; case 139: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1752 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); @@ -6084,52 +6106,52 @@ yyreduce: List_Delete((yyvsp[(8) - (9)].l)); (yyval.s).Type = MSH_PHYSICAL_VOLUME; (yyval.s).Num = num; - ;} + } break; case 140: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1774 "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); - ;} + } break; case 141: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1779 "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); - ;} + } break; case 142: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1784 "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); - ;} + } break; case 143: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1789 "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); - ;} + } break; case 144: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1794 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); @@ -6152,23 +6174,23 @@ yyreduce: } Free((yyvsp[(1) - (4)].c)); List_Delete((yyvsp[(3) - (4)].l)); - ;} + } break; case 145: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1817 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); IntersectCurvesWithSurface((yyvsp[(4) - (9)].l), (int)(yyvsp[(8) - (9)].d), (yyval.l)); List_Delete((yyvsp[(4) - (9)].l)); - ;} + } break; case 146: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1823 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape*)); @@ -6176,44 +6198,44 @@ yyreduce: List_Delete((yyvsp[(7) - (9)].l)); SplitCurve((int)(yyvsp[(4) - (9)].d), tmp, (yyval.l)); List_Delete(tmp); - ;} + } break; case 147: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1833 "Gmsh.y" - { (yyval.l) = (yyvsp[(1) - (1)].l); ;} + { (yyval.l) = (yyvsp[(1) - (1)].l); } break; case 148: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1834 "Gmsh.y" - { (yyval.l) = (yyvsp[(1) - (1)].l); ;} + { (yyval.l) = (yyvsp[(1) - (1)].l); } break; case 149: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1839 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); - ;} + } break; case 150: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1843 "Gmsh.y" { List_Add((yyval.l), &(yyvsp[(2) - (2)].s)); - ;} + } break; case 151: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1847 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ @@ -6236,12 +6258,12 @@ yyreduce: yymsg(1, "Unknown point %d", TheShape.Num); } } - ;} + } break; case 152: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1870 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ @@ -6264,12 +6286,12 @@ yyreduce: yymsg(1, "Unknown curve %d", TheShape.Num); } } - ;} + } break; case 153: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1893 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ @@ -6292,12 +6314,12 @@ yyreduce: yymsg(1, "Unknown surface %d", TheShape.Num); } } - ;} + } break; case 154: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1916 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ @@ -6320,12 +6342,12 @@ yyreduce: yymsg(1, "Unknown volume %d", TheShape.Num); } } - ;} + } break; case 155: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1944 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6346,12 +6368,12 @@ yyreduce: else yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (8)].d)); #endif - ;} + } break; case 156: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1965 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6374,12 +6396,12 @@ yyreduce: Tree_Add(GModel::current()->getGEOInternals()->LevelSets, &l); } #endif - ;} + } break; case 157: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 1989 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6399,12 +6421,12 @@ yyreduce: else yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (14)].d)); #endif - ;} + } break; case 158: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2010 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6425,12 +6447,12 @@ yyreduce: else yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (16)].d)); #endif - ;} + } break; case 159: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2031 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6450,12 +6472,12 @@ yyreduce: else yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (12)].d)); #endif - ;} + } break; case 160: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2051 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6567,12 +6589,12 @@ yyreduce: yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (8)].d)); Free((yyvsp[(2) - (8)].c)); #endif - ;} + } break; case 161: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2163 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6591,12 +6613,12 @@ yyreduce: yymsg(0, "Wrong levelset definition"); Free((yyvsp[(2) - (8)].c)); Free((yyvsp[(7) - (8)].c)); #endif - ;} + } break; case 162: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2182 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6634,12 +6656,12 @@ yyreduce: yymsg(0, "Wrong levelset definition"); Free((yyvsp[(2) - (6)].c)); #endif - ;} + } break; case 163: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2221 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6742,12 +6764,12 @@ yyreduce: yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (14)].d)); Free((yyvsp[(2) - (14)].c)); #endif - ;} + } break; case 164: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2329 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ @@ -6756,23 +6778,23 @@ yyreduce: DeleteShape(TheShape.Type, TheShape.Num); } List_Delete((yyvsp[(3) - (4)].l)); - ;} + } break; case 165: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2338 "Gmsh.y" { #if defined(HAVE_MESH) GModel::current()->getFields()->deleteField((int)(yyvsp[(4) - (6)].d)); #endif - ;} + } break; case 166: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2344 "Gmsh.y" { #if defined(HAVE_POST) @@ -6787,12 +6809,12 @@ yyreduce: yymsg(0, "Unknown command 'Delete %s'", (yyvsp[(2) - (6)].c)); #endif Free((yyvsp[(2) - (6)].c)); - ;} + } break; case 167: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2359 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){ @@ -6820,12 +6842,12 @@ yyreduce: yymsg(0, "Unknown object or expression to delete '%s'", (yyvsp[(2) - (3)].c)); } Free((yyvsp[(2) - (3)].c)); - ;} + } break; case 168: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2387 "Gmsh.y" { #if defined(HAVE_POST) @@ -6837,12 +6859,12 @@ yyreduce: yymsg(0, "Unknown command 'Delete %s %s'", (yyvsp[(2) - (4)].c), (yyvsp[(3) - (4)].c)); #endif Free((yyvsp[(2) - (4)].c)); Free((yyvsp[(3) - (4)].c)); - ;} + } break; case 169: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2404 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ @@ -6851,34 +6873,34 @@ yyreduce: ColorShape(TheShape.Type, TheShape.Num, (yyvsp[(2) - (5)].u)); } List_Delete((yyvsp[(4) - (5)].l)); - ;} + } break; case 170: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2418 "Gmsh.y" { for(int i = 0; i < 4; i++) VisibilityShape((yyvsp[(2) - (3)].c), i, 1); Free((yyvsp[(2) - (3)].c)); - ;} + } break; case 171: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2424 "Gmsh.y" { for(int i = 0; i < 4; i++) VisibilityShape((yyvsp[(2) - (3)].c), i, 0); Free((yyvsp[(2) - (3)].c)); - ;} + } break; case 172: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2430 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ @@ -6887,12 +6909,12 @@ yyreduce: VisibilityShape(TheShape.Type, TheShape.Num, 1); } List_Delete((yyvsp[(3) - (4)].l)); - ;} + } break; case 173: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2439 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ @@ -6901,12 +6923,12 @@ yyreduce: VisibilityShape(TheShape.Type, TheShape.Num, 0); } List_Delete((yyvsp[(3) - (4)].l)); - ;} + } break; case 174: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2453 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Include")){ @@ -6949,12 +6971,12 @@ yyreduce: else yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (3)].c)); Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(2) - (3)].c)); - ;} + } break; case 175: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2496 "Gmsh.y" { #if defined(HAVE_POST) @@ -6971,12 +6993,12 @@ yyreduce: yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (7)].c)); #endif Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(2) - (7)].c)); Free((yyvsp[(6) - (7)].c)); - ;} + } break; case 176: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2513 "Gmsh.y" { #if defined(HAVE_POST) && defined(HAVE_MESH) @@ -6991,12 +7013,12 @@ yyreduce: yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (7)].c)); #endif Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(2) - (7)].c)); Free((yyvsp[(3) - (7)].c)); - ;} + } break; case 177: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2528 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){ @@ -7015,12 +7037,12 @@ yyreduce: else yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (3)].c)); Free((yyvsp[(1) - (3)].c)); - ;} + } break; case 178: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2547 "Gmsh.y" { #if defined(HAVE_PLUGINS) @@ -7032,12 +7054,12 @@ yyreduce: } #endif Free((yyvsp[(3) - (7)].c)); Free((yyvsp[(6) - (7)].c)); - ;} + } break; case 179: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2559 "Gmsh.y" { #if defined(HAVE_POST) @@ -7061,93 +7083,93 @@ yyreduce: yymsg(0, "Unknown 'Combine' command"); #endif Free((yyvsp[(2) - (3)].c)); - ;} + } break; case 180: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2583 "Gmsh.y" { exit(0); - ;} + } break; case 181: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2587 "Gmsh.y" { // FIXME: this is a hack to force a transfer from the old DB to // the new DB. This will become unnecessary if/when we fill the // GModel directly during parsing. GModel::current()->importGEOInternals(); - ;} + } break; case 182: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2594 "Gmsh.y" { CTX::instance()->forcedBBox = 0; GModel::current()->importGEOInternals(); SetBoundingBox(); - ;} + } break; case 183: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2600 "Gmsh.y" { CTX::instance()->forcedBBox = 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)); - ;} + } break; case 184: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2605 "Gmsh.y" { #if defined(HAVE_OPENGL) drawContext::global()->draw(); #endif - ;} + } break; case 185: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2611 "Gmsh.y" { GModel::current()->createTopologyFromMesh(); - ;} + } break; case 186: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2615 "Gmsh.y" { GModel::current()->createTopologyFromMesh(1); - ;} + } break; case 187: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2619 "Gmsh.y" { GModel::current()->importGEOInternals(); GModel::current()->refineMesh(CTX::instance()->mesh.secondOrderLinear); - ;} + } break; case 188: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2629 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d); @@ -7164,12 +7186,12 @@ yyreduce: yymsg(0, "Reached maximum number of imbricated loops"); ImbricatedLoop = MAX_RECUR_LOOPS - 1; } - ;} + } break; case 189: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2646 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d); @@ -7186,12 +7208,12 @@ yyreduce: yymsg(0, "Reached maximum number of imbricated loops"); ImbricatedLoop = MAX_RECUR_LOOPS - 1; } - ;} + } break; case 190: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2663 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d); @@ -7212,12 +7234,12 @@ yyreduce: yymsg(0, "Reached maximum number of imbricated loops"); ImbricatedLoop = MAX_RECUR_LOOPS - 1; } - ;} + } break; case 191: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2684 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d); @@ -7238,12 +7260,12 @@ yyreduce: yymsg(0, "Reached maximum number of imbricated loops"); ImbricatedLoop = MAX_RECUR_LOOPS - 1; } - ;} + } break; case 192: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2705 "Gmsh.y" { if(ImbricatedLoop <= 0){ @@ -7278,12 +7300,12 @@ yyreduce: else ImbricatedLoop--; } - ;} + } break; case 193: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2740 "Gmsh.y" { if(!FunctionManager::Instance()->createFunction @@ -7291,52 +7313,52 @@ yyreduce: yymsg(0, "Redefinition of function %s", (yyvsp[(2) - (2)].c)); skip_until(NULL, "Return"); //FIXME: wee leak $2 - ;} + } break; case 194: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2748 "Gmsh.y" { if(!FunctionManager::Instance()->leaveFunction (&gmsh_yyin, gmsh_yyname, gmsh_yylineno)) yymsg(0, "Error while exiting function"); - ;} + } break; case 195: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2754 "Gmsh.y" { if(!FunctionManager::Instance()->enterFunction ((yyvsp[(2) - (3)].c), &gmsh_yyin, gmsh_yyname, gmsh_yylineno)) yymsg(0, "Unknown function %s", (yyvsp[(2) - (3)].c)); //FIXME: wee leak $2 - ;} + } break; case 196: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2761 "Gmsh.y" { if(!(yyvsp[(3) - (4)].d)) skip_until("If", "EndIf"); - ;} + } break; case 197: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2765 "Gmsh.y" { - ;} + } break; case 198: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2774 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7344,12 +7366,12 @@ yyreduce: (yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], 0., 0., 0., 0., 0., 0., 0., NULL, (yyval.l)); List_Delete((yyvsp[(4) - (5)].l)); - ;} + } break; case 199: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2782 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7357,12 +7379,12 @@ yyreduce: 0., 0., 0., (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), NULL, (yyval.l)); List_Delete((yyvsp[(10) - (11)].l)); - ;} + } break; case 200: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2790 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7370,22 +7392,22 @@ yyreduce: (yyvsp[(3) - (13)].v)[0], (yyvsp[(3) - (13)].v)[1], (yyvsp[(3) - (13)].v)[2], (yyvsp[(5) - (13)].v)[0], (yyvsp[(5) - (13)].v)[1], (yyvsp[(5) - (13)].v)[2], (yyvsp[(7) - (13)].v)[0], (yyvsp[(7) - (13)].v)[1], (yyvsp[(7) - (13)].v)[2], (yyvsp[(9) - (13)].d), NULL, (yyval.l)); List_Delete((yyvsp[(12) - (13)].l)); - ;} + } break; case 201: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2798 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 202: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2803 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7393,22 +7415,22 @@ yyreduce: (yyvsp[(2) - (7)].v)[0], (yyvsp[(2) - (7)].v)[1], (yyvsp[(2) - (7)].v)[2], 0., 0., 0., 0., 0., 0., 0., &extr, (yyval.l)); List_Delete((yyvsp[(4) - (7)].l)); - ;} + } break; case 203: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2811 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 204: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2816 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7416,22 +7438,22 @@ yyreduce: 0., 0., 0., (yyvsp[(3) - (13)].v)[0], (yyvsp[(3) - (13)].v)[1], (yyvsp[(3) - (13)].v)[2], (yyvsp[(5) - (13)].v)[0], (yyvsp[(5) - (13)].v)[1], (yyvsp[(5) - (13)].v)[2], (yyvsp[(7) - (13)].d), &extr, (yyval.l)); List_Delete((yyvsp[(10) - (13)].l)); - ;} + } break; case 205: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2824 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 206: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2829 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7439,356 +7461,356 @@ yyreduce: (yyvsp[(3) - (15)].v)[0], (yyvsp[(3) - (15)].v)[1], (yyvsp[(3) - (15)].v)[2], (yyvsp[(5) - (15)].v)[0], (yyvsp[(5) - (15)].v)[1], (yyvsp[(5) - (15)].v)[2], (yyvsp[(7) - (15)].v)[0], (yyvsp[(7) - (15)].v)[1], (yyvsp[(7) - (15)].v)[2], (yyvsp[(9) - (15)].d), &extr, (yyval.l)); List_Delete((yyvsp[(12) - (15)].l)); - ;} + } break; case 207: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2837 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 208: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2842 "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., &extr, (yyval.l)); List_Delete((yyvsp[(3) - (6)].l)); - ;} + } break; case 209: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2850 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (8)].d), (yyvsp[(6) - (8)].v)[0], (yyvsp[(6) - (8)].v)[1], (yyvsp[(6) - (8)].v)[2], 0., 0., 0., 0., 0., 0., 0., NULL, (yyval.l)); - ;} + } break; case 210: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2857 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (8)].d), (yyvsp[(6) - (8)].v)[0], (yyvsp[(6) - (8)].v)[1], (yyvsp[(6) - (8)].v)[2], 0., 0., 0., 0., 0., 0., 0., NULL, (yyval.l)); - ;} + } break; case 211: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2864 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (8)].d), (yyvsp[(6) - (8)].v)[0], (yyvsp[(6) - (8)].v)[1], (yyvsp[(6) - (8)].v)[2], 0., 0., 0., 0., 0., 0., 0., NULL, (yyval.l)); - ;} + } break; case 212: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2871 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), 0., 0., 0., (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], (yyvsp[(8) - (12)].v)[0], (yyvsp[(8) - (12)].v)[1], (yyvsp[(8) - (12)].v)[2], (yyvsp[(10) - (12)].d), NULL, (yyval.l)); - ;} + } break; case 213: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2878 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), 0., 0., 0., (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], (yyvsp[(8) - (12)].v)[0], (yyvsp[(8) - (12)].v)[1], (yyvsp[(8) - (12)].v)[2], (yyvsp[(10) - (12)].d), NULL, (yyval.l)); - ;} + } break; case 214: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2885 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), 0., 0., 0., (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], (yyvsp[(8) - (12)].v)[0], (yyvsp[(8) - (12)].v)[1], (yyvsp[(8) - (12)].v)[2], (yyvsp[(10) - (12)].d), NULL, (yyval.l)); - ;} + } break; case 215: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2892 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (14)].d), (yyvsp[(6) - (14)].v)[0], (yyvsp[(6) - (14)].v)[1], (yyvsp[(6) - (14)].v)[2], (yyvsp[(8) - (14)].v)[0], (yyvsp[(8) - (14)].v)[1], (yyvsp[(8) - (14)].v)[2], (yyvsp[(10) - (14)].v)[0], (yyvsp[(10) - (14)].v)[1], (yyvsp[(10) - (14)].v)[2], (yyvsp[(12) - (14)].d), NULL, (yyval.l)); - ;} + } break; case 216: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2899 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (14)].d), (yyvsp[(6) - (14)].v)[0], (yyvsp[(6) - (14)].v)[1], (yyvsp[(6) - (14)].v)[2], (yyvsp[(8) - (14)].v)[0], (yyvsp[(8) - (14)].v)[1], (yyvsp[(8) - (14)].v)[2], (yyvsp[(10) - (14)].v)[0], (yyvsp[(10) - (14)].v)[1], (yyvsp[(10) - (14)].v)[2], (yyvsp[(12) - (14)].d), NULL, (yyval.l)); - ;} + } break; case 217: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2906 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (14)].d), (yyvsp[(6) - (14)].v)[0], (yyvsp[(6) - (14)].v)[1], (yyvsp[(6) - (14)].v)[2], (yyvsp[(8) - (14)].v)[0], (yyvsp[(8) - (14)].v)[1], (yyvsp[(8) - (14)].v)[2], (yyvsp[(10) - (14)].v)[0], (yyvsp[(10) - (14)].v)[1], (yyvsp[(10) - (14)].v)[2], (yyvsp[(12) - (14)].d), NULL, (yyval.l)); - ;} + } break; case 218: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2913 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 219: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2918 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], 0., 0., 0., 0., 0., 0., 0., &extr, (yyval.l)); - ;} + } break; case 220: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2925 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 221: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2930 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], 0., 0., 0., 0., 0., 0., 0., &extr, (yyval.l)); - ;} + } break; case 222: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2937 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 223: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2942 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], 0., 0., 0., 0., 0., 0., 0., &extr, (yyval.l)); - ;} + } break; case 224: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2949 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 225: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2954 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (16)].d), 0., 0., 0., (yyvsp[(6) - (16)].v)[0], (yyvsp[(6) - (16)].v)[1], (yyvsp[(6) - (16)].v)[2], (yyvsp[(8) - (16)].v)[0], (yyvsp[(8) - (16)].v)[1], (yyvsp[(8) - (16)].v)[2], (yyvsp[(10) - (16)].d), &extr, (yyval.l)); - ;} + } break; case 226: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2961 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 227: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2966 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (16)].d), 0., 0., 0., (yyvsp[(6) - (16)].v)[0], (yyvsp[(6) - (16)].v)[1], (yyvsp[(6) - (16)].v)[2], (yyvsp[(8) - (16)].v)[0], (yyvsp[(8) - (16)].v)[1], (yyvsp[(8) - (16)].v)[2], (yyvsp[(10) - (16)].d), &extr, (yyval.l)); - ;} + } break; case 228: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2973 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 229: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2978 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (16)].d), 0., 0., 0., (yyvsp[(6) - (16)].v)[0], (yyvsp[(6) - (16)].v)[1], (yyvsp[(6) - (16)].v)[2], (yyvsp[(8) - (16)].v)[0], (yyvsp[(8) - (16)].v)[1], (yyvsp[(8) - (16)].v)[2], (yyvsp[(10) - (16)].d), &extr, (yyval.l)); - ;} + } break; case 230: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2985 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 231: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2990 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (18)].d), (yyvsp[(6) - (18)].v)[0], (yyvsp[(6) - (18)].v)[1], (yyvsp[(6) - (18)].v)[2], (yyvsp[(8) - (18)].v)[0], (yyvsp[(8) - (18)].v)[1], (yyvsp[(8) - (18)].v)[2], (yyvsp[(10) - (18)].v)[0], (yyvsp[(10) - (18)].v)[1], (yyvsp[(10) - (18)].v)[2], (yyvsp[(12) - (18)].d), &extr, (yyval.l)); - ;} + } break; case 232: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 2997 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 233: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3002 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (18)].d), (yyvsp[(6) - (18)].v)[0], (yyvsp[(6) - (18)].v)[1], (yyvsp[(6) - (18)].v)[2], (yyvsp[(8) - (18)].v)[0], (yyvsp[(8) - (18)].v)[1], (yyvsp[(8) - (18)].v)[2], (yyvsp[(10) - (18)].v)[0], (yyvsp[(10) - (18)].v)[1], (yyvsp[(10) - (18)].v)[2], (yyvsp[(12) - (18)].d), &extr, (yyval.l)); - ;} + } break; case 234: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3009 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - ;} + } break; case 235: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3014 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (18)].d), (yyvsp[(6) - (18)].v)[0], (yyvsp[(6) - (18)].v)[1], (yyvsp[(6) - (18)].v)[2], (yyvsp[(8) - (18)].v)[0], (yyvsp[(8) - (18)].v)[1], (yyvsp[(8) - (18)].v)[2], (yyvsp[(10) - (18)].v)[0], (yyvsp[(10) - (18)].v)[1], (yyvsp[(10) - (18)].v)[2], (yyvsp[(12) - (18)].d), &extr, (yyval.l)); - ;} + } break; case 236: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3025 "Gmsh.y" { - ;} + } break; case 237: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3028 "Gmsh.y" { - ;} + } break; case 238: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3034 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; @@ -7797,12 +7819,12 @@ yyreduce: extr.mesh.hLayer.clear(); extr.mesh.NbElmLayer.push_back((int)fabs((yyvsp[(3) - (5)].d))); extr.mesh.hLayer.push_back(1.); - ;} + } break; case 239: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3043 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; @@ -7822,12 +7844,12 @@ yyreduce: yymsg(0, "Wrong layer definition {%d, %d}", List_Nbr((yyvsp[(3) - (7)].l)), List_Nbr((yyvsp[(5) - (7)].l))); List_Delete((yyvsp[(3) - (7)].l)); List_Delete((yyvsp[(5) - (7)].l)); - ;} + } break; case 240: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3063 "Gmsh.y" { yymsg(0, "Explicit region numbers in layers are deprecated"); @@ -7850,57 +7872,57 @@ yyreduce: List_Delete((yyvsp[(3) - (9)].l)); List_Delete((yyvsp[(5) - (9)].l)); List_Delete((yyvsp[(7) - (9)].l)); - ;} + } break; case 241: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3086 "Gmsh.y" { extr.mesh.Recombine = true; - ;} + } break; case 242: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3090 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_DBL_1; - ;} + } break; case 243: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3094 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_DBL_1_RECOMB; - ;} + } break; case 244: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3098 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_SNGL_1; - ;} + } break; case 245: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3102 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_SNGL_1_RECOMB; - ;} + } break; case 246: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3106 "Gmsh.y" { int num = (int)(yyvsp[(3) - (9)].d); @@ -7919,12 +7941,12 @@ yyreduce: } } List_Delete((yyvsp[(6) - (9)].l)); - ;} + } break; case 247: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3125 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (6)].c), "Index")) @@ -7932,21 +7954,21 @@ yyreduce: else if(!strcmp((yyvsp[(2) - (6)].c), "View")) extr.mesh.ViewIndex = (yyvsp[(4) - (6)].d); Free((yyvsp[(2) - (6)].c)); - ;} + } break; case 248: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3137 "Gmsh.y" { (yyval.v)[0] = (yyval.v)[1] = 1.; - ;} + } break; case 249: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3141 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Progression") || !strcmp((yyvsp[(2) - (3)].c), "Power")) @@ -7959,21 +7981,21 @@ yyreduce: } (yyval.v)[1] = (yyvsp[(3) - (3)].d); Free((yyvsp[(2) - (3)].c)); - ;} + } break; case 250: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3156 "Gmsh.y" { (yyval.i) = -1; // left - ;} + } break; case 251: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3160 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "Right")) @@ -7983,48 +8005,48 @@ yyreduce: else // alternated (yyval.i) = 0; Free((yyvsp[(1) - (1)].c)); - ;} + } break; case 252: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3172 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(double)); - ;} + } break; case 253: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3176 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); - ;} + } break; case 254: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3181 "Gmsh.y" { (yyval.i) = 45; - ;} + } break; case 255: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3185 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(2) - (2)].d); - ;} + } break; case 256: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3192 "Gmsh.y" { int type = (int)(yyvsp[(6) - (7)].v)[0]; @@ -8080,12 +8102,12 @@ yyreduce: } List_Delete((yyvsp[(3) - (7)].l)); } - ;} + } break; case 257: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3248 "Gmsh.y" { int k = List_Nbr((yyvsp[(4) - (6)].l)); @@ -8155,22 +8177,22 @@ yyreduce: } } List_Delete((yyvsp[(4) - (6)].l)); - ;} + } break; case 258: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3318 "Gmsh.y" { yymsg(1, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)"); List_Delete((yyvsp[(7) - (8)].l)); - ;} + } break; case 259: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3323 "Gmsh.y" { int k = List_Nbr((yyvsp[(4) - (5)].l)); @@ -8237,12 +8259,12 @@ yyreduce: } } List_Delete((yyvsp[(4) - (5)].l)); - ;} + } break; case 260: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3390 "Gmsh.y" { if(!(yyvsp[(2) - (3)].l)){ @@ -8278,12 +8300,12 @@ yyreduce: } List_Delete((yyvsp[(2) - (3)].l)); } - ;} + } break; case 261: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3426 "Gmsh.y" { if(!(yyvsp[(3) - (5)].l)){ @@ -8326,12 +8348,12 @@ yyreduce: } List_Delete((yyvsp[(3) - (5)].l)); } - ;} + } break; case 262: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3469 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ @@ -8351,12 +8373,12 @@ yyreduce: } } List_Delete((yyvsp[(3) - (6)].l)); - ;} + } break; case 263: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3494 "Gmsh.y" { if(List_Nbr((yyvsp[(5) - (6)].l)) != List_Nbr((yyvsp[(3) - (6)].l))){ @@ -8383,12 +8405,12 @@ yyreduce: } List_Delete((yyvsp[(3) - (6)].l)); List_Delete((yyvsp[(5) - (6)].l)); - ;} + } break; case 264: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3522 "Gmsh.y" { if (List_Nbr((yyvsp[(5) - (12)].l)) != List_Nbr((yyvsp[(10) - (12)].l))){ @@ -8424,12 +8446,12 @@ yyreduce: } List_Delete((yyvsp[(5) - (12)].l)); List_Delete((yyvsp[(10) - (12)].l)); - ;} + } break; case 265: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3565 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); @@ -8452,12 +8474,12 @@ yyreduce: else yymsg(0, "Unknown surface %d", (int)(yyvsp[(8) - (10)].d)); } - ;} + } break; case 266: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3588 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); @@ -8480,37 +8502,37 @@ yyreduce: else yymsg(0, "Unknown surface %d", (int)(yyvsp[(8) - (10)].d)); } - ;} + } break; case 267: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3611 "Gmsh.y" { - ;} + } break; case 268: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3614 "Gmsh.y" { - ;} + } break; case 269: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3623 "Gmsh.y" { ReplaceAllDuplicates(); - ;} + } break; case 270: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3627 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Geometry")) @@ -8520,12 +8542,12 @@ yyreduce: else yymsg(0, "Unknown coherence command"); Free((yyvsp[(2) - (3)].c)); - ;} + } break; case 271: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3637 "Gmsh.y" { if(List_Nbr((yyvsp[(4) - (6)].l)) >= 2){ @@ -8555,36 +8577,36 @@ yyreduce: yymsg(0, "Need at least two points to merge"); ReplaceAllDuplicates(); List_Delete((yyvsp[(4) - (6)].l)); - ;} + } break; case 272: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3671 "Gmsh.y" - { (yyval.c) = (char*)"Homology"; ;} + { (yyval.c) = (char*)"Homology"; } break; case 273: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3672 "Gmsh.y" - { (yyval.c) = (char*)"Cohomology"; ;} + { (yyval.c) = (char*)"Cohomology"; } break; case 274: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3677 "Gmsh.y" { std::vector<int> domain, subdomain; GModel::current()->addHomologyRequest((yyvsp[(1) - (2)].c), domain, subdomain); - ;} + } break; case 275: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3682 "Gmsh.y" { std::vector<int> domain, subdomain; @@ -8595,12 +8617,12 @@ yyreduce: } GModel::current()->addHomologyRequest((yyvsp[(1) - (5)].c), domain, subdomain); List_Delete((yyvsp[(3) - (5)].l)); - ;} + } break; case 276: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3693 "Gmsh.y" { std::vector<int> domain, subdomain; @@ -8617,500 +8639,500 @@ yyreduce: GModel::current()->addHomologyRequest((yyvsp[(1) - (7)].c), domain, subdomain); List_Delete((yyvsp[(3) - (7)].l)); List_Delete((yyvsp[(5) - (7)].l)); - ;} + } break; case 277: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3714 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (1)].d); ;} + { (yyval.d) = (yyvsp[(1) - (1)].d); } break; case 278: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3715 "Gmsh.y" - { (yyval.d) = (yyvsp[(2) - (3)].d); ;} + { (yyval.d) = (yyvsp[(2) - (3)].d); } break; case 279: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3716 "Gmsh.y" - { (yyval.d) = -(yyvsp[(2) - (2)].d); ;} + { (yyval.d) = -(yyvsp[(2) - (2)].d); } break; case 280: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3717 "Gmsh.y" - { (yyval.d) = (yyvsp[(2) - (2)].d); ;} + { (yyval.d) = (yyvsp[(2) - (2)].d); } break; case 281: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3718 "Gmsh.y" - { (yyval.d) = !(yyvsp[(2) - (2)].d); ;} + { (yyval.d) = !(yyvsp[(2) - (2)].d); } break; case 282: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3719 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d); ;} + { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d); } break; case 283: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3720 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d); ;} + { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d); } break; case 284: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3721 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d); ;} + { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d); } break; case 285: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3723 "Gmsh.y" { if(!(yyvsp[(3) - (3)].d)) yymsg(0, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); else (yyval.d) = (yyvsp[(1) - (3)].d) / (yyvsp[(3) - (3)].d); - ;} + } break; case 286: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3729 "Gmsh.y" - { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d); ;} + { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d); } break; case 287: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3730 "Gmsh.y" - { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); ;} + { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); } break; case 288: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3731 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d); ;} + { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d); } break; case 289: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3732 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d); ;} + { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d); } break; case 290: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3733 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d); ;} + { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d); } break; case 291: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3734 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d); ;} + { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d); } break; case 292: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3735 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d); ;} + { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d); } break; case 293: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3736 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d); ;} + { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d); } break; case 294: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3737 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d); ;} + { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d); } break; case 295: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3738 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d); ;} + { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d); } break; case 296: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3739 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); ;} + { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); } break; case 297: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3740 "Gmsh.y" - { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = exp((yyvsp[(3) - (4)].d)); } break; case 298: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3741 "Gmsh.y" - { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = log((yyvsp[(3) - (4)].d)); } break; case 299: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3742 "Gmsh.y" - { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = log10((yyvsp[(3) - (4)].d)); } break; case 300: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3743 "Gmsh.y" - { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); } break; case 301: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3744 "Gmsh.y" - { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = sin((yyvsp[(3) - (4)].d)); } break; case 302: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3745 "Gmsh.y" - { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = asin((yyvsp[(3) - (4)].d)); } break; case 303: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3746 "Gmsh.y" - { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = cos((yyvsp[(3) - (4)].d)); } break; case 304: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3747 "Gmsh.y" - { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = acos((yyvsp[(3) - (4)].d)); } break; case 305: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3748 "Gmsh.y" - { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = tan((yyvsp[(3) - (4)].d)); } break; case 306: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3749 "Gmsh.y" - { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = atan((yyvsp[(3) - (4)].d)); } break; case 307: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3750 "Gmsh.y" - { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} + { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));} break; case 308: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3751 "Gmsh.y" - { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); } break; case 309: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3752 "Gmsh.y" - { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); } break; case 310: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3753 "Gmsh.y" - { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); } break; case 311: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3754 "Gmsh.y" - { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); } break; case 312: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3755 "Gmsh.y" - { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = floor((yyvsp[(3) - (4)].d)); } break; case 313: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3756 "Gmsh.y" - { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); } break; case 314: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3757 "Gmsh.y" - { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} + { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); } break; case 315: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3758 "Gmsh.y" - { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} + { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); } break; case 316: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3759 "Gmsh.y" - { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;} + { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); } break; case 317: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3760 "Gmsh.y" - { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;} + { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; } break; case 318: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3762 "Gmsh.y" - { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = exp((yyvsp[(3) - (4)].d)); } break; case 319: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3763 "Gmsh.y" - { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = log((yyvsp[(3) - (4)].d)); } break; case 320: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3764 "Gmsh.y" - { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = log10((yyvsp[(3) - (4)].d)); } break; case 321: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3765 "Gmsh.y" - { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); } break; case 322: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3766 "Gmsh.y" - { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = sin((yyvsp[(3) - (4)].d)); } break; case 323: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3767 "Gmsh.y" - { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = asin((yyvsp[(3) - (4)].d)); } break; case 324: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3768 "Gmsh.y" - { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = cos((yyvsp[(3) - (4)].d)); } break; case 325: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3769 "Gmsh.y" - { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = acos((yyvsp[(3) - (4)].d)); } break; case 326: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3770 "Gmsh.y" - { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = tan((yyvsp[(3) - (4)].d)); } break; case 327: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3771 "Gmsh.y" - { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = atan((yyvsp[(3) - (4)].d)); } break; case 328: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3772 "Gmsh.y" - { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} + { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));} break; case 329: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3773 "Gmsh.y" - { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); } break; case 330: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3774 "Gmsh.y" - { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); } break; case 331: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3775 "Gmsh.y" - { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); } break; case 332: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3776 "Gmsh.y" - { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); } break; case 333: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3777 "Gmsh.y" - { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = floor((yyvsp[(3) - (4)].d)); } break; case 334: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3778 "Gmsh.y" - { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} + { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); } break; case 335: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3779 "Gmsh.y" - { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} + { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); } break; case 336: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3780 "Gmsh.y" - { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} + { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); } break; case 337: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3781 "Gmsh.y" - { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;} + { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); } break; case 338: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3782 "Gmsh.y" - { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;} + { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; } break; case 339: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3791 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (1)].d); ;} + { (yyval.d) = (yyvsp[(1) - (1)].d); } break; case 340: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3792 "Gmsh.y" - { (yyval.d) = 3.141592653589793; ;} + { (yyval.d) = 3.141592653589793; } break; case 341: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3793 "Gmsh.y" - { (yyval.d) = Msg::GetCommRank(); ;} + { (yyval.d) = Msg::GetCommRank(); } break; case 342: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3794 "Gmsh.y" - { (yyval.d) = Msg::GetCommSize(); ;} + { (yyval.d) = Msg::GetCommSize(); } break; case 343: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3795 "Gmsh.y" - { (yyval.d) = GetGmshMajorVersion(); ;} + { (yyval.d) = GetGmshMajorVersion(); } break; case 344: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3796 "Gmsh.y" - { (yyval.d) = GetGmshMinorVersion(); ;} + { (yyval.d) = GetGmshMinorVersion(); } break; case 345: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3797 "Gmsh.y" - { (yyval.d) = GetGmshPatchVersion(); ;} + { (yyval.d) = GetGmshPatchVersion(); } break; case 346: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3802 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (1)].c))){ @@ -9127,12 +9149,12 @@ yyreduce: (yyval.d) = s.value[0]; } Free((yyvsp[(1) - (1)].c)); - ;} + } break; case 347: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3822 "Gmsh.y" { char tmpstring[1024]; @@ -9151,12 +9173,12 @@ yyreduce: (yyval.d) = s.value[0]; } Free((yyvsp[(1) - (5)].c)); - ;} + } break; case 348: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3841 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); @@ -9174,12 +9196,12 @@ yyreduce: (yyval.d) = s.value[index]; } Free((yyvsp[(1) - (4)].c)); - ;} + } break; case 349: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3859 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(2) - (4)].c))){ @@ -9191,12 +9213,12 @@ yyreduce: (yyval.d) = s.value.size(); } Free((yyvsp[(2) - (4)].c)); - ;} + } break; case 350: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3871 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (2)].c))){ @@ -9213,12 +9235,12 @@ yyreduce: (yyval.d) = (s.value[0] += (yyvsp[(2) - (2)].i)); } Free((yyvsp[(1) - (2)].c)); - ;} + } break; case 351: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3888 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); @@ -9236,32 +9258,32 @@ yyreduce: (yyval.d) = (s.value[index] += (yyvsp[(5) - (5)].i)); } Free((yyvsp[(1) - (5)].c)); - ;} + } break; case 352: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3909 "Gmsh.y" { NumberOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), (yyval.d)); Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(3) - (3)].c)); - ;} + } break; case 353: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3914 "Gmsh.y" { NumberOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), (yyval.d)); Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c)); - ;} + } break; case 354: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3919 "Gmsh.y" { double d = 0.; @@ -9271,12 +9293,12 @@ yyreduce: (yyval.d) = d; } Free((yyvsp[(1) - (4)].c)); Free((yyvsp[(3) - (4)].c)); - ;} + } break; case 355: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3929 "Gmsh.y" { double d = 0.; @@ -9286,160 +9308,160 @@ yyreduce: (yyval.d) = d; } Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(6) - (7)].c)); - ;} + } break; case 356: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3939 "Gmsh.y" { (yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d)); Free((yyvsp[(3) - (6)].c)); - ;} + } break; case 357: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3947 "Gmsh.y" { memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double)); - ;} + } break; case 358: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3951 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i]; - ;} + } break; case 359: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3955 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i]; - ;} + } break; case 360: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3959 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i]; - ;} + } break; case 361: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3963 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i]; - ;} + } break; case 362: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3970 "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 363: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3974 "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 364: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3978 "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 365: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3982 "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 366: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3989 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(List_T*)); List_Add((yyval.l), &((yyvsp[(1) - (1)].l))); - ;} + } break; case 367: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 3994 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].l))); - ;} + } break; case 368: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4001 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); - ;} + } break; case 369: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4006 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); - ;} + } break; case 370: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4010 "Gmsh.y" { // creates an empty list (yyval.l) = List_Create(2, 1, sizeof(double)); - ;} + } break; case 371: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4015 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); - ;} + } break; case 372: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4019 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); @@ -9447,12 +9469,12 @@ yyreduce: double *pd = (double*)List_Pointer((yyval.l), i); (*pd) = - (*pd); } - ;} + } break; case 373: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4027 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (5)].l); @@ -9460,21 +9482,21 @@ yyreduce: double *pd = (double*)List_Pointer((yyval.l), i); (*pd) *= (yyvsp[(1) - (5)].d); } - ;} + } break; case 374: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4038 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); - ;} + } break; case 375: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4042 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all")) @@ -9483,12 +9505,12 @@ yyreduce: yyerror("Unknown special string for list replacement"); (yyval.l) = List_Create(2, 1, sizeof(double)); } - ;} + } break; case 376: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4054 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); @@ -9496,12 +9518,12 @@ yyreduce: double *pd = (double*)List_Pointer((yyval.l), i); (*pd) = - (*pd); } - ;} + } break; case 377: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4062 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (3)].l); @@ -9509,24 +9531,24 @@ yyreduce: double *pd = (double*)List_Pointer((yyval.l), i); (*pd) *= (yyvsp[(1) - (3)].d); } - ;} + } break; case 378: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4070 "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.)) List_Add((yyval.l), &d); - ;} + } break; case 379: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4077 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -9537,12 +9559,12 @@ yyreduce: else for(double d = (yyvsp[(1) - (5)].d); ((yyvsp[(5) - (5)].d) > 0) ? (d <= (yyvsp[(3) - (5)].d)) : (d >= (yyvsp[(3) - (5)].d)); d += (yyvsp[(5) - (5)].d)) List_Add((yyval.l), &d); - ;} + } break; case 380: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4088 "Gmsh.y" { // Returns the coordinates of a point and fills a list with it. @@ -9562,48 +9584,48 @@ yyreduce: List_Add((yyval.l), &v->Pos.Y); List_Add((yyval.l), &v->Pos.Z); } - ;} + } break; case 381: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4108 "Gmsh.y" { (yyval.l) = GetAllEntityNumbers(0); - ;} + } break; case 382: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4112 "Gmsh.y" { (yyval.l) = GetAllEntityNumbers(1); - ;} + } break; case 383: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4116 "Gmsh.y" { (yyval.l) = GetAllEntityNumbers(2); - ;} + } break; case 384: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4120 "Gmsh.y" { (yyval.l) = GetAllEntityNumbers(3); - ;} + } break; case 385: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4124 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); @@ -9613,12 +9635,12 @@ yyreduce: List_Add((yyval.l), &d); } List_Delete((yyvsp[(1) - (1)].l)); - ;} + } break; case 386: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4134 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); @@ -9628,12 +9650,12 @@ yyreduce: List_Add((yyval.l), &d); } List_Delete((yyvsp[(1) - (1)].l)); - ;} + } break; case 387: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4144 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -9645,12 +9667,12 @@ yyreduce: List_Add((yyval.l), &s.value[i]); } Free((yyvsp[(1) - (3)].c)); - ;} + } break; case 388: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4156 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -9662,12 +9684,12 @@ yyreduce: List_Add((yyval.l), &s.value[i]); } Free((yyvsp[(3) - (4)].c)); - ;} + } break; case 389: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4168 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -9685,40 +9707,40 @@ yyreduce: } Free((yyvsp[(1) - (6)].c)); List_Delete((yyvsp[(4) - (6)].l)); - ;} + } break; case 390: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4189 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); - ;} + } break; case 391: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4194 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); - ;} + } break; case 392: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4198 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].d))); - ;} + } break; case 393: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4202 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){ @@ -9727,63 +9749,63 @@ yyreduce: List_Add((yyval.l), &d); } List_Delete((yyvsp[(3) - (3)].l)); - ;} + } break; case 394: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4214 "Gmsh.y" { (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d)); - ;} + } break; case 395: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4218 "Gmsh.y" { (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255); - ;} + } break; case 396: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4230 "Gmsh.y" { int flag; (yyval.u) = GetColorForString(ColorString, -1, (yyvsp[(1) - (1)].c), &flag); if(flag) yymsg(0, "Unknown color '%s'", (yyvsp[(1) - (1)].c)); Free((yyvsp[(1) - (1)].c)); - ;} + } break; case 397: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4237 "Gmsh.y" { unsigned int val = 0; ColorOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(5) - (5)].c), val); (yyval.u) = val; Free((yyvsp[(1) - (5)].c)); Free((yyvsp[(5) - (5)].c)); - ;} + } break; case 398: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4247 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); - ;} + } break; case 399: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4251 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); @@ -9795,40 +9817,40 @@ yyreduce: List_Add((yyval.l), &ct->table[i]); } Free((yyvsp[(1) - (6)].c)); - ;} + } break; case 400: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4266 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); List_Add((yyval.l), &((yyvsp[(1) - (1)].u))); - ;} + } break; case 401: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4271 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].u))); - ;} + } break; case 402: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4278 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); - ;} + } break; case 403: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4282 "Gmsh.y" { if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){ @@ -9841,12 +9863,12 @@ yyreduce: strcpy((yyval.c), val.c_str()); Free((yyvsp[(1) - (1)].c)); } - ;} + } break; case 404: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4295 "Gmsh.y" { std::string out; @@ -9854,12 +9876,12 @@ yyreduce: (yyval.c) = (char*)Malloc((out.size() + 1) * sizeof(char)); strcpy((yyval.c), out.c_str()); Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(3) - (3)].c)); - ;} + } break; case 405: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4303 "Gmsh.y" { std::string out; @@ -9867,21 +9889,21 @@ yyreduce: (yyval.c) = (char*)Malloc((out.size() + 1) * sizeof(char)); strcpy((yyval.c), out.c_str()); Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c)); - ;} + } break; case 406: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4314 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); - ;} + } break; case 407: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4318 "Gmsh.y" { (yyval.c) = (char *)Malloc(32 * sizeof(char)); @@ -9889,12 +9911,12 @@ yyreduce: time(&now); strcpy((yyval.c), ctime(&now)); (yyval.c)[strlen((yyval.c)) - 1] = '\0'; - ;} + } break; case 408: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4326 "Gmsh.y" { const char *env = GetEnvironmentVar((yyvsp[(3) - (4)].c)); @@ -9902,12 +9924,12 @@ yyreduce: (yyval.c) = (char *)Malloc((sizeof(env) + 1) * sizeof(char)); strcpy((yyval.c), env); Free((yyvsp[(3) - (4)].c)); - ;} + } break; case 409: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4334 "Gmsh.y" { std::string s = Msg::GetString((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c)); @@ -9915,12 +9937,12 @@ yyreduce: strcpy((yyval.c), s.c_str()); Free((yyvsp[(3) - (6)].c)); Free((yyvsp[(5) - (6)].c)); - ;} + } break; case 410: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4342 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (6)].c)) + strlen((yyvsp[(5) - (6)].c)) + 1) * sizeof(char)); @@ -9928,12 +9950,12 @@ yyreduce: strcat((yyval.c), (yyvsp[(5) - (6)].c)); Free((yyvsp[(3) - (6)].c)); Free((yyvsp[(5) - (6)].c)); - ;} + } break; case 411: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4350 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); @@ -9947,12 +9969,12 @@ yyreduce: } if(i <= 0) strcpy((yyval.c), (yyvsp[(3) - (4)].c)); Free((yyvsp[(3) - (4)].c)); - ;} + } break; case 412: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4364 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); @@ -9966,21 +9988,21 @@ yyreduce: else strcpy((yyval.c), &(yyvsp[(3) - (4)].c)[i+1]); Free((yyvsp[(3) - (4)].c)); - ;} + } break; case 413: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4378 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); - ;} + } break; case 414: -/* Line 1464 of yacc.c */ +/* Line 1806 of yacc.c */ #line 4382 "Gmsh.y" { char tmpstring[1024]; @@ -9999,15 +10021,26 @@ yyreduce: Free((yyvsp[(3) - (6)].c)); } List_Delete((yyvsp[(5) - (6)].l)); - ;} + } break; -/* Line 1464 of yacc.c */ -#line 10009 "Gmsh.tab.cpp" +/* Line 1806 of yacc.c */ +#line 10031 "Gmsh.tab.cpp" default: break; } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -10035,6 +10068,10 @@ yyreduce: | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -10042,37 +10079,36 @@ yyerrlab: #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; } +# undef YYSYNTAX_ERROR #endif } @@ -10131,7 +10167,7 @@ yyerrlab1: for (;;) { yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) + if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) @@ -10190,8 +10226,13 @@ yyexhaustedlab: yyreturn: if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -10216,7 +10257,7 @@ yyreturn: -/* Line 1684 of yacc.c */ +/* Line 2067 of yacc.c */ #line 4402 "Gmsh.y" diff --git a/Parser/Gmsh.tab.hpp b/Parser/Gmsh.tab.hpp index 74b36e603bcef7a57059b2d4f50b08146d20e118..dceee60cb62d56ddb3b9e946afb69fb7bde87ba6 100644 --- a/Parser/Gmsh.tab.hpp +++ b/Parser/Gmsh.tab.hpp @@ -1,9 +1,8 @@ -/* A Bison parser, made by GNU Bison 2.4.3. */ +/* A Bison parser, made by GNU Bison 2.5. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -182,7 +181,7 @@ typedef union YYSTYPE { -/* Line 1685 of yacc.c */ +/* Line 2068 of yacc.c */ #line 87 "Gmsh.y" char *c; @@ -195,8 +194,8 @@ typedef union YYSTYPE -/* Line 1685 of yacc.c */ -#line 200 "Gmsh.tab.hpp" +/* Line 2068 of yacc.c */ +#line 199 "Gmsh.tab.hpp" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index 60a56d20f91a0f2631e5a0f0e2c9dd1ed324fc4c..4d4fdfb42a2f893e65af6b2ec848e4e389505a18 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -931,9 +931,9 @@ Affectation : { #if defined(HAVE_MESH) if(!strcmp($1,"Background")) - GModel::current()->getFields()->background_field = (int)$4; + GModel::current()->getFields()->setBackgroundFieldId((int)$4); else if(!strcmp($1,"BoundaryLayer")) - GModel::current()->getFields()->boundaryLayer_field = (int)$4; + GModel::current()->getFields()->setBoundaryLayerFieldId((int)$4); else yymsg(0, "Unknown command %s Field", $1); #endif diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp index e7cc92b77dbe299aff2d692321a8f444b54417c2..9763f8a6da00bb3a243dc7eeb1ec439127e557f7 100644 --- a/Parser/Gmsh.yy.cpp +++ b/Parser/Gmsh.yy.cpp @@ -172,12 +172,7 @@ typedef unsigned int flex_uint32_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -extern yy_size_t gmsh_yyleng; +extern int gmsh_yyleng; extern FILE *gmsh_yyin, *gmsh_yyout; @@ -203,6 +198,11 @@ extern FILE *gmsh_yyin, *gmsh_yyout; #define unput(c) yyunput( c, (yytext_ptr) ) +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -220,7 +220,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -290,8 +290,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* yy_hold_char holds the character lost when gmsh_yytext is formed. */ static char yy_hold_char; -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t gmsh_yyleng; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int gmsh_yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; @@ -319,7 +319,7 @@ static void gmsh_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); YY_BUFFER_STATE gmsh_yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE gmsh_yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE gmsh_yy_scan_bytes (yyconst char *bytes,yy_size_t len ); +YY_BUFFER_STATE gmsh_yy_scan_bytes (yyconst char *bytes,int len ); void *gmsh_yyalloc (yy_size_t ); void *gmsh_yyrealloc (void *,yy_size_t ); @@ -984,7 +984,7 @@ FILE *gmsh_yyget_out (void ); void gmsh_yyset_out (FILE * out_str ); -yy_size_t gmsh_yyget_leng (void ); +int gmsh_yyget_leng (void ); char *gmsh_yyget_text (void ); @@ -1045,7 +1045,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - yy_size_t n; \ + int n; \ for ( n = 0; n < max_size && \ (c = getc( gmsh_yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -2181,7 +2181,7 @@ static int yy_get_next_buffer (void) else { - yy_size_t num_to_read = + int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -2195,7 +2195,7 @@ static int yy_get_next_buffer (void) if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; + int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -2226,7 +2226,7 @@ static int yy_get_next_buffer (void) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); + (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -2336,7 +2336,7 @@ static int yy_get_next_buffer (void) if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register yy_size_t number_to_move = (yy_n_chars) + 2; + register int number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = @@ -2385,7 +2385,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -2409,7 +2409,7 @@ static int yy_get_next_buffer (void) case EOB_ACT_END_OF_FILE: { if ( gmsh_yywrap( ) ) - return 0; + return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -2661,7 +2661,7 @@ void gmsh_yypop_buffer_state (void) */ static void gmsh_yyensure_buffer_stack (void) { - yy_size_t num_to_alloc; + int num_to_alloc; if (!(yy_buffer_stack)) { @@ -2758,11 +2758,12 @@ YY_BUFFER_STATE gmsh_yy_scan_string (yyconst char * yystr ) * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE gmsh_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +YY_BUFFER_STATE gmsh_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; - yy_size_t n, i; + yy_size_t n; + int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; @@ -2844,7 +2845,7 @@ FILE *gmsh_yyget_out (void) /** Get the length of the current token. * */ -yy_size_t gmsh_yyget_leng (void) +int gmsh_yyget_leng (void) { return gmsh_yyleng; } diff --git a/gmshpy/gmshMesh.i b/gmshpy/gmshMesh.i index cbe71480cfb645b0a2e0fc496d67ab5e82763e52..c48c77ac35b5c85ece9d214addd1dc597cd049a8 100644 --- a/gmshpy/gmshMesh.i +++ b/gmshpy/gmshMesh.i @@ -13,6 +13,7 @@ #include "Levy3D.h" #include "meshPartition.h" #include "meshMetric.h" + #include "Field.h" #include "CenterlineField.h" %} @@ -30,4 +31,5 @@ namespace std { %include "Levy3D.h" %include "meshPartition.h" %include "meshMetric.h" +%include "Field.h" %include "CenterlineField.h"