diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index 2d5a1ca396b80b48e2db68ca9772fd67da51c912..f158d5f4bcc9d8d1f003797ccbc35c140026a8c0 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -2774,10 +2774,10 @@ void GModel::computeHomology() // restore cell complex to non-reduced state if we are reusing it if(itt != itp.first) cellcomplex->restoreComplex(); std::string type = itt->second; - if(type == "Generators") - homology->findGenerators(cellcomplex); - else if(type == "DualGenerators" || type == "Cuts") - homology->findDualGenerators(cellcomplex); + if(type == "Homology") + homology->findHomologyBasis(cellcomplex); + else if(type == "Cohomology") + homology->findCohomologyBasis(cellcomplex); else Msg::Error("Unknown type of homology computation: %s", type.c_str()); } diff --git a/Geo/Homology.cpp b/Geo/Homology.cpp index ff87c781abaa21bb85a7d03a385a877f52e1e289..d635a22e3b6ba06f97a313dd52db547d8e047113 100644 --- a/Geo/Homology.cpp +++ b/Geo/Homology.cpp @@ -14,6 +14,14 @@ #if defined(HAVE_KBIPACK) +template <class TTypeA, class TTypeB> + bool convert(const TTypeA& input, TTypeB& output ){ + std::stringstream stream; + stream << input; + stream >> output; + return stream.good(); +} + Homology::Homology(GModel* model, std::vector<int> physicalDomain, std::vector<int> physicalSubdomain, bool save0N, bool saveOrig, @@ -61,8 +69,6 @@ Homology::Homology(GModel* model, std::vector<int> physicalDomain, } } } - _maxdomain = 0; - _maxnum = 0; } CellComplex* Homology::createCellComplex(std::vector<GEntity*>& domainEntities, @@ -106,13 +112,17 @@ CellComplex* Homology::createCellComplex(std::vector<GEntity*>& domainEntities, return cellComplex; } +CellComplex* Homology::createCellComplex() +{ + return createCellComplex(_domainEntities, _subdomainEntities); +} + Homology::~Homology() { - for(std::map<int, Chain*>::iterator it = _basisChains.begin(); - it != _basisChains.end(); it++) delete it->second; + } -void Homology::findGenerators(CellComplex* cellComplex) +void Homology::findHomologyBasis(CellComplex* cellComplex) { bool ownComplex = false; if(cellComplex==NULL){ @@ -120,7 +130,7 @@ void Homology::findGenerators(CellComplex* cellComplex) _subdomainEntities); ownComplex = true; } - std::string domainString = getDomainString(_domain, _subdomain); + std::string domainString = _getDomainString(_domain, _subdomain); Msg::StatusBar(2, true, "Reducing cell complex..."); @@ -133,12 +143,12 @@ void Homology::findGenerators(CellComplex* cellComplex) cellComplex->getSize(3), cellComplex->getSize(2), cellComplex->getSize(1), cellComplex->getSize(0)); - Msg::StatusBar(2, true, "Computing homology spaces..."); + Msg::StatusBar(2, true, "Computing homology space basis ..."); t1 = Cpu(); - ChainComplex chains = ChainComplex(cellComplex); - chains.computeHomology(); + ChainComplex chainComplex = ChainComplex(cellComplex); + chainComplex.computeHomology(); t2 = Cpu(); - Msg::StatusBar(2, true, "Done computing homology spaces (%g s)", t2 - t1); + Msg::StatusBar(2, true, "Done computing homology space basis (%g s)", t2 - t1); int dim = cellComplex->getDim(); @@ -147,50 +157,42 @@ void Homology::findGenerators(CellComplex* cellComplex) HRank[j] = 0; std::string dimension = ""; convert(j, dimension); - for(int i = 1; i <= chains.getBasisSize(j, 3); i++){ + for(int i = 1; i <= chainComplex.getBasisSize(j, 3); i++){ std::string generator = ""; convert(i, generator); std::string name = "H" + dimension + domainString + generator; - std::map<Cell*, int, Less_Cell> protoChain; - chains.getBasisChain(protoChain, i, j, 3, _smoothen); - Chain* chain = new Chain(protoChain, cellComplex, ++_maxdomain, name, - chains.getTorsion(j,i)); - if(chain->getSize() == 0) { - delete chain; - _maxdomain--; - continue; - } - HRank[j] = HRank[j] + 1; - if(chain->getTorsion() != 1){ - Msg::Warning("H%d %d has torsion coefficient %d!", - j, i, chain->getTorsion()); + std::map<Cell*, int, Less_Cell> chain; + chainComplex.getBasisChain(chain, i, j, 3, _smoothen); + int torsion = chainComplex.getTorsion(j,i); + if(_eraseNullCells(chain)) { + if(!_save0N && (j != 0 && j != dim)) _createPhysicalGroup(chain, name); + HRank[j] = HRank[j] + 1; + if(torsion != 1){ + Msg::Warning("H%d %d has torsion coefficient %d!", + j, i, torsion); + } } - // FIXME: Cell* and CellComplex* pointers should not outlive - // the objects, don't store Chains containing them for now - //_basisChains[chain->createPGroup()] = chain; - if(!_save0N && (j != 0 && j != dim)) chain->createPGroup(); - delete chain; } } - if(_fileName != "") writeGeneratorsMSH(); + if(_fileName != "") writeBasisMSH(); if(ownComplex) delete cellComplex; - Msg::Info("Ranks of homology spaces for primal cell complex:"); + Msg::Info("Ranks of homology spaces:"); Msg::Info("H0 = %d", HRank[0]); Msg::Info("H1 = %d", HRank[1]); Msg::Info("H2 = %d", HRank[2]); Msg::Info("H3 = %d", HRank[3]); - if(omitted != 0) Msg::Info("The computation of generators in the highest dimension was omitted"); + if(omitted != 0) Msg::Info("The computation of basis elements in the highest dimension was omitted"); Msg::StatusBar(2, false, "H0: %d, H1: %d, H2: %d, H3: %d", HRank[0], HRank[1], HRank[2], HRank[3]); } -void Homology::findDualGenerators(CellComplex* cellComplex) +void Homology::findCohomologyBasis(CellComplex* cellComplex) { bool ownComplex = false; if(cellComplex==NULL){ @@ -210,13 +212,13 @@ void Homology::findDualGenerators(CellComplex* cellComplex) cellComplex->getSize(3), cellComplex->getSize(2), cellComplex->getSize(1), cellComplex->getSize(0)); - Msg::StatusBar(2, true, "Computing homology spaces..."); + Msg::StatusBar(2, true, "Computing cohomology space basis ..."); t1 = Cpu(); - ChainComplex chains = ChainComplex(cellComplex); - chains.transposeHMatrices(); - chains.computeHomology(true); + ChainComplex chainComplex = ChainComplex(cellComplex); + chainComplex.transposeHMatrices(); + chainComplex.computeHomology(true); t2 = Cpu(); - Msg::StatusBar(2, true, "Done computing homology spaces (%g s)", t2- t1); + Msg::StatusBar(2, true, "Done computing cohomology space basis (%g s)", t2- t1); int dim = cellComplex->getDim(); @@ -224,55 +226,45 @@ void Homology::findDualGenerators(CellComplex* cellComplex) for(int i = 0; i < 4; i++) HRank[i] = 0; for(int j = 3; j > -1; j--){ std::string dimension = ""; - convert(dim-j, dimension); + convert(j, dimension); - for(int i = 1; i <= chains.getBasisSize(j, 3); i++){ + for(int i = 1; i <= chainComplex.getBasisSize(j, 3); i++){ std::string generator = ""; convert(i, generator); std::string name = "H" + dimension + "*" + - getDomainString(_domain, _subdomain) + generator; - std::map<Cell*, int, Less_Cell> protoChain; - chains.getBasisChain(protoChain, i, j, 3, _smoothen); - Chain* chain = new Chain(protoChain, cellComplex, ++_maxdomain, name, - chains.getTorsion(j,i)); - if(chain->getSize() == 0) { - delete chain; - --_maxdomain; - continue; - } - - HRank[dim-j] = HRank[dim-j] + 1; - if(chain->getTorsion() != 1){ - Msg::Warning("H%d* %d has torsion coefficient %d!", - dim-j, i, chain->getTorsion()); + _getDomainString(_domain, _subdomain) + generator; + std::map<Cell*, int, Less_Cell> chain; + chainComplex.getBasisChain(chain, i, j, 3, _smoothen); + int torsion = chainComplex.getTorsion(j,i); + if(_eraseNullCells(chain)) { + if(!_save0N && (j != 0 && j != dim)) _createPhysicalGroup(chain, name); + HRank[j] = HRank[j] + 1; + if(torsion != 1){ + Msg::Warning("H%d* %d has torsion coefficient %d!", j, i, torsion); + } } - // FIXME: Cell* and CellComplex* pointers should not outlive - // the objects, don't store Chains containing them for now - //_basisChains[chain->createPGroup()] = chain; - if(!_save0N && (j != 0 && j != dim)) chain->createPGroup(); - delete chain; } } - if(_fileName != "") writeGeneratorsMSH(); + if(_fileName != "") writeBasisMSH(); if(ownComplex) delete cellComplex; - Msg::Info("Ranks of homology spaces for the dual cell complex:"); + Msg::Info("Ranks of cohomology spaces:"); Msg::Info("H0* = %d", HRank[0]); Msg::Info("H1* = %d", HRank[1]); Msg::Info("H2* = %d", HRank[2]); Msg::Info("H3* = %d", HRank[3]); - if(omitted != 0) Msg::Info("The computation of %d highest dimension dual generators was omitted", omitted); + if(omitted != 0) Msg::Info("The computation of basis elements in the highest dimension was omitted"); Msg::StatusBar(2, false, "H0*: %d, H1*: %d, H2*: %d, H3*: %d", HRank[0], HRank[1], HRank[2], HRank[3]); } -std::string Homology::getDomainString(const std::vector<int>& domain, - const std::vector<int>& subdomain) +std::string Homology::_getDomainString(const std::vector<int>& domain, + const std::vector<int>& subdomain) { std::string domainString = "({"; if(domain.empty()) domainString += "0"; @@ -304,98 +296,32 @@ std::string Homology::getDomainString(const std::vector<int>& domain, return domainString; } -bool Homology::writeGeneratorsMSH(bool binary) +int Homology::_eraseNullCells(std::map<Cell*, int, Less_Cell>& chain) { - if(_fileName.empty()) return false; - if(!_model->writeMSH(_fileName, 2.0, binary)) return false; - Msg::Info("Wrote homology computation results to %s", _fileName.c_str()); - return true; -} - -void Homology::storeCells(CellComplex* cellComplex, int dim) -{ - std::vector<MElement*> elements; - MElementFactory factory; - - for(CellComplex::citer cit = cellComplex->firstCell(dim); - cit != cellComplex->lastCell(dim); cit++){ - Cell* cell = *cit; - - std::map<Cell*, int, Less_Cell > cells; - cell->getCells(cells); - for(Cell::citer it = cells.begin(); it != cells.end(); it++){ - Cell* subCell = it->first; - - std::vector<MVertex*> v; - cell->getMeshVertices(v); - - MElement* e = factory.create(cell->getTypeMSH(), v); - elements.push_back(e); - } - } - - int max[4]; - for(int i = 0; i < 4; i++) max[i] = _model->getMaxElementaryNumber(i); - int entityNum = *std::max_element(max,max+4) + 1; - for(int i = 0; i < 4; i++) max[i] = _model->getMaxPhysicalNumber(i); - int physicalNum = *std::max_element(max,max+4) + 1; - - std::map<int, std::vector<MElement*> > entityMap; - entityMap[entityNum] = elements; - std::map<int, std::map<int, std::string> > physicalMap; - std::map<int, std::string> physicalInfo; - physicalInfo[physicalNum]="Cell Complex"; - physicalMap[entityNum] = physicalInfo; - - _model->storeChain(dim, entityMap, physicalMap); - _model->setPhysicalName("Cell Complex", dim, physicalNum); -} - -int Chain::writeChainMSH(const std::string &name) -{ - if(getSize() == 0) return 1; - - FILE *fp = fopen(name.c_str(), "a"); - if(!fp){ - Msg::Error("Unable to open file '%s'", name.c_str()); - return 0; - } - - fprintf(fp, "\n$ElementData\n"); - - fprintf(fp, "1 \n"); - fprintf(fp, "\"%s\" \n", getName().c_str()); - fprintf(fp, "1 \n"); - fprintf(fp, "0.0 \n"); - fprintf(fp, "4 \n"); - fprintf(fp, "0 \n"); - fprintf(fp, "1 \n"); - fprintf(fp, "%d \n", getSize()); - fprintf(fp, "0 \n"); - - for(citer cit = _cells.begin(); cit != _cells.end(); cit++){ - Cell* cell = (*cit).first; - int coeff = (*cit).second; - fprintf(fp, "%d %d \n", cell->getIndex(), coeff ); + std::vector<Cell*> toRemove; + for(citer cit = chain.begin(); cit != chain.end(); cit++){ + if(cit->second == 0) toRemove.push_back(cit->first); } - - fprintf(fp, "$EndElementData\n"); - fclose(fp); - - return 1; + for(unsigned int i = 0; i < toRemove.size(); i++) chain.erase(toRemove[i]); + return chain.size(); } -int Chain::createPGroup() +void Homology::_createPhysicalGroup(std::map<Cell*, int, Less_Cell>& chain, std::string name) { std::vector<MElement*> elements; std::map<int, std::vector<double> > data; MElementFactory factory; + int dim = 0; + + typedef std::map<Cell*, int, Less_Cell>::iterator citer; + for(citer cit = chain.begin(); cit != chain.end(); cit++){ + Cell* cell = cit->first; + int coeff = cit->second; + if(coeff == 0) continue; - for(citer cit = _cells.begin(); cit != _cells.end(); cit++){ - Cell* cell = (*cit).first; - int coeff = (*cit).second; std::vector<MVertex*> v; cell->getMeshVertices(v); + dim = cell->getDim(); MElement* e = factory.create(cell->getTypeMSH(), v); if(cell->getDim() > 0 && coeff < 0) e->revert(); // flip orientation @@ -413,32 +339,31 @@ int Chain::createPGroup() data[e->getNum()] = coeffs; } + GModel* m = this->getModel(); int max[4]; for(int i = 0; i < 4; i++) - max[i] = this->getCellComplex()->getModel()->getMaxElementaryNumber(i); + max[i] = m->getMaxElementaryNumber(i); int entityNum = *std::max_element(max,max+4) + 1; for(int i = 0; i < 4; i++) - max[i] = this->getCellComplex()->getModel()->getMaxPhysicalNumber(i); + max[i] = m->getMaxPhysicalNumber(i); int physicalNum = *std::max_element(max,max+4) + 1; - setNum(physicalNum); std::map<int, std::vector<MElement*> > entityMap; entityMap[entityNum] = elements; std::map<int, std::map<int, std::string> > physicalMap; std::map<int, std::string> physicalInfo; - physicalInfo[physicalNum] = getName(); + physicalInfo[physicalNum] = name; physicalMap[entityNum] = physicalInfo; if(!data.empty()){ - GModel* m = this->getCellComplex()->getModel(); - m->storeChain(getDim(), entityMap, physicalMap); - m->setPhysicalName(getName(), getDim(), physicalNum); + m->storeChain(dim, entityMap, physicalMap); + m->setPhysicalName(name, dim, physicalNum); #if defined(HAVE_POST) // create PView for instant visualization std::string pnum = ""; convert(physicalNum, pnum); - std::string postname = pnum + ": " + getName(); + std::string postname = pnum + ": " + name; PView* view = new PView(postname, "ElementData", m, data, 0, 1); // the user should be interested about the orientations int size = 30; @@ -448,33 +373,53 @@ int Chain::createPGroup() view->setOptions(opt); #endif } - - return physicalNum; } - -Chain::Chain(std::map<Cell*, int, Less_Cell>& chain, - CellComplex* cellComplex, int num, - std::string name, int torsion) +bool Homology::writeBasisMSH(bool binary) { - _cells = chain; - if(!_cells.empty()) _dim = firstCell()->first->getDim(); - else _dim = 0; - _name = name; - _num = num; - _cellComplex = cellComplex; - _torsion = torsion; - eraseNullCells(); + if(_fileName.empty()) return false; + if(!_model->writeMSH(_fileName, 2.0, binary)) return false; + Msg::Info("Wrote homology computation results to %s", _fileName.c_str()); + return true; } -void Chain::eraseNullCells() +void Homology::storeCells(CellComplex* cellComplex, int dim) { - std::vector<Cell*> toRemove; - for(citer cit = _cells.begin(); cit != _cells.end(); cit++){ - if(cit->second == 0) toRemove.push_back(cit->first); + std::vector<MElement*> elements; + MElementFactory factory; + + for(CellComplex::citer cit = cellComplex->firstCell(dim); + cit != cellComplex->lastCell(dim); cit++){ + Cell* cell = *cit; + + std::map<Cell*, int, Less_Cell > cells; + cell->getCells(cells); + for(Cell::citer it = cells.begin(); it != cells.end(); it++){ + Cell* subCell = it->first; + + std::vector<MVertex*> v; + cell->getMeshVertices(v); + + MElement* e = factory.create(cell->getTypeMSH(), v); + elements.push_back(e); + } } - for(unsigned int i = 0; i < toRemove.size(); i++) _cells.erase(toRemove[i]); - return; + + int max[4]; + for(int i = 0; i < 4; i++) max[i] = _model->getMaxElementaryNumber(i); + int entityNum = *std::max_element(max,max+4) + 1; + for(int i = 0; i < 4; i++) max[i] = _model->getMaxPhysicalNumber(i); + int physicalNum = *std::max_element(max,max+4) + 1; + + std::map<int, std::vector<MElement*> > entityMap; + entityMap[entityNum] = elements; + std::map<int, std::map<int, std::string> > physicalMap; + std::map<int, std::string> physicalInfo; + physicalInfo[physicalNum]="Cell Complex"; + physicalMap[entityNum] = physicalInfo; + + _model->storeChain(dim, entityMap, physicalMap); + _model->setPhysicalName("Cell Complex", dim, physicalNum); } #endif diff --git a/Geo/Homology.h b/Geo/Homology.h index 054f8309b078e87bde5e05f0af8b2b0873f48a2a..a781b714a5c0bebf0804f3c58b884c0548a75150 100644 --- a/Geo/Homology.h +++ b/Geo/Homology.h @@ -17,16 +17,6 @@ #if defined(HAVE_KBIPACK) -template <class TTypeA, class TTypeB> - bool convert(const TTypeA& input, TTypeB& output ){ - std::stringstream stream; - stream << input; - stream >> output; - return stream.good(); -} - -class Chain; - // Interface class for homology computation in Gmsh class Homology { @@ -52,15 +42,23 @@ class Homology // save chains of 0 and highest dimension bool _save0N; + // save original cell complex bool _saveOrig; - int _maxdomain; - int _maxnum; - // file name to store the results std::string _fileName; - std::map<int, Chain*> _basisChains; + typedef std::map<Cell*, int, Less_Cell>::iterator citer; + + // create a string describing the generator + std::string _getDomainString(const std::vector<int>& domain, + const std::vector<int>& subdomain); + + // remove cells with coefficient 0 + int _eraseNullCells(std::map<Cell*, int, Less_Cell>& chain); + + // create a Gmsh physical group from a chain + void _createPhysicalGroup(std::map<Cell*, int, Less_Cell>& chain, std::string name); public: @@ -73,87 +71,21 @@ class Homology // create a cell complex from a mesh in geometrical entities of Gmsh CellComplex* createCellComplex(std::vector<GEntity*>& domainEntities, std::vector<GEntity*>& subdomainEntities); - CellComplex* createCellComplex() { - return createCellComplex(_domainEntities, _subdomainEntities); } + CellComplex* createCellComplex(); + GModel* getModel() const { return _model; } void setFileName(std::string fileName) { _fileName = fileName; } // find the generators/dual generarators of homology spaces, - void findGenerators(CellComplex* cellComplex=NULL); - void findDualGenerators(CellComplex* cellComplex=NULL); - - // experimental - void findHomSequence() {} - void computeRanks() {} - - // create a string describing the generator - std::string getDomainString(const std::vector<int>& domain, - const std::vector<int>& subdomain); + void findHomologyBasis(CellComplex* cellComplex=NULL); + void findCohomologyBasis(CellComplex* cellComplex=NULL); // write the generators to a file - bool writeGeneratorsMSH(bool binary=false); + bool writeBasisMSH(bool binary=false); + // store dim-dimensional cells of cellComplex as a physical group // in _model, for debugging void storeCells(CellComplex* cellComplex, int dim); - - GModel* getModel() const { return _model; } - -}; - -// A class representing a chain. -// Used to store generators of the homology spaces and visualize them in Gmsh. -class Chain { - - private: - // cells and their coefficients in this chain - std::map< Cell*, int, Less_Cell > _cells; - // name of the chain (optional) - std::string _name; - // physical group number of the chain - int _num; - // cell complex this chain belongs to - CellComplex* _cellComplex; - - // torsion coefficient - int _torsion; - - int _dim; - - public: - Chain(std::map<Cell*, int, Less_Cell>& chain, - CellComplex* cellComplex, int num, - std::string name="Chain", int torsion=0); - - typedef std::map<Cell*, int, Less_Cell>::iterator citer; - citer firstCell() {return _cells.begin(); } - citer lastCell() {return _cells.end(); } - - int getTorsion() const { return _torsion; } - int getDim() const { return _dim; } - CellComplex* getCellComplex() const { return _cellComplex; } - void getCells(std::map<Cell*, int, Less_Cell> cells) const { - cells = _cells; } - - // erase cells from the chain with zero coefficient - void eraseNullCells(); - - // number of cells in this chain - int getSize() const { return _cells.size();} - - // get/set chain name - std::string getName() const { return _name; } - void setName(std::string name) { _name=name; } - // get/set physical group number - int getNum() const { return _num; } - void setNum(int num) { _num=num; } - - // append this chain to a MSH ASCII file as $ElementData - // for debugging only - int writeChainMSH(const std::string &name); - - // create a Gmsh physical group from this chain. - int createPGroup(); - }; #endif diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 5fa077aa3c10cbdff816d427f2db7e72a88788ac..6c492ce7a6aee6fa753181772b7c3672334e52f9 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -1,8 +1,10 @@ -/* A Bison parser, made by GNU Bison 2.5. */ -/* Bison implementation for Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + 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 @@ -44,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.5" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -73,7 +75,7 @@ /* Copy the first part of user declarations. */ -/* Line 268 of yacc.c */ +/* Line 189 of yacc.c */ #line 1 "Gmsh.y" // Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle @@ -161,8 +163,8 @@ int PrintListOfDouble(char *format, List_T *list, char *buffer); fullMatrix<double> ListOfListOfDouble2Matrix(List_T *list); -/* Line 268 of yacc.c */ -#line 166 "Gmsh.tab.cpp" +/* Line 189 of yacc.c */ +#line 168 "Gmsh.tab.cpp" /* Enabling traces. */ #ifndef YYDEBUG @@ -333,7 +335,7 @@ fullMatrix<double> ListOfListOfDouble2Matrix(List_T *list); typedef union YYSTYPE { -/* Line 293 of yacc.c */ +/* Line 214 of yacc.c */ #line 87 "Gmsh.y" char *c; @@ -346,8 +348,8 @@ typedef union YYSTYPE -/* Line 293 of yacc.c */ -#line 351 "Gmsh.tab.cpp" +/* Line 214 of yacc.c */ +#line 353 "Gmsh.tab.cpp" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -358,8 +360,8 @@ typedef union YYSTYPE /* Copy the second part of user declarations. */ -/* Line 343 of yacc.c */ -#line 363 "Gmsh.tab.cpp" +/* Line 264 of yacc.c */ +#line 365 "Gmsh.tab.cpp" #ifdef short # undef short @@ -409,7 +411,7 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS +# if YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -462,11 +464,11 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 +# ifndef _STDLIB_H +# define _STDLIB_H 1 # endif # endif # endif @@ -489,24 +491,24 @@ YYID (yyi) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ +# if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 +# ifndef _STDLIB_H +# define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined malloc && ! defined _STDLIB_H && (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 EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif @@ -535,7 +537,23 @@ union yyalloc ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) -# define YYCOPY_NEEDED 1 +/* 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 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of @@ -555,26 +573,6 @@ 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. */ @@ -1147,8 +1145,8 @@ static const yytype_uint8 yyr2[] = 6, 4, 4, 4, 6 }; -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint16 yydefact[] = { @@ -1477,7 +1475,8 @@ 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 YYTABLE_NINF, syntax error. */ + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -5 static const yytype_int16 yytable[] = { @@ -2243,12 +2242,6 @@ 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, @@ -3174,18 +3167,9 @@ static const yytype_uint8 yystos[] = /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ + Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif #define YYRECOVERING() (!!yyerrstatus) @@ -3195,6 +3179,7 @@ do \ { \ yychar = (Token); \ yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ @@ -3236,10 +3221,19 @@ while (YYID (0)) #endif -/* This macro is provided for backward compatibility. */ +/* 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. */ #ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# if 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 #endif @@ -3431,6 +3425,7 @@ int yydebug; # define YYMAXDEPTH 10000 #endif + #if YYERROR_VERBOSE @@ -3533,142 +3528,115 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* 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. - - 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) +/* 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) { - 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; - } - } - } + int yyn = yypact[yystate]; - 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 (! (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; + } - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } + if (yysize_overflow) + return YYSIZE_MAXIMUM; - /* 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; + 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; + } } #endif /* YYERROR_VERBOSE */ + /*-----------------------------------------------. | Release the memory associated to this symbol. | @@ -3701,7 +3669,6 @@ yydestruct (yymsg, yytype, yyvaluep) } } - /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus @@ -3728,9 +3695,10 @@ YYSTYPE yylval; int yynerrs; -/*----------. -| yyparse. | -`----------*/ + +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -3754,6 +3722,8 @@ yyparse () #endif #endif { + + int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; @@ -3908,7 +3878,7 @@ yybackup: /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) + if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ @@ -3939,8 +3909,8 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yytable_value_is_error (yyn)) - goto yyerrlab; + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -3995,161 +3965,161 @@ yyreduce: { case 3: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 159 "Gmsh.y" - { yyerrok; return 1; } + { yyerrok; return 1; ;} break; case 6: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 170 "Gmsh.y" - { return 1; } + { return 1; ;} break; case 7: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 171 "Gmsh.y" - { return 1; } + { return 1; ;} break; case 8: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 172 "Gmsh.y" - { return 1; } + { return 1; ;} break; case 9: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 173 "Gmsh.y" - { return 1; } + { return 1; ;} break; case 10: -/* Line 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 175 "Gmsh.y" - { return 1; } + { return 1; ;} break; case 12: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 176 "Gmsh.y" - { return 1; } + { return 1; ;} break; case 13: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 177 "Gmsh.y" - { return 1; } + { return 1; ;} break; case 14: -/* Line 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 179 "Gmsh.y" - { return 1; } + { return 1; ;} break; case 16: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 180 "Gmsh.y" - { return 1; } + { return 1; ;} break; case 17: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 181 "Gmsh.y" - { return 1; } + { return 1; ;} break; case 18: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 182 "Gmsh.y" - { return 1; } + { return 1; ;} break; case 19: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 183 "Gmsh.y" - { return 1; } + { return 1; ;} break; case 20: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 184 "Gmsh.y" - { return 1; } + { return 1; ;} break; case 21: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 185 "Gmsh.y" - { return 1; } + { return 1; ;} break; case 22: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 186 "Gmsh.y" - { return 1; } + { return 1; ;} break; case 23: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 191 "Gmsh.y" { (yyval.c) = (char*)"w"; - } + ;} break; case 24: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 195 "Gmsh.y" { (yyval.c) = (char*)"a"; - } + ;} break; case 25: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 202 "Gmsh.y" { Msg::Direct((yyvsp[(3) - (5)].c)); Free((yyvsp[(3) - (5)].c)); - } + ;} break; case 26: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 207 "Gmsh.y" { std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(6) - (7)].c)); @@ -4163,12 +4133,12 @@ yyreduce: } Free((yyvsp[(3) - (7)].c)); Free((yyvsp[(6) - (7)].c)); - } + ;} break; case 27: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 221 "Gmsh.y" { char tmpstring[1024]; @@ -4181,12 +4151,12 @@ yyreduce: Msg::Direct(tmpstring); Free((yyvsp[(3) - (7)].c)); List_Delete((yyvsp[(5) - (7)].l)); - } + ;} break; case 28: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 234 "Gmsh.y" { char tmpstring[1024]; @@ -4209,12 +4179,12 @@ yyreduce: Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(8) - (9)].c)); List_Delete((yyvsp[(5) - (9)].l)); - } + ;} break; case 29: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 262 "Gmsh.y" { #if defined(HAVE_POST) @@ -4228,12 +4198,12 @@ yyreduce: delete ViewData; #endif Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(2) - (6)].c)); - } + ;} break; case 30: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 276 "Gmsh.y" { #if defined(HAVE_POST) @@ -4244,12 +4214,12 @@ yyreduce: } #endif Free((yyvsp[(2) - (6)].c)); - } + ;} break; case 31: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 287 "Gmsh.y" { #if defined(HAVE_POST) @@ -4260,51 +4230,51 @@ yyreduce: } #endif Free((yyvsp[(2) - (6)].c)); - } + ;} break; case 32: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 301 "Gmsh.y" { #if defined(HAVE_POST) ViewData = new PViewDataList(); #endif - } + ;} break; case 38: -/* Line 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 329 "Gmsh.y" { #if defined(HAVE_POST) @@ -4408,12 +4378,12 @@ yyreduce: #endif ViewCoord.clear(); Free((yyvsp[(1) - (1)].c)); - } + ;} break; case 43: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 433 "Gmsh.y" { #if defined(HAVE_POST) @@ -4423,47 +4393,47 @@ yyreduce: ViewValueList->push_back(ViewCoord[3 * j + i]); } #endif - } + ;} break; case 44: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 443 "Gmsh.y" { #if defined(HAVE_POST) if(ViewValueList) (*ViewNumList)++; #endif - } + ;} break; case 45: -/* Line 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 469 "Gmsh.y" { #if defined(HAVE_POST) @@ -4472,47 +4442,47 @@ yyreduce: ViewData->T2D.push_back((yyvsp[(7) - (8)].d)); ViewData->T2D.push_back(ViewData->T2C.size()); #endif - } + ;} break; case 48: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 478 "Gmsh.y" { #if defined(HAVE_POST) ViewData->NbT2++; #endif - } + ;} break; case 49: -/* Line 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 504 "Gmsh.y" { #if defined(HAVE_POST) @@ -4520,23 +4490,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 512 "Gmsh.y" { #if defined(HAVE_POST) ViewData->NbT3++; #endif - } + ;} break; case 53: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 522 "Gmsh.y" { #if defined(HAVE_POST) @@ -4552,12 +4522,12 @@ yyreduce: ViewData->setInterpolationMatrices(type, ListOfListOfDouble2Matrix((yyvsp[(3) - (8)].l)), ListOfListOfDouble2Matrix((yyvsp[(6) - (8)].l))); #endif - } + ;} break; case 54: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 541 "Gmsh.y" { #if defined(HAVE_POST) @@ -4573,80 +4543,80 @@ yyreduce: ListOfListOfDouble2Matrix((yyvsp[(9) - (14)].l)), ListOfListOfDouble2Matrix((yyvsp[(12) - (14)].l))); #endif - } + ;} break; case 55: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 560 "Gmsh.y" { #if defined(HAVE_POST) ViewValueList = &ViewData->Time; #endif - } + ;} break; case 56: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 566 "Gmsh.y" { - } + ;} break; case 57: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 573 "Gmsh.y" - { (yyval.i) = 0; } + { (yyval.i) = 0; ;} break; case 58: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 574 "Gmsh.y" - { (yyval.i) = 1; } + { (yyval.i) = 1; ;} break; case 59: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 575 "Gmsh.y" - { (yyval.i) = 2; } + { (yyval.i) = 2; ;} break; case 60: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 576 "Gmsh.y" - { (yyval.i) = 3; } + { (yyval.i) = 3; ;} break; case 61: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 577 "Gmsh.y" - { (yyval.i) = 4; } + { (yyval.i) = 4; ;} break; case 62: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 581 "Gmsh.y" - { (yyval.i) = 1; } + { (yyval.i) = 1; ;} break; case 63: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 582 "Gmsh.y" - { (yyval.i) = -1; } + { (yyval.i) = -1; ;} break; case 65: -/* Line 1806 of yacc.c */ +/* Line 1455 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){ @@ -4706,12 +4676,12 @@ yyreduce: } Free((yyvsp[(1) - (4)].c)); List_Delete((yyvsp[(3) - (4)].l)); - } + ;} break; case 66: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 654 "Gmsh.y" { gmsh_yysymbol &s(gmsh_yysymbols[(yyvsp[(1) - (6)].c)]); @@ -4740,12 +4710,12 @@ yyreduce: } Free((yyvsp[(1) - (6)].c)); List_Delete((yyvsp[(5) - (6)].l)); - } + ;} break; case 67: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 684 "Gmsh.y" { int index = (int)(yyvsp[(3) - (7)].d); @@ -4778,12 +4748,12 @@ yyreduce: yymsg(0, "Variable '%s' is not a list", (yyvsp[(1) - (7)].c)); } Free((yyvsp[(1) - (7)].c)); - } + ;} break; case 68: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 717 "Gmsh.y" { if(List_Nbr((yyvsp[(4) - (9)].l)) != List_Nbr((yyvsp[(8) - (9)].l))){ @@ -4829,12 +4799,12 @@ yyreduce: Free((yyvsp[(1) - (9)].c)); List_Delete((yyvsp[(4) - (9)].l)); List_Delete((yyvsp[(8) - (9)].l)); - } + ;} break; case 69: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 763 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c))) @@ -4849,12 +4819,12 @@ yyreduce: yymsg(0, "Variable '%s' is a list", (yyvsp[(1) - (3)].c)); } Free((yyvsp[(1) - (3)].c)); - } + ;} break; case 70: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 778 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c))) @@ -4870,23 +4840,23 @@ yyreduce: yymsg(0, "Variable '%s' is not a list", (yyvsp[(1) - (6)].c)); } Free((yyvsp[(1) - (6)].c)); - } + ;} break; case 71: -/* Line 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 803 "Gmsh.y" { std::string tmp((yyvsp[(5) - (6)].c)); @@ -4897,7 +4867,7 @@ yyreduce: case 73: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 809 "Gmsh.y" { std::string tmp((yyvsp[(8) - (9)].c)); @@ -4908,7 +4878,7 @@ yyreduce: case 74: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 818 "Gmsh.y" { double d = 0.; @@ -4926,12 +4896,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 836 "Gmsh.y" { double d = 0.; @@ -4949,12 +4919,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 854 "Gmsh.y" { double d = 0.; @@ -4963,12 +4933,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 863 "Gmsh.y" { double d = 0.; @@ -4977,32 +4947,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 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 888 "Gmsh.y" { GmshColorTable *ct = GetColorTable(0); @@ -5022,12 +4992,12 @@ yyreduce: } Free((yyvsp[(1) - (6)].c)); List_Delete((yyvsp[(5) - (6)].l)); - } + ;} break; case 81: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 908 "Gmsh.y" { GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (9)].d)); @@ -5047,12 +5017,12 @@ yyreduce: } Free((yyvsp[(1) - (9)].c)); List_Delete((yyvsp[(8) - (9)].l)); - } + ;} break; case 82: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 931 "Gmsh.y" { #if defined(HAVE_MESH) @@ -5063,12 +5033,12 @@ yyreduce: else yymsg(0, "Unknown command %s Field", (yyvsp[(1) - (5)].c)); #endif - } + ;} break; case 83: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 942 "Gmsh.y" { #if defined(HAVE_MESH) @@ -5076,12 +5046,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 950 "Gmsh.y" { #if defined(HAVE_MESH) @@ -5103,12 +5073,12 @@ yyreduce: yymsg(0, "No field with id %i", (int)(yyvsp[(3) - (9)].d)); #endif Free((yyvsp[(6) - (9)].c)); - } + ;} break; case 85: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 972 "Gmsh.y" { #if defined(HAVE_MESH) @@ -5131,12 +5101,12 @@ yyreduce: #endif Free((yyvsp[(6) - (9)].c)); Free((yyvsp[(8) - (9)].c)); - } + ;} break; case 86: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 995 "Gmsh.y" { #if defined(HAVE_MESH) @@ -5161,12 +5131,12 @@ yyreduce: #endif Free((yyvsp[(6) - (11)].c)); List_Delete((yyvsp[(9) - (11)].l)); - } + ;} break; case 87: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1020 "Gmsh.y" { #if defined(HAVE_MESH) @@ -5184,12 +5154,12 @@ yyreduce: yymsg(0, "No field with id %i", (int)(yyvsp[(3) - (7)].d)); #endif Free((yyvsp[(6) - (7)].c)); - } + ;} break; case 88: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1041 "Gmsh.y" { #if defined(HAVE_PLUGINS) @@ -5201,12 +5171,12 @@ yyreduce: } #endif Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(6) - (9)].c)); - } + ;} break; case 89: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1053 "Gmsh.y" { #if defined(HAVE_PLUGINS) @@ -5218,12 +5188,12 @@ yyreduce: } #endif Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(6) - (9)].c)); Free((yyvsp[(8) - (9)].c)); - } + ;} break; case 93: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1071 "Gmsh.y" { std::string key((yyvsp[(3) - (3)].c)); @@ -5234,12 +5204,12 @@ yyreduce: gmsh_yysymbols[key].value = val; } Free((yyvsp[(3) - (3)].c)); - } + ;} break; case 94: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1082 "Gmsh.y" { std::string key((yyvsp[(3) - (5)].c)); @@ -5250,19 +5220,19 @@ yyreduce: gmsh_yysymbols[key].value = val; } Free((yyvsp[(3) - (5)].c)); - } + ;} break; case 95: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1093 "Gmsh.y" - { floatOptions.clear(); charOptions.clear(); } + { floatOptions.clear(); charOptions.clear(); ;} break; case 96: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1095 "Gmsh.y" { std::string key((yyvsp[(3) - (9)].c)); @@ -5271,12 +5241,12 @@ yyreduce: Msg::ExchangeOnelabParameter(key, val, floatOptions, charOptions); gmsh_yysymbols[key].value = val; } - } + ;} break; case 99: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1111 "Gmsh.y" { std::string key((yyvsp[(2) - (3)].c)); @@ -5287,12 +5257,12 @@ yyreduce: } Free((yyvsp[(2) - (3)].c)); List_Delete((yyvsp[(3) - (3)].l)); - } + ;} break; case 100: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1122 "Gmsh.y" { std::string key((yyvsp[(2) - (3)].c)); @@ -5300,42 +5270,42 @@ yyreduce: charOptions[key].push_back(val); Free((yyvsp[(2) - (3)].c)); Free((yyvsp[(3) - (3)].c)); - } + ;} break; case 101: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1135 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(1) - (1)].d); - } + ;} break; case 102: -/* Line 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1149 "Gmsh.y" { (yyval.l) = 0; - } + ;} break; case 104: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1153 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(Vertex*)); @@ -5345,30 +5315,30 @@ yyreduce: else{ List_Add((yyval.l), &v); } - } + ;} break; case 105: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1165 "Gmsh.y" { for(int i = 0; i < 4; i++) (yyval.v)[i] = 0.; - } + ;} break; case 106: -/* Line 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1179 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5391,21 +5361,21 @@ yyreduce: } (yyval.s).Type = MSH_POINT; (yyval.s).Num = num; - } + ;} break; case 108: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1202 "Gmsh.y" { curPhysDim = 0; - } + ;} break; case 109: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1206 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); @@ -5421,12 +5391,12 @@ yyreduce: List_Delete((yyvsp[(8) - (9)].l)); (yyval.s).Type = MSH_PHYSICAL_POINT; (yyval.s).Num = num; - } + ;} break; case 110: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1222 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ @@ -5445,12 +5415,12 @@ yyreduce: // dummy values (yyval.s).Type = 0; (yyval.s).Num = 0; - } + ;} break; case 111: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1244 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5468,12 +5438,12 @@ yyreduce: List_Delete((yyvsp[(6) - (7)].l)); (yyval.s).Type = MSH_SEGM_LINE; (yyval.s).Num = num; - } + ;} break; case 112: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1262 "Gmsh.y" { for (int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ @@ -5494,12 +5464,12 @@ yyreduce: } } } - } + ;} break; case 113: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1283 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5517,12 +5487,12 @@ yyreduce: List_Delete((yyvsp[(6) - (7)].l)); (yyval.s).Type = MSH_SEGM_SPLN; (yyval.s).Num = num; - } + ;} break; case 114: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1301 "Gmsh.y" { int num = (int)(yyvsp[(3) - (8)].d); @@ -5552,12 +5522,12 @@ yyreduce: List_Delete((yyvsp[(6) - (8)].l)); (yyval.s).Type = MSH_SEGM_CIRC; (yyval.s).Num = num; - } + ;} break; case 115: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1331 "Gmsh.y" { int num = (int)(yyvsp[(3) - (8)].d); @@ -5587,12 +5557,12 @@ yyreduce: List_Delete((yyvsp[(6) - (8)].l)); (yyval.s).Type = MSH_SEGM_ELLI; (yyval.s).Num = num; - } + ;} break; case 116: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1361 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5610,12 +5580,12 @@ yyreduce: List_Delete((yyvsp[(6) - (7)].l)); (yyval.s).Type = MSH_SEGM_BSPLN; (yyval.s).Num = num; - } + ;} break; case 117: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1379 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5633,12 +5603,12 @@ yyreduce: List_Delete((yyvsp[(6) - (7)].l)); (yyval.s).Type = MSH_SEGM_BEZIER; (yyval.s).Num = num; - } + ;} break; case 118: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1397 "Gmsh.y" { int num = (int)(yyvsp[(3) - (11)].d); @@ -5664,12 +5634,12 @@ yyreduce: List_Delete((yyvsp[(8) - (11)].l)); (yyval.s).Type = MSH_SEGM_NURBS; (yyval.s).Num = num; - } + ;} break; case 119: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1423 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -5687,12 +5657,12 @@ yyreduce: Free((yyvsp[(2) - (8)].c)); (yyval.s).Type = MSH_SEGM_LOOP; (yyval.s).Num = num; - } + ;} break; case 120: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1441 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -5710,21 +5680,21 @@ yyreduce: List_Delete((yyvsp[(7) - (8)].l)); (yyval.s).Type = MSH_SEGM_COMPOUND; (yyval.s).Num = num; - } + ;} break; case 121: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1459 "Gmsh.y" { curPhysDim = 1; - } + ;} break; case 122: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1463 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); @@ -5740,12 +5710,12 @@ yyreduce: List_Delete((yyvsp[(8) - (9)].l)); (yyval.s).Type = MSH_PHYSICAL_LINE; (yyval.s).Num = num; - } + ;} break; case 123: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1482 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -5763,12 +5733,12 @@ yyreduce: List_Delete((yyvsp[(7) - (8)].l)); (yyval.s).Type = MSH_SURF_PLAN; (yyval.s).Num = num; - } + ;} break; case 124: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1500 "Gmsh.y" { int num = (int)(yyvsp[(4) - (9)].d), type = 0; @@ -5807,46 +5777,46 @@ yyreduce: List_Delete((yyvsp[(7) - (9)].l)); (yyval.s).Type = type; (yyval.s).Num = num; - } + ;} break; case 125: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1539 "Gmsh.y" { myGmshSurface = 0; (yyval.s).Type = 0; (yyval.s).Num = 0; - } + ;} break; case 126: -/* Line 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1558 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5871,12 +5841,12 @@ yyreduce: } (yyval.s).Type = 0; (yyval.s).Num = num; - } + ;} break; case 129: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1583 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -5901,12 +5871,12 @@ yyreduce: } (yyval.s).Type = 0; (yyval.s).Num = num; - } + ;} break; case 130: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1608 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -5923,12 +5893,12 @@ yyreduce: Free((yyvsp[(2) - (8)].c)); (yyval.s).Type = MSH_SURF_LOOP; (yyval.s).Num = num; - } + ;} break; case 131: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1625 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -5945,12 +5915,12 @@ yyreduce: List_Delete((yyvsp[(7) - (8)].l)); (yyval.s).Type = MSH_SURF_COMPOUND; (yyval.s).Num = num; - } + ;} break; case 132: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1643 "Gmsh.y" { int num = (int)(yyvsp[(4) - (12)].d); @@ -5980,21 +5950,21 @@ yyreduce: Free((yyvsp[(8) - (12)].c)); (yyval.s).Type = MSH_SURF_COMPOUND; (yyval.s).Num = num; - } + ;} break; case 133: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1673 "Gmsh.y" { curPhysDim = 2; - } + ;} break; case 134: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1677 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); @@ -6010,12 +5980,12 @@ yyreduce: List_Delete((yyvsp[(8) - (9)].l)); (yyval.s).Type = MSH_PHYSICAL_SURFACE; (yyval.s).Num = num; - } + ;} break; case 135: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1697 "Gmsh.y" { yymsg(0, "'Complex Volume' command is deprecated: use 'Volume' instead"); @@ -6033,12 +6003,12 @@ yyreduce: List_Delete((yyvsp[(7) - (8)].l)); (yyval.s).Type = MSH_VOLUME; (yyval.s).Num = num; - } + ;} break; case 136: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1715 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); @@ -6055,12 +6025,12 @@ yyreduce: List_Delete((yyvsp[(6) - (7)].l)); (yyval.s).Type = MSH_VOLUME; (yyval.s).Num = num; - } + ;} break; case 137: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1732 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); @@ -6076,21 +6046,21 @@ yyreduce: List_Delete((yyvsp[(7) - (8)].l)); (yyval.s).Type = MSH_VOLUME_COMPOUND; (yyval.s).Num = num; - } + ;} break; case 138: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1748 "Gmsh.y" { curPhysDim = 3; - } + ;} break; case 139: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1752 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); @@ -6106,52 +6076,52 @@ yyreduce: List_Delete((yyvsp[(8) - (9)].l)); (yyval.s).Type = MSH_PHYSICAL_VOLUME; (yyval.s).Num = num; - } + ;} break; case 140: -/* Line 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1794 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); @@ -6174,23 +6144,23 @@ yyreduce: } Free((yyvsp[(1) - (4)].c)); List_Delete((yyvsp[(3) - (4)].l)); - } + ;} break; case 145: -/* Line 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1823 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape*)); @@ -6198,44 +6168,44 @@ yyreduce: List_Delete((yyvsp[(7) - (9)].l)); SplitCurve((int)(yyvsp[(4) - (9)].d), tmp, (yyval.l)); List_Delete(tmp); - } + ;} break; case 147: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1833 "Gmsh.y" - { (yyval.l) = (yyvsp[(1) - (1)].l); } + { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 148: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1834 "Gmsh.y" - { (yyval.l) = (yyvsp[(1) - (1)].l); } + { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 149: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1839 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); - } + ;} break; case 150: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1843 "Gmsh.y" { List_Add((yyval.l), &(yyvsp[(2) - (2)].s)); - } + ;} break; case 151: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1847 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ @@ -6258,12 +6228,12 @@ yyreduce: yymsg(1, "Unknown point %d", TheShape.Num); } } - } + ;} break; case 152: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1870 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ @@ -6286,12 +6256,12 @@ yyreduce: yymsg(1, "Unknown curve %d", TheShape.Num); } } - } + ;} break; case 153: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1893 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ @@ -6314,12 +6284,12 @@ yyreduce: yymsg(1, "Unknown surface %d", TheShape.Num); } } - } + ;} break; case 154: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1916 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ @@ -6342,12 +6312,12 @@ yyreduce: yymsg(1, "Unknown volume %d", TheShape.Num); } } - } + ;} break; case 155: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1944 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6368,12 +6338,12 @@ yyreduce: else yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (8)].d)); #endif - } + ;} break; case 156: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1965 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6396,12 +6366,12 @@ yyreduce: Tree_Add(GModel::current()->getGEOInternals()->LevelSets, &l); } #endif - } + ;} break; case 157: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1989 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6421,12 +6391,12 @@ yyreduce: else yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (14)].d)); #endif - } + ;} break; case 158: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2010 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6447,12 +6417,12 @@ yyreduce: else yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (16)].d)); #endif - } + ;} break; case 159: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2031 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6472,12 +6442,12 @@ yyreduce: else yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (12)].d)); #endif - } + ;} break; case 160: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2051 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6589,12 +6559,12 @@ yyreduce: yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (8)].d)); Free((yyvsp[(2) - (8)].c)); #endif - } + ;} break; case 161: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2163 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6613,12 +6583,12 @@ yyreduce: yymsg(0, "Wrong levelset definition"); Free((yyvsp[(2) - (8)].c)); Free((yyvsp[(7) - (8)].c)); #endif - } + ;} break; case 162: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2182 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6656,12 +6626,12 @@ yyreduce: yymsg(0, "Wrong levelset definition"); Free((yyvsp[(2) - (6)].c)); #endif - } + ;} break; case 163: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2221 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) @@ -6764,12 +6734,12 @@ yyreduce: yymsg(0, "Wrong levelset definition (%d)", (yyvsp[(4) - (14)].d)); Free((yyvsp[(2) - (14)].c)); #endif - } + ;} break; case 164: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2329 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ @@ -6778,23 +6748,23 @@ yyreduce: DeleteShape(TheShape.Type, TheShape.Num); } List_Delete((yyvsp[(3) - (4)].l)); - } + ;} break; case 165: -/* Line 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2344 "Gmsh.y" { #if defined(HAVE_POST) @@ -6809,12 +6779,12 @@ yyreduce: yymsg(0, "Unknown command 'Delete %s'", (yyvsp[(2) - (6)].c)); #endif Free((yyvsp[(2) - (6)].c)); - } + ;} break; case 167: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2359 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){ @@ -6842,12 +6812,12 @@ yyreduce: yymsg(0, "Unknown object or expression to delete '%s'", (yyvsp[(2) - (3)].c)); } Free((yyvsp[(2) - (3)].c)); - } + ;} break; case 168: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2387 "Gmsh.y" { #if defined(HAVE_POST) @@ -6859,12 +6829,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2404 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ @@ -6873,34 +6843,34 @@ yyreduce: ColorShape(TheShape.Type, TheShape.Num, (yyvsp[(2) - (5)].u)); } List_Delete((yyvsp[(4) - (5)].l)); - } + ;} break; case 170: -/* Line 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2430 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ @@ -6909,12 +6879,12 @@ yyreduce: VisibilityShape(TheShape.Type, TheShape.Num, 1); } List_Delete((yyvsp[(3) - (4)].l)); - } + ;} break; case 173: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2439 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ @@ -6923,12 +6893,12 @@ yyreduce: VisibilityShape(TheShape.Type, TheShape.Num, 0); } List_Delete((yyvsp[(3) - (4)].l)); - } + ;} break; case 174: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2453 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Include")){ @@ -6970,12 +6940,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2495 "Gmsh.y" { #if defined(HAVE_POST) @@ -6992,12 +6962,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2512 "Gmsh.y" { #if defined(HAVE_POST) && defined(HAVE_MESH) @@ -7012,12 +6982,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2527 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){ @@ -7036,12 +7006,12 @@ yyreduce: else yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (3)].c)); Free((yyvsp[(1) - (3)].c)); - } + ;} break; case 178: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2546 "Gmsh.y" { #if defined(HAVE_PLUGINS) @@ -7053,12 +7023,12 @@ yyreduce: } #endif Free((yyvsp[(3) - (7)].c)); Free((yyvsp[(6) - (7)].c)); - } + ;} break; case 179: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2558 "Gmsh.y" { #if defined(HAVE_POST) @@ -7082,93 +7052,93 @@ yyreduce: yymsg(0, "Unknown 'Combine' command"); #endif Free((yyvsp[(2) - (3)].c)); - } + ;} break; case 180: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2582 "Gmsh.y" { exit(0); - } + ;} break; case 181: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2586 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2593 "Gmsh.y" { CTX::instance()->forcedBBox = 0; GModel::current()->importGEOInternals(); SetBoundingBox(); - } + ;} break; case 183: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2599 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2604 "Gmsh.y" { #if defined(HAVE_OPENGL) drawContext::global()->draw(); #endif - } + ;} break; case 185: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2610 "Gmsh.y" { GModel::current()->createTopologyFromMesh(); - } + ;} break; case 186: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2614 "Gmsh.y" { GModel::current()->createTopologyFromMesh(1); - } + ;} break; case 187: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2618 "Gmsh.y" { GModel::current()->importGEOInternals(); GModel::current()->refineMesh(CTX::instance()->mesh.secondOrderLinear); - } + ;} break; case 188: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2628 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d); @@ -7185,12 +7155,12 @@ yyreduce: yymsg(0, "Reached maximum number of imbricated loops"); ImbricatedLoop = MAX_RECUR_LOOPS - 1; } - } + ;} break; case 189: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2645 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d); @@ -7207,12 +7177,12 @@ yyreduce: yymsg(0, "Reached maximum number of imbricated loops"); ImbricatedLoop = MAX_RECUR_LOOPS - 1; } - } + ;} break; case 190: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2662 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d); @@ -7233,12 +7203,12 @@ yyreduce: yymsg(0, "Reached maximum number of imbricated loops"); ImbricatedLoop = MAX_RECUR_LOOPS - 1; } - } + ;} break; case 191: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2683 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d); @@ -7259,12 +7229,12 @@ yyreduce: yymsg(0, "Reached maximum number of imbricated loops"); ImbricatedLoop = MAX_RECUR_LOOPS - 1; } - } + ;} break; case 192: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2704 "Gmsh.y" { if(ImbricatedLoop <= 0){ @@ -7299,12 +7269,12 @@ yyreduce: else ImbricatedLoop--; } - } + ;} break; case 193: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2739 "Gmsh.y" { if(!FunctionManager::Instance()->createFunction @@ -7312,52 +7282,52 @@ yyreduce: yymsg(0, "Redefinition of function %s", (yyvsp[(2) - (2)].c)); skip_until(NULL, "Return"); //FIXME: wee leak $2 - } + ;} break; case 194: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2747 "Gmsh.y" { if(!FunctionManager::Instance()->leaveFunction (&gmsh_yyin, gmsh_yyname, gmsh_yylineno)) yymsg(0, "Error while exiting function"); - } + ;} break; case 195: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2753 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2760 "Gmsh.y" { if(!(yyvsp[(3) - (4)].d)) skip_until("If", "EndIf"); - } + ;} break; case 197: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2764 "Gmsh.y" { - } + ;} break; case 198: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2773 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7365,12 +7335,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2781 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7378,12 +7348,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2789 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7391,22 +7361,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2797 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - } + ;} break; case 202: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2802 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7414,22 +7384,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2810 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - } + ;} break; case 204: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2815 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7437,22 +7407,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2823 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - } + ;} break; case 206: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2828 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); @@ -7460,356 +7430,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2836 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - } + ;} break; case 208: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2841 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2849 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2856 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2863 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2870 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2877 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2884 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2891 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2898 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2905 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2912 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - } + ;} break; case 219: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2917 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2924 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - } + ;} break; case 221: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2929 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2936 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - } + ;} break; case 223: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2941 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2948 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - } + ;} break; case 225: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2953 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2960 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - } + ;} break; case 227: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2965 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2972 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - } + ;} break; case 229: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2977 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2984 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - } + ;} break; case 231: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2989 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 2996 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - } + ;} break; case 233: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3001 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3008 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; - } + ;} break; case 235: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3013 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3024 "Gmsh.y" { - } + ;} break; case 237: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3027 "Gmsh.y" { - } + ;} break; case 238: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3033 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; @@ -7818,12 +7788,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3042 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; @@ -7843,12 +7813,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3062 "Gmsh.y" { yymsg(0, "Explicit region numbers in layers are deprecated"); @@ -7871,57 +7841,57 @@ yyreduce: List_Delete((yyvsp[(3) - (9)].l)); List_Delete((yyvsp[(5) - (9)].l)); List_Delete((yyvsp[(7) - (9)].l)); - } + ;} break; case 241: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3085 "Gmsh.y" { extr.mesh.Recombine = true; - } + ;} break; case 242: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3089 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_DBL_1; - } + ;} break; case 243: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3093 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_DBL_1_RECOMB; - } + ;} break; case 244: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3097 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_SNGL_1; - } + ;} break; case 245: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3101 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_SNGL_1_RECOMB; - } + ;} break; case 246: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3105 "Gmsh.y" { int num = (int)(yyvsp[(3) - (9)].d); @@ -7940,12 +7910,12 @@ yyreduce: } } List_Delete((yyvsp[(6) - (9)].l)); - } + ;} break; case 247: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3124 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (6)].c), "Index")) @@ -7953,21 +7923,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3136 "Gmsh.y" { (yyval.v)[0] = (yyval.v)[1] = 1.; - } + ;} break; case 249: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3140 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Progression") || !strcmp((yyvsp[(2) - (3)].c), "Power")) @@ -7980,21 +7950,21 @@ yyreduce: } (yyval.v)[1] = (yyvsp[(3) - (3)].d); Free((yyvsp[(2) - (3)].c)); - } + ;} break; case 250: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3155 "Gmsh.y" { (yyval.i) = -1; // left - } + ;} break; case 251: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3159 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "Right")) @@ -8004,48 +7974,48 @@ yyreduce: else // alternated (yyval.i) = 0; Free((yyvsp[(1) - (1)].c)); - } + ;} break; case 252: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3171 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(double)); - } + ;} break; case 253: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3175 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); - } + ;} break; case 254: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3180 "Gmsh.y" { (yyval.i) = 45; - } + ;} break; case 255: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3184 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(2) - (2)].d); - } + ;} break; case 256: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3191 "Gmsh.y" { int type = (int)(yyvsp[(6) - (7)].v)[0]; @@ -8101,12 +8071,12 @@ yyreduce: } List_Delete((yyvsp[(3) - (7)].l)); } - } + ;} break; case 257: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3247 "Gmsh.y" { int k = List_Nbr((yyvsp[(4) - (6)].l)); @@ -8176,22 +8146,22 @@ yyreduce: } } List_Delete((yyvsp[(4) - (6)].l)); - } + ;} break; case 258: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3317 "Gmsh.y" { yymsg(1, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)"); List_Delete((yyvsp[(7) - (8)].l)); - } + ;} break; case 259: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3322 "Gmsh.y" { int k = List_Nbr((yyvsp[(4) - (5)].l)); @@ -8258,12 +8228,12 @@ yyreduce: } } List_Delete((yyvsp[(4) - (5)].l)); - } + ;} break; case 260: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3389 "Gmsh.y" { if(!(yyvsp[(2) - (3)].l)){ @@ -8299,12 +8269,12 @@ yyreduce: } List_Delete((yyvsp[(2) - (3)].l)); } - } + ;} break; case 261: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3425 "Gmsh.y" { if(!(yyvsp[(3) - (5)].l)){ @@ -8347,12 +8317,12 @@ yyreduce: } List_Delete((yyvsp[(3) - (5)].l)); } - } + ;} break; case 262: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3468 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ @@ -8372,12 +8342,12 @@ yyreduce: } } List_Delete((yyvsp[(3) - (6)].l)); - } + ;} break; case 263: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3493 "Gmsh.y" { if(List_Nbr((yyvsp[(5) - (6)].l)) != List_Nbr((yyvsp[(3) - (6)].l))){ @@ -8404,12 +8374,12 @@ yyreduce: } List_Delete((yyvsp[(3) - (6)].l)); List_Delete((yyvsp[(5) - (6)].l)); - } + ;} break; case 264: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3521 "Gmsh.y" { if (List_Nbr((yyvsp[(5) - (12)].l)) != List_Nbr((yyvsp[(10) - (12)].l))){ @@ -8445,12 +8415,12 @@ yyreduce: } List_Delete((yyvsp[(5) - (12)].l)); List_Delete((yyvsp[(10) - (12)].l)); - } + ;} break; case 265: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3564 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); @@ -8473,12 +8443,12 @@ yyreduce: else yymsg(0, "Unknown surface %d", (int)(yyvsp[(8) - (10)].d)); } - } + ;} break; case 266: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3587 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); @@ -8501,37 +8471,37 @@ yyreduce: else yymsg(0, "Unknown surface %d", (int)(yyvsp[(8) - (10)].d)); } - } + ;} break; case 267: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3610 "Gmsh.y" { - } + ;} break; case 268: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3613 "Gmsh.y" { - } + ;} break; case 269: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3622 "Gmsh.y" { ReplaceAllDuplicates(); - } + ;} break; case 270: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3626 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Geometry")) @@ -8541,12 +8511,12 @@ yyreduce: else yymsg(0, "Unknown coherence command"); Free((yyvsp[(2) - (3)].c)); - } + ;} break; case 271: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3636 "Gmsh.y" { if(List_Nbr((yyvsp[(4) - (6)].l)) >= 2){ @@ -8576,36 +8546,36 @@ yyreduce: yymsg(0, "Need at least two points to merge"); ReplaceAllDuplicates(); List_Delete((yyvsp[(4) - (6)].l)); - } + ;} break; case 272: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3670 "Gmsh.y" - { (yyval.c) = (char*)"Generators"; } + { (yyval.c) = (char*)"Homology"; ;} break; case 273: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3671 "Gmsh.y" - { (yyval.c) = (char*)"DualGenerators"; } + { (yyval.c) = (char*)"Cohomology"; ;} break; case 274: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3676 "Gmsh.y" { std::vector<int> domain, subdomain; GModel::current()->addHomologyRequest((yyvsp[(1) - (2)].c), domain, subdomain); - } + ;} break; case 275: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3681 "Gmsh.y" { std::vector<int> domain, subdomain; @@ -8616,12 +8586,12 @@ yyreduce: } GModel::current()->addHomologyRequest((yyvsp[(1) - (5)].c), domain, subdomain); List_Delete((yyvsp[(3) - (5)].l)); - } + ;} break; case 276: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3692 "Gmsh.y" { std::vector<int> domain, subdomain; @@ -8638,500 +8608,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3713 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (1)].d); } + { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 278: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3714 "Gmsh.y" - { (yyval.d) = (yyvsp[(2) - (3)].d); } + { (yyval.d) = (yyvsp[(2) - (3)].d); ;} break; case 279: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3715 "Gmsh.y" - { (yyval.d) = -(yyvsp[(2) - (2)].d); } + { (yyval.d) = -(yyvsp[(2) - (2)].d); ;} break; case 280: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3716 "Gmsh.y" - { (yyval.d) = (yyvsp[(2) - (2)].d); } + { (yyval.d) = (yyvsp[(2) - (2)].d); ;} break; case 281: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3717 "Gmsh.y" - { (yyval.d) = !(yyvsp[(2) - (2)].d); } + { (yyval.d) = !(yyvsp[(2) - (2)].d); ;} break; case 282: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3718 "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 1806 of yacc.c */ +/* Line 1455 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 284: -/* Line 1806 of yacc.c */ +/* Line 1455 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 285: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3722 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3728 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3729 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3730 "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 1806 of yacc.c */ +/* Line 1455 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 290: -/* Line 1806 of yacc.c */ +/* Line 1455 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 291: -/* Line 1806 of yacc.c */ +/* Line 1455 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 292: -/* Line 1806 of yacc.c */ +/* Line 1455 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 293: -/* Line 1806 of yacc.c */ +/* Line 1455 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 294: -/* Line 1806 of yacc.c */ +/* Line 1455 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 295: -/* Line 1806 of yacc.c */ +/* Line 1455 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 296: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3738 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3739 "Gmsh.y" - { (yyval.d) = exp((yyvsp[(3) - (4)].d)); } + { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; case 298: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3740 "Gmsh.y" - { (yyval.d) = log((yyvsp[(3) - (4)].d)); } + { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; case 299: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3741 "Gmsh.y" - { (yyval.d) = log10((yyvsp[(3) - (4)].d)); } + { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; case 300: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3742 "Gmsh.y" - { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); } + { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; case 301: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3743 "Gmsh.y" - { (yyval.d) = sin((yyvsp[(3) - (4)].d)); } + { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; case 302: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3744 "Gmsh.y" - { (yyval.d) = asin((yyvsp[(3) - (4)].d)); } + { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; case 303: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3745 "Gmsh.y" - { (yyval.d) = cos((yyvsp[(3) - (4)].d)); } + { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; case 304: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3746 "Gmsh.y" - { (yyval.d) = acos((yyvsp[(3) - (4)].d)); } + { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; case 305: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3747 "Gmsh.y" - { (yyval.d) = tan((yyvsp[(3) - (4)].d)); } + { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; case 306: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3748 "Gmsh.y" - { (yyval.d) = atan((yyvsp[(3) - (4)].d)); } + { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; case 307: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3749 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3750 "Gmsh.y" - { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); } + { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; case 309: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3751 "Gmsh.y" - { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); } + { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; case 310: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3752 "Gmsh.y" - { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); } + { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; case 311: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3753 "Gmsh.y" - { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); } + { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; case 312: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3754 "Gmsh.y" - { (yyval.d) = floor((yyvsp[(3) - (4)].d)); } + { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; case 313: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3755 "Gmsh.y" - { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); } + { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; case 314: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3756 "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 1806 of yacc.c */ +/* Line 1455 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 316: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3758 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3759 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3761 "Gmsh.y" - { (yyval.d) = exp((yyvsp[(3) - (4)].d)); } + { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; case 319: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3762 "Gmsh.y" - { (yyval.d) = log((yyvsp[(3) - (4)].d)); } + { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; case 320: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3763 "Gmsh.y" - { (yyval.d) = log10((yyvsp[(3) - (4)].d)); } + { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; case 321: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3764 "Gmsh.y" - { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); } + { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; case 322: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3765 "Gmsh.y" - { (yyval.d) = sin((yyvsp[(3) - (4)].d)); } + { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; case 323: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3766 "Gmsh.y" - { (yyval.d) = asin((yyvsp[(3) - (4)].d)); } + { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; case 324: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3767 "Gmsh.y" - { (yyval.d) = cos((yyvsp[(3) - (4)].d)); } + { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; case 325: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3768 "Gmsh.y" - { (yyval.d) = acos((yyvsp[(3) - (4)].d)); } + { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; case 326: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3769 "Gmsh.y" - { (yyval.d) = tan((yyvsp[(3) - (4)].d)); } + { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; case 327: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3770 "Gmsh.y" - { (yyval.d) = atan((yyvsp[(3) - (4)].d)); } + { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; case 328: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3771 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3772 "Gmsh.y" - { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); } + { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; case 330: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3773 "Gmsh.y" - { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); } + { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; case 331: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3774 "Gmsh.y" - { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); } + { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; case 332: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3775 "Gmsh.y" - { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); } + { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; case 333: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3776 "Gmsh.y" - { (yyval.d) = floor((yyvsp[(3) - (4)].d)); } + { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; case 334: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3777 "Gmsh.y" - { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); } + { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; case 335: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3778 "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 1806 of yacc.c */ +/* Line 1455 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 337: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3780 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3781 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3790 "Gmsh.y" - { (yyval.d) = (yyvsp[(1) - (1)].d); } + { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 340: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3791 "Gmsh.y" - { (yyval.d) = 3.141592653589793; } + { (yyval.d) = 3.141592653589793; ;} break; case 341: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3792 "Gmsh.y" - { (yyval.d) = Msg::GetCommRank(); } + { (yyval.d) = Msg::GetCommRank(); ;} break; case 342: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3793 "Gmsh.y" - { (yyval.d) = Msg::GetCommSize(); } + { (yyval.d) = Msg::GetCommSize(); ;} break; case 343: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3794 "Gmsh.y" - { (yyval.d) = GetGmshMajorVersion(); } + { (yyval.d) = GetGmshMajorVersion(); ;} break; case 344: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3795 "Gmsh.y" - { (yyval.d) = GetGmshMinorVersion(); } + { (yyval.d) = GetGmshMinorVersion(); ;} break; case 345: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3796 "Gmsh.y" - { (yyval.d) = GetGmshPatchVersion(); } + { (yyval.d) = GetGmshPatchVersion(); ;} break; case 346: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3801 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (1)].c))){ @@ -9148,12 +9118,12 @@ yyreduce: (yyval.d) = s.value[0]; } Free((yyvsp[(1) - (1)].c)); - } + ;} break; case 347: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3821 "Gmsh.y" { char tmpstring[1024]; @@ -9172,12 +9142,12 @@ yyreduce: (yyval.d) = s.value[0]; } Free((yyvsp[(1) - (5)].c)); - } + ;} break; case 348: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3840 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); @@ -9195,12 +9165,12 @@ yyreduce: (yyval.d) = s.value[index]; } Free((yyvsp[(1) - (4)].c)); - } + ;} break; case 349: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3858 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(2) - (4)].c))){ @@ -9212,12 +9182,12 @@ yyreduce: (yyval.d) = s.value.size(); } Free((yyvsp[(2) - (4)].c)); - } + ;} break; case 350: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3870 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (2)].c))){ @@ -9234,12 +9204,12 @@ yyreduce: (yyval.d) = (s.value[0] += (yyvsp[(2) - (2)].i)); } Free((yyvsp[(1) - (2)].c)); - } + ;} break; case 351: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3887 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); @@ -9257,32 +9227,32 @@ yyreduce: (yyval.d) = (s.value[index] += (yyvsp[(5) - (5)].i)); } Free((yyvsp[(1) - (5)].c)); - } + ;} break; case 352: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3908 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3913 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3918 "Gmsh.y" { double d = 0.; @@ -9292,12 +9262,12 @@ yyreduce: (yyval.d) = d; } Free((yyvsp[(1) - (4)].c)); Free((yyvsp[(3) - (4)].c)); - } + ;} break; case 355: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3928 "Gmsh.y" { double d = 0.; @@ -9307,160 +9277,160 @@ yyreduce: (yyval.d) = d; } Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(6) - (7)].c)); - } + ;} break; case 356: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3938 "Gmsh.y" { (yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d)); Free((yyvsp[(3) - (6)].c)); - } + ;} break; case 357: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3946 "Gmsh.y" { memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double)); - } + ;} break; case 358: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3950 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i]; - } + ;} break; case 359: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3954 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i]; - } + ;} break; case 360: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3958 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3962 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3969 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3973 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3977 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3981 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3988 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(List_T*)); List_Add((yyval.l), &((yyvsp[(1) - (1)].l))); - } + ;} break; case 367: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 3993 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].l))); - } + ;} break; case 368: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4000 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); - } + ;} break; case 369: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4005 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); - } + ;} break; case 370: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4009 "Gmsh.y" { // creates an empty list (yyval.l) = List_Create(2, 1, sizeof(double)); - } + ;} break; case 371: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4014 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); - } + ;} break; case 372: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4018 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); @@ -9468,12 +9438,12 @@ yyreduce: double *pd = (double*)List_Pointer((yyval.l), i); (*pd) = - (*pd); } - } + ;} break; case 373: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4026 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (5)].l); @@ -9481,21 +9451,21 @@ yyreduce: double *pd = (double*)List_Pointer((yyval.l), i); (*pd) *= (yyvsp[(1) - (5)].d); } - } + ;} break; case 374: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4037 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); - } + ;} break; case 375: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4041 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all")) @@ -9504,12 +9474,12 @@ yyreduce: yyerror("Unknown special string for list replacement"); (yyval.l) = List_Create(2, 1, sizeof(double)); } - } + ;} break; case 376: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4053 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); @@ -9517,12 +9487,12 @@ yyreduce: double *pd = (double*)List_Pointer((yyval.l), i); (*pd) = - (*pd); } - } + ;} break; case 377: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4061 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (3)].l); @@ -9530,24 +9500,24 @@ yyreduce: double *pd = (double*)List_Pointer((yyval.l), i); (*pd) *= (yyvsp[(1) - (3)].d); } - } + ;} break; case 378: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4069 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4076 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -9558,12 +9528,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4087 "Gmsh.y" { // Returns the coordinates of a point and fills a list with it. @@ -9583,48 +9553,48 @@ yyreduce: List_Add((yyval.l), &v->Pos.Y); List_Add((yyval.l), &v->Pos.Z); } - } + ;} break; case 381: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4107 "Gmsh.y" { (yyval.l) = GetAllEntityNumbers(0); - } + ;} break; case 382: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4111 "Gmsh.y" { (yyval.l) = GetAllEntityNumbers(1); - } + ;} break; case 383: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4115 "Gmsh.y" { (yyval.l) = GetAllEntityNumbers(2); - } + ;} break; case 384: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4119 "Gmsh.y" { (yyval.l) = GetAllEntityNumbers(3); - } + ;} break; case 385: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4123 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); @@ -9634,12 +9604,12 @@ yyreduce: List_Add((yyval.l), &d); } List_Delete((yyvsp[(1) - (1)].l)); - } + ;} break; case 386: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4133 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); @@ -9649,12 +9619,12 @@ yyreduce: List_Add((yyval.l), &d); } List_Delete((yyvsp[(1) - (1)].l)); - } + ;} break; case 387: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4143 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -9666,12 +9636,12 @@ yyreduce: List_Add((yyval.l), &s.value[i]); } Free((yyvsp[(1) - (3)].c)); - } + ;} break; case 388: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4155 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -9683,12 +9653,12 @@ yyreduce: List_Add((yyval.l), &s.value[i]); } Free((yyvsp[(3) - (4)].c)); - } + ;} break; case 389: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4167 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -9706,40 +9676,40 @@ yyreduce: } Free((yyvsp[(1) - (6)].c)); List_Delete((yyvsp[(4) - (6)].l)); - } + ;} break; case 390: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4188 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); - } + ;} break; case 391: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4193 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); - } + ;} break; case 392: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4197 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].d))); - } + ;} break; case 393: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4201 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){ @@ -9748,63 +9718,63 @@ yyreduce: List_Add((yyval.l), &d); } List_Delete((yyvsp[(3) - (3)].l)); - } + ;} break; case 394: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4213 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4217 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4229 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4236 "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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4246 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); - } + ;} break; case 399: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4250 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); @@ -9816,40 +9786,40 @@ yyreduce: List_Add((yyval.l), &ct->table[i]); } Free((yyvsp[(1) - (6)].c)); - } + ;} break; case 400: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4265 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); List_Add((yyval.l), &((yyvsp[(1) - (1)].u))); - } + ;} break; case 401: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4270 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].u))); - } + ;} break; case 402: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4277 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); - } + ;} break; case 403: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4281 "Gmsh.y" { if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){ @@ -9862,12 +9832,12 @@ yyreduce: strcpy((yyval.c), val.c_str()); Free((yyvsp[(1) - (1)].c)); } - } + ;} break; case 404: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4294 "Gmsh.y" { std::string out; @@ -9875,12 +9845,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4302 "Gmsh.y" { std::string out; @@ -9888,21 +9858,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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4313 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); - } + ;} break; case 407: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4317 "Gmsh.y" { (yyval.c) = (char *)Malloc(32 * sizeof(char)); @@ -9910,12 +9880,12 @@ yyreduce: time(&now); strcpy((yyval.c), ctime(&now)); (yyval.c)[strlen((yyval.c)) - 1] = '\0'; - } + ;} break; case 408: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4325 "Gmsh.y" { const char *env = GetEnvironmentVar((yyvsp[(3) - (4)].c)); @@ -9923,12 +9893,12 @@ yyreduce: (yyval.c) = (char *)Malloc((sizeof(env) + 1) * sizeof(char)); strcpy((yyval.c), env); Free((yyvsp[(3) - (4)].c)); - } + ;} break; case 409: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4333 "Gmsh.y" { std::string s = Msg::GetString((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c)); @@ -9936,12 +9906,12 @@ yyreduce: strcpy((yyval.c), s.c_str()); Free((yyvsp[(3) - (6)].c)); Free((yyvsp[(5) - (6)].c)); - } + ;} break; case 410: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4341 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (6)].c)) + strlen((yyvsp[(5) - (6)].c)) + 1) * sizeof(char)); @@ -9949,12 +9919,12 @@ yyreduce: strcat((yyval.c), (yyvsp[(5) - (6)].c)); Free((yyvsp[(3) - (6)].c)); Free((yyvsp[(5) - (6)].c)); - } + ;} break; case 411: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4349 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); @@ -9968,12 +9938,12 @@ yyreduce: } if(i <= 0) strcpy((yyval.c), (yyvsp[(3) - (4)].c)); Free((yyvsp[(3) - (4)].c)); - } + ;} break; case 412: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4363 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); @@ -9987,21 +9957,21 @@ yyreduce: else strcpy((yyval.c), &(yyvsp[(3) - (4)].c)[i+1]); Free((yyvsp[(3) - (4)].c)); - } + ;} break; case 413: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4377 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); - } + ;} break; case 414: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 4381 "Gmsh.y" { char tmpstring[1024]; @@ -10020,26 +9990,15 @@ yyreduce: Free((yyvsp[(3) - (6)].c)); } List_Delete((yyvsp[(5) - (6)].l)); - } + ;} break; -/* Line 1806 of yacc.c */ -#line 10030 "Gmsh.tab.cpp" +/* Line 1455 of yacc.c */ +#line 10000 "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); @@ -10067,10 +10026,6 @@ 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) { @@ -10078,36 +10033,37 @@ yyerrlab: #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) { - 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; + 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; + } } -# undef YYSYNTAX_ERROR #endif } @@ -10166,7 +10122,7 @@ yyerrlab1: for (;;) { yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) + if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) @@ -10225,13 +10181,8 @@ yyexhaustedlab: yyreturn: if (yychar != YYEMPTY) - { - /* 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); - } + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -10256,7 +10207,7 @@ yyreturn: -/* Line 2067 of yacc.c */ +/* Line 1675 of yacc.c */ #line 4401 "Gmsh.y" diff --git a/Parser/Gmsh.tab.hpp b/Parser/Gmsh.tab.hpp index dceee60cb62d56ddb3b9e946afb69fb7bde87ba6..b0fa1dec2c1c29fcc3fa94d981f2763576f456ed 100644 --- a/Parser/Gmsh.tab.hpp +++ b/Parser/Gmsh.tab.hpp @@ -1,8 +1,10 @@ -/* A Bison parser, made by GNU Bison 2.5. */ -/* Bison interface for Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ + +/* Skeleton interface for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + 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 @@ -181,7 +183,7 @@ typedef union YYSTYPE { -/* Line 2068 of yacc.c */ +/* Line 1676 of yacc.c */ #line 87 "Gmsh.y" char *c; @@ -194,8 +196,8 @@ typedef union YYSTYPE -/* Line 2068 of yacc.c */ -#line 199 "Gmsh.tab.hpp" +/* Line 1676 of yacc.c */ +#line 201 "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 4a2581104f87c56a9ef882c95104356d16bff3b6..a46af7a3f6b869dc7e289a1be714c41efae8cea0 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -3667,8 +3667,8 @@ Coherence : // H O M O L O G Y HomologyCommand : - tHomology { $$ = (char*)"Generators"; } - | tCohomology { $$ = (char*)"DualGenerators"; } + tHomology { $$ = (char*)"Homology"; } + | tCohomology { $$ = (char*)"Cohomology"; } ; Homology : diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp index e7cc92b77dbe299aff2d692321a8f444b54417c2..2bc746933ebd95c8ec895b1a079f8e13e8b9f276 100644 --- a/Parser/Gmsh.yy.cpp +++ b/Parser/Gmsh.yy.cpp @@ -73,7 +73,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -104,6 +103,8 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif +#endif /* ! C99 */ + #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -160,7 +161,15 @@ typedef unsigned int flex_uint32_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -172,12 +181,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 +207,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 +229,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 +299,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 +328,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 ); @@ -945,7 +954,7 @@ void skipline(void); #define YY_NO_UNISTD_H #endif -#line 949 "Gmsh.yy.cpp" +#line 958 "Gmsh.yy.cpp" #define INITIAL 0 @@ -984,7 +993,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 ); @@ -1026,7 +1035,12 @@ static int input (void ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -1034,7 +1048,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO fwrite( gmsh_yytext, gmsh_yyleng, 1, gmsh_yyout ) +#define ECHO do { if (fwrite( gmsh_yytext, gmsh_yyleng, 1, gmsh_yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1045,7 +1059,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - yy_size_t n; \ + size_t n; \ for ( n = 0; n < max_size && \ (c = getc( gmsh_yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1130,7 +1144,7 @@ YY_DECL #line 49 "Gmsh.l" -#line 1134 "Gmsh.yy.cpp" +#line 1148 "Gmsh.yy.cpp" if ( !(yy_init) ) { @@ -1995,7 +2009,7 @@ YY_RULE_SETUP #line 233 "Gmsh.l" ECHO; YY_BREAK -#line 1999 "Gmsh.yy.cpp" +#line 2013 "Gmsh.yy.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2181,7 +2195,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 +2209,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 +2240,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 +2350,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 +2399,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 +2423,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 +2675,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)) { @@ -2753,16 +2767,17 @@ YY_BUFFER_STATE gmsh_yy_scan_string (yyconst char * yystr ) /** Setup the input buffer state to scan the given bytes. The next call to gmsh_yylex() will * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @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 +2859,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/Plugin/HomologyComputation.cpp b/Plugin/HomologyComputation.cpp index 0a49bdc536419dc0493fef1627e4b2bddd836bdc..343337e6359b5f2f6f93cb431a20b376b97de50c 100644 --- a/Plugin/HomologyComputation.cpp +++ b/Plugin/HomologyComputation.cpp @@ -19,9 +19,8 @@ StringXNumber HomologyComputationOptions_Number[] = { {GMSH_FULLRC, "PhysicalGroupForDomain2", NULL, 0.}, {GMSH_FULLRC, "PhysicalGroupForSubdomain1", NULL, 0.}, {GMSH_FULLRC, "PhysicalGroupForSubdomain2", NULL, 0.}, - {GMSH_FULLRC, "ComputeGenerators", NULL, 1.}, - {GMSH_FULLRC, "ComputeCuts", NULL, 0.}, - //{GMSH_FULLRC, "ComputeRanks", NULL, 0.}, + {GMSH_FULLRC, "CompututeHomology", NULL, 1.}, + {GMSH_FULLRC, "ComputeCohomology", NULL, 0.}, }; StringXString HomologyComputationOptions_String[] = { @@ -38,15 +37,15 @@ extern "C" std::string GMSH_HomologyComputationPlugin::getHelp() const { - return "Plugin(Homology) computes ranks and generators of " - "(relative) homology spaces and their thick cuts.\n\n" - + return "Plugin(Homology) computes ranks and basis elements " + "of (relative) homology and cohomology spaces.\n\n" + "Define physical groups in order to specify the computation " "domain and the relative subdomain. Otherwise the whole mesh " "is the domain and the relative subdomain is empty. \n\n" - - "Plugin(Homology) creates new views, one for each generator found. " - "The resulting generator chains together with the mesh are saved to " + + "Plugin(Homology) creates new views, one for each basis element. " + "The resulting basis chains together with the mesh are saved to " "the file given."; } @@ -73,10 +72,10 @@ StringXString *GMSH_HomologyComputationPlugin::getOptionStr(int iopt) PView *GMSH_HomologyComputationPlugin::execute(PView *v) { std::string fileName = HomologyComputationOptions_String[0].def; - + std::vector<int> domain; std::vector<int> subdomain; - + int d1 = (int)HomologyComputationOptions_Number[0].def; int d2 = (int)HomologyComputationOptions_Number[1].def; if(d1 > 0) domain.push_back(d1); @@ -87,26 +86,22 @@ PView *GMSH_HomologyComputationPlugin::execute(PView *v) if(d2 > 0) subdomain.push_back(d2); - int gens = (int)HomologyComputationOptions_Number[4].def; - int cuts = (int)HomologyComputationOptions_Number[5].def; - //int rank = (int)HomologyComputationOptions_Number[6].def; + int hom = (int)HomologyComputationOptions_Number[4].def; + int coh = (int)HomologyComputationOptions_Number[5].def; GModel *m = GModel::current(); - + Homology* homology = new Homology(m, domain, subdomain); homology->setFileName(fileName); CellComplex* cc = homology->createCellComplex(); - if(gens != 0){ - homology->findGenerators(cc); + if(hom != 0){ + homology->findHomologyBasis(cc); } - if(cuts != 0){ + if(coh != 0){ cc->restoreComplex(); - homology->findDualGenerators(cc); + homology->findCohomologyBasis(cc); } - /*if(rank != 0){ - homology->computeRanks(); - }*/ - + delete cc; delete homology; diff --git a/Plugin/HomologyComputation.h b/Plugin/HomologyComputation.h index a3d3c1894da23cf73b4f995d8cb0d8aee42b09d4..2cd18476f414eec2782f171d60fd7612e792ee92 100644 --- a/Plugin/HomologyComputation.h +++ b/Plugin/HomologyComputation.h @@ -25,14 +25,14 @@ class GMSH_HomologyComputationPlugin : public GMSH_PostPlugin std::string getName() const { return "Homology"; } std::string getShortHelp() const { - return "Compute relative homology groups"; + return "Compute relative (co)homology spaces"; } std::string getHelp() const; std::string getAuthor() const { return "M. Pellikka"; } int getNbOptions() const; - StringXNumber *getOption(int iopt); + StringXNumber *getOption(int iopt); int getNbOptionsStr() const; - StringXString *getOptionStr(int iopt); + StringXString *getOptionStr(int iopt); PView *execute(PView *); };