diff --git a/Common/Context.h b/Common/Context.h index 78a19b27bb4d829eb07ba20cc91ea3200a44e194..a4d8363db632ec11084d866405955cc03c5d22a1 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -119,7 +119,6 @@ class Context_T { int expert_mode; // to disable some warnings for beginners int printing; // dynamic: equal to 1 while gmsh is printing int hide_unselected; // hide all unselected entities - int draw_all_models; int use_transform; // transform display coordinates? (0=no, 1=scale, 2=...) double transform[3][3], offset[3]; // transformation matrix for geo/mesh drawing diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index b72bb8b93db1221b897de28001776b43b6c369ca..4cddb013c84a24f176cb7087c0abd36dae2e0ba8 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -531,8 +531,6 @@ StringXNumber GeneralOptions_Number[] = { { F|O, "DoubleBuffer" , opt_general_double_buffer , 1. , "Use a double buffered graphic window (on Unix, should be set to 0 when working on a remote host without GLX)" }, - { F|O, "DrawAllModels" , opt_general_draw_all_models, 0. , - "Draw all loaded models (instead of drawing only the current one)" }, { F|O, "DrawBoundingBoxes" , opt_general_draw_bounding_box, 0. , "Draw bounding boxes" }, diff --git a/Common/Makefile b/Common/Makefile index d9a89bfaed29b101feeea432e7e3964cfeccfb7d..05670f5734d69d4adb18ba48fc5b77fafc69820d 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -22,7 +22,6 @@ SRC = Gmsh.cpp\ OS.cpp\ OpenFile.cpp\ CreateFile.cpp\ - Visibility.cpp\ VertexArray.cpp\ SmoothData.cpp\ Octree.cpp OctreeInternals.cpp\ @@ -67,7 +66,8 @@ Gmsh${OBJEXT}: Gmsh.cpp GmshDefines.h ../Geo/GModel.h ../Geo/GVertex.h \ ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h GmshMessage.h OpenFile.h CreateFile.h Options.h \ ../Post/ColorTable.h CommandLine.h OS.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Mesh/Generator.h ../Mesh/Field.h \ + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/GmshMessage.h ../Mesh/Generator.h ../Mesh/Field.h \ ../Post/PView.h Context.h ../Geo/CGNSOptions.h \ ../Mesh/PartitionOptions.h ../Mesh/Partition.h GmshDaemon.h \ ../Plugin/PluginManager.h @@ -114,7 +114,8 @@ OpenFile${OBJEXT}: OpenFile.cpp GmshMessage.h ../Geo/Geo.h \ ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \ ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \ ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h ../Common/ListUtils.h \ + ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/ListUtils.h \ ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \ ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ @@ -126,8 +127,7 @@ OpenFile${OBJEXT}: OpenFile.cpp GmshMessage.h ../Geo/Geo.h \ ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h Context.h \ ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h OpenFile.h \ CommandLine.h ../Graphics/ReadImg.h OS.h StringUtils.h \ - ../Parser/Parser.h ../Post/PView.h ../Post/PViewData.h \ - ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Fltk/GUI.h \ + ../Parser/Parser.h ../Post/PView.h ../Post/PViewData.h ../Fltk/GUI.h \ ../Fltk/Draw.h CreateFile${OBJEXT}: CreateFile.cpp GmshMessage.h ../Geo/GModel.h \ ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ @@ -145,26 +145,14 @@ CreateFile${OBJEXT}: CreateFile.cpp GmshMessage.h ../Geo/GModel.h \ ../Graphics/gl2png.h ../Graphics/PixelBuffer.h ../Graphics/gl2ppm.h \ ../Graphics/PixelBuffer.h ../Graphics/gl2yuv.h \ ../Graphics/PixelBuffer.h -Visibility${OBJEXT}: Visibility.cpp Visibility.h GmshDefines.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \ - ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Parser/Parser.h VertexArray${OBJEXT}: VertexArray.cpp VertexArray.h ../Geo/SVector3.h \ ../Geo/SPoint3.h Context.h ../Geo/CGNSOptions.h \ ../Mesh/PartitionOptions.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/GmshMessage.h SmoothData${OBJEXT}: SmoothData.cpp SmoothData.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/GmshMessage.h Octree${OBJEXT}: Octree.cpp Octree.h OctreeInternals.h OctreeInternals${OBJEXT}: OctreeInternals.cpp GmshMessage.h OctreeInternals.h StringUtils${OBJEXT}: StringUtils.cpp StringUtils.h GmshMessage.h diff --git a/Common/OpenFile.cpp b/Common/OpenFile.cpp index e3206ceed7c8d900db18982179572cef6143b9ef..8aef3223a79a70223d0507ad96880a68fd64fb6f 100644 --- a/Common/OpenFile.cpp +++ b/Common/OpenFile.cpp @@ -241,6 +241,9 @@ int MergeFile(const char *name, int warn_if_missing) return 0; } + if(model->getName() == "") + SetProjectName(name); + // added 'b' for pure Windows programs, since some of these files // contain binary data FILE *fp = fopen(name, "rb"); @@ -270,8 +273,7 @@ int MergeFile(const char *name, int warn_if_missing) sprintf(tmp, "gunzip -c %s > %s", name, no_ext); if(SystemCall(tmp)) Msg::Error("Failed to uncompress `%s': check directory permissions", name); - if(!strcmp(CTX.filename, name)) // this is the project file - SetProjectName(no_ext); + SetProjectName(no_ext); return MergeFile(no_ext); } } @@ -418,7 +420,6 @@ void OpenProject(const char *name) // parsing ResetTemporaryBoundingBox(); - SetProjectName(name); MergeFile(name); CTX.threads_lock = 0; diff --git a/Common/Options.cpp b/Common/Options.cpp index 7e55ecfb626eec4c0aae36b3d6431749e7c8f6dd..f9b65e849eec3883d70ce48eee81fa8fd1377d99 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -3176,13 +3176,6 @@ double opt_general_draw_bounding_box(OPT_ARGS_NUM) return CTX.draw_bbox; } -double opt_general_draw_all_models(OPT_ARGS_NUM) -{ - if(action & GMSH_SET) - CTX.draw_all_models = (int)val; - return CTX.draw_all_models; -} - double opt_general_xmin(OPT_ARGS_NUM) { return CTX.min[0]; diff --git a/Common/Options.h b/Common/Options.h index 54e972cafd69090ec02ba17857422dba2f6178f3..28afc13377f113596f43c4271d362c4f501b8272 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -288,7 +288,6 @@ double opt_general_orthographic(OPT_ARGS_NUM); double opt_general_mouse_selection(OPT_ARGS_NUM); double opt_general_mouse_hover_meshes(OPT_ARGS_NUM); double opt_general_draw_bounding_box(OPT_ARGS_NUM); -double opt_general_draw_all_models(OPT_ARGS_NUM); double opt_general_fast_redraw(OPT_ARGS_NUM); double opt_general_xmin(OPT_ARGS_NUM); double opt_general_xmax(OPT_ARGS_NUM); diff --git a/Common/Visibility.cpp b/Common/Visibility.cpp deleted file mode 100644 index 17d60d3b82ca4a952e715a07e58a7dadcb917051..0000000000000000000000000000000000000000 --- a/Common/Visibility.cpp +++ /dev/null @@ -1,312 +0,0 @@ -// Gmsh - Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle -// -// See the LICENSE.txt file for license information. Please report all -// bugs and problems to <gmsh@geuz.org>. - -#include <string.h> -#include "Visibility.h" -#include "GModel.h" -#include "MElement.h" - -#if !defined(HAVE_NO_PARSER) -#include "Parser.h" -#endif - -VisibilityManager *VisibilityManager::manager = 0; - -class VisLessThan{ - public: - bool operator()(const Vis *v1, const Vis *v2) const - { - switch(VisibilityManager::instance()->getSortMode()){ - case 1: return v1->getDim() < v2->getDim() ? true : false; - case -1: return v1->getDim() > v2->getDim() ? true : false; - case 2: return v1->getTag() < v2->getTag() ? true : false; - case -2: return v1->getTag() > v2->getTag() ? true : false; - case 3: - return strcmp(VisibilityManager::instance()->getLabel(v1->getTag()).c_str(), - VisibilityManager::instance()->getLabel(v2->getTag()).c_str()) < 0 ? - true : false; - default: - return strcmp(VisibilityManager::instance()->getLabel(v1->getTag()).c_str(), - VisibilityManager::instance()->getLabel(v2->getTag()).c_str()) > 0 ? - true : false; - } - } -}; - -void VisibilityManager::update(int type) -{ - _labels.clear(); - for(unsigned int i = 0; i < _entities.size(); i++) - delete _entities[i]; - _entities.clear(); - - GModel *m = GModel::current(); - -#if !defined(HAVE_NO_PARSER) - for(std::map<std::string, std::vector<double> >::iterator it = gmsh_yysymbols.begin(); - it != gmsh_yysymbols.end(); ++it) - for(unsigned int i = 0; i < it->second.size(); i++) - VisibilityManager::instance()->setLabel((int)it->second[i], it->first, 0); -#endif - - if(type == 0){ // elementary entities - for(GModel::piter it = m->firstElementaryName(); it != m->lastElementaryName(); ++it) - setLabel(it->first, it->second); - for(GModel::viter it = m->firstVertex(); it != m->lastVertex(); it++) - _entities.push_back(new VisElementary(*it)); - for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++) - _entities.push_back(new VisElementary(*it)); - for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++) - _entities.push_back(new VisElementary(*it)); - for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++) - _entities.push_back(new VisElementary(*it)); - } - else if(type == 1){ // physical entities - for(GModel::piter it = m->firstPhysicalName(); it != m->lastPhysicalName(); ++it) - setLabel(it->first, it->second); - std::map<int, std::vector<GEntity*> > groups[4]; - m->getPhysicalGroups(groups); - for(int i = 0; i < 4; i++){ - std::map<int, std::vector<GEntity*> >::const_iterator it = groups[i].begin(); - for(; it != groups[i].end(); ++it) - _entities.push_back(new VisPhysical(it->first, i, it->second)); - } - } - else if(type == 2){ // partitions - std::set<int> part = m->getMeshPartitions(); - for(std::set<int>::const_iterator it = part.begin(); it != part.end(); ++it) - _entities.push_back(new VisPartition(*it)); - } - std::sort(_entities.begin(), _entities.end(), VisLessThan()); -} - -void VisibilityManager::setAllInvisible(int type) -{ - GModel *m = GModel::current(); - - if(type == 0 || type == 1){ - // elementary or physical mode: set all entities in the model invisible - for(GModel::viter it = m->firstVertex(); it != m->lastVertex(); it++) - (*it)->setVisibility(false); - for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++) - (*it)->setVisibility(false); - for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++) - (*it)->setVisibility(false); - for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++) - (*it)->setVisibility(false); - } - - // this is superfluous in elementary mode, but we don't care - for(int i = 0; i < getNumEntities(); i++) setVisibility(i, false); -} - -std::string VisibilityManager::getBrowserLine(int n) -{ - int tag = _entities[n]->getTag(); - char str[256]; - bool label_exists = _labels.count(tag); - const char *label_color = (label_exists && _labels[tag].second) ? "@b" : ""; - sprintf(str, "\t%s\t%d\t%s%s", _entities[n]->getName().c_str(), tag, - label_color, label_exists ? _labels[tag].first.c_str() : ""); - return std::string(str); -} - -std::string VisibilityManager::getStringForGEO() -{ - std::vector<int> state[4][2]; - - GModel *m = GModel::current(); - - for(GModel::viter it = m->firstVertex(); it != m->lastVertex(); it++) - (*it)->getVisibility() ? - state[0][1].push_back((*it)->tag()) : state[0][0].push_back((*it)->tag()); - for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++) - (*it)->getVisibility() ? - state[1][1].push_back((*it)->tag()) : state[1][0].push_back((*it)->tag()); - for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++) - (*it)->getVisibility() ? - state[2][1].push_back((*it)->tag()) : state[2][0].push_back((*it)->tag()); - for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++) - (*it)->getVisibility() ? - state[3][1].push_back((*it)->tag()) : state[3][0].push_back((*it)->tag()); - - char tmp[256]; - const char *labels[4] = {"Point", "Line", "Surface", "Volume"}; - std::string str; - int mode; - - int on = 0, off = 0; - for(int i = 0; i < 4; i++){ - on += state[i][1].size(); - off += state[i][0].size(); - } - - if(on > off){ - str = "Show \"*\";\n"; - if(!off) return str; - str += "Hide {\n"; - mode = 0; - } - else{ - str = "Hide \"*\";\n"; - if(!on) return str; - str += "Show {\n"; - mode = 1; - } - - for(int i = 0; i < 4; i++){ - if(state[i][mode].size()){ - str += labels[i]; - str += "{"; - for(unsigned int j = 0; j < state[i][mode].size(); j++){ - if(j) str += ","; - sprintf(tmp, "%d", state[i][mode][j]); - str += tmp; - } - str += "};\n"; - } - } - str += "}\n"; - return str; -} - -void VisibilityManager::setVisibilityByNumber(int type, int num, char val, bool recursive) -{ - bool all = (num < 0) ? true : false; - - GModel *m = GModel::current(); - - switch(type){ - case 0: // nodes - for(GModel::viter it = m->firstVertex(); it != m->lastVertex(); it++) - for(unsigned int i = 0; i < (*it)->mesh_vertices.size(); i++) - if(all || (*it)->mesh_vertices[i]->getNum() == num) - (*it)->mesh_vertices[i]->setVisibility(val); - for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++) - for(unsigned int i = 0; i < (*it)->mesh_vertices.size(); i++) - if(all || (*it)->mesh_vertices[i]->getNum() == num) - (*it)->mesh_vertices[i]->setVisibility(val); - for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++) - for(unsigned int i = 0; i < (*it)->mesh_vertices.size(); i++) - if(all || (*it)->mesh_vertices[i]->getNum() == num) - (*it)->mesh_vertices[i]->setVisibility(val); - for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++) - for(unsigned int i = 0; i < (*it)->mesh_vertices.size(); i++) - if(all || (*it)->mesh_vertices[i]->getNum() == num) - (*it)->mesh_vertices[i]->setVisibility(val); - break; - case 1: // elements - for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++){ - for(unsigned int i = 0; i < (*it)->lines.size(); i++) - if(all || (*it)->lines[i]->getNum() == num) - (*it)->lines[i]->setVisibility(val); - } - for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++){ - for(unsigned int i = 0; i < (*it)->triangles.size(); i++) - if(all || (*it)->triangles[i]->getNum() == num) - (*it)->triangles[i]->setVisibility(val); - for(unsigned int i = 0; i < (*it)->quadrangles.size(); i++) - if(all || (*it)->quadrangles[i]->getNum() == num) - (*it)->quadrangles[i]->setVisibility(val); - } - for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++){ - for(unsigned int i = 0; i < (*it)->tetrahedra.size(); i++) - if(all || (*it)->tetrahedra[i]->getNum() == num) - (*it)->tetrahedra[i]->setVisibility(val); - for(unsigned int i = 0; i < (*it)->hexahedra.size(); i++) - if(all || (*it)->hexahedra[i]->getNum() == num) - (*it)->hexahedra[i]->setVisibility(val); - for(unsigned int i = 0; i < (*it)->prisms.size(); i++) - if(all || (*it)->prisms[i]->getNum() == num) - (*it)->prisms[i]->setVisibility(val); - for(unsigned int i = 0; i < (*it)->pyramids.size(); i++) - if(all || (*it)->pyramids[i]->getNum() == num) - (*it)->pyramids[i]->setVisibility(val); - } - break; - case 2: // point - for(GModel::viter it = m->firstVertex(); it != m->lastVertex(); it++) - if(all || (*it)->tag() == num) (*it)->setVisibility(val, recursive); - break; - case 3: // line - for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++) - if(all || (*it)->tag() == num) (*it)->setVisibility(val, recursive); - break; - case 4: // surface - for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++) - if(all || (*it)->tag() == num) (*it)->setVisibility(val, recursive); - break; - case 5: // volume - for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++) - if(all || (*it)->tag() == num) (*it)->setVisibility(val, recursive); - break; - case 6: // physical point - for(GModel::viter it = m->firstVertex(); it != m->lastVertex(); it++) - for(unsigned int i = 0; i < (*it)->physicals.size(); i++) - if (all || std::abs((*it)->physicals[i]) == num) (*it)->setVisibility(val, recursive); - break; - case 7: // physical line - for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++) - for(unsigned int i = 0; i < (*it)->physicals.size(); i++) - if (all || std::abs((*it)->physicals[i]) == num) (*it)->setVisibility(val, recursive); - break; - case 8: // physical surface - for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++) - for(unsigned int i = 0; i < (*it)->physicals.size(); i++) - if (all || std::abs((*it)->physicals[i]) == num) (*it)->setVisibility(val, recursive); - break; - case 9: // physical volume - for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++) - for(unsigned int i = 0; i < (*it)->physicals.size(); i++) - if (all || std::abs((*it)->physicals[i]) == num) (*it)->setVisibility(val, recursive); - break; - } -} - -void VisElementary::setVisibility(char val, bool recursive) -{ - _e->setVisibility(val, recursive); -} - -void VisPhysical::setVisibility(char val, bool recursive) -{ - _visible = val; - for(unsigned int i = 0; i < _list.size(); i++) - _list[i]->setVisibility(val, recursive); -} - -void VisPartition::setVisibility(char val, bool recursive) -{ - GModel *m = GModel::current(); - - _visible = val; - for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++){ - for(unsigned int i = 0; i < (*it)->lines.size(); i++) - if((*it)->lines[i]->getPartition() == _tag) - (*it)->lines[i]->setVisibility(val); - } - for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++){ - for(unsigned int i = 0; i < (*it)->triangles.size(); i++) - if((*it)->triangles[i]->getPartition() == _tag) - (*it)->triangles[i]->setVisibility(val); - for(unsigned int i = 0; i < (*it)->quadrangles.size(); i++) - if((*it)->quadrangles[i]->getPartition() == _tag) - (*it)->quadrangles[i]->setVisibility(val); - } - for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++){ - for(unsigned int i = 0; i < (*it)->tetrahedra.size(); i++) - if((*it)->tetrahedra[i]->getPartition() == _tag) - (*it)->tetrahedra[i]->setVisibility(val); - for(unsigned int i = 0; i < (*it)->hexahedra.size(); i++) - if((*it)->hexahedra[i]->getPartition() == _tag) - (*it)->hexahedra[i]->setVisibility(val); - for(unsigned int i = 0; i < (*it)->prisms.size(); i++) - if((*it)->prisms[i]->getPartition() == _tag) - (*it)->prisms[i]->setVisibility(val); - for(unsigned int i = 0; i < (*it)->pyramids.size(); i++) - if((*it)->pyramids[i]->getPartition() == _tag) - (*it)->pyramids[i]->setVisibility(val); - } -} diff --git a/Common/Visibility.h b/Common/Visibility.h deleted file mode 100644 index 8c37603794af58c943d2420ee0a1accce0332c58..0000000000000000000000000000000000000000 --- a/Common/Visibility.h +++ /dev/null @@ -1,156 +0,0 @@ -// Gmsh - Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle -// -// See the LICENSE.txt file for license information. Please report all -// bugs and problems to <gmsh@geuz.org>. - -#ifndef _VISIBILITY_H_ -#define _VISIBILITY_H_ - -#include <string> -#include <map> -#include <vector> -#include "GmshDefines.h" -#include "GVertex.h" -#include "GEdge.h" -#include "GFace.h" -#include "GRegion.h" - -class Vis { - public: - Vis(){} - virtual ~Vis(){} - virtual int getTag() const = 0; - virtual int getDim() const = 0; - virtual std::string getName() const = 0; - virtual char getVisibility() const = 0; - virtual void setVisibility(char val, bool recursive=false) = 0; -}; - -class VisElementary : public Vis { - private: - GEntity *_e; - int _dim; - public: - VisElementary(GVertex *e) : _e(e), _dim(0) {} - VisElementary(GEdge *e) : _e(e), _dim(1) {} - VisElementary(GFace *e) : _e(e), _dim(2) {} - VisElementary(GRegion *e) : _e(e), _dim(3) {} - ~VisElementary(){} - int getTag() const { return _e->tag(); } - int getDim() const { return _dim; } - std::string getName() const - { - if(_dim == 0) return "Point"; - else if(_dim == 1) return "Line"; - else if(_dim == 2) return "Surface"; - else return "Volume"; - } - char getVisibility() const { return _e->getVisibility(); } - void setVisibility(char val, bool recursive=false); -}; - -class VisPhysical : public Vis { - private: - int _tag, _dim; - char _visible; - std::vector<GEntity*> _list; - public: - VisPhysical(int tag, int dim, std::vector<GEntity*> list) - : _tag(tag), _dim(dim), _visible(1), _list(list) {} - ~VisPhysical(){} - int getTag() const { return _tag; } - int getDim() const { return _dim; } - std::string getName() const - { - if(_dim == 0) return "Point"; - else if(_dim == 1) return "Line"; - else if(_dim == 2) return "Surface"; - else return "Volume"; - } - char getVisibility() const { return _visible; } - void setVisibility(char val, bool recursive=false); -}; - -class VisPartition : public Vis { - private: - int _tag; - char _visible; - public: - VisPartition(int tag) : _tag(tag), _visible(1) {} - ~VisPartition(){} - int getTag() const { return _tag; } - int getDim() const { return -1; } - std::string getName() const { return "Partition"; } - char getVisibility() const { return _visible; } - void setVisibility(char val, bool recursive=false); -}; - -// Singleton, one visibility manager for the whole interface -class VisibilityManager { - private: - std::map<int, std::pair<std::string, int> > _labels; - std::vector<Vis*> _entities; - int _sortMode; - static VisibilityManager *manager; - VisibilityManager() : _sortMode(-1) {} - - public : - // create the only instance of the manager - static VisibilityManager *instance() - { - if(!manager) manager = new VisibilityManager(); - return manager; - } - - // repopulate the manager with current data of the given type - void update(int type); - - // get the number of entities in the manager - int getNumEntities() { return _entities.size(); } - - // get the number of entities in the manager - Vis *getEntity(int i) { return _entities[i]; } - - // get the visibility information for the nth entity in the manager - char getVisibility(int n){ return _entities[n]->getVisibility(); } - - // set the visibility information for the nth entity in the manager - void setVisibility(int n, char val, bool recursive=false) - { - _entities[n]->setVisibility(val, recursive); - } - - // set all entities to be invisible - void setAllInvisible(int type); - - // set the visibility of one or all entites of a given type (0=node, - // 1=element, 2=point, 3=line, 4=surface, 5=volume, 6=physical - // point, 7=physical line, 8=physical surface, 9=physical volume) - void setVisibilityByNumber(int type, int num, char val, bool recursive=false); - - // get the tag of the nth entity in the manager - int getTag(int n){ return _entities[n]->getTag(); } - - // get the browser line for the nth entity in the manager - std::string getBrowserLine(int n); - - // get the whole visibility information in geo format - std::string getStringForGEO(); - - // set the sort mode - void setSortMode(int mode){ _sortMode = (_sortMode != mode) ? mode : -mode; } - - // get the sort mode - int getSortMode(){ return _sortMode; } - - // associate a label with a tag (quality=0 for "old-style" unreliable labels) - void setLabel(int tag, std::string label, int quality=1) - { - _labels[tag] = std::make_pair(label, quality); - } - - // get the label associated with a tag - std::string getLabel(int tag){ return _labels[tag].first; } -}; - -#endif diff --git a/Fltk/Makefile b/Fltk/Makefile index fd033bd0db6625ae50e14cfed1ca5de74bd6992e..ecac5b57204d49cd6bd3346942cba66fbc3994be 100644 --- a/Fltk/Makefile +++ b/Fltk/Makefile @@ -10,7 +10,8 @@ LIB = ../lib/libGmshFltk${LIBEXT} INC = ${DASH}I../Common ${DASH}I../Graphics\ ${DASH}I../Geo ${DASH}I../Mesh ${DASH}I../Post ${DASH}I../Numeric\ ${DASH}I../Parser ${DASH}I../Fltk ${DASH}I../Plugin ${DASH}I../utils/solvers\ - ${DASH}I../contrib/ANN/include ${DASH}I../contrib/NativeFileChooser + ${DASH}I../contrib/ANN/include ${DASH}I../contrib/NativeFileChooser\ + ${DASH}I../contrib/TreeBrowser CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} @@ -126,9 +127,9 @@ openglWindow${OBJEXT}: openglWindow.cpp openglWindow.h ../Graphics/drawContext.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - Draw.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h GUI.h \ - ../Common/VertexArray.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/PartitionOptions.h + Draw.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h GUI.h ../Common/VertexArray.h \ + ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h menuWindow${OBJEXT}: menuWindow.cpp GUI.h Draw.h menuWindow.h popupButton.h \ shortcutWindow.h graphicWindow.h openglWindow.h \ ../Graphics/drawContext.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ @@ -228,10 +229,9 @@ visibilityWindow${OBJEXT}: visibilityWindow.cpp GUI.h Draw.h visibilityWindow.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - ../Common/Visibility.h ../Common/GmshDefines.h \ ../Geo/GeoStringInterface.h ../Common/ListUtils.h ../Common/Options.h \ ../Post/ColorTable.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/PartitionOptions.h + ../Mesh/PartitionOptions.h ../Parser/Parser.h clippingWindow${OBJEXT}: clippingWindow.cpp GUI.h Draw.h clippingWindow.h \ shortcutWindow.h ../Common/GmshDefines.h ../Post/PView.h \ ../Geo/SPoint3.h ../Post/PViewOptions.h ../Post/ColorTable.h \ @@ -324,12 +324,13 @@ classificationEditor${OBJEXT}: classificationEditor.cpp GUI.h \ ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \ ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Post/ColorTable.h \ - ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h Draw.h \ - ../Common/Options.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/PartitionOptions.h ../Mesh/meshGFaceDelaunayInsertion.h \ - ../Mesh/meshGFaceOptimize.h ../Mesh/meshGFaceDelaunayInsertion.h \ - ../Geo/discreteEdge.h ../Geo/GModel.h ../Geo/GEdge.h \ - ../Geo/discreteFace.h ../Geo/GModel.h ../Geo/GFace.h + ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h Draw.h ../Common/Options.h ../Common/Context.h \ + ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h \ + ../Mesh/meshGFaceDelaunayInsertion.h ../Mesh/meshGFaceOptimize.h \ + ../Mesh/meshGFaceDelaunayInsertion.h ../Geo/discreteEdge.h \ + ../Geo/GModel.h ../Geo/GEdge.h ../Geo/discreteFace.h ../Geo/GModel.h \ + ../Geo/GFace.h partitionDialog${OBJEXT}: partitionDialog.cpp GUI.h shortcutWindow.h \ ../Common/GmshDefines.h ../Common/GmshMessage.h ../Geo/GModel.h \ ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ diff --git a/Fltk/extraDialogs.cpp b/Fltk/extraDialogs.cpp index 475f761c3423d0f167c733a73f8e22972b30dfd6..bff48b6d05816abbb1ec1d1e42e4f0ea58ad918f 100644 --- a/Fltk/extraDialogs.cpp +++ b/Fltk/extraDialogs.cpp @@ -151,13 +151,6 @@ static void model_switch_cb(Fl_Widget* w, void *data) Draw(); } -static void model_draw_all_cb(Fl_Widget* w, void *data) -{ - Fl_Check_Button *b = (Fl_Check_Button*)w; - opt_general_draw_all_models(0, GMSH_SET | GMSH_GUI, (int)b->value()); - Draw(); -} - int model_chooser() { struct _menu{ @@ -175,13 +168,11 @@ int model_chooser() menu->window = new Fl_Menu_Window(WW, 6 * BH); if(CTX.non_modal_windows) menu->window->set_non_modal(); menu->window->border(0); - Fl_Box *l = new Fl_Box(0, 0, WW, BH, "Choose current model:"); + Fl_Box *l = new Fl_Box(0, 0, WW, BH, "Select active model:"); l->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE | FL_ALIGN_CLIP); - menu->browser = new Fl_Hold_Browser(0, BH, WW, 4 * BH); + menu->browser = new Fl_Hold_Browser(0, BH, WW, 5 * BH); menu->browser->callback(model_switch_cb); menu->browser->when(FL_WHEN_RELEASE_ALWAYS); - menu->butt = new Fl_Check_Button(0, 5 * BH, WW, BH, "Draw all models"); - menu->butt->callback(model_draw_all_cb); menu->window->end(); } @@ -193,7 +184,6 @@ int model_chooser() menu->browser->add(tmp); if(GModel::list[i] == GModel::current()) menu->browser->value(i + 1); } - menu->butt->value(CTX.draw_all_models); if(menu->window->non_modal() && !menu->window->shown()) menu->window->show(); // fix ordering diff --git a/Fltk/graphicWindow.cpp b/Fltk/graphicWindow.cpp index 8ea0885ce1ff4403f72f1d179649e6b9481ef884..97c1d3c5c3f95ae2ad720a7fac3b4c67fe289eb2 100644 --- a/Fltk/graphicWindow.cpp +++ b/Fltk/graphicWindow.cpp @@ -314,7 +314,7 @@ graphicWindow::graphicWindow(int fontsize) butt[5] = new Fl_Button(x, glheight + 2, sw, sht, "@-1gmsh_models"); x += sw; butt[5]->callback(status_xyz1p_cb, (void *)"model"); - butt[5]->tooltip("Change current model"); + butt[5]->tooltip("Select active model"); butt[0] = new Fl_Button(x, glheight + 2, sw, sht, "X"); x += sw; diff --git a/Fltk/visibilityWindow.cpp b/Fltk/visibilityWindow.cpp index 928382d0901bd22f26cb1ab0b24a828c84b7530b..5e027f477bf5c1408ff061417025b2e0535cf38f 100644 --- a/Fltk/visibilityWindow.cpp +++ b/Fltk/visibilityWindow.cpp @@ -3,6 +3,9 @@ // See the LICENSE.txt file for license information. Please report all // bugs and problems to <gmsh@geuz.org>. +#include <string> +#include <map> +#include <vector> #include <string.h> #include <FL/Fl_Tabs.H> #include <FL/Fl_Box.H> @@ -16,69 +19,553 @@ #include "GmshMessage.h" #include "GModel.h" #include "MElement.h" -#include "Visibility.h" #include "GeoStringInterface.h" #include "Options.h" #include "Context.h" +#if !defined(HAVE_NO_PARSER) +#include "Parser.h" +#endif + extern Context_T CTX; -// Visibility Menu +class Vis { + public: + Vis(){} + virtual ~Vis(){} + virtual int getTag() const = 0; + virtual int getDim() const = 0; + virtual std::string getName() const = 0; + virtual char getVisibility() const = 0; + virtual void setVisibility(char val, bool recursive=false) = 0; +}; -void visibility_cb(Fl_Widget *w, void *data) -{ - // get the visibility info from the model, and update the browser - // accordingly - const char *str = (const char*)data; - if(str && !strcmp(str, "redraw_only")) - GUI::instance()->visibility->show(true); - else - GUI::instance()->visibility->show(false); +class VisModel : public Vis { + private: + int _tag; + char _visible; + public: + VisModel(int tag) : _tag(tag), _visible(1) {} + ~VisModel(){} + int getTag() const { return _tag; } + int getDim() const { return -1; } + std::string getName() const { return "Model"; } + char getVisibility() const { return _visible; } + void setVisibility(char val, bool recursive=false) + { + _visible = val; + if(_tag >= 0 && _tag < GModel::list.size()) + GModel::list[_tag]->setVisibility(val); + } +}; + +class VisElementary : public Vis { + private: + GEntity *_e; + int _dim; + public: + VisElementary(GVertex *e) : _e(e), _dim(0) {} + VisElementary(GEdge *e) : _e(e), _dim(1) {} + VisElementary(GFace *e) : _e(e), _dim(2) {} + VisElementary(GRegion *e) : _e(e), _dim(3) {} + ~VisElementary(){} + int getTag() const { return _e->tag(); } + int getDim() const { return _dim; } + std::string getName() const + { + if(_dim == 0) return "Point"; + else if(_dim == 1) return "Line"; + else if(_dim == 2) return "Surface"; + else return "Volume"; + } + char getVisibility() const { return _e->getVisibility(); } + void setVisibility(char val, bool recursive=false) + { + _e->setVisibility(val, recursive); + } +}; + +class VisPhysical : public Vis { + private: + int _tag, _dim; + char _visible; + std::vector<GEntity*> _list; + public: + VisPhysical(int tag, int dim, std::vector<GEntity*> list) + : _tag(tag), _dim(dim), _visible(1), _list(list) {} + ~VisPhysical(){} + int getTag() const { return _tag; } + int getDim() const { return _dim; } + std::string getName() const + { + if(_dim == 0) return "Point"; + else if(_dim == 1) return "Line"; + else if(_dim == 2) return "Surface"; + else return "Volume"; + } + char getVisibility() const { return _visible; } + void setVisibility(char val, bool recursive=false) + { + _visible = val; + for(unsigned int i = 0; i < _list.size(); i++) + _list[i]->setVisibility(val, recursive); + } +}; + +class VisPartition : public Vis { + private: + int _tag; + char _visible; + public: + VisPartition(int tag) : _tag(tag), _visible(1) {} + ~VisPartition(){} + int getTag() const { return _tag; } + int getDim() const { return -1; } + std::string getName() const { return "Partition"; } + char getVisibility() const { return _visible; } + void setVisibility(char val, bool recursive=false) + { + GModel *m = GModel::current(); + _visible = val; + std::vector<GEntity*> entities; + m->getEntities(entities); + for(unsigned int i = 0; i < entities.size(); i++) + for(unsigned int j = 0; j < entities[i]->getNumMeshElements(); j++) + if(entities[i]->getMeshElement(j)->getPartition() == _tag) + entities[i]->getMeshElement(j)->setVisibility(val); + } +}; +class VisibilityList { // singleton + private: + std::map<int, std::pair<std::string, int> > _labels; + std::vector<Vis*> _entities; + int _sortMode; + static VisibilityList *_instance; + VisibilityList() : _sortMode(-1) {} + public : + enum VisibilityType{ + Models = 1, + ElementaryEntities = 2, + PhysicalEntities = 3, + MeshPartitions = 4, + }; + static VisibilityList *instance() + { + if(!_instance) _instance = new VisibilityList(); + return _instance; + } + class VisLessThan { + public: + bool operator()(const Vis *v1, const Vis *v2) const + { + switch(instance()->getSortMode()){ + case 1: return v1->getDim() < v2->getDim() ? true : false; + case -1: return v1->getDim() > v2->getDim() ? true : false; + case 2: return v1->getTag() < v2->getTag() ? true : false; + case -2: return v1->getTag() > v2->getTag() ? true : false; + case 3: + return strcmp(instance()->getLabel(v1->getTag()).c_str(), + instance()->getLabel(v2->getTag()).c_str()) < 0 ? + true : false; + default: + return strcmp(instance()->getLabel(v1->getTag()).c_str(), + instance()->getLabel(v2->getTag()).c_str()) > 0 ? + true : false; + } + } + }; + // repopulate the list with current data of the given type + void update(VisibilityType type) + { + _labels.clear(); + for(unsigned int i = 0; i < _entities.size(); i++) + delete _entities[i]; + _entities.clear(); + GModel *m = GModel::current(); +#if !defined(HAVE_NO_PARSER) + for(std::map<std::string, std::vector<double> >::iterator it = gmsh_yysymbols.begin(); + it != gmsh_yysymbols.end(); ++it) + for(unsigned int i = 0; i < it->second.size(); i++) + instance()->setLabel((int)it->second[i], it->first, 0); +#endif + if(type == Models){ + for(unsigned int i = 0; i < GModel::list.size(); i++){ + _entities.push_back(new VisModel(i)); + std::string name = GModel::list[i]->getName(); + if(GModel::list[i] == GModel::current()) name += " (Active)"; + setLabel(i, name); + } + } + if(type == ElementaryEntities){ + for(GModel::piter it = m->firstElementaryName(); it != m->lastElementaryName(); ++it) + setLabel(it->first, it->second); + for(GModel::viter it = m->firstVertex(); it != m->lastVertex(); it++) + _entities.push_back(new VisElementary(*it)); + for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++) + _entities.push_back(new VisElementary(*it)); + for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++) + _entities.push_back(new VisElementary(*it)); + for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++) + _entities.push_back(new VisElementary(*it)); + } + else if(type == PhysicalEntities){ + for(GModel::piter it = m->firstPhysicalName(); it != m->lastPhysicalName(); ++it) + setLabel(it->first, it->second); + std::map<int, std::vector<GEntity*> > groups[4]; + m->getPhysicalGroups(groups); + for(int i = 0; i < 4; i++){ + std::map<int, std::vector<GEntity*> >::const_iterator it = groups[i].begin(); + for(; it != groups[i].end(); ++it) + _entities.push_back(new VisPhysical(it->first, i, it->second)); + } + } + else if(type == MeshPartitions){ + std::set<int> part = m->getMeshPartitions(); + for(std::set<int>::const_iterator it = part.begin(); it != part.end(); ++it) + _entities.push_back(new VisPartition(*it)); + } + std::sort(_entities.begin(), _entities.end(), VisLessThan()); + } + // get the number of entities in the list + int getNumEntities() { return _entities.size(); } + // get the number of entities in the list + Vis *getEntity(int i) { return _entities[i]; } + // get the visibility information for the nth entity in the list + char getVisibility(int n){ return _entities[n]->getVisibility(); } + // set the visibility information for the nth entity in the list + void setVisibility(int n, char val, bool recursive=false) + { + _entities[n]->setVisibility(val, recursive); + } + // set all entities to be invisible + void setAllInvisible(VisibilityType type) + { + if(type == Models){ + for(unsigned int i = 0; i < GModel::list.size(); i++) + GModel::list[i]->setVisibility(0); + } + else if(type == ElementaryEntities || type == PhysicalEntities){ + GModel *m = GModel::current(); + // elementary or physical mode: set all entities in the model invisible + for(GModel::viter it = m->firstVertex(); it != m->lastVertex(); it++) + (*it)->setVisibility(0); + for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++) + (*it)->setVisibility(0); + for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++) + (*it)->setVisibility(0); + for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++) + (*it)->setVisibility(0); + } + // this is superfluous in elementary mode, but we don't care + for(int i = 0; i < getNumEntities(); i++) setVisibility(i, 0); + } + // get the tag of the nth entity in the list + int getTag(int n){ return _entities[n]->getTag(); } + // get the browser line for the nth entity in the list + std::string getBrowserLine(int n) + { + int tag = _entities[n]->getTag(); + char str[256]; + bool label_exists = _labels.count(tag); + const char *label_color = (label_exists && _labels[tag].second) ? "@b" : ""; + sprintf(str, "\t%s\t%d\t%s%s", _entities[n]->getName().c_str(), tag, + label_color, label_exists ? _labels[tag].first.c_str() : ""); + return std::string(str); + } + // set the sort mode + void setSortMode(int mode){ _sortMode = (_sortMode != mode) ? mode : -mode; } + // get the sort mode + int getSortMode(){ return _sortMode; } + // associate a label with a tag (quality=0 for "old-style" unreliable labels) + void setLabel(int tag, std::string label, int quality=1) + { + _labels[tag] = std::make_pair(label, quality); + } + // get the label associated with a tag + std::string getLabel(int tag){ return _labels[tag].first; } +}; + +VisibilityList *VisibilityList::_instance = 0; + +static void _rebuild_list_browser() +{ GUI::instance()->visibility->browser->clear(); - int type = GUI::instance()->visibility->type->value(); + VisibilityList::VisibilityType type; + switch(GUI::instance()->visibility->browser_type->value()){ + case 0: type = VisibilityList::Models; break; + case 2: type = VisibilityList::PhysicalEntities; break; + case 3: type = VisibilityList::MeshPartitions; break; + case 1: default: type = VisibilityList::ElementaryEntities; break; + } - VisibilityManager::instance()->update(type); - for(int i = 0; i < VisibilityManager::instance()->getNumEntities(); i++){ + VisibilityList::instance()->update(type); + for(int i = 0; i < VisibilityList::instance()->getNumEntities(); i++){ GUI::instance()->visibility->browser->add - (VisibilityManager::instance()->getBrowserLine(i).c_str()); - if(VisibilityManager::instance()->getVisibility(i)) + (VisibilityList::instance()->getBrowserLine(i).c_str()); + if(VisibilityList::instance()->getVisibility(i)) GUI::instance()->visibility->browser->select(i + 1); } - // activate the delete button for physicals only! - if(type == 1) + // activate/deactivate delete button + if(type == VisibilityList::PhysicalEntities) GUI::instance()->visibility->push[0]->activate(); else GUI::instance()->visibility->push[0]->deactivate(); +} + +#if defined(HAVE_TREE_BROWSER) + +static void _add_vertex(GVertex *gv, Flu_Tree_Browser::Node *n) +{ + char str[128]; + sprintf(str, "Point %d", gv->tag()); + Flu_Tree_Browser::Node *n2 = n->add(str); + if(gv->getVisibility()) n2->select(true); + n2->user_data((void*)gv); +} + +static void _add_edge(GEdge *ge, Flu_Tree_Browser::Node *n) +{ + char str[128]; + sprintf(str, "Line %d/", ge->tag()); + Flu_Tree_Browser::Node *n2 = n->add(str); + if(ge->getVisibility()) n2->select(true); + n2->user_data((void*)ge); + if(ge->getBeginVertex()) + _add_vertex(ge->getBeginVertex(), n2); + if(ge->getEndVertex()) + _add_vertex(ge->getEndVertex(), n2); +} + +static void _add_face(GFace *gf, Flu_Tree_Browser::Node *n) +{ + char str[128]; + sprintf(str, "Surface %d/", gf->tag()); + Flu_Tree_Browser::Node *n2 = n->add(str); + if(gf->getVisibility()) n2->select(true); + n2->user_data((void*)gf); + std::list<GEdge*> edges = gf->edges(); + for(std::list<GEdge*>::iterator it = edges.begin(); it != edges.end(); it++) + _add_edge(*it, n2); +} + +static void _add_region(GRegion *gr, Flu_Tree_Browser::Node *n) +{ + char str[128]; + sprintf(str, "Volume %d/", gr->tag()); + Flu_Tree_Browser::Node *n2 = n->add(str); + if(gr->getVisibility()) n2->select(true); + n2->user_data((void*)gr); + std::list<GFace*> faces = gr->faces(); + for(std::list<GFace*>::iterator it = faces.begin(); it != faces.end(); it++) + _add_face(*it, n2); +} - // disable numeric and interactive selection for partitions - if(type == 2){ - GUI::instance()->visibility->group[1]->deactivate(); - GUI::instance()->visibility->group[2]->deactivate(); +static void _add_physical_group(int dim, int num, std::vector<GEntity*> &ge, + Flu_Tree_Browser::Node *n) +{ + if(ge.empty()) return; + char str[256]; + Flu_Tree_Browser::Node *n2 = 0; + std::string name; + if(ge[0]->model()->getPhysicalName(num).size()) + name += std::string(" <<") + ge[0]->model()->getPhysicalName(num) + ">>"; + switch(dim){ + case 3: + sprintf(str, "Physical Volume %d%s/", num, name.c_str()); + n2 = n->add(str); + for(unsigned int i = 0; i < ge.size(); i++) + _add_region((GRegion*)ge[i], n2); + break; + case 2: + sprintf(str, "Physical Surface %d%s/", num, name.c_str()); + n2 = n->add(str); + for(unsigned int i = 0; i < ge.size(); i++) + _add_face((GFace*)ge[i], n2); + break; + case 1: + sprintf(str, "Physical Line %d%s/", num, name.c_str()); + n2 = n->add(str); + for(unsigned int i = 0; i < ge.size(); i++) + _add_edge((GEdge*)ge[i], n2); + break; + case 0: + sprintf(str, "Physical Point %d%s/", num, name.c_str()); + n2 = n->add(str); + for(unsigned int i = 0; i < ge.size(); i++) + _add_vertex((GVertex*)ge[i], n2); + break; + default: + break; } - else{ - GUI::instance()->visibility->group[1]->activate(); - GUI::instance()->visibility->group[2]->activate(); +} + +static void _rebuild_tree_browser(bool force) +{ + if(!force){ + int numEnt = 0; + for(unsigned int i = 0; i < GModel::list.size(); i++){ + numEnt += GModel::list[i]->getNumRegions() + + GModel::list[i]->getNumFaces() + + GModel::list[i]->getNumEdges() + + GModel::list[i]->getNumVertices(); + } + if(numEnt > 10000){ + GUI::instance()->visibility->tree->hide(); + GUI::instance()->visibility->tree_create->show(); + return; + } } + + GUI::instance()->visibility->tree_create->hide(); + GUI::instance()->visibility->tree->show(); + GUI::instance()->visibility->tree->clear(); + + char str[128]; + for(unsigned int i = 0; i < GModel::list.size(); i++){ + GModel *m = GModel::list[i]; + std::string s(" <<"); + s += m->getName() + ">>"; + if(m == GModel::current()) s += " (Active)"; + sprintf(str, "Model %d %s/", i, s.c_str()); + Flu_Tree_Browser::Node *n = GUI::instance()->visibility->tree->add(str); + if(m->getVisibility()) n->select(true); + Flu_Tree_Browser::Node *e = n->add("Elementary entities/"); + e->select(true); + for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++) + _add_region(*it, e); + for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++) + _add_face(*it, e); + for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++) + _add_edge(*it, e); + for(GModel::viter it = m->firstVertex(); it != m->lastVertex(); it++) + _add_vertex(*it, e); + Flu_Tree_Browser::Node *g = n->add("Physical groups/"); + g->select(true); + std::map<int, std::vector<GEntity*> > groups[4]; + m->getPhysicalGroups(groups); + for(int i = 3; i >= 0; i--) + for(std::map<int, std::vector<GEntity*> >::iterator it = groups[i].begin(); + it != groups[i].end(); it++) + _add_physical_group(i, it->first, it->second, g); + } +} + +static void build_tree_cb(Fl_Widget *w, void *data) +{ + _rebuild_tree_browser(true); +} + +static void _recur_select(Flu_Tree_Browser::Node *n) +{ + n->select(true); + for(int i = 0; i < n->children(); i++) + _recur_select(n->child(i)); +} + +static void _recur_set_visible(Flu_Tree_Browser::Node *n) +{ + if(n->user_data() && n->selected()){ + GEntity *ge = (GEntity*)n->user_data(); + bool recursive = GUI::instance()->visibility->butt[0]->value() ? true : false; + ge->setVisibility(1, recursive); + // force this: if we ask to see an entity, let's assume that we + // don't want the whole model to be invisible + ge->model()->setVisibility(1); + } + for(int i = 0; i < n->children(); i++) + _recur_set_visible(n->child(i)); +} + +static void _recur_update_selected(Flu_Tree_Browser::Node *n) +{ + if(n->user_data()){ + GEntity *ge = (GEntity*)n->user_data(); + n->select(ge->getVisibility() ? true : false); + } + for(int i = 0; i < n->children(); i++) + _recur_update_selected(n->child(i)); +} + +static void visibility_tree_apply_cb(Fl_Widget *w, void *data) +{ + bool recursive = GUI::instance()->visibility->butt[0]->value() ? true : false; + Flu_Tree_Browser::Node *root = GUI::instance()->visibility->tree->first(); + for(int i = 0; i < root->children(); i++){ + GModel *m = GModel::list[i]; + Flu_Tree_Browser::Node *n = root->child(i); + // treat special levels separately + if(recursive){ + if(n->selected()){ // if model is selected + _recur_select(n); + } + else{ + for(int j = 0; j < n->children(); j++){ + if(n->child(j)->selected()) // if elementary/physical is selected + _recur_select(n->child(j)); + else if(j == 1){ + for(int k = 0; k < n->child(j)->children(); k++){ + if(n->child(j)->child(k)->selected()) // if physical ent is selected + _recur_select(n->child(j)->child(k)); + } + } + } + } + } + // set all entities as invisible + std::vector<GEntity*> entities; + m->getEntities(entities); + for(unsigned int j = 0; j < entities.size(); j++) + entities[j]->setVisibility(0); + // set visibility flag according to tree selection + _recur_set_visible(n); + // update tree selection + _recur_update_selected(n); + } + Draw(); +} + +#endif + +void visibility_cb(Fl_Widget *w, void *data) +{ + // get the visibility info from the model, and update the browser + // accordingly + const char *str = (const char*)data; + if(str && !strcmp(str, "redraw_only")) + GUI::instance()->visibility->show(true); + else + GUI::instance()->visibility->show(false); + + _rebuild_list_browser(); +#if defined(HAVE_TREE_BROWSER) + _rebuild_tree_browser(false); +#endif } -static void visibility_ok_cb(Fl_Widget *w, void *data) +static void visibility_browser_apply_cb(Fl_Widget *w, void *data) { // if the browser is not empty, get the selections made in the // browser and apply them into the model - if(VisibilityManager::instance()->getNumEntities()){ + if(VisibilityList::instance()->getNumEntities()){ CTX.mesh.changed |= (ENT_LINE | ENT_SURFACE | ENT_VOLUME); bool recursive = GUI::instance()->visibility->butt[0]->value() ? true : false; - int type = GUI::instance()->visibility->type->value(); - VisibilityManager::instance()->setAllInvisible(type); - for(int i = 0; i < VisibilityManager::instance()->getNumEntities(); i++) + VisibilityList::VisibilityType type; + switch(GUI::instance()->visibility->browser_type->value()){ + case 0: type = VisibilityList::Models; break; + case 2: type = VisibilityList::PhysicalEntities; break; + case 3: type = VisibilityList::MeshPartitions; break; + case 1: default: type = VisibilityList::ElementaryEntities; break; + } + VisibilityList::instance()->setAllInvisible(type); + for(int i = 0; i < VisibilityList::instance()->getNumEntities(); i++) if(GUI::instance()->visibility->browser->selected(i + 1)) - VisibilityManager::instance()->setVisibility(i, 1, recursive); + VisibilityList::instance()->setVisibility(i, 1, recursive); // then refresh the browser to account for recursive selections - for(int i = 0; i < VisibilityManager::instance()->getNumEntities(); i++) - if(VisibilityManager::instance()->getVisibility(i)) + for(int i = 0; i < VisibilityList::instance()->getNumEntities(); i++) + if(VisibilityList::instance()->getVisibility(i)) GUI::instance()->visibility->browser->select(i + 1); Draw(); } @@ -86,17 +573,62 @@ static void visibility_ok_cb(Fl_Widget *w, void *data) static void visibility_save_cb(Fl_Widget *w, void *data) { - std::string str = VisibilityManager::instance()->getStringForGEO(); + // get the whole visibility information in geo format + std::vector<int> state[4][2]; + GModel *m = GModel::current(); + for(GModel::viter it = m->firstVertex(); it != m->lastVertex(); it++) + (*it)->getVisibility() ? + state[0][1].push_back((*it)->tag()) : state[0][0].push_back((*it)->tag()); + for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++) + (*it)->getVisibility() ? + state[1][1].push_back((*it)->tag()) : state[1][0].push_back((*it)->tag()); + for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++) + (*it)->getVisibility() ? + state[2][1].push_back((*it)->tag()) : state[2][0].push_back((*it)->tag()); + for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++) + (*it)->getVisibility() ? + state[3][1].push_back((*it)->tag()) : state[3][0].push_back((*it)->tag()); + char tmp[256]; + const char *labels[4] = {"Point", "Line", "Surface", "Volume"}; + std::string str; + int mode; + int on = 0, off = 0; + for(int i = 0; i < 4; i++){ + on += state[i][1].size(); + off += state[i][0].size(); + } + if(on > off){ + add_infile("Show \"*\";", CTX.filename); + if(!off) return; + str += "Hide {\n"; + mode = 0; + } + else{ + add_infile("Hide \"*\";", CTX.filename); + if(!on) return; + str += "Show {\n"; + mode = 1; + } + for(int i = 0; i < 4; i++){ + if(state[i][mode].size()){ + str += labels[i]; + str += "{"; + for(unsigned int j = 0; j < state[i][mode].size(); j++){ + if(j) str += ","; + sprintf(tmp, "%d", state[i][mode][j]); + str += tmp; + } + str += "};\n"; + } + } + str += "}\n"; add_infile(str.c_str(), CTX.filename); } static void visibility_delete_cb(Fl_Widget *w, void *data) { - int type = GUI::instance()->visibility->type->value(); - if(type != 1) return; // delete only available for physicals - bool all = true; - for(int i = 0; i < VisibilityManager::instance()->getNumEntities(); i++){ + for(int i = 0; i < VisibilityList::instance()->getNumEntities(); i++){ if(!GUI::instance()->visibility->browser->selected(i + 1)){ all = false; break; @@ -106,14 +638,13 @@ static void visibility_delete_cb(Fl_Widget *w, void *data) GModel::current()->deletePhysicalGroups(); } else{ - for(int i = 0; i < VisibilityManager::instance()->getNumEntities(); i++){ + for(int i = 0; i < VisibilityList::instance()->getNumEntities(); i++){ if(GUI::instance()->visibility->browser->selected(i + 1)){ - Vis *v = VisibilityManager::instance()->getEntity(i); + Vis *v = VisibilityList::instance()->getEntity(i); GModel::current()->deletePhysicalGroup(v->getDim(), v->getTag()); } } } - visibility_cb(NULL, (void*)"redraw_only"); } @@ -160,7 +691,7 @@ static void visibility_sort_cb(Fl_Widget *w, void *data) for(int i = 0; i < GUI::instance()->visibility->browser->size(); i++){ if(GUI::instance()->visibility->browser->selected(i + 1)){ static char tmpstr[256]; - sprintf(tmpstr, "%d", VisibilityManager::instance()->getTag(i)); + sprintf(tmpstr, "%d", VisibilityList::instance()->getTag(i)); GUI::instance()->geoContext->input[1]->value(tmpstr); break; } @@ -169,64 +700,119 @@ static void visibility_sort_cb(Fl_Widget *w, void *data) GUI::instance()->geoContext->show(0); } else { // set new sorting mode - VisibilityManager::instance()->setSortMode(val); + VisibilityList::instance()->setSortMode(val); visibility_cb(NULL, (void*)"redraw_only"); } } -static void visibility_number_cb(Fl_Widget *w, void *data) +static void _set_visibility_by_number(int what, int num, char val, bool recursive) { - CTX.mesh.changed |= (ENT_LINE | ENT_SURFACE | ENT_VOLUME); - - // type = 0 for elementary, 1 for physical and 2 for partitions - int type = GUI::instance()->visibility->type->value(); - if(type != 0 && type != 1) return; - - // what = 0 for nodes, 1 for elements, 2 for points, 3 for lines, 4 - // for surfaces, 5 for volumes, 6 for physical points, 7 for - // physical lines, 8 for physical surfaces and 9 for physical - // volumes - int what = (int)(long)data; - char val; - if(what >= 100){ // show - val = 1; - what -= 100; - } - else{ // hide - val = 0; + bool all = (num < 0) ? true : false; + + GModel *m = GModel::current(); + + switch(what){ + case 0: // nodes + for(GModel::viter it = m->firstVertex(); it != m->lastVertex(); it++) + for(unsigned int i = 0; i < (*it)->mesh_vertices.size(); i++) + if(all || (*it)->mesh_vertices[i]->getNum() == num) + (*it)->mesh_vertices[i]->setVisibility(val); + for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++) + for(unsigned int i = 0; i < (*it)->mesh_vertices.size(); i++) + if(all || (*it)->mesh_vertices[i]->getNum() == num) + (*it)->mesh_vertices[i]->setVisibility(val); + for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++) + for(unsigned int i = 0; i < (*it)->mesh_vertices.size(); i++) + if(all || (*it)->mesh_vertices[i]->getNum() == num) + (*it)->mesh_vertices[i]->setVisibility(val); + for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++) + for(unsigned int i = 0; i < (*it)->mesh_vertices.size(); i++) + if(all || (*it)->mesh_vertices[i]->getNum() == num) + (*it)->mesh_vertices[i]->setVisibility(val); + break; + case 1: // elements + for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++){ + for(unsigned int i = 0; i < (*it)->lines.size(); i++) + if(all || (*it)->lines[i]->getNum() == num) + (*it)->lines[i]->setVisibility(val); + } + for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++){ + for(unsigned int i = 0; i < (*it)->triangles.size(); i++) + if(all || (*it)->triangles[i]->getNum() == num) + (*it)->triangles[i]->setVisibility(val); + for(unsigned int i = 0; i < (*it)->quadrangles.size(); i++) + if(all || (*it)->quadrangles[i]->getNum() == num) + (*it)->quadrangles[i]->setVisibility(val); + } + for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++){ + for(unsigned int i = 0; i < (*it)->tetrahedra.size(); i++) + if(all || (*it)->tetrahedra[i]->getNum() == num) + (*it)->tetrahedra[i]->setVisibility(val); + for(unsigned int i = 0; i < (*it)->hexahedra.size(); i++) + if(all || (*it)->hexahedra[i]->getNum() == num) + (*it)->hexahedra[i]->setVisibility(val); + for(unsigned int i = 0; i < (*it)->prisms.size(); i++) + if(all || (*it)->prisms[i]->getNum() == num) + (*it)->prisms[i]->setVisibility(val); + for(unsigned int i = 0; i < (*it)->pyramids.size(); i++) + if(all || (*it)->pyramids[i]->getNum() == num) + (*it)->pyramids[i]->setVisibility(val); + } + break; + case 2: // point + for(GModel::viter it = m->firstVertex(); it != m->lastVertex(); it++) + if(all || (*it)->tag() == num) (*it)->setVisibility(val, recursive); + break; + case 3: // line + for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++) + if(all || (*it)->tag() == num) (*it)->setVisibility(val, recursive); + break; + case 4: // surface + for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++) + if(all || (*it)->tag() == num) (*it)->setVisibility(val, recursive); + break; + case 5: // volume + for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++) + if(all || (*it)->tag() == num) (*it)->setVisibility(val, recursive); + break; + case 6: // physical point + for(GModel::viter it = m->firstVertex(); it != m->lastVertex(); it++) + for(unsigned int i = 0; i < (*it)->physicals.size(); i++) + if (all || std::abs((*it)->physicals[i]) == num) (*it)->setVisibility(val, recursive); + break; + case 7: // physical line + for(GModel::eiter it = m->firstEdge(); it != m->lastEdge(); it++) + for(unsigned int i = 0; i < (*it)->physicals.size(); i++) + if (all || std::abs((*it)->physicals[i]) == num) (*it)->setVisibility(val, recursive); + break; + case 8: // physical surface + for(GModel::fiter it = m->firstFace(); it != m->lastFace(); it++) + for(unsigned int i = 0; i < (*it)->physicals.size(); i++) + if (all || std::abs((*it)->physicals[i]) == num) (*it)->setVisibility(val, recursive); + break; + case 9: // physical volume + for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); it++) + for(unsigned int i = 0; i < (*it)->physicals.size(); i++) + if (all || std::abs((*it)->physicals[i]) == num) (*it)->setVisibility(val, recursive); + break; } - const char *str = GUI::instance()->visibility->input[what]->value(); - if(type == 1 && what >= 2 && what <= 5) what += 4; - - int num = (!strcmp(str, "all") || !strcmp(str, "*")) ? -1 : atoi(str); - bool recursive = GUI::instance()->visibility->butt[0]->value() ? true : false; - - VisibilityManager::instance()->setVisibilityByNumber(what, num, val, recursive); - - int pos = GUI::instance()->visibility->browser->position(); - visibility_cb(NULL, (void*)"redraw_only"); - GUI::instance()->visibility->browser->position(pos); - Draw(); } -static void apply_visibility(char mode, - std::vector<GVertex*> &vertices, - std::vector<GEdge*> &edges, - std::vector<GFace*> &faces, - std::vector<GRegion*> ®ions, - std::vector<MElement*> &elements) +static void _apply_visibility(char mode, bool physical, + std::vector<GVertex*> &vertices, + std::vector<GEdge*> &edges, + std::vector<GFace*> &faces, + std::vector<GRegion*> ®ions, + std::vector<MElement*> &elements) { - // type = 0 for elementary, 1 for physical and 2 for partitions - int type = GUI::instance()->visibility->type->value(); - if(type != 0 && type != 1) return; bool recursive = GUI::instance()->visibility->butt[0]->value() ? true : false; if(mode == 1){ // when showing a single entity, first hide everything if(CTX.pick_elements) - VisibilityManager::instance()->setVisibilityByNumber(1, -1, 0, false); + _set_visibility_by_number(1, -1, 0, false); else for(int i = 2; i <= 5; i++) - VisibilityManager::instance()->setVisibilityByNumber(i, -1, 0, false); + _set_visibility_by_number(i, -1, 0, false); } if(mode == 2) mode = 1; @@ -237,36 +823,32 @@ static void apply_visibility(char mode, } else{ for(unsigned int i = 0; i < vertices.size(); i++){ - if(type == 0) + if(!physical) vertices[i]->setVisibility(mode, recursive); else for(unsigned int j = 0; j < vertices[i]->physicals.size(); j++) - VisibilityManager::instance()->setVisibilityByNumber - (6, vertices[i]->physicals[j], mode, recursive); + _set_visibility_by_number(6, vertices[i]->physicals[j], mode, recursive); } for(unsigned int i = 0; i < edges.size(); i++){ - if(type == 0) + if(!physical) edges[i]->setVisibility(mode, recursive); else for(unsigned int j = 0; j < edges[i]->physicals.size(); j++) - VisibilityManager::instance()->setVisibilityByNumber - (7, edges[i]->physicals[j], mode, recursive); + _set_visibility_by_number(7, edges[i]->physicals[j], mode, recursive); } for(unsigned int i = 0; i < faces.size(); i++){ - if(type == 0) + if(!physical) faces[i]->setVisibility(mode, recursive); else for(unsigned int j = 0; j < faces[i]->physicals.size(); j++) - VisibilityManager::instance()->setVisibilityByNumber - (8, faces[i]->physicals[j], mode, recursive); + _set_visibility_by_number(8, faces[i]->physicals[j], mode, recursive); } for(unsigned int i = 0; i < regions.size(); i++){ - if(type == 0) + if(!physical) regions[i]->setVisibility(mode, recursive); else for(unsigned int j = 0; j < regions[i]->physicals.size(); j++) - VisibilityManager::instance()->setVisibilityByNumber - (9, regions[i]->physicals[j], mode, recursive); + _set_visibility_by_number(9, regions[i]->physicals[j], mode, recursive); } } int pos = GUI::instance()->visibility->browser->position(); @@ -274,88 +856,108 @@ static void apply_visibility(char mode, GUI::instance()->visibility->browser->position(pos); } +static void visibility_number_cb(Fl_Widget *w, void *data) +{ + CTX.mesh.changed |= (ENT_LINE | ENT_SURFACE | ENT_VOLUME); + + // what = 0 for nodes, 1 for elements, 2 for points, 3 for lines, 4 + // for surfaces, 5 for volumes, 6 for physical points, 7 for + // physical lines, 8 for physical surfaces and 9 for physical + // volumes + int what = (int)(long)data; + char val; + if(what >= 100){ // show + val = 1; + what -= 100; + } + else{ // hide + val = 0; + } + const char *str = GUI::instance()->visibility->input[what]->value(); + + int num = (!strcmp(str, "all") || !strcmp(str, "*")) ? -1 : atoi(str); + bool recursive = GUI::instance()->visibility->butt[0]->value() ? true : false; + + _set_visibility_by_number(what, num, val, recursive); + + int pos = GUI::instance()->visibility->browser->position(); + visibility_cb(NULL, (void*)"redraw_only"); + GUI::instance()->visibility->browser->position(pos); + Draw(); +} + static void visibility_interactive_cb(Fl_Widget *w, void *data) { - const char *str = (const char*)data; - const char *help; + std::string str((const char*)data); int what; - char mode; + char mode; // 0 for hide, 1 for show, 2 for undo + bool physical = (str.find("physical") != std::string::npos); - if(!strcmp(str, "hide_elements")){ + if(str == "elements to hide"){ CTX.pick_elements = 1; what = ENT_ALL; mode = 0; - help = "elements to hide"; } - else if(!strcmp(str, "hide_points")){ + else if(str == "points to hide" || str == "physical points to hide"){ CTX.pick_elements = 0; what = ENT_POINT; mode = 0; - help = "points to hide"; opt_geometry_points(0, GMSH_SET | GMSH_GUI, 1); } - else if(!strcmp(str, "hide_lines")){ + else if(str == "lines to hide" || str == "physical lines to hide"){ CTX.pick_elements = 0; what = ENT_LINE; mode = 0; - help = "lines to hide"; opt_geometry_lines(0, GMSH_SET | GMSH_GUI, 1); } - else if(!strcmp(str, "hide_surfaces")){ + else if(str == "surfaces to hide" || str == "physical surfaces to hide"){ CTX.pick_elements = 0; what = ENT_SURFACE; mode = 0; - help = "surfaces to hide"; if(GModel::current()->getMeshStatus() < 2) opt_geometry_surfaces(0, GMSH_SET | GMSH_GUI, 1); } - else if(!strcmp(str, "hide_volumes")){ + else if(str == "volumes to hide" || str == "physical volumes to hide"){ CTX.pick_elements = 0; what = ENT_VOLUME; mode = 0; - help = "volumes to hide"; if(GModel::current()->getMeshStatus() < 3) opt_geometry_volumes(0, GMSH_SET | GMSH_GUI, 1); } - else if(!strcmp(str, "show_elements")){ + else if(str == "elements to show"){ CTX.pick_elements = 1; what = ENT_ALL; mode = 1; - help = "elements to show"; } - else if(!strcmp(str, "show_points")){ + else if(str == "points to show" || str == "physical points to show"){ CTX.pick_elements = 0; what = ENT_POINT; mode = 1; - help = "points to show"; opt_geometry_points(0, GMSH_SET | GMSH_GUI, 1); } - else if(!strcmp(str, "show_lines")){ + else if(str == "lines to show" || str == "physical lines to show"){ CTX.pick_elements = 0; what = ENT_LINE; mode = 1; - help = "lines to show"; opt_geometry_lines(0, GMSH_SET | GMSH_GUI, 1); } - else if(!strcmp(str, "show_surfaces")){ + else if(str == "surfaces to show" || str == "physical surfaces to show"){ CTX.pick_elements = 0; what = ENT_SURFACE; mode = 1; - help = "surfaces to show"; if(GModel::current()->getMeshStatus() < 2) opt_geometry_surfaces(0, GMSH_SET | GMSH_GUI, 1); } - else if(!strcmp(str, "show_volumes")){ + else if(str == "volumes to show" || str == "physical volumes to show"){ CTX.pick_elements = 0; what = ENT_VOLUME; mode = 1; - help = "volumes to show"; if(GModel::current()->getMeshStatus() < 3) opt_geometry_volumes(0, GMSH_SET | GMSH_GUI, 1); } - else if(!strcmp(str, "show_all")){ + else if(str == "show all"){ for(int i = 1; i <= 5; i++) // elements, points, lines, surfaces, volumes - VisibilityManager::instance()->setVisibilityByNumber(i, -1, 1, false); + _set_visibility_by_number(i, -1, 1, false); CTX.mesh.changed = ENT_ALL; Draw(); return; @@ -374,7 +976,7 @@ static void visibility_interactive_cb(Fl_Widget *w, void *data) CTX.mesh.changed = ENT_ALL; Draw(); Msg::StatusBar(3, false, "Select %s\n[Press %s'q' to abort]", - help, mode ? "" : "'u' to undo or "); + str.c_str(), mode ? "" : "'u' to undo or "); char ib = GUI::instance()->selectEntity(what); if(ib == 'l') { @@ -384,10 +986,10 @@ static void visibility_interactive_cb(Fl_Widget *w, void *data) faces = GUI::instance()->selectedFaces; regions = GUI::instance()->selectedRegions; elements = GUI::instance()->selectedElements; - apply_visibility(mode, vertices, edges, faces, regions, elements); + _apply_visibility(mode, physical, vertices, edges, faces, regions, elements); } if(ib == 'u' && !mode){ // undo only in hide mode - apply_visibility(2, vertices, edges, faces, regions, elements); + _apply_visibility(2, physical, vertices, edges, faces, regions, elements); } if(ib == 'q'){ break; @@ -404,11 +1006,17 @@ static void visibility_interactive_cb(Fl_Widget *w, void *data) class visBrowser : public Fl_Browser{ int handle(int event) { - if(event == FL_KEYBOARD){ - switch(Fl::event_key()) { - case FL_Enter: - case FL_KP_Enter: - visibility_ok_cb(NULL, NULL); + switch(event){ + case FL_SHORTCUT: + case FL_KEYBOARD: + if(Fl::test_shortcut(FL_CTRL+'a')){ + for(int i = 0; i < size(); i++) + select(i + 1); + return 1; + } + else if(Fl::test_shortcut(FL_Enter) || + Fl::test_shortcut(FL_KP_Enter)){ + visibility_browser_apply_cb(NULL, NULL); return 1; } } @@ -423,13 +1031,6 @@ visibilityWindow::visibilityWindow(int fontsize) : _fontsize(fontsize) { static int cols[5] = {15, 95, 95, 180, 0}; - static Fl_Menu_Item type_table[] = { - {"Elementary entities", 0, (Fl_Callback *) visibility_cb}, - {"Physical groups", 0, (Fl_Callback *) visibility_cb}, - {"Mesh partitions", 0, (Fl_Callback *) visibility_cb}, - {0} - }; - int width = cols[0] + cols[1] + cols[2] + cols[3] + 6 * WB; int height = 18 * BH; int brw = width - 4 * WB; @@ -438,97 +1039,142 @@ visibilityWindow::visibilityWindow(int fontsize) (width, height, CTX.non_modal_windows, "Visibility"); win->box(GMSH_WINDOW_BOX); - type = new Fl_Choice(WB, WB, (width - 3 * WB) / 2, BH); - type->menu(type_table); - - butt[0] = new Fl_Check_Button - (WB + (width - 3 * WB) / 2 + WB, WB, (width - 3 * WB) / 2, BH, - "Set visibility recursively"); - butt[0]->type(FL_TOGGLE_BUTTON); - butt[0]->value(1); - Fl_Tabs *o = new Fl_Tabs - (WB, 2 * WB + BH, width - 2 * WB, height - 4 * WB - 2 * BH); + (WB, WB, width - 2 * WB, height - 3 * WB - BH); { - group[0] = new Fl_Group - (WB, 2 * WB + 2 * BH, width - 2 * WB, height - 4 * WB - 3 * BH, "Browser"); + Fl_Group *g = new Fl_Group + (WB, WB + BH, width - 2 * WB, height - 3 * WB - 2 * BH, "List browser"); Fl_Button *o0 = new Fl_Button - (2 * WB, 3 * WB + 2 * BH, cols[0], BH/2, "*"); + (2 * WB, 2 * WB + BH, cols[0], BH/2, "*"); o0->align(FL_ALIGN_TOP | FL_ALIGN_INSIDE); o0->tooltip("Select/unselect all"); o0->callback(visibility_sort_cb, (void *)"*"); Fl_Button *o1 = new Fl_Button - (2 * WB, 3 * WB + 2 * BH + BH/2, cols[0], BH - BH/2, "-"); + (2 * WB, 2 * WB + BH + BH/2, cols[0], BH - BH/2, "-"); o1->tooltip("Invert selection"); o1->callback(visibility_sort_cb, (void *)"-"); Fl_Button *o2 = new Fl_Button - (2 * WB + cols[0], 3 * WB + 2 * BH, cols[1], BH, "Type"); + (2 * WB + cols[0], 2 * WB + BH, cols[1], BH, "Type"); o2->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); o2->tooltip("Sort by type"); o2->callback(visibility_sort_cb, (void *)"type"); Fl_Button *o3 = new Fl_Button - (2 * WB + cols[0] + cols[1], 3 * WB + 2 * BH, cols[2], BH, "Number"); + (2 * WB + cols[0] + cols[1], 2 * WB + BH, cols[2], BH, "Number"); o3->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); o3->tooltip("Sort by number"); o3->callback(visibility_sort_cb, (void *)"number"); Fl_Button *o4 = new Fl_Button - (2 * WB + cols[0] + cols[1] + cols[2], 3 * WB + 2 * BH, cols[3], BH, "Name"); + (2 * WB + cols[0] + cols[1] + cols[2], 2 * WB + BH, cols[3], BH, "Name"); o4->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); o4->tooltip("Sort by name"); o4->callback(visibility_sort_cb, (void *)"name"); Fl_Button *o5 = new Fl_Button - (width - 4 * WB, 3 * WB + 2 * BH, 2 * WB, BH, "+"); + (width - 4 * WB, 2 * WB + BH, 2 * WB, BH, "+"); o5->tooltip("Add parameter name for first selected item"); o5->callback(visibility_sort_cb, (void *)"+"); { - Fl_Group *o = new Fl_Group - (2 * WB, 3 * WB + 3 * BH, brw, height - 7 * WB - 5 * BH); + Fl_Group *gg = new Fl_Group + (2 * WB, 2 * WB + 2 * BH, brw, height - 6 * WB - 4 * BH); browser = new visBrowser - (2 * WB, 3 * WB + 3 * BH, brw, height - 7 * WB - 5 * BH); + (2 * WB, 2 * WB + 2 * BH, brw, height - 6 * WB - 4 * BH); browser->type(FL_MULTI_BROWSER); browser->column_widths(cols); - o->end(); - Fl_Group::current()->resizable(o); + gg->end(); + Fl_Group::current()->resizable(gg); } + static Fl_Menu_Item browser_type_table[] = { + {"Models", 0, (Fl_Callback *) visibility_cb}, + {"Elementary entities", 0, (Fl_Callback *) visibility_cb}, + {"Physical groups", 0, (Fl_Callback *) visibility_cb}, + {"Mesh partitions", 0, (Fl_Callback *) visibility_cb}, + {0} + }; + browser_type = new Fl_Choice + (2 * WB, height - 2 * BH - 3 * WB, (width - 3 * WB) / 2, BH); + browser_type->menu(browser_type_table); + browser_type->value(1); + push[0] = new Fl_Button (width - 2 * BB - 3 * WB, height - 2 * BH - 3 * WB, BB, BH, "Delete"); push[0]->callback(visibility_delete_cb); Fl_Return_Button *b1 = new Fl_Return_Button (width - 1 * BB - 2 * WB, height - 2 * BH - 3 * WB, BB, BH, "Apply"); - b1->callback(visibility_ok_cb); + b1->callback(visibility_browser_apply_cb); - group[0]->end(); - Fl_Group::current()->resizable(group[0]); + g->end(); + Fl_Group::current()->resizable(g); } +#if defined(HAVE_TREE_BROWSER) { - group[1] = new Fl_Group - (WB, 2 * WB + 2 * BH, width - 2 * WB, height - 4 * WB - 2 * BH, "Numeric input"); - group[1]->resizable(NULL); + Fl_Group *g = new Fl_Group + (WB, WB + BH, width - 2 * WB, height - 3 * WB - 2 * BH, "Tree browser"); + + tree = new Flu_Tree_Browser + (2 * WB, 2 * WB + BH, brw, height - 6 * WB - 3 * BH); + tree->show_root(false); + tree->box(FL_DOWN_BOX); + tree->insertion_mode(FLU_INSERT_BACK); + tree->branch_icons(0, 0); + Fl_Group::current()->resizable(tree); + tree->hide(); + + tree_create = new Fl_Button + (2 * WB, 2 * WB + BH, brw, height - 6 * WB - 3 * BH, + "The model contains more than ten thousand entities,\n" + "which might slow down the tree browser.\n\n" + "Create tree browser anyway?"); + tree_create->callback(build_tree_cb); + + Fl_Return_Button *b1 = new Fl_Return_Button + (width - 1 * BB - 2 * WB, height - 2 * BH - 3 * WB, BB, BH, "Apply"); + b1->callback(visibility_tree_apply_cb); - for(int i = 0; i < 6; i++){ - input[i] = new Fl_Input - (width / 2 - WB / 2 - IW, 3 * WB + (i + 2) * BH, IW, BH); + g->end(); + } +#endif + { + Fl_Group *g = new Fl_Group + (WB, WB + BH, width - 2 * WB, height - 3 * WB - 2 * BH, "Numeric"); + g->resizable(NULL); + + int yy = 2 * WB + BH; + for(int i = 0; i < 10; i++){ + if(i == 0){ + Fl_Box *b = new Fl_Box(2 * WB, yy, IW, BH, "Mesh entities:"); + b->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); + yy += BH; + } + else if(i == 2){ + Fl_Box *b = new Fl_Box(2 * WB, yy, IW, BH, "Elementary entities:"); + b->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); + yy += BH; + } + else if(i == 6){ + Fl_Box *b = new Fl_Box(2 * WB, yy, IW, BH, "Physical groups:"); + b->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); + yy += BH; + } + input[i] = new Fl_Input(width / 2 - WB / 2 - IW, yy, IW, BH); input[i]->align(FL_ALIGN_LEFT); input[i]->value("*"); - Fl_Button *o1 = new Fl_Button - (width / 2 + WB / 2, 3 * WB + (i + 2) * BH, BB, BH, "Show"); + Fl_Button *o1 = new Fl_Button(width / 2 + WB / 2, yy, BB, BH, "Show"); o1->callback(visibility_number_cb, (void *)(100+i)); - Fl_Button *o2 = new Fl_Button - (width / 2 + WB / 2 + BB + WB, 3 * WB + (i + 2) * BH, BB, BH, "Hide"); + Fl_Button *o2 = new Fl_Button(width / 2 + WB / 2 + BB + WB, yy, BB, BH, "Hide"); o2->callback(visibility_number_cb, (void *)i); + yy += BH; } input[0]->label("Node"); @@ -549,59 +1195,103 @@ visibilityWindow::visibilityWindow(int fontsize) input[5]->label("Volume"); input[5]->tooltip("Enter volume number, or *"); - group[1]->end(); + input[6]->label("Point"); + input[6]->tooltip("Enter point number, or *"); + + input[7]->label("Line"); + input[7]->tooltip("Enter line number, or *"); + + input[8]->label("Surface"); + input[8]->tooltip("Enter surface number, or *"); + + input[9]->label("Volume"); + input[9]->tooltip("Enter volume number, or *"); + + g->end(); } { - group[2] = new Fl_Group - (WB, 2 * WB + 2 * BH, width - 2 * WB, height - 4 * WB - 2 * BH, "Interactive"); - group[2]->resizable(NULL); + Fl_Group *g = new Fl_Group + (WB, WB + BH, width - 2 * WB, height - 3 * WB - 2 * BH, "Interactive"); + g->resizable(NULL); + Fl_Button* bb[20]; int ll = width/2 - BH - WB - IW; - - Fl_Box *b2 = new Fl_Box - (FL_NO_BOX, ll, 3 * WB + 2 * BH, IW, BH, "Hide with the mouse:"); - b2->align(FL_ALIGN_INSIDE|FL_ALIGN_CENTER); - - Fl_Button *butt1 = new Fl_Button(ll, 3 * WB + 3 * BH, IW, BH, "Elements"); - butt1->callback(visibility_interactive_cb, (void *)"hide_elements"); - Fl_Button *butt2 = new Fl_Button(ll, 3 * WB + 4 * BH, IW, BH, "Points"); - butt2->callback(visibility_interactive_cb, (void *)"hide_points"); - Fl_Button *butt3 = new Fl_Button(ll, 3 * WB + 5 * BH, IW, BH, "Lines"); - butt3->callback(visibility_interactive_cb, (void *)"hide_lines"); - Fl_Button *butt4 = new Fl_Button(ll, 3 * WB + 6 * BH, IW, BH, "Surfaces"); - butt4->callback(visibility_interactive_cb, (void *)"hide_surfaces"); - Fl_Button *butt5 = new Fl_Button(ll, 3 * WB + 7 * BH, IW, BH, "Volumes"); - butt5->callback(visibility_interactive_cb, (void *)"hide_volumes"); - - Fl_Button *butt6 = new Fl_Button - (ll + IW + WB, 3 * WB + 3 * BH, 2 * BH, 5*BH, "Show\nAll"); - butt6->callback(visibility_interactive_cb, (void *)"show_all"); - int ll2 = ll + IW + WB + 2*BH + WB; - - Fl_Box *b12 = new Fl_Box - (FL_NO_BOX, ll2, 3 * WB + 2 * BH, IW, BH, "Show with the mouse:"); - b12->align(FL_ALIGN_INSIDE|FL_ALIGN_CENTER); - - Fl_Button *butt11 = new Fl_Button(ll2, 3 * WB + 3 * BH, IW, BH, "Elements"); - butt11->callback(visibility_interactive_cb, (void *)"show_elements"); - Fl_Button *butt12 = new Fl_Button(ll2, 3 * WB + 4 * BH, IW, BH, "Points"); - butt12->callback(visibility_interactive_cb, (void *)"show_points"); - Fl_Button *butt13 = new Fl_Button(ll2, 3 * WB + 5 * BH, IW, BH, "Lines"); - butt13->callback(visibility_interactive_cb, (void *)"show_lines"); - Fl_Button *butt14 = new Fl_Button(ll2, 3 * WB + 6 * BH, IW, BH, "Surfaces"); - butt14->callback(visibility_interactive_cb, (void *)"show_surfaces"); - Fl_Button *butt15 = new Fl_Button(ll2, 3 * WB + 7 * BH, IW, BH, "Volumes"); - butt15->callback(visibility_interactive_cb, (void *)"show_volumes"); + int yy = 2 * WB + BH; + for(int i = 0; i < 9; i++){ + if(i == 0){ + Fl_Box *b = new Fl_Box(2 * WB, yy, IW, BH, "Mesh entities:"); + b->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); + yy += BH; + } + else if(i == 1){ + Fl_Box *b = new Fl_Box(2 * WB, yy, IW, BH, "Elementary entities:"); + b->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); + yy += BH; + } + else if(i == 5){ + Fl_Box *b = new Fl_Box(2 * WB, yy, IW, BH, "Physical groups:"); + b->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); + yy += BH; + } + bb[2 * i] = new Fl_Button(ll, yy, IW, BH); + bb[2 * i + 1] = new Fl_Button(ll2, yy, IW, BH); + yy += BH; + } + bb[0]->label("Hide elements"); + bb[0]->callback(visibility_interactive_cb, (void *)"elements to hide"); + bb[1]->label("Show elements"); + bb[1]->callback(visibility_interactive_cb, (void *)"elements to show"); + bb[2]->label("Hide points"); + bb[2]->callback(visibility_interactive_cb, (void *)"points to hide"); + bb[3]->label("Show points"); + bb[3]->callback(visibility_interactive_cb, (void *)"points to show"); + bb[4]->label("Hide lines"); + bb[4]->callback(visibility_interactive_cb, (void *)"lines to hide"); + bb[5]->label("Show lines"); + bb[5]->callback(visibility_interactive_cb, (void *)"lines to show"); + bb[6]->label("Hide surfaces"); + bb[6]->callback(visibility_interactive_cb, (void *)"surfaces to hide"); + bb[7]->label("Show surfaces"); + bb[7]->callback(visibility_interactive_cb, (void *)"surfaces to show"); + bb[8]->label("Hide volumes"); + bb[8]->callback(visibility_interactive_cb, (void *)"volumes to hide"); + bb[9]->label("Show volumes"); + bb[9]->callback(visibility_interactive_cb, (void *)"volumes to show"); + bb[10]->label("Hide points"); + bb[10]->callback(visibility_interactive_cb, (void *)"physical points to hide"); + bb[11]->label("Show points"); + bb[11]->callback(visibility_interactive_cb, (void *)"physical points to show"); + bb[12]->label("Hide lines"); + bb[12]->callback(visibility_interactive_cb, (void *)"physical lines to hide"); + bb[13]->label("Show lines"); + bb[13]->callback(visibility_interactive_cb, (void *)"physical lines to show"); + bb[14]->label("Hide surfaces"); + bb[14]->callback(visibility_interactive_cb, (void *)"physical surfaces to hide"); + bb[15]->label("Show surfaces"); + bb[15]->callback(visibility_interactive_cb, (void *)"physical surfaces to show"); + bb[16]->label("Hide volumes"); + bb[16]->callback(visibility_interactive_cb, (void *)"physical volumes to hide"); + bb[17]->label("Show volumes"); + bb[17]->callback(visibility_interactive_cb, (void *)"physical volumes to show"); + + bb[18] = new Fl_Button + (ll + IW + WB, 2 * WB + 2 * BH, 2 * BH, 11 * BH, "Show\nAll"); + bb[18]->callback(visibility_interactive_cb, (void *)"show all"); - group[2]->end(); + g->end(); } o->end(); win->resizable(o); - win->size_range(width, 9 * BH + 6 * WB, width); + win->size_range(width, 15 * BH + 5 * WB, width); { + butt[0] = new Fl_Check_Button + (WB, height - BH - WB, (width - 3 * WB) / 2, BH, "Set visibility recursively"); + butt[0]->type(FL_TOGGLE_BUTTON); + butt[0]->value(1); + Fl_Button *o1 = new Fl_Button (width - 2 * BB - 2 * WB, height - BH - WB, BB, BH, "Save"); o1->callback(visibility_save_cb); @@ -622,4 +1312,3 @@ void visibilityWindow::show(bool redrawOnly) else win->show(); } - diff --git a/Fltk/visibilityWindow.h b/Fltk/visibilityWindow.h index d9af15ca22636861aa9168a0f01f10e4e638b571..98c316c00db460f56f556762b2fcc6582b6dfb7c 100644 --- a/Fltk/visibilityWindow.h +++ b/Fltk/visibilityWindow.h @@ -14,14 +14,21 @@ #include <FL/Fl_Check_Button.H> #include <FL/Fl_Input.H> +#if defined(HAVE_TREE_BROWSER) +#include "Flu_Tree_Browser.h" +#endif + class visibilityWindow{ private: int _fontsize; public: Fl_Window *win; - Fl_Group *group[5]; - Fl_Choice *type; + Fl_Choice *browser_type; Fl_Browser *browser; +#if defined(HAVE_TREE_BROWSER) + Flu_Tree_Browser *tree; + Fl_Button *tree_create; +#endif Fl_Check_Button *butt[2]; Fl_Button *push[2]; Fl_Input *input[10]; diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index 46c89b857e1f47afd92a73500a6cbcdc8f66e23f..d096db578413a6a5f1b2515c5db5d6760ba68936 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -29,8 +29,9 @@ std::vector<GModel*> GModel::list; int GModel::_current = -1; GModel::GModel(std::string name) - : _octree(0), _geo_internals(0), _occ_internals(0), _fm_internals(0), - _fields(0), _currentMeshEntity(0), modelName(name), normals(0) + : _name(name), _visible(1), _octree(0), + _geo_internals(0), _occ_internals(0), _fm_internals(0), + _fields(0), _currentMeshEntity(0), normals(0) { partitionSize[0] = 0; partitionSize[1] = 0; list.push_back(this); @@ -75,6 +76,8 @@ GModel *GModel::findByName(std::string name) void GModel::destroy() { + _name.clear(); + for(riter it = firstRegion(); it != lastRegion(); ++it) delete *it; regions.clear(); diff --git a/Geo/GModel.h b/Geo/GModel.h index 58e37304a9f6514cf9588d45a952bff7c4c29130..8af394c60c1d2de458bc49f0fd65be2bb80df08d 100644 --- a/Geo/GModel.h +++ b/Geo/GModel.h @@ -28,6 +28,12 @@ class CGNSOptions; class GModel { private: + // the name of the model + std::string _name; + + // the visibility flag + char _visible; + // vertex cache to speed-up direct access by vertex number (used for // post-processing I/O) std::vector<MVertex*> _vertexVectorCache; @@ -75,7 +81,6 @@ class GModel static int _current; protected: - std::string modelName; std::set<GRegion*, GEntityLessThan> regions; std::set<GFace*, GEntityLessThan> faces; std::set<GEdge*, GEntityLessThan> edges; @@ -114,8 +119,12 @@ class GModel FieldManager *getFields(){ return _fields; } // get/set the model name - void setName(std::string name){ modelName = name; } - std::string getName(){ return modelName; } + void setName(std::string name){ _name = name; } + std::string getName(){ return _name; } + + // get/set the visibility flag + char getVisibility(){ return _visible; } + void setVisibility(char val){ _visible = val; } // get the number of entities in this model int getNumRegions() const { return regions.size(); } diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp index ddf640c0d31d4550e56a16b0fd89ba1aa938fabf..f58b70e054005d58acfd6bab4b55f0faa02bf8d8 100644 --- a/Geo/Geo.cpp +++ b/Geo/Geo.cpp @@ -2906,7 +2906,7 @@ bool ProjectPointOnSurface(Surface *s, Vertex &p, double uv[2]) x(0) = uv[0]; x(1) = uv[1]; PointSurface ps = {&p, s}; - if(newton_fd(projectPS, x, &ps, 1.)){ + if(newton_fd(projectPS, x, &ps)){ p = InterpolateSurface(s, x(0), x(1), 0, 0); return true; } @@ -3060,7 +3060,7 @@ bool IntersectCurvesWithSurface(List_T *curve_ids, int surface_id, List_T *shape uvt(0) = 0.5; uvt(1) = 0.5; uvt(2) = 0.5; - if(newton_fd(intersectCS, uvt, &cs, 1.)){ + if(newton_fd(intersectCS, uvt, &cs)){ Vertex p = InterpolateCurve(c, uvt(2), 0); Vertex *v = Create_Vertex(NEWPOINT(), p.Pos.X, p.Pos.Y, p.Pos.Z, p.lc, p.u); Tree_Insert(GModel::current()->getGEOInternals()->Points, &v); diff --git a/Geo/Makefile b/Geo/Makefile index fe2672b8bc14c7e74332cacd5854634bca54f460..37474ed2f82e36f8f7f2a63978cfc2fa4b885176 100644 --- a/Geo/Makefile +++ b/Geo/Makefile @@ -89,8 +89,9 @@ GFace${OBJEXT}: GFace.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ MVertex.h MEdge.h MFace.h ../Common/GmshMessage.h \ ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ ../Common/VertexArray.h ../Geo/SVector3.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Numeric/GaussLegendre1D.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Numeric/GaussLegendre1D.h ../Common/Context.h ../Geo/CGNSOptions.h \ + ../Mesh/PartitionOptions.h GFaceCompound${OBJEXT}: GFaceCompound.cpp GFaceCompound.h GFace.h GEntity.h \ Range.h SPoint3.h SBoundingBox3d.h GPoint.h GEdgeLoop.h GEdge.h \ GVertex.h SPoint2.h SVector3.h Pair.h ../Numeric/gmshAssembler.h \ @@ -104,7 +105,7 @@ GFaceCompound${OBJEXT}: GFaceCompound.cpp GFaceCompound.h GFace.h GEntity.h \ ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \ ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ ../Numeric/Gauss.h ../Numeric/GmshMatrix.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Common/Octree.h \ + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h ../Common/Octree.h \ ../Common/OctreeInternals.h ../Numeric/gmshLinearSystemGmm.h \ ../Numeric/gmshLinearSystem.h ../Numeric/gmshLinearSystemFull.h \ ../Numeric/gmshLinearSystem.h ../Numeric/GmshMatrix.h @@ -117,38 +118,40 @@ gmshVertex${OBJEXT}: gmshVertex.cpp GFace.h GEntity.h Range.h SPoint3.h \ SBoundingBox3d.h GPoint.h GEdgeLoop.h GEdge.h GVertex.h SPoint2.h \ SVector3.h Pair.h gmshVertex.h Geo.h ../Common/GmshDefines.h \ gmshSurface.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ - ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \ - ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h \ - GeoInterpolation.h ../Common/GmshMessage.h MVertex.h MElement.h MEdge.h \ - MFace.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Numeric/Gauss.h + ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/ListUtils.h \ + ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ + ExtrudeParams.h ../Common/SmoothData.h GeoInterpolation.h MVertex.h \ + MElement.h MEdge.h MFace.h ../Numeric/FunctionSpace.h \ + ../Numeric/GmshMatrix.h ../Numeric/Gauss.h gmshEdge${OBJEXT}: gmshEdge.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \ GEdgeLoop.h Pair.h GRegion.h GFaceCompound.h gmshEdge.h Geo.h \ ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ExtrudeParams.h ../Common/SmoothData.h GeoInterpolation.h \ - ../Common/GmshMessage.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/PartitionOptions.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/GmshMessage.h ../Common/ListUtils.h ../Common/TreeUtils.h \ + ../Common/avl.h ../Common/ListUtils.h ExtrudeParams.h \ + ../Common/SmoothData.h GeoInterpolation.h ../Common/Context.h \ + ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h gmshFace${OBJEXT}: gmshFace.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \ GEdgeLoop.h Pair.h GRegion.h gmshFace.h Geo.h ../Common/GmshDefines.h \ gmshSurface.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ - ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \ - ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h \ - GeoInterpolation.h ../Common/GmshMessage.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h + ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/ListUtils.h \ + ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ + ExtrudeParams.h ../Common/SmoothData.h GeoInterpolation.h \ + ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h gmshRegion${OBJEXT}: gmshRegion.cpp GModel.h GVertex.h GEntity.h Range.h \ SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h \ GFace.h GEdgeLoop.h Pair.h GRegion.h gmshRegion.h Geo.h \ ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ExtrudeParams.h ../Common/SmoothData.h ../Common/GmshMessage.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/GmshMessage.h ../Common/ListUtils.h ../Common/TreeUtils.h \ + ../Common/avl.h ../Common/ListUtils.h ExtrudeParams.h \ + ../Common/SmoothData.h gmshSurface${OBJEXT}: gmshSurface.cpp gmshSurface.h Pair.h Range.h SPoint2.h \ SPoint3.h SVector3.h SBoundingBox3d.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Common/GmshMessage.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/GmshMessage.h OCCVertex${OBJEXT}: OCCVertex.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \ GEdgeLoop.h Pair.h GRegion.h MVertex.h MElement.h \ @@ -164,8 +167,9 @@ OCCFace${OBJEXT}: OCCFace.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \ GEdgeLoop.h Pair.h GRegion.h OCCVertex.h OCCIncludes.h OCCEdge.h \ OCCFace.h ../Common/GmshMessage.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Common/VertexArray.h ../Geo/SVector3.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/VertexArray.h ../Geo/SVector3.h ../Common/Context.h \ + ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h OCCRegion${OBJEXT}: OCCRegion.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \ GEdgeLoop.h Pair.h GRegion.h OCCVertex.h OCCIncludes.h OCCEdge.h \ @@ -174,23 +178,24 @@ discreteEdge${OBJEXT}: discreteEdge.cpp discreteEdge.h GModel.h GVertex.h \ GEntity.h Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \ SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/GmshMessage.h \ Geo.h ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ExtrudeParams.h ../Common/SmoothData.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \ + ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h discreteFace${OBJEXT}: discreteFace.cpp discreteFace.h GModel.h GVertex.h \ GEntity.h Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \ SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/GmshMessage.h \ Geo.h ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ExtrudeParams.h ../Common/SmoothData.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \ + ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h discreteRegion${OBJEXT}: discreteRegion.cpp discreteRegion.h GModel.h GVertex.h \ GEntity.h Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \ SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h Geo.h \ ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ExtrudeParams.h ../Common/SmoothData.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/GmshMessage.h ../Common/ListUtils.h ../Common/TreeUtils.h \ + ../Common/avl.h ../Common/ListUtils.h ExtrudeParams.h \ + ../Common/SmoothData.h fourierEdge${OBJEXT}: fourierEdge.cpp fourierEdge.h GEdge.h GEntity.h Range.h \ SPoint3.h SBoundingBox3d.h GVertex.h GPoint.h SPoint2.h SVector3.h \ GModel.h GFace.h GEdgeLoop.h Pair.h GRegion.h fourierVertex.h MVertex.h \ @@ -210,18 +215,19 @@ GModel${OBJEXT}: GModel.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ discreteRegion.h discreteFace.h discreteEdge.h discreteVertex.h \ gmshSurface.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ - ../Common/Octree.h ../Common/OctreeInternals.h ../Common/SmoothData.h \ - ../Mesh/Field.h ../Post/PView.h ../Geo/SPoint3.h ../Mesh/Generator.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h + ../Numeric/GmshMatrix.h ../Common/Octree.h ../Common/OctreeInternals.h \ + ../Common/SmoothData.h ../Mesh/Field.h ../Post/PView.h ../Geo/SPoint3.h \ + ../Mesh/Generator.h ../Common/Context.h ../Geo/CGNSOptions.h \ + ../Mesh/PartitionOptions.h GModelIO_Geo${OBJEXT}: GModelIO_Geo.cpp GModel.h GVertex.h GEntity.h Range.h \ SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h \ GFace.h GEdgeLoop.h Pair.h GRegion.h Geo.h ../Common/GmshDefines.h \ gmshSurface.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ - ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \ - ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h \ - ../Common/OpenFile.h ../Common/GmshMessage.h gmshVertex.h gmshFace.h \ - GFaceCompound.h gmshEdge.h gmshRegion.h ../Mesh/Field.h ../Post/PView.h \ - ../Geo/SPoint3.h ../Parser/Parser.h + ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/ListUtils.h \ + ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ + ExtrudeParams.h ../Common/SmoothData.h ../Common/OpenFile.h \ + gmshVertex.h gmshFace.h GFaceCompound.h gmshEdge.h gmshRegion.h \ + ../Mesh/Field.h ../Post/PView.h ../Geo/SPoint3.h ../Parser/Parser.h GModelIO_Mesh${OBJEXT}: GModelIO_Mesh.cpp GModel.h GVertex.h GEntity.h Range.h \ SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h \ GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/GmshDefines.h MElement.h \ @@ -251,35 +257,35 @@ GModelIO_MED${OBJEXT}: GModelIO_MED.cpp GModel.h GVertex.h GEntity.h Range.h \ ExtrudeParams${OBJEXT}: ExtrudeParams.cpp ../Common/GmshMessage.h Geo.h \ ../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \ SPoint3.h SVector3.h SBoundingBox3d.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ExtrudeParams.h ../Common/SmoothData.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \ + ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h Geo${OBJEXT}: Geo.cpp ../Common/GmshMessage.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Common/MallocUtils.h Geo.h \ + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/MallocUtils.h Geo.h ../Common/GmshDefines.h gmshSurface.h \ + Pair.h Range.h SPoint2.h SPoint3.h SVector3.h SBoundingBox3d.h \ + ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \ + ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h GModel.h \ + GVertex.h GEntity.h GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h \ + GeoInterpolation.h ../Mesh/Field.h ../Post/PView.h ../Geo/SPoint3.h \ + ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h +GeoStringInterface${OBJEXT}: GeoStringInterface.cpp ../Common/GmshMessage.h \ + ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h ../Common/StringUtils.h Geo.h \ ../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \ SPoint3.h SVector3.h SBoundingBox3d.h ../Common/ListUtils.h \ ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ExtrudeParams.h ../Common/SmoothData.h GModel.h GVertex.h GEntity.h \ - GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h GeoInterpolation.h \ - ../Mesh/Field.h ../Post/PView.h ../Geo/SPoint3.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h -GeoStringInterface${OBJEXT}: GeoStringInterface.cpp ../Common/GmshMessage.h \ - ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ - ../Common/StringUtils.h Geo.h ../Common/GmshDefines.h gmshSurface.h \ - Pair.h Range.h SPoint2.h SPoint3.h SVector3.h SBoundingBox3d.h \ - ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \ - ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h \ - GeoStringInterface.h ../Common/OpenFile.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h GModel.h GVertex.h \ - GEntity.h GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h \ - ../Parser/Parser.h + ExtrudeParams.h ../Common/SmoothData.h GeoStringInterface.h \ + ../Common/OpenFile.h ../Common/Context.h ../Geo/CGNSOptions.h \ + ../Mesh/PartitionOptions.h GModel.h GVertex.h GEntity.h GPoint.h \ + GEdge.h GFace.h GEdgeLoop.h GRegion.h ../Parser/Parser.h GeoInterpolation${OBJEXT}: GeoInterpolation.cpp ../Common/GmshMessage.h Geo.h \ ../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \ SPoint3.h SVector3.h SBoundingBox3d.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ExtrudeParams.h ../Common/SmoothData.h GeoInterpolation.h \ - GeoStringInterface.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \ + ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h \ + GeoInterpolation.h GeoStringInterface.h findLinks${OBJEXT}: findLinks.cpp ../Common/GmshMessage.h GModel.h GVertex.h \ GEntity.h Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \ SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/TreeUtils.h \ @@ -289,17 +295,19 @@ MVertex${OBJEXT}: MVertex.cpp MVertex.h SPoint2.h SPoint3.h GVertex.h GEntity.h GEdgeLoop.h Pair.h GFaceCompound.h ../Common/GmshMessage.h \ ../Common/StringUtils.h MFace${OBJEXT}: MFace.cpp MFace.h MVertex.h SPoint2.h SPoint3.h SVector3.h \ - ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h ../Common/Context.h \ + ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/Context.h \ ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h MElement${OBJEXT}: MElement.cpp MElement.h ../Common/GmshDefines.h MVertex.h \ SPoint2.h SPoint3.h MEdge.h SVector3.h MFace.h ../Common/GmshMessage.h \ ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ GEntity.h Range.h SBoundingBox3d.h GFace.h GPoint.h GEdgeLoop.h GEdge.h \ GVertex.h Pair.h ../Common/StringUtils.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Numeric/GaussLegendre1D.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h \ - ../Mesh/qualityMeasures.h ../Mesh/meshGFaceDelaunayInsertion.h \ - ../Geo/MElement.h ../Mesh/meshGRegionDelaunayInsertion.h \ - ../Mesh/BackgroundMesh.h ../Mesh/qualityMeasures.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Numeric/GaussLegendre1D.h ../Common/Context.h ../Geo/CGNSOptions.h \ + ../Mesh/PartitionOptions.h ../Mesh/qualityMeasures.h \ + ../Mesh/meshGFaceDelaunayInsertion.h ../Geo/MElement.h \ + ../Mesh/meshGRegionDelaunayInsertion.h ../Mesh/BackgroundMesh.h \ + ../Mesh/qualityMeasures.h MZone${OBJEXT}: MZone.cpp MZoneBoundary${OBJEXT}: MZoneBoundary.cpp diff --git a/Graphics/Makefile b/Graphics/Makefile index 40cfcf3b075e81ec0455aed95aa6a1f39d05478b..e9eaf93c9a6524cd3209639f482b4ea8f58264d2 100644 --- a/Graphics/Makefile +++ b/Graphics/Makefile @@ -59,7 +59,8 @@ depend: # DO NOT DELETE THIS LINE Trackball${OBJEXT}: Trackball.cpp Trackball.h -Iso${OBJEXT}: Iso.cpp ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h +Iso${OBJEXT}: Iso.cpp ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ReadImg${OBJEXT}: ReadImg.cpp ReadImg.h ../Common/GmshMessage.h ../Post/PView.h \ ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ @@ -67,8 +68,9 @@ ReadImg${OBJEXT}: ReadImg.cpp ReadImg.h ../Common/GmshMessage.h ../Post/PView.h drawContext${OBJEXT}: drawContext.cpp ../Common/GmshMessage.h drawContext.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h Trackball.h \ ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h \ - ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ + ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h ../Geo/GModel.h ../Geo/GVertex.h \ + ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \ ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \ ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ @@ -105,9 +107,9 @@ drawGeom${OBJEXT}: drawGeom.cpp drawContext.h ../Geo/SBoundingBox3d.h \ ../Geo/SBoundingBox3d.h drawPost${OBJEXT}: drawPost.cpp drawContext.h ../Geo/SBoundingBox3d.h \ ../Geo/SPoint3.h ../Common/GmshMessage.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h Iso.h ../Post/PView.h \ - ../Post/PViewOptions.h ../Post/ColorTable.h ../Post/PViewData.h \ - ../Numeric/GmshMatrix.h ../Common/VertexArray.h ../Geo/SVector3.h \ + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h Iso.h \ + ../Post/PView.h ../Post/PViewOptions.h ../Post/ColorTable.h \ + ../Post/PViewData.h ../Common/VertexArray.h ../Geo/SVector3.h \ ../Geo/SPoint3.h ../Common/SmoothData.h ../Common/Context.h \ ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h gl2ps.h drawAxes${OBJEXT}: drawAxes.cpp drawContext.h ../Geo/SBoundingBox3d.h \ @@ -120,7 +122,8 @@ drawAxes${OBJEXT}: drawAxes.cpp drawContext.h ../Geo/SBoundingBox3d.h \ ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Common/Context.h ../Geo/CGNSOptions.h \ ../Mesh/PartitionOptions.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h gl2ps.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/GmshMessage.h gl2ps.h drawScales${OBJEXT}: drawScales.cpp drawContext.h ../Geo/SBoundingBox3d.h \ ../Geo/SPoint3.h ../Post/PView.h ../Post/PViewOptions.h \ ../Post/ColorTable.h ../Post/PViewData.h ../Numeric/GmshMatrix.h \ @@ -131,12 +134,13 @@ drawGraph2d${OBJEXT}: drawGraph2d.cpp drawContext.h ../Geo/SBoundingBox3d.h \ ../Post/ColorTable.h ../Post/PViewData.h ../Numeric/GmshMatrix.h \ ../Common/GmshMessage.h gl2ps.h ../Common/Context.h \ ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h drawGlyph${OBJEXT}: drawGlyph.cpp drawContext.h ../Geo/SBoundingBox3d.h \ ../Geo/SPoint3.h ../Fltk/Draw.h ../Common/GmshDefines.h \ ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ - ../Common/StringUtils.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/PartitionOptions.h gl2ps.h + ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/StringUtils.h \ + ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h \ + gl2ps.h gl2ps${OBJEXT}: gl2ps.cpp gl2ps.h gl2gif${OBJEXT}: gl2gif.cpp ../Common/MallocUtils.h gl2gif.h PixelBuffer.h \ ../Common/GmshMessage.h ../Fltk/Draw.h diff --git a/Graphics/drawGeom.cpp b/Graphics/drawGeom.cpp index a461b67c3a0bf69a48695f4091cb3579719e030d..8e718816f800d8799ac009fa5b049023aa135a63 100644 --- a/Graphics/drawGeom.cpp +++ b/Graphics/drawGeom.cpp @@ -475,7 +475,7 @@ void drawContext::drawGeom() for(unsigned int i = 0; i < GModel::list.size(); i++){ GModel *m = GModel::list[i]; - if(CTX.draw_all_models || m == GModel::current()){ + if(m->getVisibility()){ if(CTX.geom.points || CTX.geom.points_num) std::for_each(m->firstVertex(), m->lastVertex(), drawGVertex(this)); if(CTX.geom.lines || CTX.geom.lines_num || CTX.geom.tangents) diff --git a/Graphics/drawMesh.cpp b/Graphics/drawMesh.cpp index 8dd2b6f39317ee727d9d1f8f794eea7cca5e8cdf..62139382de89c0549cd2901fe587c37c6febf9eb 100644 --- a/Graphics/drawMesh.cpp +++ b/Graphics/drawMesh.cpp @@ -954,7 +954,7 @@ void drawContext::drawMesh() for(unsigned int i = 0; i < GModel::list.size(); i++){ GModel *m = GModel::list[i]; - if(CTX.draw_all_models || m == GModel::current()){ + if(m->getVisibility()){ int status = m->getMeshStatus(); if(CTX.mesh.changed) { Msg::Debug("Mesh has changed: reinitializing drawing data", CTX.mesh.changed); diff --git a/Mesh/Makefile b/Mesh/Makefile index e4caab0b73d0f9009863ec15423b924021b7ee04..9673d7d6744c216147d8e5dae73f7f3ad79d1515 100644 --- a/Mesh/Makefile +++ b/Mesh/Makefile @@ -77,42 +77,42 @@ depend: # DO NOT DELETE THIS LINE Generator${OBJEXT}: Generator.cpp ../Common/GmshMessage.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/PartitionOptions.h ../Common/OS.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \ - ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Numeric/Gauss.h meshGEdge.h meshGFace.h meshGFaceBDS.h meshGRegion.h \ - BackgroundMesh.h BoundaryLayers.h HighOrder.h Generator.h \ - ../Post/PView.h ../Post/PViewData.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h \ + ../Common/OS.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ + ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ + ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \ + ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ + ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \ + ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \ + ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/MElement.h \ + ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \ + ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ + ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ + ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ + meshGEdge.h meshGFace.h meshGFaceBDS.h meshGRegion.h BackgroundMesh.h \ + BoundaryLayers.h HighOrder.h Generator.h ../Post/PView.h \ + ../Post/PViewData.h Field${OBJEXT}: Field.cpp ../Common/Context.h ../Geo/CGNSOptions.h \ ../Mesh/PartitionOptions.h Field.h ../Post/PView.h ../Geo/SPoint3.h \ ../Geo/GeoInterpolation.h ../Geo/Geo.h ../Common/GmshDefines.h \ ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h \ ../Geo/SPoint3.h ../Geo/SVector3.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Common/GmshMessage.h ../Post/OctreePost.h ../Common/Octree.h \ + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/GmshMessage.h ../Common/ListUtils.h ../Common/TreeUtils.h \ + ../Common/avl.h ../Common/ListUtils.h ../Geo/SPoint2.h \ + ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Geo/GModel.h \ + ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ + ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \ + ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \ + ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \ + ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ + ../Geo/SBoundingBox3d.h ../Post/OctreePost.h ../Common/Octree.h \ ../Common/OctreeInternals.h ../Post/PViewDataList.h ../Post/PViewData.h \ - ../Numeric/GmshMatrix.h ../Geo/MVertex.h ../Geo/SPoint2.h \ - ../Geo/SPoint3.h + ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h gmshSmoothHighOrder${OBJEXT}: gmshSmoothHighOrder.cpp HighOrder.h \ ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ @@ -135,7 +135,8 @@ gmshSmoothHighOrder${OBJEXT}: gmshSmoothHighOrder.cpp HighOrder.h \ ../Numeric/gmshTermOfFormulation.h ../Numeric/GmshMatrix.h \ ../Numeric/gmshLinearSystemGmm.h ../Numeric/gmshLinearSystem.h \ ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h \ - ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h + ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h meshGEdge${OBJEXT}: meshGEdge.cpp ../Geo/GModel.h ../Geo/GVertex.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ @@ -150,8 +151,9 @@ meshGEdge${OBJEXT}: meshGEdge.cpp ../Geo/GModel.h ../Geo/GVertex.h \ ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ ../Numeric/GmshMatrix.h ../Numeric/Gauss.h BackgroundMesh.h \ - ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h + ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h ../Common/Context.h ../Geo/CGNSOptions.h \ + ../Mesh/PartitionOptions.h meshGEdgeExtruded${OBJEXT}: meshGEdgeExtruded.cpp ../Geo/GModel.h \ ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ @@ -183,8 +185,8 @@ meshGFace${OBJEXT}: meshGFace.cpp meshGFace.h meshGFaceBDS.h \ ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Common/Context.h ../Geo/CGNSOptions.h \ ../Mesh/PartitionOptions.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h BDS.h qualityMeasures.h Field.h \ - ../Post/PView.h ../Common/OS.h HighOrder.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h BDS.h \ + qualityMeasures.h Field.h ../Post/PView.h ../Common/OS.h HighOrder.h meshGFaceTransfinite${OBJEXT}: meshGFaceTransfinite.cpp meshGFace.h \ ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ @@ -198,7 +200,7 @@ meshGFaceTransfinite${OBJEXT}: meshGFaceTransfinite.cpp meshGFace.h \ ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Common/Context.h \ ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h meshGFaceExtruded${OBJEXT}: meshGFaceExtruded.cpp ../Geo/GModel.h \ ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ @@ -230,8 +232,8 @@ meshGFaceBDS${OBJEXT}: meshGFaceBDS.cpp meshGFace.h meshGFaceOptimize.h \ ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h \ ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h BDS.h qualityMeasures.h Field.h \ - ../Post/PView.h ../Common/OS.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h BDS.h \ + qualityMeasures.h Field.h ../Post/PView.h ../Common/OS.h meshGFaceDelaunayInsertion${OBJEXT}: meshGFaceDelaunayInsertion.cpp \ BackgroundMesh.h meshGFaceDelaunayInsertion.h ../Geo/MElement.h \ ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \ @@ -245,7 +247,7 @@ meshGFaceDelaunayInsertion${OBJEXT}: meshGFaceDelaunayInsertion.cpp \ ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h \ ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \ ../Geo/SVector3.h ../Geo/Pair.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h meshGFaceOptimize${OBJEXT}: meshGFaceOptimize.cpp meshGFaceOptimize.h \ ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ @@ -260,18 +262,18 @@ meshGFaceOptimize${OBJEXT}: meshGFaceOptimize.cpp meshGFaceOptimize.h \ ../Geo/SVector3.h ../Geo/Pair.h BackgroundMesh.h Generator.h meshGFaceQuadrilateralize${OBJEXT}: meshGFaceQuadrilateralize.cpp \ meshGFaceQuadrilateralize.h ../Common/GmshMessage.h \ - ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ - ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h meshGFaceDelaunayInsertion.h \ - ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - meshGFaceOptimize.h meshGFaceBDS.h BDS.h + ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h \ + ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ + ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h \ + ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h \ + ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ + ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ + meshGFaceDelaunayInsertion.h ../Geo/MElement.h ../Common/GmshDefines.h \ + ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \ + ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \ + ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ + ../Numeric/Gauss.h meshGFaceOptimize.h meshGFaceBDS.h BDS.h meshGRegion${OBJEXT}: meshGRegion.cpp meshGRegion.h \ meshGRegionDelaunayInsertion.h ../Geo/MElement.h \ ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \ @@ -279,14 +281,14 @@ meshGRegion${OBJEXT}: meshGRegion.cpp meshGRegion.h \ ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h BackgroundMesh.h qualityMeasures.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h BackgroundMesh.h \ + qualityMeasures.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ + ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ + ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \ + ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \ + ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \ + ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/gmshRegion.h ../Geo/Geo.h \ ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h \ ../Geo/SPoint3.h ../Geo/SVector3.h ../Geo/SBoundingBox3d.h \ @@ -302,14 +304,15 @@ meshGRegionDelaunayInsertion${OBJEXT}: meshGRegionDelaunayInsertion.cpp \ ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h qualityMeasures.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h qualityMeasures.h \ + ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ + ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ + ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ + ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ + ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ + ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ + ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ + ../Geo/SBoundingBox3d.h meshGRegionTransfinite${OBJEXT}: meshGRegionTransfinite.cpp meshGFace.h \ ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ @@ -358,32 +361,33 @@ meshGRegionLocalMeshMod${OBJEXT}: meshGRegionLocalMeshMod.cpp \ ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h \ ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h BackgroundMesh.h qualityMeasures.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h BackgroundMesh.h \ + qualityMeasures.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GRegion.h \ ../Geo/GEntity.h DivideAndConquer${OBJEXT}: DivideAndConquer.cpp ../Common/GmshMessage.h \ - ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h DivideAndConquer.h \ - ../Common/MallocUtils.h + ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h DivideAndConquer.h ../Common/MallocUtils.h BackgroundMesh${OBJEXT}: BackgroundMesh.cpp ../Common/GmshMessage.h \ BackgroundMesh.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h Field.h ../Post/PView.h + ../Numeric/GmshMatrix.h ../Common/Context.h ../Geo/CGNSOptions.h \ + ../Mesh/PartitionOptions.h ../Geo/GVertex.h ../Geo/GEntity.h \ + ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ + ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \ + ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ + ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \ + ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GModel.h ../Geo/GVertex.h \ + ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h ../Geo/GEntity.h \ + ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h Field.h ../Post/PView.h qualityMeasures${OBJEXT}: qualityMeasures.cpp qualityMeasures.h BDS.h \ ../Common/GmshMessage.h ../Geo/MVertex.h ../Geo/SPoint2.h \ ../Geo/SPoint3.h ../Geo/MElement.h ../Common/GmshDefines.h \ ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h + ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h BoundaryLayers${OBJEXT}: BoundaryLayers.cpp ../Geo/GModel.h ../Geo/GVertex.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ @@ -398,18 +402,19 @@ BoundaryLayers${OBJEXT}: BoundaryLayers.cpp ../Geo/GModel.h ../Geo/GVertex.h \ ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ ../Numeric/GmshMatrix.h ../Numeric/Gauss.h BoundaryLayers.h \ ../Geo/ExtrudeParams.h ../Common/SmoothData.h meshGEdge.h meshGFace.h -BDS${OBJEXT}: BDS.cpp ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h BDS.h \ - ../Common/GmshMessage.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - meshGFaceDelaunayInsertion.h ../Geo/MElement.h ../Common/GmshDefines.h \ - ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Numeric/Gauss.h qualityMeasures.h +BDS${OBJEXT}: BDS.cpp ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h ../Common/GmshMessage.h BDS.h ../Geo/GFace.h \ + ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ + ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ + ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ + ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \ + ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \ + ../Geo/SVector3.h ../Geo/Pair.h meshGFaceDelaunayInsertion.h \ + ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ + ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ + ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ + ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ + qualityMeasures.h HighOrder${OBJEXT}: HighOrder.cpp HighOrder.h ../Geo/GModel.h ../Geo/GVertex.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ @@ -424,8 +429,9 @@ HighOrder${OBJEXT}: HighOrder.cpp HighOrder.h ../Geo/GModel.h ../Geo/GVertex.h \ ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Geo/MFace.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Common/OS.h \ - ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h + ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h ../Common/Context.h ../Geo/CGNSOptions.h \ + ../Mesh/PartitionOptions.h Partition${OBJEXT}: Partition.cpp ../Geo/GModel.h ../Geo/GVertex.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ diff --git a/Numeric/GmshMatrix.h b/Numeric/GmshMatrix.h index 5a359830021e7fe5319e9b409676dc92264ffebb..6afc0af6ea7fe9c8c4f4e79014699a683b4229bc 100644 --- a/Numeric/GmshMatrix.h +++ b/Numeric/GmshMatrix.h @@ -231,8 +231,8 @@ class Gmsh_Matrix } SCALAR determinant() const { - Gmsh_Matrix<SCALAR> tmp(*this); #if defined(HAVE_LAPACK) + Gmsh_Matrix<SCALAR> tmp(*this); int M = size1(), N = size2(), lda = size1(), info; int *ipiv = new int[std::min(M, N)]; dgetrf_(&M, &N, tmp._data, &lda, ipiv, &info); @@ -429,7 +429,7 @@ class GSL_Matrix { GSL_Vector tmp(S.size()); gsl_linalg_SV_decomp(_data, V._data, S._data, tmp._data); - return false; + return true; } }; diff --git a/Numeric/Numeric.cpp b/Numeric/Numeric.cpp index b130fabf67cadc2c0e72660e27a8f5bd9d8bdcf1..b1dd0d27f2f8c365789938c2e94a2b781aafc9e6 100644 --- a/Numeric/Numeric.cpp +++ b/Numeric/Numeric.cpp @@ -5,11 +5,6 @@ #include "GmshMessage.h" #include "Numeric.h" -#include "GmshMatrix.h" - -// This file contains the routines that depend on the GSL, some of -// which need to be reimplemented (e.g. in terms of Gmsh_Matrix) -// before we can get rid of the GSL completely. #if defined(HAVE_GSL) diff --git a/Numeric/NumericEmbedded.cpp b/Numeric/NumericEmbedded.cpp index 219d1167a913e4818084713e32774e560023aaa9..7726040a9334b4427447a631e1e5cb2337d886c7 100644 --- a/Numeric/NumericEmbedded.cpp +++ b/Numeric/NumericEmbedded.cpp @@ -488,40 +488,37 @@ void invert_singular_matrix3x3(double MM[3][3], double II[3][3]) } bool newton_fd(void (*func)(Double_Vector &, Double_Vector &, void *), - Double_Vector &x, void *data, double relax) + Double_Vector &x, void *data, double relax, double tolx) { - const double PRECISION = 1.e-6; - const int MAXIT = 10; + const int MAXIT = 50; const double EPS = 1.e-4; const int N = x.size(); Double_Matrix J(N, N); - Double_Vector r(N), rp(N), dx(N); + Double_Vector f(N), feps(N), dx(N); - int iter = 1; - while (iter < MAXIT){ - iter++; - func(x, r, data); + for (int iter = 0; iter < MAXIT; iter++){ + func(x, f, data); for (int j = 0; j < N; j++){ double h = EPS * fabs(x(j)); if(h == 0.) h = EPS; x(j) += h; - func(x, rp, data); + func(x, feps, data); for (int i = 0; i < N; i++) - J(i, j) = (rp(i) - r(i)) / h; + J(i, j) = (feps(i) - f(i)) / h; x(j) -= h; } if (N == 1) - dx(0) = r(0) / J(0, 0); + dx(0) = f(0) / J(0, 0); else - J.lu_solve(r, dx); + J.lu_solve(f, dx); for (int i = 0; i < N; i++) x(i) -= relax * dx(i); - if(dx.norm() < PRECISION) return true; + if(dx.norm() < tolx) return true; } return false; } diff --git a/Numeric/NumericEmbedded.h b/Numeric/NumericEmbedded.h index fb457310ff5a5dbbc529125ae438de23adc90143..4ba6bf858b29e032e696cfb47d92da3921d78588 100644 --- a/Numeric/NumericEmbedded.h +++ b/Numeric/NumericEmbedded.h @@ -71,6 +71,6 @@ double ComputeVonMises(double *val); double ComputeScalarRep(int numComp, double *val); void invert_singular_matrix3x3(double MM[3][3], double II[3][3]); bool newton_fd(void (*func)(Double_Vector &, Double_Vector &, void *), - Double_Vector &x, void *data, double relax); + Double_Vector &x, void *data, double relax=1., double tolx=1.e-6); #endif diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 9e080b14bcbe64757c80a8511e9558888b141c4b..4710a2caeb9ca17d1c63244172802bee84ac885b 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -650,16 +650,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 6139 +#define YYLAST 6284 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 141 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 73 +#define YYNNTS 74 /* YYNRULES -- Number of rules. */ -#define YYNRULES 356 +#define YYNRULES 358 /* YYNRULES -- Number of states. */ -#define YYNSTATES 1251 +#define YYNSTATES 1253 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -748,10 +748,10 @@ static const yytype_uint16 yyprhs[] = 1752, 1754, 1756, 1758, 1760, 1762, 1764, 1766, 1768, 1774, 1779, 1784, 1787, 1793, 1797, 1804, 1809, 1817, 1824, 1826, 1829, 1832, 1836, 1840, 1852, 1862, 1870, 1878, 1880, 1884, - 1886, 1888, 1891, 1895, 1900, 1906, 1909, 1913, 1917, 1923, - 1928, 1930, 1932, 1936, 1943, 1945, 1947, 1951, 1955, 1965, - 1973, 1975, 1981, 1985, 1992, 1994, 1998, 2000, 2002, 2006, - 2013, 2015, 2017, 2024, 2029, 2034, 2039 + 1886, 1888, 1891, 1895, 1900, 1906, 1908, 1910, 1913, 1917, + 1921, 1927, 1932, 1934, 1936, 1940, 1947, 1949, 1951, 1955, + 1959, 1969, 1977, 1979, 1985, 1989, 1996, 1998, 2002, 2004, + 2006, 2010, 2017, 2019, 2021, 2028, 2033, 2038, 2043 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ @@ -762,18 +762,18 @@ static const yytype_int16 yyrhs[] = 170, -1, 173, -1, 174, -1, 175, -1, 178, -1, 198, -1, 199, -1, 200, -1, 177, -1, 176, -1, 118, -1, 118, 118, -1, 35, 131, 5, 132, 6, - -1, 35, 131, 5, 132, 145, 212, 6, -1, 35, - 131, 5, 137, 208, 132, 6, -1, 35, 131, 5, - 137, 208, 132, 145, 212, 6, -1, 4, 5, 138, + -1, 35, 131, 5, 132, 145, 213, 6, -1, 35, + 131, 5, 137, 209, 132, 6, -1, 35, 131, 5, + 137, 209, 132, 145, 213, 6, -1, 4, 5, 138, 148, 139, 6, -1, 78, 4, 133, 201, 134, 6, -1, 79, 4, 133, 201, 134, 6, -1, -1, 148, 151, -1, 148, 155, -1, 148, 158, -1, 148, 160, -1, 148, 161, -1, 201, -1, 149, 137, 201, -1, 201, -1, 150, 137, 201, -1, -1, -1, 4, 152, - 131, 149, 132, 153, 138, 150, 139, 6, -1, 212, - -1, 154, 137, 212, -1, -1, 80, 131, 201, 137, + 131, 149, 132, 153, 138, 150, 139, 6, -1, 213, + -1, 154, 137, 213, -1, -1, 80, 131, 201, 137, 201, 137, 201, 132, 156, 138, 154, 139, 6, -1, - 212, -1, 157, 137, 212, -1, -1, 81, 131, 201, + 213, -1, 157, 137, 213, -1, -1, 81, 131, 201, 137, 201, 137, 201, 137, 201, 132, 159, 138, 157, 139, 6, -1, 82, 138, 205, 139, 138, 205, 139, 6, -1, 82, 138, 205, 139, 138, 205, 139, 138, @@ -781,26 +781,26 @@ static const yytype_int16 yyrhs[] = 138, 150, 139, 6, -1, 7, -1, 111, -1, 110, -1, 109, -1, 108, -1, 129, -1, 128, -1, 4, 163, 201, 6, -1, 4, 133, 201, 134, 163, 201, - 6, -1, 4, 133, 138, 208, 139, 134, 163, 206, + 6, -1, 4, 133, 138, 209, 139, 134, 163, 206, 6, -1, 4, 133, 134, 7, 206, 6, -1, 4, 133, 134, 111, 206, 6, -1, 4, 164, 6, -1, - 4, 133, 201, 134, 164, 6, -1, 4, 7, 213, - 6, -1, 4, 135, 4, 7, 213, 6, -1, 4, - 133, 201, 134, 135, 4, 7, 213, 6, -1, 4, + 4, 133, 201, 134, 164, 6, -1, 4, 7, 214, + 6, -1, 4, 135, 4, 7, 214, 6, -1, 4, + 133, 201, 134, 135, 4, 7, 214, 6, -1, 4, 135, 4, 163, 201, 6, -1, 4, 133, 201, 134, 135, 4, 163, 201, 6, -1, 4, 135, 4, 164, 6, -1, 4, 133, 201, 134, 135, 4, 164, 6, - -1, 4, 135, 90, 135, 4, 7, 209, 6, -1, - 4, 133, 201, 134, 135, 90, 135, 4, 7, 209, - 6, -1, 4, 135, 91, 7, 210, 6, -1, 4, - 133, 201, 134, 135, 91, 7, 210, 6, -1, 4, + -1, 4, 135, 90, 135, 4, 7, 210, 6, -1, + 4, 133, 201, 134, 135, 90, 135, 4, 7, 210, + 6, -1, 4, 135, 91, 7, 211, 6, -1, 4, + 133, 201, 134, 135, 91, 7, 211, 6, -1, 4, 98, 7, 201, 6, -1, 98, 133, 201, 134, 7, 4, 6, -1, 98, 133, 201, 134, 135, 4, 7, 201, 6, -1, 98, 133, 201, 134, 135, 4, 7, - 213, 6, -1, 98, 133, 201, 134, 135, 4, 7, - 138, 208, 139, 6, -1, 63, 131, 4, 132, 135, + 214, 6, -1, 98, 133, 201, 134, 135, 4, 7, + 138, 209, 139, 6, -1, 63, 131, 4, 132, 135, 4, 7, 201, 6, -1, 63, 131, 4, 132, 135, - 4, 7, 213, 6, -1, 201, -1, 213, -1, -1, + 4, 7, 214, 6, -1, 201, -1, 214, -1, -1, 93, 47, 138, 201, 139, -1, -1, 56, 203, -1, 43, 131, 201, 132, 7, 203, 6, -1, 60, 43, 131, 166, 132, 7, 206, 6, -1, 52, 53, 206, @@ -829,19 +829,19 @@ static const yytype_int16 yyrhs[] = 64, 138, 203, 137, 203, 137, 201, 139, 138, 171, 139, -1, 66, 203, 138, 171, 139, -1, 67, 138, 203, 137, 201, 139, 138, 171, 139, -1, 4, 138, - 171, 139, -1, 75, 46, 138, 208, 139, 49, 138, - 201, 139, -1, 72, 46, 131, 201, 132, 138, 208, + 171, 139, -1, 75, 46, 138, 209, 139, 49, 138, + 201, 139, -1, 72, 46, 131, 201, 132, 138, 209, 139, 6, -1, 172, -1, 170, -1, -1, 172, 169, - -1, 172, 43, 138, 208, 139, 6, -1, 172, 46, - 138, 208, 139, 6, -1, 172, 49, 138, 208, 139, - 6, -1, 172, 51, 138, 208, 139, 6, -1, 73, + -1, 172, 43, 138, 209, 139, 6, -1, 172, 46, + 138, 209, 139, 6, -1, 172, 49, 138, 209, 139, + 6, -1, 172, 51, 138, 209, 139, 6, -1, 73, 138, 172, 139, -1, 73, 98, 133, 201, 134, 6, -1, 73, 4, 133, 201, 134, 6, -1, 73, 4, - 6, -1, 73, 4, 4, 6, -1, 90, 209, 138, - 172, 139, -1, 102, 212, 6, -1, 103, 212, 6, + 6, -1, 73, 4, 4, 6, -1, 90, 210, 138, + 172, 139, -1, 102, 5, 6, -1, 103, 5, 6, -1, 102, 138, 172, 139, -1, 103, 138, 172, 139, - -1, 4, 213, 6, -1, 4, 4, 133, 201, 134, - 212, 6, -1, 4, 4, 4, 133, 201, 134, 6, + -1, 4, 214, 6, -1, 4, 4, 133, 201, 134, + 213, 6, -1, 4, 4, 4, 133, 201, 134, 6, -1, 4, 201, 6, -1, 63, 131, 4, 132, 135, 4, 6, -1, 84, 4, 6, -1, 97, 6, -1, 40, 6, -1, 40, 138, 201, 137, 201, 137, 201, @@ -893,14 +893,14 @@ static const yytype_int16 yyrhs[] = 7, 206, 62, 201, 6, -1, -1, 62, 4, 201, -1, -1, 4, -1, -1, 7, 206, -1, -1, 7, 201, -1, 58, 46, 206, 7, 201, 194, 6, -1, - 58, 49, 206, 196, 195, 6, -1, 55, 49, 138, + 58, 49, 207, 196, 195, 6, -1, 55, 49, 138, 201, 139, 7, 206, 6, -1, 58, 51, 138, 201, - 139, 7, 206, 6, -1, 70, 49, 206, 197, 6, + 139, 7, 206, 6, -1, 70, 49, 207, 197, 6, -1, 71, 49, 206, 7, 201, 6, -1, 43, 138, - 208, 139, 93, 49, 138, 201, 139, 6, -1, 46, - 138, 208, 139, 93, 49, 138, 201, 139, 6, -1, - 46, 138, 208, 139, 93, 51, 138, 201, 139, 6, - -1, 49, 138, 208, 139, 93, 51, 138, 201, 139, + 209, 139, 93, 49, 138, 201, 139, 6, -1, 46, + 138, 209, 139, 93, 49, 138, 201, 139, 6, -1, + 46, 138, 209, 139, 93, 51, 138, 201, 139, 6, + -1, 49, 138, 209, 139, 93, 51, 138, 201, 139, 6, -1, 74, 6, -1, 74, 4, 6, -1, 202, -1, 131, 201, 132, -1, 122, 201, -1, 121, 201, -1, 126, 201, -1, 201, 122, 201, -1, 201, 121, @@ -945,23 +945,23 @@ static const yytype_int16 yyrhs[] = 139, -1, 138, 201, 137, 201, 137, 201, 137, 201, 139, -1, 138, 201, 137, 201, 137, 201, 139, -1, 131, 201, 137, 201, 137, 201, 132, -1, 206, -1, - 205, 137, 206, -1, 201, -1, 207, -1, 138, 139, - -1, 138, 208, 139, -1, 122, 138, 208, 139, -1, - 201, 123, 138, 208, 139, -1, 122, 207, -1, 201, - 123, 207, -1, 201, 8, 201, -1, 201, 8, 201, - 8, 201, -1, 43, 138, 201, 139, -1, 170, -1, - 178, -1, 4, 133, 134, -1, 4, 133, 138, 208, - 139, 134, -1, 201, -1, 207, -1, 208, 137, 201, - -1, 208, 137, 207, -1, 138, 201, 137, 201, 137, - 201, 137, 201, 139, -1, 138, 201, 137, 201, 137, - 201, 139, -1, 4, -1, 4, 135, 90, 135, 4, - -1, 138, 211, 139, -1, 4, 133, 201, 134, 135, - 91, -1, 209, -1, 211, 137, 209, -1, 213, -1, - 4, -1, 4, 135, 4, -1, 4, 133, 201, 134, - 135, 4, -1, 5, -1, 42, -1, 37, 131, 212, - 137, 212, 132, -1, 38, 131, 212, 132, -1, 39, - 131, 212, 132, -1, 36, 131, 212, 132, -1, 36, - 131, 212, 137, 208, 132, -1 + 205, 137, 206, -1, 201, -1, 208, -1, 138, 139, + -1, 138, 209, 139, -1, 122, 138, 209, 139, -1, + 201, 123, 138, 209, 139, -1, 206, -1, 5, -1, + 122, 208, -1, 201, 123, 208, -1, 201, 8, 201, + -1, 201, 8, 201, 8, 201, -1, 43, 138, 201, + 139, -1, 170, -1, 178, -1, 4, 133, 134, -1, + 4, 133, 138, 209, 139, 134, -1, 201, -1, 208, + -1, 209, 137, 201, -1, 209, 137, 208, -1, 138, + 201, 137, 201, 137, 201, 137, 201, 139, -1, 138, + 201, 137, 201, 137, 201, 139, -1, 4, -1, 4, + 135, 90, 135, 4, -1, 138, 212, 139, -1, 4, + 133, 201, 134, 135, 91, -1, 210, -1, 212, 137, + 210, -1, 214, -1, 4, -1, 4, 135, 4, -1, + 4, 133, 201, 134, 135, 4, -1, 5, -1, 42, + -1, 37, 131, 213, 137, 213, 132, -1, 38, 131, + 213, 132, -1, 39, 131, 213, 132, -1, 36, 131, + 213, 132, -1, 36, 131, 213, 137, 209, 132, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -988,21 +988,21 @@ static const yytype_uint16 yyrline[] = 2255, 2262, 2269, 2277, 2276, 2288, 2287, 2299, 2298, 2310, 2309, 2321, 2320, 2332, 2331, 2343, 2342, 2354, 2353, 2365, 2364, 2379, 2382, 2388, 2397, 2417, 2440, 2444, 2468, 2471, - 2487, 2490, 2503, 2506, 2512, 2515, 2522, 2551, 2599, 2604, - 2646, 2668, 2694, 2717, 2740, 2743, 2752, 2756, 2772, 2773, - 2774, 2775, 2776, 2777, 2778, 2779, 2780, 2787, 2788, 2789, - 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, - 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, - 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2820, - 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 2830, - 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 2840, - 2849, 2850, 2851, 2852, 2853, 2854, 2855, 2859, 2872, 2884, - 2899, 2909, 2919, 2937, 2942, 2947, 2957, 2967, 2975, 2979, - 2983, 2987, 2991, 2998, 3002, 3006, 3010, 3017, 3022, 3029, - 3034, 3038, 3043, 3047, 3055, 3066, 3074, 3082, 3089, 3100, - 3120, 3130, 3140, 3150, 3170, 3175, 3179, 3183, 3195, 3199, - 3211, 3218, 3228, 3232, 3247, 3252, 3259, 3263, 3276, 3284, - 3295, 3299, 3307, 3315, 3329, 3343, 3347 + 2487, 2490, 2503, 2506, 2512, 2515, 2522, 2551, 2621, 2626, + 2668, 2711, 2737, 2760, 2783, 2786, 2795, 2799, 2815, 2816, + 2817, 2818, 2819, 2820, 2821, 2822, 2823, 2830, 2831, 2832, + 2833, 2834, 2835, 2836, 2837, 2838, 2839, 2840, 2841, 2842, + 2843, 2844, 2845, 2846, 2847, 2848, 2849, 2850, 2851, 2852, + 2853, 2854, 2855, 2856, 2857, 2858, 2859, 2860, 2861, 2863, + 2864, 2865, 2866, 2867, 2868, 2869, 2870, 2871, 2872, 2873, + 2874, 2875, 2876, 2877, 2878, 2879, 2880, 2881, 2882, 2883, + 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2902, 2915, 2927, + 2942, 2952, 2962, 2980, 2985, 2990, 3000, 3010, 3018, 3022, + 3026, 3030, 3034, 3041, 3045, 3049, 3053, 3060, 3065, 3072, + 3077, 3081, 3086, 3090, 3098, 3109, 3113, 3125, 3133, 3141, + 3148, 3159, 3179, 3189, 3199, 3209, 3229, 3234, 3238, 3242, + 3254, 3258, 3270, 3277, 3287, 3291, 3306, 3311, 3318, 3322, + 3335, 3343, 3354, 3358, 3366, 3374, 3388, 3402, 3406 }; #endif @@ -1045,8 +1045,8 @@ static const char *const yytname[] = "ExtrudeParameter", "TransfiniteType", "TransfiniteArrangement", "TransfiniteCorners", "RecombineAngle", "Transfinite", "Embedding", "Coherence", "FExpr", "FExpr_Single", "VExpr", "VExpr_Single", - "RecursiveListOfListOfDouble", "ListOfDouble", "FExpr_Multi", - "RecursiveListOfDouble", "ColorExpr", "ListOfColor", + "RecursiveListOfListOfDouble", "ListOfDouble", "ListOfDoubleOrAll", + "FExpr_Multi", "RecursiveListOfDouble", "ColorExpr", "ListOfColor", "RecursiveListOfColor", "StringExprVar", "StringExpr", 0 }; #endif @@ -1109,10 +1109,10 @@ static const yytype_uint8 yyr1[] = 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 203, 203, 203, 203, 203, 204, 204, 204, 204, 205, 205, 206, - 206, 206, 206, 206, 206, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 208, 208, 208, 208, 209, 209, - 209, 209, 210, 210, 211, 211, 212, 212, 212, 212, - 213, 213, 213, 213, 213, 213, 213 + 206, 206, 206, 206, 206, 207, 207, 208, 208, 208, + 208, 208, 208, 208, 208, 208, 209, 209, 209, 209, + 210, 210, 210, 210, 211, 211, 212, 212, 213, 213, + 213, 213, 214, 214, 214, 214, 214, 214, 214 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1150,10 +1150,10 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 4, 2, 5, 3, 6, 4, 7, 6, 1, 2, 2, 3, 3, 11, 9, 7, 7, 1, 3, 1, - 1, 2, 3, 4, 5, 2, 3, 3, 5, 4, - 1, 1, 3, 6, 1, 1, 3, 3, 9, 7, - 1, 5, 3, 6, 1, 3, 1, 1, 3, 6, - 1, 1, 6, 4, 4, 4, 6 + 1, 2, 3, 4, 5, 1, 1, 2, 3, 3, + 5, 4, 1, 1, 3, 6, 1, 1, 3, 3, + 9, 7, 1, 5, 3, 6, 1, 3, 1, 1, + 3, 6, 1, 1, 6, 4, 4, 4, 6 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -1168,10 +1168,10 @@ static const yytype_uint16 yydefact[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, 0, 162, 0, 0, 159, 0, 0, 0, 0, 5, 7, 6, 8, 9, 10, 11, 12, 13, 19, - 18, 14, 15, 16, 17, 290, 297, 350, 54, 291, + 18, 14, 15, 16, 17, 290, 297, 352, 54, 291, 292, 293, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 351, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 353, 0, 0, 294, 295, 296, 58, 57, 56, 55, 0, 0, 0, 60, 59, 0, 0, 0, 0, 127, 0, 0, 0, 228, 0, 0, 0, 0, 150, 0, 152, 0, 0, @@ -1180,54 +1180,54 @@ static const yytype_uint16 yydefact[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 308, 0, 0, 0, 0, 0, 127, 0, 0, 0, 0, 0, 0, 127, 0, 226, 0, - 0, 0, 0, 0, 0, 0, 340, 0, 0, 0, - 0, 0, 149, 0, 0, 158, 347, 350, 127, 0, - 346, 127, 0, 0, 0, 0, 0, 301, 29, 0, + 0, 0, 0, 0, 0, 0, 342, 0, 0, 0, + 0, 0, 149, 0, 0, 158, 0, 127, 0, 127, + 0, 0, 0, 0, 301, 29, 352, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 297, 231, - 230, 232, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 126, 0, 125, 0, 66, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 297, 231, 230, 232, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 126, + 0, 125, 0, 66, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 143, 107, 0, 0, 0, 0, 297, 0, - 0, 330, 331, 334, 335, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 319, - 0, 320, 0, 0, 0, 0, 0, 0, 212, 0, + 143, 107, 0, 0, 0, 0, 297, 0, 0, 332, + 333, 336, 337, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 319, 0, 320, + 0, 0, 0, 0, 0, 0, 326, 325, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 310, 309, 0, 0, 0, 0, 127, 127, 0, 0, 0, 0, 0, 0, 0, 172, 0, 127, 214, 0, 0, 0, 136, 0, 0, 0, 227, 0, 0, 0, 148, 0, 0, 0, 0, 0, 127, 0, 0, 0, 0, 160, - 0, 0, 0, 139, 0, 140, 0, 0, 303, 0, - 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, + 139, 0, 140, 0, 0, 0, 303, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 349, 0, 348, 0, 0, 0, 0, 0, 0, 229, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 122, 0, 0, 0, 0, 128, 61, 0, 246, 245, 244, 243, 239, 240, 242, 241, 234, 233, 235, 236, 237, 238, 108, 0, 0, 0, 0, 0, - 0, 230, 325, 0, 0, 0, 0, 0, 0, 0, + 0, 230, 327, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 0, 0, 0, 86, 87, 0, 0, 0, 0, 0, 0, 0, 0, 312, 311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 0, 0, 0, 0, 137, 0, 0, 133, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 161, 0, 0, 348, 141, - 142, 0, 299, 305, 0, 39, 0, 0, 0, 52, - 0, 30, 31, 32, 33, 34, 248, 269, 249, 270, - 250, 271, 251, 272, 252, 273, 253, 274, 254, 275, - 255, 276, 256, 277, 268, 289, 257, 278, 0, 0, - 259, 280, 260, 281, 261, 282, 262, 283, 263, 284, - 264, 285, 0, 0, 0, 0, 0, 0, 355, 0, - 0, 353, 354, 79, 0, 0, 0, 0, 0, 54, + 0, 0, 0, 0, 0, 161, 0, 141, 142, 0, + 299, 305, 0, 39, 0, 0, 0, 52, 0, 30, + 31, 32, 33, 34, 248, 269, 249, 270, 250, 271, + 251, 272, 252, 273, 253, 274, 254, 275, 255, 276, + 256, 277, 268, 289, 257, 278, 0, 0, 259, 280, + 260, 281, 261, 282, 262, 283, 263, 284, 264, 285, + 0, 0, 0, 0, 0, 0, 0, 0, 357, 0, + 0, 355, 356, 79, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 73, 0, 0, 0, 0, 300, 0, 0, 0, 0, 0, 22, 20, 0, 0, - 0, 0, 332, 0, 0, 327, 235, 326, 336, 337, + 0, 0, 334, 0, 0, 329, 235, 328, 338, 339, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 322, 0, 0, 0, 0, 0, 0, 0, 208, 213, 211, 0, 0, 0, 0, 0, 0, @@ -1235,217 +1235,217 @@ static const yytype_uint16 yydefact[] = 0, 0, 0, 0, 0, 0, 201, 0, 163, 0, 215, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 0, 0, 0, 0, 0, - 0, 0, 302, 0, 298, 0, 0, 0, 0, 0, - 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 299, 64, 65, 0, 0, 0, 0, 0, - 67, 69, 71, 0, 0, 344, 0, 77, 0, 0, - 0, 0, 247, 21, 0, 0, 0, 0, 0, 329, - 0, 0, 90, 90, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 323, 0, 94, 0, 0, 0, - 0, 0, 0, 0, 217, 0, 0, 0, 0, 0, + 0, 302, 0, 298, 0, 0, 0, 0, 0, 26, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 350, + 0, 0, 0, 299, 64, 65, 0, 0, 0, 0, + 0, 67, 69, 71, 0, 0, 346, 0, 77, 0, + 0, 0, 0, 247, 21, 0, 0, 0, 0, 0, + 331, 0, 0, 90, 90, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 323, 0, 94, 0, 0, + 0, 0, 0, 0, 0, 217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 206, 0, 0, 173, 202, 0, 0, 221, 0, 135, - 134, 0, 27, 28, 0, 0, 0, 341, 0, 0, - 0, 153, 0, 0, 0, 145, 304, 144, 0, 0, + 0, 206, 0, 0, 173, 202, 0, 0, 221, 0, + 135, 134, 0, 27, 28, 0, 0, 0, 343, 0, + 0, 0, 153, 0, 0, 145, 304, 144, 0, 0, 0, 0, 317, 0, 258, 279, 265, 286, 266, 287, - 267, 288, 356, 352, 307, 0, 54, 0, 0, 0, - 0, 62, 0, 0, 0, 342, 0, 0, 0, 0, - 23, 24, 0, 0, 92, 0, 328, 0, 0, 0, - 0, 0, 95, 0, 0, 110, 111, 0, 0, 96, - 116, 324, 0, 0, 0, 0, 88, 0, 216, 0, - 0, 0, 0, 0, 0, 0, 147, 0, 0, 0, - 0, 127, 0, 183, 0, 185, 0, 187, 319, 0, - 0, 0, 0, 167, 0, 0, 100, 101, 0, 0, - 0, 0, 80, 0, 349, 306, 0, 35, 0, 0, - 0, 0, 0, 37, 0, 0, 0, 74, 0, 0, - 75, 0, 345, 129, 130, 131, 132, 0, 0, 333, - 0, 91, 97, 98, 103, 0, 0, 112, 0, 0, - 0, 218, 105, 0, 0, 209, 219, 115, 93, 104, - 113, 117, 0, 0, 0, 0, 316, 0, 315, 0, - 0, 174, 0, 0, 175, 0, 0, 176, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 339, 0, - 155, 154, 0, 0, 0, 40, 0, 0, 0, 318, - 0, 0, 0, 63, 70, 72, 0, 78, 0, 25, - 0, 0, 0, 0, 0, 0, 0, 0, 106, 0, - 84, 85, 127, 0, 121, 0, 0, 0, 0, 0, - 0, 203, 0, 0, 127, 0, 124, 123, 0, 0, - 0, 0, 81, 82, 0, 36, 0, 0, 0, 38, - 53, 0, 343, 0, 222, 223, 224, 225, 109, 0, - 0, 0, 0, 0, 314, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 168, 0, 0, - 338, 156, 0, 0, 0, 0, 0, 76, 0, 0, - 0, 0, 119, 0, 189, 0, 0, 191, 0, 0, - 193, 0, 0, 0, 204, 0, 164, 0, 127, 102, - 83, 0, 44, 0, 50, 0, 0, 0, 89, 114, - 313, 177, 0, 0, 184, 178, 0, 0, 186, 179, - 0, 0, 188, 0, 0, 0, 170, 0, 0, 0, - 0, 0, 0, 0, 195, 0, 197, 0, 199, 205, - 207, 169, 165, 0, 41, 0, 48, 0, 0, 0, - 0, 180, 0, 0, 181, 0, 0, 182, 0, 0, - 0, 42, 0, 0, 151, 0, 0, 0, 0, 0, - 0, 0, 171, 0, 0, 0, 0, 0, 190, 0, - 192, 0, 194, 0, 43, 45, 0, 46, 0, 99, - 0, 0, 0, 0, 0, 51, 196, 198, 200, 47, - 49 + 267, 288, 0, 358, 354, 307, 0, 54, 0, 0, + 0, 0, 62, 0, 0, 0, 344, 0, 0, 0, + 0, 23, 24, 0, 0, 92, 0, 330, 0, 0, + 0, 0, 0, 95, 0, 0, 110, 111, 0, 0, + 96, 116, 324, 0, 0, 0, 0, 88, 0, 216, + 0, 0, 0, 0, 0, 0, 0, 147, 0, 0, + 0, 0, 127, 0, 183, 0, 185, 0, 187, 319, + 0, 0, 0, 0, 167, 0, 0, 100, 101, 0, + 0, 0, 0, 80, 0, 306, 0, 35, 0, 0, + 0, 0, 0, 37, 0, 0, 0, 0, 74, 0, + 0, 75, 0, 347, 129, 130, 131, 132, 0, 0, + 335, 0, 91, 97, 98, 103, 0, 0, 112, 0, + 0, 0, 218, 105, 0, 0, 209, 219, 115, 93, + 104, 113, 117, 0, 0, 0, 0, 316, 0, 315, + 0, 0, 174, 0, 0, 175, 0, 0, 176, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 341, + 0, 155, 154, 0, 0, 0, 40, 0, 0, 0, + 318, 0, 0, 0, 351, 63, 70, 72, 0, 78, + 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, + 106, 0, 84, 85, 127, 0, 121, 0, 0, 0, + 0, 0, 0, 203, 0, 0, 127, 0, 124, 123, + 0, 0, 0, 0, 81, 82, 0, 36, 0, 0, + 0, 38, 53, 0, 345, 0, 222, 223, 224, 225, + 109, 0, 0, 0, 0, 0, 314, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 168, + 0, 0, 340, 156, 0, 0, 0, 0, 0, 76, + 0, 0, 0, 0, 119, 0, 189, 0, 0, 191, + 0, 0, 193, 0, 0, 0, 204, 0, 164, 0, + 127, 102, 83, 0, 44, 0, 50, 0, 0, 0, + 89, 114, 313, 177, 0, 0, 184, 178, 0, 0, + 186, 179, 0, 0, 188, 0, 0, 0, 170, 0, + 0, 0, 0, 0, 0, 0, 195, 0, 197, 0, + 199, 205, 207, 169, 165, 0, 41, 0, 48, 0, + 0, 0, 0, 180, 0, 0, 181, 0, 0, 182, + 0, 0, 0, 42, 0, 0, 151, 0, 0, 0, + 0, 0, 0, 0, 171, 0, 0, 0, 0, 0, + 190, 0, 192, 0, 194, 0, 43, 45, 0, 46, + 0, 99, 0, 0, 0, 0, 0, 51, 196, 198, + 200, 47, 49 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 2, 3, 60, 658, 61, 62, 400, 956, 962, - 581, 745, 1084, 1210, 582, 1178, 1236, 583, 1212, 584, - 585, 749, 127, 217, 63, 523, 994, 899, 467, 311, - 282, 283, 66, 67, 68, 69, 70, 312, 719, 1147, - 1193, 543, 1012, 1015, 1018, 1162, 1166, 1170, 1202, 1205, - 1208, 715, 716, 813, 694, 520, 547, 72, 73, 74, - 329, 130, 348, 173, 861, 862, 331, 315, 198, 649, - 776, 209, 210 + -1, 2, 3, 60, 658, 61, 62, 398, 956, 962, + 579, 744, 1086, 1212, 580, 1180, 1238, 581, 1214, 582, + 583, 748, 127, 214, 63, 523, 995, 900, 467, 309, + 280, 281, 66, 67, 68, 69, 70, 310, 719, 1149, + 1195, 543, 1013, 1016, 1019, 1164, 1168, 1172, 1204, 1207, + 1210, 715, 716, 814, 694, 520, 547, 72, 73, 74, + 327, 130, 348, 173, 861, 862, 338, 329, 313, 198, + 649, 777, 443, 444 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -1036 +#define YYPACT_NINF -1017 static const yytype_int16 yypact[] = { - 2645, 70, 29, 2721, -1036, -1036, 1308, 74, -24, -41, - -5, 106, -80, -9, 40, -53, 67, 71, -36, 78, - 144, 90, -42, 111, 230, 233, 276, 249, 256, 254, - 186, 195, 323, 323, 223, 272, 329, 330, 342, 23, - 35, 382, 417, 443, 447, 341, 345, 346, 15, 7, - -1036, 353, -1036, 463, 376, -1036, 511, 517, 10, 69, - -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, - -1036, -1036, -1036, -1036, -1036, -1036, 22, 388, 619, -1036, - -1036, -1036, -77, 54, 128, 145, 180, 258, 267, 294, - 405, 422, 425, 434, 439, 512, 521, 529, 601, 602, - 645, 648, 665, 396, 399, 400, 409, -1036, 545, 416, - -1036, -1036, -1036, -1036, -1036, -1036, -1036, 2151, 2151, 2151, - -1036, -1036, 2151, 1783, 19, 557, 340, 2151, 560, 693, - -1036, 577, 582, 2151, 584, -1036, 2151, -1036, 2151, 2084, - 2151, 2151, 461, 2151, 2084, 2151, 2151, 467, 2084, 2151, - 2151, 1356, 471, 2151, 465, 480, 481, 1356, 1356, 477, - 505, 515, 532, 533, 542, 543, 638, 323, 323, 323, - 2151, 2151, 143, -1036, 357, 323, 550, 555, 556, 1954, - 379, 1356, 1356, 566, 36, 570, -1036, 700, -1036, 571, - 579, 580, 718, 2151, 2151, 2151, 612, 2151, 598, 644, - 2151, 2151, -1036, 2151, 742, -1036, 668, -1036, -1036, 774, - -1036, -1036, 791, 642, 2151, 785, 662, -1036, -1036, 819, - 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151, - 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151, - 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151, - 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151, - 2151, 2151, 596, 596, 596, 596, 2151, 821, 655, 713, - 713, 713, 4980, 14, 2084, 4244, 485, 694, 841, 720, - 722, -1036, 725, 2785, 928, -1036, -1036, 2151, 2151, 2151, - 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151, - 2151, 2151, -1036, -1036, 1549, -87, 3490, 5001, 567, 734, - 2084, -1036, -1036, 993, -1036, 685, 5022, 5043, 2151, 5064, - 698, 5085, 5106, 2151, 699, 5127, 5148, 1486, 1171, 2433, - 861, -1036, 2151, 5169, 2151, 2151, 2151, 867, 871, 2151, - 2151, 735, 735, 735, 735, 2151, 747, -78, -1036, -1036, - 3516, 3542, 323, 323, 340, 340, -21, 2151, 2151, 2151, - 1954, 1954, 2151, 2785, 58, -1036, 888, 891, 2151, 876, - -1036, 2151, 2151, 1204, -1036, 2084, 2151, 2151, -1036, 5190, - 5211, 5232, 812, 3568, -1036, 780, 2452, 5253, 4267, -1036, - 2151, 907, 1519, -1036, 1777, -1036, 2151, 4290, -49, 2151, - 13, -1036, 5274, 4313, 5295, 4336, 5316, 4359, 5337, 4382, - 5358, 4405, 5379, 4428, 5400, 4451, 5421, 4474, 5442, 4497, - 5463, 4520, 5484, 4543, 3594, 3620, 5505, 4566, 5526, 4589, - 5547, 4612, 5568, 4635, 5589, 4658, 5610, 4681, 3646, 3672, - 3698, 3724, 3750, 3776, 172, 792, 815, 824, 1580, 795, - 2151, -1036, 1356, 1356, 710, 273, 619, 2151, 922, 954, - 16, 839, -1036, -69, -14, -35, -54, -1036, -1036, 2480, - 1104, 1038, 767, 767, 593, 593, 593, 593, 669, 669, - 713, 713, 713, 713, -1036, 12, 2084, 2151, 971, 1919, - 2151, 713, -1036, 2151, 2084, 2084, 887, 974, 975, 5631, - 977, 892, 995, 997, 5652, 913, 1000, 1001, 2084, -1036, - 726, 1616, 2151, 5673, 1002, 2548, 5694, 5715, 2151, 1356, - 1006, 2820, 5736, 879, 6009, -1036, 880, 881, 883, 5757, - 882, 323, 2151, 2151, -1036, -1036, 877, 890, 2151, 3802, - 3828, 3854, 3464, 107, 323, 1947, 2151, 1012, 2151, 5778, - -1036, 4704, 4727, -1036, 730, 4750, 4773, 1013, 1014, 1015, - 895, 2151, 2180, 2151, 2151, -1036, 21, 4796, -1036, -1036, - -1036, 4819, 338, -1036, 2848, -1036, 896, 900, 897, -1036, - 1020, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, - -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, - -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, 2151, 2151, - -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, - -1036, -1036, 2151, 2151, 2151, 2151, 2151, 2151, -1036, 2084, - 596, -1036, -1036, -1036, 2151, 4842, 1027, 1028, 902, -1036, - 68, 2151, 1032, 1048, 1897, -1036, 1050, 926, 15, 1049, - -1036, 2084, 2084, 2084, 2084, 2151, -1036, 942, 596, 277, - 3880, 323, -1036, 2084, 2876, 2499, 713, -1036, 993, -1036, - 1017, 1356, 1356, 1055, 1356, 781, 1356, 1356, 1057, 1018, - 1356, 1356, 738, -1036, 2084, 2242, 1061, 933, 1065, 1069, - 1071, 2016, -1036, -1036, 1073, 1074, 1077, 1078, 1079, 1080, - 1081, 1083, 1076, 228, 3906, 3932, -1036, -1036, 2904, 323, - 323, 323, 1085, 955, 961, -40, -1036, 328, -1036, 107, - 6009, -1036, 2277, 956, 1089, 1091, 1051, 1092, 1095, 1356, - 1356, 1356, 1098, 3958, -1036, 2518, 847, 1099, 1100, 985, - 1115, 1118, -1036, 1119, -1036, 996, 2151, 2151, 1356, 986, - -1036, 5799, 4865, 5820, 4888, 5841, 4911, 5862, 4934, 279, - 994, 5883, -31, -1036, -1036, 163, 498, 998, 1121, 2296, - -1036, -1036, -1036, 15, 2151, -1036, 757, -1036, 766, 769, - 770, 773, 6009, -1036, 1123, 47, 2151, 6, 777, -1036, - 2151, 992, 1082, 1082, 1356, 1126, 1004, 1005, 1129, 1133, - 1356, 1007, 1134, 1138, -1036, 778, -1036, 1141, 2151, 1356, - 1356, 1356, 1143, 1142, -1036, 1356, 1356, 1356, 1356, 1356, - 1356, 1356, 206, 2151, 2151, 2151, 1029, -56, -51, 248, - -1036, 1356, 2151, -1036, -1036, 1954, -13, -1036, 2084, -1036, - -1036, 1031, -1036, -1036, 1144, 1145, 1084, -1036, 2151, 2151, - 2151, -1036, 1159, 1163, 1167, -1036, -49, -1036, 2151, 3984, - 4010, 782, -1036, 2151, -1036, -1036, -1036, -1036, -1036, -1036, - -1036, -1036, -1036, -1036, -1036, 1356, 619, 2151, 1166, 1172, - 16, -1036, 1173, 4957, 15, -1036, 1177, 1201, 1203, 1205, - -1036, -1036, 596, 4036, -1036, 1043, 6009, 2151, 323, 1206, - 1207, 1209, -1036, 2151, 2151, -1036, -1036, 1224, 2151, -1036, - -1036, -1036, 1226, 4062, 1227, 1234, 1139, 2151, -1036, 1235, - 1236, 1238, 1239, 1251, 1253, 1174, -1036, 735, 2932, 5904, - 2736, 340, 323, 1256, 323, 1260, 323, 1261, 318, 1131, - 5925, 2960, 375, -1036, 783, 2151, -1036, -1036, 1356, 2764, - 875, 5946, -1036, 1746, -1036, -1036, 374, 6009, 2151, 2151, - 1356, 1132, 787, 6009, 1263, 1265, 2315, -1036, 1266, 1268, - -1036, 1137, -1036, -1036, -1036, -1036, -1036, 1273, 2151, -1036, - 2988, 147, -1036, -1036, -1036, 3016, 3044, -1036, 3072, 1275, - 2151, -1036, -1036, 1237, 1276, 6009, -1036, -1036, -1036, -1036, - -1036, -1036, 1147, 2334, 1277, 1148, -1036, 2151, -1036, 1149, - 442, -1036, 1156, 507, -1036, 1157, 544, -1036, 1158, 1281, - 1356, 1274, 1160, 2151, 1293, 3100, 1212, 2151, -1036, 2151, - -1036, -1036, 2084, 2362, 1295, -1036, 2151, 4088, 4114, -1036, - 1356, 2151, 1297, -1036, -1036, -1036, 15, -1036, 1213, -1036, - 4140, 1299, 1300, 1302, 1303, 1310, 4166, 1176, -1036, 1356, - -1036, -1036, 340, 2792, -1036, 1954, 107, 1954, 107, 1954, - 107, -1036, 788, 1356, -1036, 3128, -1036, -1036, 2151, 3156, - 3184, 796, -1036, -1036, 1182, 6009, 2151, 2151, 800, 6009, - -1036, 1315, -1036, 2151, -1036, -1036, -1036, -1036, -1036, 1343, - 2151, 801, 1210, 2151, -1036, 3212, 547, 124, 3240, 549, - 138, 3268, 561, 190, 1356, 1345, 1290, 2247, 1215, 2381, - -1036, -1036, 1348, 2151, 5967, 4192, 26, -1036, 4218, 1218, - 3296, 1350, -1036, 3324, 1351, 2151, 1352, 1355, 2151, 1357, - 1358, 2151, 1362, 1223, -1036, 2151, -1036, 107, -1036, -1036, - -1036, 805, -1036, 2151, -1036, 1356, 2151, 1364, -1036, -1036, - -1036, -1036, 1254, 3352, -1036, -1036, 1255, 3380, -1036, -1036, - 1257, 3408, -1036, 1385, 2400, 320, 2266, 1388, 1258, 5988, - 806, 3436, 1264, 107, 1391, 107, 1392, 107, 1394, -1036, - -1036, -1036, -1036, 107, -1036, 596, -1036, 1267, 1396, 1398, - 386, -1036, 1269, 394, -1036, 1270, 398, -1036, 1271, 411, - 809, -1036, 1272, 1356, -1036, 1286, 1405, 107, 1420, 107, - 1421, 107, -1036, 596, 1426, 596, 813, 1427, -1036, 446, - -1036, 492, -1036, 540, -1036, -1036, 814, -1036, 1429, -1036, - 1432, 1434, 1436, 596, 1439, -1036, -1036, -1036, -1036, -1036, - -1036 + 2816, 42, 72, 2892, -1017, -1017, 1303, 86, 75, -79, + 18, 178, -64, 5, 70, -42, 145, 173, -19, 201, + 216, 203, -34, 215, 291, 301, 272, 327, 265, 334, + 259, 266, 191, 191, 286, 254, 385, 391, 400, 8, + 99, 440, 486, 517, 521, 377, 393, 399, 12, 32, + -1017, 402, -1017, 547, 405, -1017, 544, 552, 14, 15, + -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, + -1017, -1017, -1017, -1017, -1017, -1017, 26, 434, 422, -1017, + -1017, -1017, 144, 165, 253, 256, 263, 288, 312, 337, + 346, 389, 418, 428, 432, 433, 454, 471, 474, 477, + 478, 520, 523, 442, 447, 481, 482, -1017, 614, 491, + -1017, -1017, -1017, -1017, -1017, -1017, -1017, 2364, 2364, 2364, + -1017, -1017, 2364, 1996, 17, 579, 531, 2364, 621, 1237, + -1017, 624, 632, 2364, 650, -1017, 2364, -1017, 2364, 2297, + 2364, 2364, 495, 2364, 2297, 2364, 2364, 511, 2297, 2364, + 2364, 1569, 512, 2364, 530, 519, 527, 1569, 1439, 549, + 528, 553, 574, 578, 591, 606, 676, 191, 191, 191, + 2364, 2364, 280, -1017, 292, 191, 600, 623, 672, 2167, + 304, 1439, 1569, 613, 27, 646, -1017, 756, -1017, 673, + 679, 681, 761, 2364, 2364, 2364, 635, 2364, 677, 690, + 2364, 2364, -1017, 2364, 795, -1017, 810, -1017, 811, -1017, + 688, 2364, 818, 685, -1017, -1017, -1017, 819, 2364, 2364, + 2364, 2364, 2364, 2364, 2364, 2364, 2364, 2364, 2364, 2364, + 2364, 2364, 2364, 2364, 2364, 2364, 2364, 2364, 2364, 2364, + 2364, 2364, 2364, 2364, 2364, 2364, 2364, 2364, 2364, 2364, + 2364, 2364, 2364, 2364, 2364, 2364, 2364, 2364, 2364, 2364, + 39, 39, 39, 39, 2364, 823, 504, 694, 694, 694, + 5125, 11, 2297, 4389, 300, 696, 822, 699, 708, -1017, + 709, 2956, 1762, -1017, -1017, 2364, 2364, 2364, 2364, 2364, + 2364, 2364, 2364, 2364, 2364, 2364, 2364, 2364, 2364, 2364, + -1017, -1017, 1793, -52, 2229, 5146, 496, 711, 2297, -1017, + -1017, 1143, -1017, 525, 5167, 5188, 2364, 5209, 526, 5230, + 5251, 2364, 533, 5272, 5293, 1699, 1165, 2609, 843, -1017, + 2364, 5314, 2364, 2364, 2364, 844, -1017, -1017, 847, 2364, + 2364, 2421, 2421, 2421, 2421, 2364, 723, 61, -1017, -1017, + 3661, 3687, 191, 191, 531, 531, 71, 2364, 2364, 2364, + 2167, 2167, 2364, 2956, 294, -1017, 849, 851, 2364, 853, + -1017, 2364, 2364, 994, -1017, 2297, 2364, 2364, -1017, 5335, + 5356, 5377, 770, 3713, -1017, 725, 2631, 5398, 4412, -1017, + -1017, 1335, -1017, 1472, 2364, 4435, 232, 2364, 10, -1017, + 5419, 4458, 5440, 4481, 5461, 4504, 5482, 4527, 5503, 4550, + 5524, 4573, 5545, 4596, 5566, 4619, 5587, 4642, 5608, 4665, + 5629, 4688, 3739, 3765, 5650, 4711, 5671, 4734, 5692, 4757, + 5713, 4780, 5734, 4803, 5755, 4826, 3791, 3817, 3843, 3869, + 3895, 3921, 45, 125, -1017, 724, 732, 733, 2110, 729, + 2364, -1017, 1569, 1569, 542, 271, 422, 2364, 861, 864, + 13, 735, -1017, -44, 41, -18, 163, -1017, -1017, 2650, + 1160, 1371, 717, 717, 469, 469, 469, 469, 452, 452, + 694, 694, 694, 694, -1017, 7, 2297, 2364, 863, 2132, + 2364, 694, -1017, 2364, 2297, 2297, 778, 866, 867, 5776, + 868, 784, 872, 873, 5797, 788, 875, 876, 2297, -1017, + 546, 1829, 2364, 5818, 877, 2719, 5839, 5860, 2364, 1569, + 881, 2991, 5881, 754, 6154, -1017, 755, 758, 759, 5902, + 753, 191, 2364, 2364, -1017, -1017, 757, 763, 2364, 3947, + 3973, 3999, 3635, 25, 191, 1602, 2364, 887, 2364, 5923, + -1017, 4849, 4872, -1017, 555, 4895, 4918, 888, 890, 893, + 769, 2364, 1732, 2364, 2364, -1017, 22, -1017, -1017, 4941, + 532, -1017, 3019, -1017, 774, 775, 771, -1017, 901, -1017, + -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, + -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, + -1017, -1017, -1017, -1017, -1017, -1017, 2364, 2364, -1017, -1017, + -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, + 2364, 2364, 2364, 2364, 2364, 2364, 2364, 904, -1017, 2297, + 39, -1017, -1017, -1017, 2364, 4964, 905, 907, 760, -1017, + 24, 2364, 908, 909, 2393, -1017, 903, 783, 12, 911, + -1017, 2297, 2297, 2297, 2297, 2364, -1017, 800, 39, 193, + 4025, 191, -1017, 2297, 3047, 2670, 694, -1017, 1143, -1017, + 870, 1569, 1569, 913, 1569, 620, 1569, 1569, 914, 874, + 1569, 1569, 556, -1017, 2297, 2450, 916, 786, 919, 920, + 921, 611, -1017, -1017, 924, 925, 926, 927, 929, 934, + 935, 936, 941, 328, 4051, 4077, -1017, -1017, 3075, 191, + 191, 191, 940, 793, 816, -35, -1017, 332, -1017, 25, + 6154, -1017, 2469, 812, 943, 945, 910, 948, 950, 1569, + 1569, 1569, 953, 4103, -1017, 2689, 633, 954, 956, 957, + 961, -1017, 962, -1017, 838, 2364, 2364, 1569, 839, -1017, + 5944, 4987, 5965, 5010, 5986, 5033, 6007, 5056, 5079, -1017, + 209, 846, 6028, 139, -1017, -1017, 66, 365, 841, 972, + 2488, -1017, -1017, -1017, 12, 2364, -1017, 559, -1017, 560, + 564, 565, 569, 6154, -1017, 974, 52, 2364, 47, 573, + -1017, 2364, 845, 928, 928, 1569, 975, 848, 850, 976, + 981, 1569, 852, 983, 985, -1017, 576, -1017, 988, 2364, + 1569, 1569, 1569, 990, 989, -1017, 1569, 1569, 1569, 1569, + 1569, 1569, 1569, 449, 2364, 2364, 2364, 858, -51, -39, + 133, -1017, 1569, 2364, -1017, -1017, 2167, -30, -1017, 2297, + -1017, -1017, 859, -1017, -1017, 992, 993, 912, -1017, 2364, + 2364, 2364, -1017, 997, 998, -1017, 232, -1017, 2364, 4129, + 4155, 577, -1017, 2364, -1017, -1017, -1017, -1017, -1017, -1017, + -1017, -1017, 865, -1017, -1017, -1017, 1569, 422, 2364, 1002, + 1000, 13, -1017, 1003, 5102, 12, -1017, 1004, 1005, 1006, + 1007, -1017, -1017, 39, 4181, -1017, 880, 6154, 2364, 191, + 1009, 1010, 1011, -1017, 2364, 2364, -1017, -1017, 1017, 2364, + -1017, -1017, -1017, 1020, 4207, 1022, 1023, 933, 2364, -1017, + 1024, 1026, 1027, 1028, 1029, 1041, 1045, -1017, 2421, 3103, + 6049, 2907, 531, 191, 1046, 191, 1051, 191, 1052, 674, + 922, 6070, 3131, 341, -1017, 580, 2364, -1017, -1017, 1569, + 2935, 1097, 6091, -1017, 1959, -1017, 227, 6154, 2364, 2364, + 1569, 930, 581, 6154, 1056, 1060, 1063, 2513, -1017, 1055, + 1065, -1017, 937, -1017, -1017, -1017, -1017, -1017, 1067, 2364, + -1017, 3159, 382, -1017, -1017, -1017, 3187, 3215, -1017, 3243, + 1070, 2364, -1017, -1017, 1030, 1072, 6154, -1017, -1017, -1017, + -1017, -1017, -1017, 938, 2532, 1078, 949, -1017, 2364, -1017, + 947, 345, -1017, 952, 370, -1017, 955, 374, -1017, 959, + 1082, 1569, 1085, 960, 2364, 1088, 3271, 1015, 2364, -1017, + 2364, -1017, -1017, 2297, 2552, 1089, -1017, 2364, 4233, 4259, + -1017, 1569, 2364, 1098, -1017, -1017, -1017, -1017, 12, -1017, + 1025, -1017, 4285, 1107, 1108, 1109, 1111, 1112, 4311, 982, + -1017, 1569, -1017, -1017, 531, 2963, -1017, 2167, 25, 2167, + 25, 2167, 25, -1017, 629, 1569, -1017, 3299, -1017, -1017, + 2364, 3327, 3355, 634, -1017, -1017, 986, 6154, 2364, 2364, + 637, 6154, -1017, 1115, -1017, 2364, -1017, -1017, -1017, -1017, + -1017, 1118, 2364, 638, 987, 2364, -1017, 3383, 378, -21, + 3411, 407, -16, 3439, 425, -13, 1569, 1119, 1066, 1990, + 991, 2571, -1017, -1017, 1124, 2364, 6112, 4337, 20, -1017, + 4363, 995, 3467, 1129, -1017, 3495, 1130, 2364, 1132, 1133, + 2364, 1134, 1136, 2364, 1137, 1008, -1017, 2364, -1017, 25, + -1017, -1017, -1017, 641, -1017, 2364, -1017, 1569, 2364, 1139, + -1017, -1017, -1017, -1017, 1012, 3523, -1017, -1017, 1016, 3551, + -1017, -1017, 1018, 3579, -1017, 1140, 2590, -11, 2160, 1142, + 1019, 6133, 645, 3607, 1021, 25, 1147, 25, 1149, 25, + 1153, -1017, -1017, -1017, -1017, 25, -1017, 39, -1017, 1032, + 1154, 1157, -8, -1017, 1033, 126, -1017, 1034, 130, -1017, + 1035, 134, 663, -1017, 1039, 1569, -1017, 1061, 1158, 25, + 1161, 25, 1172, 25, -1017, 39, 1195, 39, 668, 1196, + -1017, 229, -1017, 297, -1017, 362, -1017, -1017, 669, -1017, + 1197, -1017, 1198, 1199, 1200, 39, 1201, -1017, -1017, -1017, + -1017, -1017, -1017 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -1036, -1036, -1036, -1036, 663, -1036, -1036, -1036, -1036, 281, - -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, - -1036, -1036, -267, 25, -1036, 75, -1036, 654, 1446, 5, - -351, -173, -1036, -1036, -1036, -1036, -1036, 1447, -1036, -1036, - -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, - -1036, -644, -655, -1036, -1036, -1036, -1036, -1036, -1036, -1036, - -4, -1036, 141, -1036, -1035, -90, 24, 38, -626, 572, - -1036, -59, 4 + -1017, -1017, -1017, -1017, 359, -1017, -1017, -1017, -1017, 98, + -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, + -1017, -1017, -269, -3, -1017, -305, -1017, 430, 1222, 3, + -353, -175, -1017, -1017, -1017, -1017, -1017, 1223, -1017, -1017, + -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, -1017, + -1017, -635, -692, -1017, -1017, -1017, -1017, -1017, -1017, -1017, + -6, -1017, 228, -1017, -1016, 290, 1047, 23, 37, -626, + 353, -1017, -253, 1 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -1455,1060 +1455,1101 @@ static const yytype_int16 yypgoto[] = #define YYTABLE_NINF -5 static const yytype_int16 yytable[] = { - 212, 135, 129, 536, 537, 1088, 363, 152, 65, 457, - 131, 199, 894, 373, 206, 207, 142, 575, 656, 196, - 647, 452, 775, 276, 1101, 133, 213, 184, 737, 5, - 712, 128, 1154, 147, 147, 392, 713, 714, 394, 187, - 369, 188, 370, 352, 353, 485, 103, 104, 105, 106, - 486, 138, 107, 891, 220, 142, 221, 712, 139, 531, - 834, 330, 138, 713, 714, 352, 353, 337, 338, 651, - 352, 353, 766, 206, 207, 836, 4, 150, 143, 120, - 121, 932, 219, 933, 654, 144, 934, 132, 935, 153, - 134, 366, 367, 576, 577, 578, 579, 120, 121, 833, - 352, 353, 148, 653, 741, 103, 104, 105, 106, 277, - 278, 107, 137, 269, 270, 271, 538, 143, 272, 275, - 1180, 185, 140, 284, 652, 453, 943, 352, 353, 304, - 657, 281, 306, 136, 307, 313, 316, 317, 200, 319, - 313, 321, 322, 151, 313, 325, 326, 882, 208, 333, - 120, 121, 580, 197, 648, 214, 738, 215, 767, 768, - 154, 186, 216, 314, 1155, 657, 350, 351, 314, 371, - 639, 141, 314, 172, 174, 351, 180, 712, 1226, 352, - 353, 834, 320, 713, 714, 222, 324, 223, 641, 379, - 380, 381, 545, 383, 712, 544, 386, 387, 145, 388, - 713, 714, 146, 444, 445, 446, 447, 211, 712, 149, - 397, 562, 926, 927, 713, 714, 402, 403, 404, 405, - 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, - 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, - 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, - 436, 437, 438, 439, 440, 441, 442, 443, 972, 224, - 712, 225, 448, 1136, 352, 353, 713, 714, 352, 353, - 313, 113, 114, 115, 116, 150, 226, 1139, 227, 155, - 639, 354, 156, 469, 470, 471, 472, 473, 474, 475, - 476, 477, 478, 479, 480, 481, 482, 483, 314, 161, - 160, 458, 162, 165, 628, 163, 491, 164, 347, 629, - 349, 228, 454, 229, 499, 176, 356, 166, 177, 504, - 364, 178, 157, 491, 313, 158, 493, 159, 513, 1142, - 515, 516, 517, 167, 492, 521, 522, 524, 524, 524, - 524, 529, 206, 207, 280, 525, 525, 525, 525, 352, - 353, 492, 314, 539, 540, 541, 269, 270, 542, 281, - 281, 175, 636, 637, 549, 823, 510, 551, 552, 352, - 353, 313, 555, 556, 103, 104, 105, 106, 181, 182, - 107, 113, 114, 115, 116, 936, 567, 937, 183, 230, - 712, 231, 571, 168, 169, 574, 713, 714, 232, 314, - 233, 120, 121, 170, 31, 32, 33, 34, 640, 785, - 179, 872, 38, 554, 495, 41, 495, 526, 527, 528, - 1091, 190, 1107, 573, 1110, 234, 1113, 235, 189, 692, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 511, 299, 300, 168, 169, 635, 191, 301, 352, - 353, 192, 834, 644, 170, 834, 712, 1019, 834, 1191, - 643, 171, 713, 714, 712, 835, 120, 121, 712, 202, - 713, 714, 193, 741, 713, 714, 194, 195, 352, 353, - 642, 712, 313, 660, 201, 635, 664, 713, 714, 665, - 666, 668, 456, 534, 535, 355, 352, 353, 875, 877, - 352, 353, 349, 1175, 313, 876, 1035, 666, 685, 203, - 314, 1036, 1023, 743, 691, 204, 712, 365, 667, 669, - 834, 205, 713, 714, 659, 1216, 218, 262, 704, 705, - 263, 264, 314, 1218, 708, 667, 236, 1220, 237, 1200, - 265, 1203, 720, 1206, 722, 834, 682, 267, 834, 1209, - 1222, 834, 266, 238, 834, 239, 240, 733, 241, 735, - 736, 279, 712, 352, 353, 242, 285, 243, 713, 714, - 244, 760, 245, 1229, 834, 1231, 834, 1233, 834, 1065, - 1009, 792, 793, 302, 795, 1240, 798, 799, 303, 305, - 802, 803, 318, 113, 114, 115, 116, 742, 323, 784, - 206, 207, 332, 334, 751, 752, 113, 114, 115, 116, - 712, 335, 336, 120, 121, 339, 713, 714, 753, 754, - 755, 756, 757, 758, 207, 313, 120, 121, 352, 353, - 761, 1241, 103, 104, 105, 106, 340, 769, 107, 844, - 845, 846, 346, 246, 1067, 247, 341, 313, 313, 313, - 313, 782, 248, 314, 249, 103, 104, 105, 106, 313, - 250, 107, 251, 342, 343, 352, 353, 759, 352, 353, - 352, 353, 703, 344, 345, 314, 314, 314, 314, 1242, - 313, 1069, 352, 353, 1135, 717, 1138, 314, 357, 778, - 779, 780, 781, 358, 359, 120, 121, 368, 1141, 286, - 489, 788, 215, 372, 901, 126, 374, 216, 314, 375, - 907, 1102, 376, 377, 296, 297, 298, 299, 300, 914, - 915, 916, 805, 301, 378, 919, 920, 921, 922, 923, - 924, 925, 252, 254, 253, 255, 384, 385, 75, 268, - 207, 939, 859, 860, 79, 80, 81, 382, 389, 82, + 129, 536, 537, 128, 363, 457, 65, 131, 445, 446, + 447, 373, 184, 656, 573, 152, 196, 647, 452, 206, + 208, 274, 776, 835, 135, 1090, 1156, 142, 767, 737, + 210, 369, 391, 370, 393, 712, 199, 526, 527, 528, + 712, 713, 714, 442, 216, 1103, 713, 714, 4, 712, + 147, 147, 134, 895, 712, 713, 714, 712, 892, 712, + 713, 714, 712, 713, 714, 713, 714, 138, 713, 714, + 352, 353, 5, 639, 139, 103, 104, 105, 106, 217, + 485, 107, 352, 353, 837, 486, 933, 138, 934, 143, + 574, 575, 576, 577, 651, 712, 144, 153, 935, 132, + 936, 713, 714, 187, 834, 188, 185, 275, 276, 944, + 142, 267, 268, 269, 768, 769, 270, 273, 1138, 148, + 653, 282, 453, 1141, 133, 657, 1144, 302, 1193, 279, + 304, 1218, 305, 311, 314, 315, 140, 317, 311, 319, + 320, 1182, 311, 323, 324, 835, 186, 331, 883, 578, + 197, 648, 207, 209, 120, 121, 136, 738, 1157, 211, + 371, 212, 312, 200, 350, 351, 213, 312, 352, 353, + 657, 312, 143, 351, 113, 114, 115, 116, 626, 652, + 627, 318, 352, 353, 137, 322, 641, 379, 380, 381, + 545, 383, 352, 353, 386, 387, 712, 388, 531, 1228, + 712, 141, 713, 714, 712, 395, 713, 714, 538, 562, + 713, 714, 400, 401, 402, 403, 404, 405, 406, 407, + 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, + 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, + 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, + 438, 439, 440, 441, 352, 353, 151, 628, 448, 973, + 172, 174, 629, 180, 154, 1220, 311, 120, 121, 1222, + 937, 458, 938, 1224, 740, 218, 145, 219, 639, 469, + 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, + 480, 481, 482, 483, 150, 312, 220, 176, 221, 712, + 177, 654, 491, 178, 146, 713, 714, 456, 161, 454, + 499, 162, 168, 169, 163, 504, 164, 742, 157, 491, + 311, 158, 170, 159, 513, 786, 515, 516, 517, 171, + 495, 492, 149, 521, 522, 524, 524, 524, 524, 529, + 155, 873, 525, 525, 525, 525, 495, 150, 492, 312, + 156, 539, 540, 541, 267, 268, 542, 279, 279, 1036, + 120, 121, 549, 510, 1037, 551, 552, 712, 1242, 311, + 555, 556, 877, 713, 714, 168, 169, 761, 160, 113, + 114, 115, 116, 165, 222, 170, 223, 224, 569, 225, + 166, 572, 179, 571, 226, 347, 227, 349, 312, 120, + 121, 352, 353, 356, 167, 785, 640, 364, 113, 114, + 115, 116, 554, 352, 353, 352, 353, 835, 354, 228, + 835, 229, 1093, 835, 175, 352, 353, 216, 120, 121, + 355, 544, 712, 1109, 181, 1112, 1243, 1115, 713, 714, + 182, 328, 365, 230, 635, 231, 183, 335, 337, 352, + 353, 644, 642, 352, 353, 927, 928, 643, 103, 104, + 105, 106, 352, 353, 107, 824, 352, 353, 232, 836, + 233, 337, 367, 113, 114, 115, 116, 234, 1024, 235, + 311, 660, 1067, 635, 664, 835, 189, 665, 666, 668, + 190, 352, 353, 120, 121, 352, 353, 876, 878, 352, + 353, 1244, 311, 352, 353, 666, 685, 1069, 193, 312, + 835, 1071, 691, 835, 1177, 1137, 835, 667, 669, 835, + 236, 191, 237, 659, 194, 192, 704, 705, 352, 353, + 195, 312, 708, 201, 667, 278, 442, 216, 203, 835, + 720, 835, 722, 835, 1140, 682, 352, 353, 204, 238, + 1202, 239, 1205, 202, 1208, 733, 205, 735, 736, 240, + 1211, 241, 1143, 242, 244, 243, 245, 741, 103, 104, + 105, 106, 215, 260, 107, 296, 297, 298, 261, 1010, + 534, 535, 299, 277, 1231, 246, 1233, 247, 1235, 349, + 294, 295, 296, 297, 298, 31, 32, 33, 34, 299, + 750, 751, 248, 38, 249, 250, 41, 251, 252, 254, + 253, 255, 262, 263, 752, 753, 754, 755, 756, 757, + 758, 264, 265, 311, 120, 121, 316, 283, 762, 489, + 300, 212, 120, 121, 126, 770, 213, 450, 301, 212, + 978, 851, 321, 330, 213, 311, 311, 311, 311, 783, + 333, 256, 312, 257, 258, 303, 259, 311, 334, 340, + 120, 121, 495, 495, 496, 501, 760, 740, 332, 797, + 495, 798, 505, 813, 312, 312, 312, 312, 311, 495, + 346, 638, 493, 495, 341, 683, 312, 339, 779, 780, + 781, 782, 495, 495, 726, 805, 885, 495, 886, 887, + 789, 495, 495, 888, 889, 342, 495, 312, 890, 343, + 495, 1104, 896, 495, 960, 912, 961, 495, 1042, 1025, + 1043, 806, 344, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 345, 357, 859, + 860, 299, 636, 637, 368, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 703, + 741, 358, 374, 299, 879, 852, 1116, 378, 1117, 884, + 382, 495, 717, 1124, 960, 960, 1128, 1133, 1042, 372, + 1179, 894, 960, 385, 1199, 897, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 511, 297, 298, + 1225, 389, 1226, 914, 299, 960, 1245, 1240, 1246, 692, + 359, 375, 376, 1020, 377, 384, 390, 392, 929, 930, + 931, 394, 396, 397, 299, 399, 939, 941, 449, 460, + 942, 459, 461, 311, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 950, 951, 952, 126, 299, 462, 490, + 512, 518, 957, 955, 519, 530, 546, 963, 548, 550, + 560, 630, 312, 563, 631, 632, 634, 645, 646, 650, + 661, 670, 967, 671, 672, 674, 945, 675, 966, 676, + 677, 679, 680, 681, 687, 693, 697, 698, 702, 788, + 699, 700, 981, 721, 766, 729, 706, 730, 986, 987, + 731, 1119, 707, 989, 732, 745, 746, 749, 759, 747, + 774, 764, 996, 765, 771, 772, 775, 778, 784, 792, + 795, 801, 1004, 808, 809, 802, 810, 811, 812, 1005, + 815, 832, 816, 817, 818, 279, 819, 828, 829, 830, + 1026, 820, 821, 822, 1213, 823, 831, 833, 1034, 840, + 839, 841, 1038, 1039, 843, 1035, 844, 848, 853, 842, + 854, 793, 794, 855, 796, 856, 799, 800, 857, 858, + 803, 804, 1236, 1052, 1239, 1178, 880, 863, 874, 881, + 891, 903, 906, 898, 899, 1058, 904, 907, 905, 910, + 909, 911, 1251, 913, 918, 919, 932, 946, 947, 948, + 964, 949, 1065, 953, 969, 954, 7, 8, 968, 971, + 974, 975, 976, 977, 980, 983, 984, 985, 1077, 845, + 846, 847, 1081, 988, 1082, 990, 994, 311, 992, 993, + 997, 1087, 998, 999, 1000, 1001, 1091, 463, 13, 14, + 464, 16, 17, 465, 19, 466, 21, 1002, 22, 1003, + 24, 25, 1012, 27, 28, 29, 312, 1015, 1018, 1021, + 1044, 1107, 1048, 1110, 943, 1113, 1045, 279, 1041, 1046, + 1083, 1049, 1050, 1051, 1121, 1057, 1061, 1059, 1060, 45, + 46, 47, 1126, 1127, 1063, 902, 1066, 1064, 1073, 1130, + 1068, 908, 1075, 1070, 1078, 1085, 1132, 1072, 1076, 1135, + 915, 916, 917, 1080, 1092, 1030, 920, 921, 922, 923, + 924, 925, 926, 1096, 1097, 1098, 1094, 1099, 1100, 963, + 1102, 1129, 940, 1131, 1125, 1146, 1134, 982, 1147, 1150, + 1152, 1165, 1159, 553, 1169, 1161, 1163, 1173, 1166, 1167, + 1170, 1176, 1171, 1174, 1184, 893, 1191, 1175, 1196, 1181, + 1185, 493, 1183, 1203, 1187, 1206, 1189, 1197, 1201, 1209, + 1216, 1011, 1217, 1014, 1230, 1017, 965, 1232, 75, 306, + 1215, 1219, 1221, 1223, 79, 80, 81, 1227, 1234, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 883, 103, 104, 105, 106, 396, 256, 107, 257, 258, - 393, 259, 893, 120, 121, 964, 896, 742, 450, 398, - 215, 878, 298, 299, 300, 216, 260, 395, 261, 301, - 399, 390, 787, 391, 913, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 928, - 929, 930, 495, 301, 496, 401, 449, 938, 940, 459, - 796, 941, 797, 977, 313, 495, 495, 501, 505, 109, - 110, 111, 112, 301, 949, 950, 951, 495, 460, 638, - 827, 828, 829, 461, 957, 850, 117, 118, 1026, 963, - 126, 119, 314, 495, 462, 683, 122, 495, 512, 726, - 1039, 125, 490, 966, 518, 495, 944, 804, 519, 530, - 965, 955, 550, 1029, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 980, 884, 546, 885, 301, 548, 985, - 986, 1117, 560, 495, 988, 886, 495, 495, 887, 888, - 495, 568, 889, 995, 495, 495, 895, 911, 563, 960, - 495, 961, 1024, 1003, 1041, 1114, 1042, 1115, 645, 630, - 1072, 1004, 634, 495, 468, 1122, 281, 960, 960, 1126, - 1131, 1025, 1041, 960, 1177, 1197, 1223, 631, 1224, 1033, - 960, 1243, 1238, 1244, 1037, 1038, 632, 1034, 646, 287, - 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 650, 1050, 1176, 942, 301, 661, 851, - 670, 671, 672, 1116, 674, 675, 1056, 287, 288, 289, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 493, 676, 1063, 677, 301, 679, 680, 681, 687, - 693, 697, 698, 699, 1030, 700, 706, 702, 721, 1075, - 729, 730, 731, 1079, 1143, 1080, 750, 746, 313, 707, - 732, 747, 1085, 763, 764, 748, 765, 1089, 770, 981, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 771, 777, 314, 773, 301, 774, - 783, 1105, 794, 1108, 800, 1111, 791, 281, 807, 801, - 1081, 808, 809, 1010, 1119, 1013, 810, 1016, 811, 814, - 822, 815, 1124, 1125, 816, 817, 818, 819, 820, 1128, - 821, 830, 832, 831, 838, 839, 1130, 840, 842, 1133, - 841, 843, 847, 852, 853, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 494, 299, 300, 963, - 854, 855, 856, 301, 863, 857, 873, 858, 880, 890, - 897, 1163, 902, 879, 1167, 905, 1211, 1171, 898, 906, - 909, 1174, 903, 904, 910, 908, 912, 917, 918, 1179, - 946, 947, 1181, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 1234, 952, 1237, 931, 301, 945, - 953, 954, 967, 948, 75, 308, 968, 979, 1002, 970, - 79, 80, 81, 973, 1249, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 1106, 974, 1109, 975, - 1112, 976, 982, 983, 309, 984, 7, 8, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 987, 989, 993, 991, 301, 31, 32, 33, 34, 35, - 992, 996, 997, 38, 998, 999, 41, 463, 13, 14, - 464, 16, 17, 465, 19, 466, 21, 1000, 22, 1001, - 24, 25, 1011, 27, 28, 29, 1014, 1017, 1020, 1043, - 1040, 1044, 1048, 1046, 1047, 109, 110, 111, 112, 1049, - 1055, 1073, 1058, 1061, 1057, 1059, 1062, 1071, 1064, 45, - 46, 47, 117, 310, 1066, 1068, 1070, 119, 1074, 1076, - 1078, 1083, 122, 1090, 1092, 1094, 1095, 125, 1096, 1097, - 509, 75, 76, 77, 1100, 78, 1098, 79, 80, 81, - 1123, 1127, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 553, 103, 104, 105, 106, 1129, 1132, - 107, 1144, 1145, 1148, 1150, 1157, 1159, 1161, 1164, 75, - 308, 1165, 1173, 1168, 1169, 79, 80, 81, 1172, 1182, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 1189, 1183, 1185, 1194, 1187, 1195, 1201, 1204, 309, - 1207, 1199, 1214, 1215, 1151, 1213, 108, 1217, 1219, 1221, - 1225, 1228, 109, 110, 111, 112, 113, 114, 115, 116, - 31, 32, 33, 34, 35, 1227, 1230, 1232, 38, 117, - 118, 41, 1235, 1239, 119, 1245, 120, 121, 1246, 122, - 1247, 123, 1248, 124, 125, 1250, 126, 900, 892, 64, - 71, 0, 969, 0, 0, 0, 0, 0, 0, 0, - 109, 110, 111, 112, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 117, 327, 0, - 0, 0, 119, 0, 0, 0, 0, 122, 0, 75, - 308, 0, 125, 0, 328, 79, 80, 81, 0, 0, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 0, 0, 0, 0, 0, 0, 0, 0, 309, - 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 31, 32, 33, 34, 35, 484, 0, 0, 38, 0, - 0, 41, 463, 13, 14, 464, 16, 17, 465, 19, - 466, 21, 0, 22, 0, 24, 25, 0, 27, 28, - 29, 0, 0, 0, 0, 0, 633, 0, 0, 0, - 109, 110, 111, 112, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 45, 46, 47, 117, 310, 0, - 0, 0, 119, 0, 0, 0, 0, 122, 0, 75, - 308, 0, 125, 0, 508, 79, 80, 81, 0, 0, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 0, 0, 0, 0, 0, 0, 0, 569, 309, - 0, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 0, 0, 0, 0, 301, - 31, 32, 33, 34, 35, 0, 0, 0, 38, 0, - 0, 41, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 110, 111, 112, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 117, 310, 0, - 0, 0, 119, 0, 0, 0, 0, 122, 0, 75, - 268, 207, 125, 0, 684, 79, 80, 81, 0, 0, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 0, 103, 104, 105, 106, 75, 268, 107, 7, - 8, 0, 79, 80, 81, 0, 0, 82, 83, 84, + 1229, 1237, 1241, 1247, 1248, 1249, 1250, 1252, 307, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 1153, 901, 64, 71, 299, 366, 31, + 32, 33, 34, 35, 970, 0, 1031, 38, 0, 1027, + 41, 0, 0, 284, 0, 0, 0, 0, 0, 0, + 1040, 0, 0, 0, 0, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 494, 297, 298, 109, + 110, 111, 112, 299, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 117, 308, 0, 0, + 299, 119, 0, 0, 0, 1108, 122, 1111, 0, 1114, + 0, 125, 0, 0, 509, 0, 75, 76, 77, 0, + 78, 1074, 79, 80, 81, 0, 0, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 0, 0, - 463, 13, 14, 464, 16, 17, 465, 19, 466, 21, - 0, 22, 0, 24, 25, 0, 27, 28, 29, 0, + 95, 96, 97, 98, 99, 100, 101, 102, 0, 103, + 104, 105, 106, 0, 0, 107, 0, 7, 8, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 1118, 0, 299, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 463, 13, + 14, 464, 16, 17, 465, 19, 466, 21, 0, 22, + 0, 24, 25, 0, 27, 28, 29, 0, 0, 0, + 0, 108, 0, 0, 0, 0, 1145, 109, 110, 111, + 112, 113, 114, 115, 116, 0, 0, 0, 0, 0, + 45, 46, 47, 0, 117, 118, 0, 0, 0, 119, + 0, 120, 121, 0, 122, 0, 123, 0, 124, 125, + 0, 126, 75, 306, 336, 0, 0, 0, 79, 80, + 81, 0, 0, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 567, 0, 0, 0, 0, 0, + 0, 0, 307, 0, 7, 8, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 31, 32, 33, 34, 35, 0, 0, + 0, 38, 0, 0, 41, 463, 13, 14, 464, 16, + 17, 465, 19, 466, 21, 0, 22, 0, 24, 25, + 0, 27, 28, 29, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 109, 110, 111, 112, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 45, 46, 47, + 117, 325, 0, 0, 0, 119, 0, 0, 0, 0, + 122, 0, 75, 306, 0, 125, 0, 326, 79, 80, + 81, 0, 0, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 0, 0, 0, 0, 0, 0, + 0, 568, 307, 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 110, 111, 112, 0, 0, 0, 0, 0, 0, - 0, 0, 45, 46, 47, 0, 0, 117, 118, 0, - 0, 0, 119, 0, 0, 0, 0, 122, 0, 0, - 0, 0, 125, 0, 1032, 0, 0, 109, 110, 111, - 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 772, 117, 118, 0, 0, 0, 119, - 0, 0, 0, 0, 122, 0, 570, 273, 0, 125, - 0, 274, 75, 268, 0, 0, 0, 0, 79, 80, + 0, 0, 0, 31, 32, 33, 34, 35, 0, 0, + 0, 38, 0, 0, 41, 463, 13, 14, 464, 16, + 17, 465, 19, 466, 21, 0, 22, 0, 24, 25, + 0, 27, 28, 29, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 109, 110, 111, 112, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 45, 46, 47, + 117, 325, 0, 0, 0, 119, 0, 0, 0, 0, + 122, 0, 75, 306, 0, 125, 0, 326, 79, 80, 81, 0, 0, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 0, 0, 0, 75, 268, 7, - 8, 0, 0, 79, 80, 81, 0, 0, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 0, - 463, 13, 14, 464, 16, 17, 465, 19, 466, 21, - 0, 22, 0, 24, 25, 0, 27, 28, 29, 287, - 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 109, 110, 111, 112, 301, 0, 0, - 0, 0, 45, 46, 47, 0, 0, 0, 0, 0, + 99, 100, 101, 102, 0, 0, 0, 0, 0, 0, + 0, 718, 307, 0, 7, 8, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 31, 32, 33, 34, 35, 468, 0, + 0, 38, 0, 0, 41, 463, 13, 14, 464, 16, + 17, 465, 19, 466, 21, 0, 22, 0, 24, 25, + 0, 27, 28, 29, 0, 0, 0, 0, 0, 484, + 0, 0, 0, 109, 110, 111, 112, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 45, 46, 47, + 117, 308, 0, 0, 0, 119, 0, 0, 0, 0, + 122, 0, 75, 306, 0, 125, 0, 508, 79, 80, + 81, 0, 0, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 0, 0, 0, 0, 0, 0, + 0, 734, 307, 0, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 0, 0, + 0, 0, 299, 31, 32, 33, 34, 35, 0, 0, + 0, 38, 0, 0, 41, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 109, 110, 111, 112, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 117, 308, 0, 0, 0, 119, 0, 0, 0, 0, + 122, 0, 75, 266, 216, 125, 0, 684, 79, 80, + 81, 0, 0, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 0, 103, 104, 105, 106, 75, + 266, 107, 7, 8, 0, 79, 80, 81, 0, 0, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 0, 0, 463, 13, 14, 464, 16, 17, 465, + 19, 466, 21, 0, 22, 0, 24, 25, 0, 27, + 28, 29, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 109, 110, 111, 112, 0, 0, 0, + 0, 0, 0, 0, 0, 45, 46, 47, 0, 0, 117, 118, 0, 0, 0, 119, 0, 0, 0, 0, - 122, 0, 0, 662, 0, 125, 0, 663, 109, 110, - 111, 112, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 360, 361, 0, 812, 0, - 119, 0, 0, 0, 0, 362, 718, 75, 308, 0, - 125, 0, 171, 79, 80, 81, 0, 0, 82, 83, + 122, 0, 0, 0, 0, 125, 0, 1033, 0, 0, + 109, 110, 111, 112, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 633, 117, 118, 0, + 0, 0, 119, 0, 0, 0, 0, 122, 0, 1148, + 271, 0, 125, 0, 272, 75, 266, 0, 0, 0, + 0, 79, 80, 81, 0, 0, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 0, 0, 0, + 75, 266, 7, 8, 0, 0, 79, 80, 81, 0, + 0, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 0, 463, 13, 14, 464, 16, 17, 465, + 19, 466, 21, 0, 22, 0, 24, 25, 0, 27, + 28, 29, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 109, 110, 111, 112, + 299, 0, 0, 0, 0, 45, 46, 47, 0, 0, + 0, 0, 0, 117, 118, 0, 0, 0, 119, 0, + 0, 0, 0, 122, 0, 0, 662, 0, 125, 0, + 663, 109, 110, 111, 112, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 360, 361, + 0, 0, 0, 119, 0, 0, 0, 0, 362, 1194, + 75, 306, 0, 125, 0, 171, 79, 80, 81, 0, + 0, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 0, 0, 0, 0, 0, 0, 0, 0, + 307, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 31, 32, 33, 34, 35, 487, 75, 266, 38, + 0, 0, 41, 79, 80, 81, 0, 0, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 0, - 0, 0, 0, 0, 0, 0, 0, 309, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 31, 32, - 33, 34, 35, 0, 75, 268, 38, 0, 0, 41, - 79, 80, 81, 0, 0, 82, 83, 84, 85, 86, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 773, + 0, 109, 110, 111, 112, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 117, 308, + 0, 0, 0, 119, 75, 266, 216, 0, 122, 0, + 79, 80, 81, 125, 0, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 0, 0, 109, 110, - 111, 112, 7, 8, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 117, 310, 0, 0, 0, - 119, 0, 0, 0, 0, 122, 0, 0, 0, 0, - 125, 0, 0, 463, 13, 14, 464, 16, 17, 465, - 19, 466, 21, 0, 22, 0, 24, 25, 0, 27, - 28, 29, 0, 0, 0, 0, 0, 0, 806, 0, - 0, 0, 0, 0, 0, 109, 110, 111, 112, 7, - 8, 0, 0, 0, 0, 45, 46, 47, 0, 0, - 0, 0, 117, 118, 0, 0, 0, 119, 7, 8, - 0, 0, 122, 837, 0, 0, 0, 125, 0, 0, - 463, 13, 14, 464, 16, 17, 465, 19, 466, 21, - 0, 22, 881, 24, 25, 0, 27, 28, 29, 463, - 13, 14, 464, 16, 17, 465, 19, 466, 21, 734, - 22, 1045, 24, 25, 0, 27, 28, 29, 0, 0, - 0, 0, 45, 46, 47, 0, 0, 0, 0, 0, - 1060, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 45, 46, 47, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 1082, 0, - 0, 0, 301, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1146, 1149, 0, 287, - 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 0, 0, 1192, 1190, 301, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 287, 288, 289, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 493, 0, 0, 0, 301, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 564, 0, 0, 0, 301, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 655, 0, - 0, 0, 301, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 790, 0, 0, - 0, 301, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 849, 0, 0, 0, - 301, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 511, 299, 300, 0, - 0, 0, 0, 301, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 0, 0, 0, 0, 301, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, -4, 1, 0, 301, -4, - 0, 0, 0, 0, 0, 0, 0, -4, -4, 0, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - -4, 0, 0, 0, 0, -4, -4, 688, -4, -4, - -4, -4, -4, -4, -4, -4, -4, -4, 0, -4, - -4, -4, -4, -4, -4, -4, -4, 0, -4, -4, - -4, -4, -4, -4, 0, -4, -4, -4, -4, -4, - -4, 0, 0, -4, -4, 6, 0, 0, 0, -4, - -4, -4, -4, 7, 8, -4, 0, -4, 0, -4, + 97, 98, 99, 100, 101, 102, 807, 103, 104, 105, + 106, 0, 0, 107, 0, 0, 0, 0, 109, 110, + 111, 112, 0, 0, 0, 838, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 117, 118, 0, 0, 0, + 119, 0, 0, 0, 882, 122, 0, 0, 0, 0, + 125, 0, 0, 0, 0, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 1047, + 0, 0, 0, 299, 0, 109, 110, 111, 112, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1062, 0, + 0, 0, 117, 118, 0, 0, 0, 119, 0, 0, + 0, 0, 122, 0, 0, 0, 0, 125, 1084, 0, + 0, 0, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 0, 1151, 0, 0, + 299, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 1192, 0, 0, 299, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 0, 0, 0, 493, 299, 0, + 0, 0, 0, 0, 0, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 564, + 0, 0, 0, 299, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 655, 0, + 0, 0, 299, 0, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 791, 0, + 0, 0, 299, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 850, 0, 0, + 0, 299, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 0, 0, 0, 0, + 299, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 511, 297, 298, 0, 0, 0, 0, 299, + 0, 0, 0, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 0, 0, 0, 0, + 299, 0, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 0, 0, 0, 0, + 299, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, -4, 1, 0, 299, + -4, 0, 0, 0, 0, 0, 0, 0, -4, -4, + 0, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, -4, 0, 0, 0, 0, -4, -4, 688, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, 0, - 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, - 0, 10, 11, 0, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 0, 22, 23, 24, 25, 26, - 27, 28, 29, 0, 30, 31, 32, 33, 34, 35, - 0, 36, 37, 38, 39, 40, 41, 7, 8, 42, - 43, 0, 0, 0, 0, 44, 45, 46, 47, 0, - 0, 48, 0, 49, 0, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 0, 0, 0, 463, 13, - 14, 464, 16, 17, 465, 19, 466, 21, 0, 22, - 0, 24, 25, 0, 27, 28, 29, 0, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 0, 0, - 45, 46, 47, 1007, 0, 1008, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 0, 0, 0, 0, - 0, 1027, 0, 1028, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 0, 0, 0, 0, 0, 1103, - 0, 1104, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 0, 0, 0, 0, 0, 0, 0, 695, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 0, 0, 0, 0, 0, 0, 0, 744, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 0, 0, - 0, 0, 0, 0, 0, 789, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 0, 0, 0, 0, - 0, 0, 0, 826, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 0, 0, 0, 0, 0, 0, - 0, 1005, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 0, 0, 0, 0, 0, 0, 0, 1022, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 0, 0, 0, 0, 0, 0, 0, 1051, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 0, 0, - 0, 0, 0, 0, 0, 1052, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 0, 0, 0, 0, - 0, 0, 0, 1053, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 0, 0, 0, 0, 0, 0, - 0, 1054, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 0, 0, 0, 0, 0, 0, 0, 1077, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 0, 0, 0, 0, 0, 0, 0, 1118, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 0, 0, - 0, 0, 0, 0, 0, 1120, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 0, 0, 0, 0, - 0, 0, 0, 1121, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 0, 0, 0, 0, 0, 0, - 0, 1134, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 0, 0, 0, 0, 0, 0, 0, 1137, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 0, 0, 0, 0, 0, 0, 0, 1140, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 0, 0, - 0, 0, 0, 0, 0, 1158, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 0, 0, 0, 0, - 0, 0, 0, 1160, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 0, 0, 0, 0, 0, 0, - 0, 1184, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 0, 0, 0, 0, 0, 0, 0, 1186, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 0, 0, 0, 0, 0, 0, 0, 1188, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 0, 0, - 0, 0, 0, 0, 0, 1198, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 451, 0, 0, 0, - 0, 532, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 0, 0, 0, 0, 0, 487, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 0, 0, - 0, 0, 0, 532, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 0, 0, 0, 0, 0, 533, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 0, 0, 0, 0, 0, 561, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 0, 0, 0, 0, - 0, 608, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 0, 0, 0, 0, 0, 609, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 0, 0, - 0, 0, 0, 622, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 0, 0, 0, 0, 0, 623, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 0, 0, 0, 0, 0, 624, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 0, 0, 0, 0, - 0, 625, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 0, 0, 0, 0, 0, 626, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 0, 0, - 0, 0, 0, 627, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 0, 0, 0, 0, 0, 709, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 0, 0, 0, 0, 0, 710, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 0, 0, 0, 0, - 0, 711, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 0, 0, 0, 0, 0, 786, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 0, 0, - 0, 0, 0, 824, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 0, 0, 0, 0, 0, 825, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 0, 0, 0, 0, 0, 848, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 0, 0, 0, 0, - 0, 958, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 0, 0, 0, 0, 0, 959, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 0, 0, - 0, 0, 0, 978, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 0, 0, 0, 0, 0, 990, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 0, 0, 0, 0, 0, 1086, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 0, 0, 0, 0, - 0, 1087, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 0, 0, 0, 0, 0, 1093, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 0, 0, - 0, 0, 0, 1099, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 0, 0, 0, 0, 0, 1153, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 0, 0, 0, 0, 0, 1156, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 0, 0, 455, 287, + -4, -4, -4, -4, -4, -4, -4, -4, 0, -4, + -4, -4, -4, -4, -4, 0, -4, -4, -4, -4, + -4, -4, 0, 0, -4, -4, 6, 0, 0, 0, + -4, -4, -4, -4, 7, 8, -4, 0, -4, 0, + -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, + 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, + 0, 0, 10, 11, 0, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 0, 22, 23, 24, 25, + 26, 27, 28, 29, 0, 30, 31, 32, 33, 34, + 35, 0, 36, 37, 38, 39, 40, 41, 7, 8, + 42, 43, 0, 0, 0, 0, 44, 45, 46, 47, + 0, 0, 48, 0, 49, 0, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 0, 0, 0, 463, + 13, 14, 464, 16, 17, 465, 19, 466, 21, 0, + 22, 0, 24, 25, 0, 27, 28, 29, 0, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 0, + 0, 45, 46, 47, 1008, 0, 1009, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 0, 0, 0, 0, 301, 0, 0, - 0, 566, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 0, 0, 572, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 0, - 0, 0, 0, 301, 0, 0, 0, 587, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 0, 0, - 589, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 0, 0, 0, 0, 301, - 0, 0, 0, 591, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 0, 0, 593, 287, 288, 289, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 0, 0, 0, 0, 301, 0, 0, 0, 595, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 0, 0, 597, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 0, 0, 0, - 0, 301, 0, 0, 0, 599, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 0, 0, 601, 287, + 298, 0, 0, 0, 0, 299, 0, 0, 0, 0, + 0, 0, 1028, 0, 1029, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, + 1105, 0, 1106, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 0, 0, 0, 0, 0, 0, 0, + 695, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 0, 0, 0, 0, 0, 0, 0, 743, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 0, + 0, 0, 0, 0, 0, 0, 790, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 0, 0, 0, 0, 299, 0, 0, 0, 0, + 0, 0, 0, 0, 827, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, + 0, 0, 1006, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 0, 0, 0, 0, 0, 0, 0, + 1023, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 0, 0, 0, 0, 0, 0, 0, 1053, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 0, + 0, 0, 0, 0, 0, 0, 1054, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 0, 0, 0, 0, 299, 0, 0, 0, 0, + 0, 0, 0, 0, 1055, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, + 0, 0, 1056, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 0, 0, 0, 0, 0, 0, 0, + 1079, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 0, 0, 0, 0, 0, 0, 0, 1120, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 0, + 0, 0, 0, 0, 0, 0, 1122, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 0, 0, 0, 0, 299, 0, 0, 0, 0, + 0, 0, 0, 0, 1123, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, + 0, 0, 1136, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 0, 0, 0, 0, 0, 0, 0, + 1139, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 0, 0, 0, 0, 0, 0, 0, 1142, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 0, + 0, 0, 0, 0, 0, 0, 1160, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 0, 0, 0, 0, 299, 0, 0, 0, 0, + 0, 0, 0, 0, 1162, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, + 0, 0, 1186, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 0, 0, 0, 0, 0, 0, 0, + 1188, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 0, 0, 0, 0, 0, 0, 0, 1190, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 0, + 0, 0, 0, 0, 0, 0, 1200, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 0, 0, 0, 0, 299, 0, 451, 0, 0, + 0, 0, 532, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 0, 0, 0, 0, 0, 532, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 0, + 0, 0, 0, 0, 533, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, + 561, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 0, 0, 0, 0, 0, 606, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 0, 0, 0, 0, 299, 0, 0, 0, 0, + 0, 0, 607, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 0, 0, 0, 0, 0, 620, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 0, + 0, 0, 0, 0, 621, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, + 622, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 0, 0, 0, 0, 0, 623, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 0, 0, 0, 0, 299, 0, 0, 0, 0, + 0, 0, 624, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 0, 0, 0, 0, 0, 625, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 0, + 0, 0, 0, 0, 709, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, + 710, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 0, 0, 0, 0, 0, 711, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 0, 0, 0, 0, 299, 0, 0, 0, 0, + 0, 0, 787, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 0, 0, 0, 0, 0, 825, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 0, + 0, 0, 0, 0, 826, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, + 849, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 0, 0, 0, 0, 0, 958, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 0, 0, 0, 0, 301, 0, 0, - 0, 603, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 0, 0, 605, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 0, - 0, 0, 0, 301, 0, 0, 0, 607, 287, 288, + 298, 0, 0, 0, 0, 299, 0, 0, 0, 0, + 0, 0, 959, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 0, 0, 0, 0, 0, 979, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 0, + 0, 0, 0, 0, 991, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, + 1088, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 0, 0, 0, 0, 0, 1089, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 0, 0, 0, 0, 299, 0, 0, 0, 0, + 0, 0, 1095, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 0, 0, 0, 0, 0, 1101, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 0, + 0, 0, 0, 0, 1155, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, + 1158, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 0, 0, 455, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 0, 0, + 0, 0, 299, 0, 0, 0, 566, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 0, 0, 0, 0, 299, 0, 0, 0, 570, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 0, 0, 0, 0, 299, 0, + 0, 0, 585, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 0, 0, 587, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 0, 0, - 611, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 0, 0, 0, 0, 301, - 0, 0, 0, 613, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 0, 0, 615, 287, 288, 289, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 0, 0, 0, 0, 301, 0, 0, 0, 617, + 0, 0, 0, 0, 299, 0, 0, 0, 589, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 0, + 0, 591, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 0, 0, 0, 0, + 299, 0, 0, 0, 593, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 0, 0, 595, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 0, 0, 619, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 0, 0, 0, - 0, 301, 0, 0, 0, 621, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 0, 0, 724, 287, + 297, 298, 0, 0, 0, 0, 299, 0, 0, 0, + 597, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 0, 0, 599, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 0, 0, + 0, 0, 299, 0, 0, 0, 601, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 0, 0, 0, 0, 301, 0, 0, - 0, 725, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 0, 0, 727, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 0, - 0, 0, 0, 301, 0, 0, 0, 728, 287, 288, + 298, 0, 0, 0, 0, 299, 0, 0, 0, 603, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 0, 0, 0, 0, 299, 0, + 0, 0, 605, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 0, 0, 609, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 0, 0, - 739, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 0, 0, 0, 0, 301, - 0, 0, 0, 740, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 0, 0, 762, 287, 288, 289, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 0, 0, 0, 0, 301, 0, 0, 0, 865, + 0, 0, 0, 0, 299, 0, 0, 0, 611, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 0, + 0, 613, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 0, 0, 0, 0, + 299, 0, 0, 0, 615, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 0, 0, 617, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 0, 0, 867, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 0, 0, 0, - 0, 301, 0, 0, 0, 869, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 0, 0, 871, 287, + 297, 298, 0, 0, 0, 0, 299, 0, 0, 0, + 619, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 0, 0, 724, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 0, 0, + 0, 0, 299, 0, 0, 0, 725, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 0, 0, 0, 0, 301, 0, 0, - 0, 971, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 451, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 0, 0, 0, - 0, 301, 0, 488, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 497, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 0, - 0, 0, 0, 301, 0, 498, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 500, 287, 288, 289, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 0, 0, 0, 0, 301, 0, 502, 287, 288, + 298, 0, 0, 0, 0, 299, 0, 0, 0, 727, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 0, 0, 0, 0, 299, 0, + 0, 0, 728, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 0, 0, 739, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 503, 287, + 0, 0, 0, 0, 299, 0, 0, 0, 763, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 0, + 0, 865, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 0, 0, 0, 0, + 299, 0, 0, 0, 867, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 0, 0, 869, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 0, 0, 0, 0, 299, 0, 0, 0, + 871, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 0, 0, 872, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 0, 0, + 0, 0, 299, 0, 0, 0, 972, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 0, 0, 0, 0, 301, 0, 506, + 298, 0, 0, 0, 0, 299, 0, 451, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 507, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 0, 0, 0, 0, 301, - 0, 514, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 557, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 0, 0, 0, - 0, 301, 0, 558, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 559, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 0, - 0, 0, 0, 301, 0, 565, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 586, 287, 288, 289, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 0, 0, 0, 0, 301, 0, 588, 287, 288, + 297, 298, 0, 0, 0, 0, 299, 0, 488, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 497, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 0, 0, 0, 0, 299, 0, + 498, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 500, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 0, 0, 0, 0, + 299, 0, 502, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 503, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 0, 0, + 0, 0, 299, 0, 506, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 507, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 590, 287, + 0, 0, 0, 0, 299, 0, 514, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 0, 0, 0, 0, 301, 0, 592, + 298, 0, 0, 0, 0, 299, 0, 557, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 594, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 0, 0, 0, 0, 301, - 0, 596, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 598, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 0, 0, 0, - 0, 301, 0, 600, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 602, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 0, - 0, 0, 0, 301, 0, 604, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 606, 287, 288, 289, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 0, 0, 0, 0, 301, 0, 610, 287, 288, + 297, 298, 0, 0, 0, 0, 299, 0, 558, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 559, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 0, 0, 0, 0, 299, 0, + 565, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 584, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 0, 0, 0, 0, + 299, 0, 586, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 588, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 0, 0, + 0, 0, 299, 0, 590, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 592, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 612, 287, + 0, 0, 0, 0, 299, 0, 594, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 0, 0, 0, 0, 301, 0, 614, + 298, 0, 0, 0, 0, 299, 0, 596, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 616, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 0, 0, 0, 0, 301, - 0, 618, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 620, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 0, 0, 0, - 0, 301, 0, 673, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 678, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 0, - 0, 0, 0, 301, 0, 686, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 689, 287, 288, 289, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 0, 0, 0, 0, 301, 0, 690, 287, 288, + 297, 298, 0, 0, 0, 0, 299, 0, 598, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 600, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 0, 0, 0, 0, 299, 0, + 602, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 604, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 0, 0, 0, 0, + 299, 0, 608, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 610, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 0, 0, + 0, 0, 299, 0, 612, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 614, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 696, 287, + 0, 0, 0, 0, 299, 0, 616, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 0, 0, 0, 0, 301, 0, 701, + 298, 0, 0, 0, 0, 299, 0, 618, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 723, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 0, 0, 0, 0, 301, - 0, 864, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 0, 0, - 301, 0, 866, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 0, 0, 0, - 0, 301, 0, 868, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 0, 0, 301, 0, 870, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 0, - 0, 0, 0, 301, 0, 874, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 0, 0, 301, 0, 1006, 287, 288, 289, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 0, 0, 0, 0, 301, 0, 1021, 287, 288, + 297, 298, 0, 0, 0, 0, 299, 0, 673, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 678, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 0, 0, 0, 0, 299, 0, + 686, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 689, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 0, 0, 0, 0, + 299, 0, 690, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 696, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 0, 0, + 0, 0, 299, 0, 701, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 723, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 0, 0, 301, 0, 1031, 287, + 0, 0, 0, 0, 299, 0, 864, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 0, 0, 0, 0, 301, 0, 1152, + 298, 0, 0, 0, 0, 299, 0, 866, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 0, 0, 301, 0, - 1196, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 0, 0, 0, 0, 301 + 297, 298, 0, 0, 0, 0, 299, 0, 868, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 0, 0, 0, 0, 299, 0, 870, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 0, 0, 0, 0, 299, 0, + 875, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 0, 0, 0, 0, 299, + 0, 1007, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 0, 0, 0, 0, + 299, 0, 1022, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 0, 0, 0, + 0, 299, 0, 1032, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 0, 0, + 0, 0, 299, 0, 1154, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 0, + 0, 0, 0, 299, 0, 1198, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 0, 0, 0, 0, 299 }; static const yytype_int16 yycheck[] = { - 59, 6, 6, 354, 355, 1040, 179, 49, 3, 276, - 6, 4, 6, 186, 4, 5, 69, 4, 6, 4, - 4, 7, 648, 4, 1059, 49, 4, 4, 7, 0, - 70, 6, 6, 69, 69, 208, 76, 77, 211, 4, - 4, 6, 6, 121, 122, 132, 36, 37, 38, 39, - 137, 131, 42, 6, 131, 69, 133, 70, 138, 137, - 715, 151, 131, 76, 77, 121, 122, 157, 158, 138, - 121, 122, 4, 4, 5, 719, 6, 131, 131, 128, - 129, 137, 78, 139, 138, 138, 137, 13, 139, 131, - 131, 181, 182, 80, 81, 82, 83, 128, 129, 139, - 121, 122, 138, 138, 135, 36, 37, 38, 39, 90, - 91, 42, 6, 117, 118, 119, 137, 131, 122, 123, - 1155, 98, 131, 127, 138, 111, 139, 121, 122, 133, - 118, 126, 136, 138, 138, 139, 140, 141, 131, 143, - 144, 145, 146, 53, 148, 149, 150, 773, 138, 153, - 128, 129, 139, 138, 138, 133, 135, 135, 90, 91, - 49, 138, 140, 139, 138, 118, 170, 171, 144, 133, - 7, 131, 148, 32, 33, 179, 35, 70, 1213, 121, - 122, 836, 144, 76, 77, 131, 148, 133, 455, 193, - 194, 195, 365, 197, 70, 137, 200, 201, 131, 203, - 76, 77, 131, 262, 263, 264, 265, 138, 70, 131, - 214, 384, 6, 7, 76, 77, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, - 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, - 254, 255, 256, 257, 258, 259, 260, 261, 884, 131, - 70, 133, 266, 139, 121, 122, 76, 77, 121, 122, - 274, 108, 109, 110, 111, 131, 131, 139, 133, 49, - 7, 138, 49, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 301, 274, 43, - 51, 276, 46, 49, 132, 49, 310, 51, 167, 137, - 169, 131, 274, 133, 318, 43, 175, 131, 46, 323, - 179, 49, 46, 327, 328, 49, 8, 51, 332, 139, - 334, 335, 336, 138, 310, 339, 340, 341, 342, 343, - 344, 345, 4, 5, 4, 341, 342, 343, 344, 121, - 122, 327, 328, 357, 358, 359, 360, 361, 362, 354, - 355, 138, 452, 453, 368, 137, 328, 371, 372, 121, - 122, 375, 376, 377, 36, 37, 38, 39, 49, 49, - 42, 108, 109, 110, 111, 137, 390, 139, 46, 131, - 70, 133, 396, 121, 122, 399, 76, 77, 131, 375, - 133, 128, 129, 131, 64, 65, 66, 67, 135, 132, - 138, 132, 72, 375, 137, 75, 137, 342, 343, 344, - 1046, 4, 1066, 398, 1068, 131, 1070, 133, 46, 519, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 121, 122, 450, 4, 130, 121, - 122, 4, 1107, 457, 131, 1110, 70, 139, 1113, 139, - 456, 138, 76, 77, 70, 137, 128, 129, 70, 6, - 76, 77, 131, 135, 76, 77, 131, 131, 121, 122, - 455, 70, 486, 487, 131, 489, 490, 76, 77, 493, - 494, 495, 7, 352, 353, 138, 121, 122, 765, 766, - 121, 122, 361, 1147, 508, 7, 132, 511, 512, 133, - 486, 137, 137, 572, 518, 4, 70, 138, 494, 495, - 1175, 4, 76, 77, 486, 139, 138, 131, 532, 533, - 131, 131, 508, 139, 538, 511, 131, 139, 133, 1183, - 131, 1185, 546, 1187, 548, 1200, 508, 131, 1203, 1193, - 139, 1206, 7, 131, 1209, 133, 131, 561, 133, 563, - 564, 4, 70, 121, 122, 131, 6, 133, 76, 77, - 131, 630, 133, 1217, 1229, 1219, 1231, 1221, 1233, 137, - 931, 671, 672, 6, 674, 139, 676, 677, 6, 5, - 680, 681, 131, 108, 109, 110, 111, 572, 131, 658, - 4, 5, 131, 138, 608, 609, 108, 109, 110, 111, - 70, 131, 131, 128, 129, 138, 76, 77, 622, 623, - 624, 625, 626, 627, 5, 629, 128, 129, 121, 122, - 634, 139, 36, 37, 38, 39, 131, 641, 42, 729, - 730, 731, 4, 131, 137, 133, 131, 651, 652, 653, - 654, 655, 131, 629, 133, 36, 37, 38, 39, 663, - 131, 42, 133, 131, 131, 121, 122, 629, 121, 122, - 121, 122, 531, 131, 131, 651, 652, 653, 654, 139, - 684, 137, 121, 122, 137, 544, 137, 663, 138, 651, - 652, 653, 654, 138, 138, 128, 129, 131, 137, 6, - 133, 663, 135, 133, 794, 138, 6, 140, 684, 138, - 800, 1062, 133, 133, 121, 122, 123, 124, 125, 809, - 810, 811, 684, 130, 6, 815, 816, 817, 818, 819, - 820, 821, 131, 131, 133, 133, 138, 93, 3, 4, - 5, 831, 746, 747, 9, 10, 11, 135, 6, 14, + 6, 354, 355, 6, 179, 274, 3, 6, 261, 262, + 263, 186, 4, 6, 4, 49, 4, 4, 7, 5, + 5, 4, 648, 715, 6, 1041, 6, 69, 4, 7, + 4, 4, 207, 6, 209, 70, 4, 342, 343, 344, + 70, 76, 77, 4, 5, 1061, 76, 77, 6, 70, + 69, 69, 131, 6, 70, 76, 77, 70, 6, 70, + 76, 77, 70, 76, 77, 76, 77, 131, 76, 77, + 121, 122, 0, 7, 138, 36, 37, 38, 39, 78, + 132, 42, 121, 122, 719, 137, 137, 131, 139, 131, + 80, 81, 82, 83, 138, 70, 138, 131, 137, 13, + 139, 76, 77, 4, 139, 6, 98, 90, 91, 139, + 69, 117, 118, 119, 90, 91, 122, 123, 139, 138, + 138, 127, 111, 139, 49, 118, 139, 133, 139, 126, + 136, 139, 138, 139, 140, 141, 131, 143, 144, 145, + 146, 1157, 148, 149, 150, 837, 138, 153, 774, 139, + 138, 138, 138, 138, 128, 129, 138, 135, 138, 133, + 133, 135, 139, 131, 170, 171, 140, 144, 121, 122, + 118, 148, 131, 179, 108, 109, 110, 111, 133, 138, + 135, 144, 121, 122, 6, 148, 455, 193, 194, 195, + 365, 197, 121, 122, 200, 201, 70, 203, 137, 1215, + 70, 131, 76, 77, 70, 211, 76, 77, 137, 384, + 76, 77, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 121, 122, 53, 132, 264, 885, + 32, 33, 137, 35, 49, 139, 272, 128, 129, 139, + 137, 274, 139, 139, 135, 131, 131, 133, 7, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 131, 272, 131, 43, 133, 70, + 46, 138, 308, 49, 131, 76, 77, 7, 43, 272, + 316, 46, 121, 122, 49, 321, 51, 570, 46, 325, + 326, 49, 131, 51, 330, 132, 332, 333, 334, 138, + 137, 308, 131, 339, 340, 341, 342, 343, 344, 345, + 49, 132, 341, 342, 343, 344, 137, 131, 325, 326, + 49, 357, 358, 359, 360, 361, 362, 354, 355, 132, + 128, 129, 368, 326, 137, 371, 372, 70, 139, 375, + 376, 377, 7, 76, 77, 121, 122, 630, 51, 108, + 109, 110, 111, 49, 131, 131, 133, 131, 394, 133, + 131, 397, 138, 396, 131, 167, 133, 169, 375, 128, + 129, 121, 122, 175, 138, 658, 135, 179, 108, 109, + 110, 111, 375, 121, 122, 121, 122, 1109, 138, 131, + 1112, 133, 1048, 1115, 138, 121, 122, 5, 128, 129, + 138, 137, 70, 1068, 49, 1070, 139, 1072, 76, 77, + 49, 151, 138, 131, 450, 133, 46, 157, 158, 121, + 122, 457, 455, 121, 122, 6, 7, 456, 36, 37, + 38, 39, 121, 122, 42, 137, 121, 122, 131, 137, + 133, 181, 182, 108, 109, 110, 111, 131, 137, 133, + 486, 487, 137, 489, 490, 1177, 46, 493, 494, 495, + 4, 121, 122, 128, 129, 121, 122, 766, 767, 121, + 122, 139, 508, 121, 122, 511, 512, 137, 131, 486, + 1202, 137, 518, 1205, 1149, 137, 1208, 494, 495, 1211, + 131, 4, 133, 486, 131, 4, 532, 533, 121, 122, + 131, 508, 538, 131, 511, 4, 4, 5, 133, 1231, + 546, 1233, 548, 1235, 137, 508, 121, 122, 4, 131, + 1185, 133, 1187, 6, 1189, 561, 4, 563, 564, 131, + 1195, 133, 137, 131, 131, 133, 133, 570, 36, 37, + 38, 39, 138, 131, 42, 123, 124, 125, 131, 932, + 352, 353, 130, 4, 1219, 131, 1221, 133, 1223, 361, + 121, 122, 123, 124, 125, 64, 65, 66, 67, 130, + 606, 607, 131, 72, 133, 131, 75, 133, 131, 131, + 133, 133, 131, 131, 620, 621, 622, 623, 624, 625, + 626, 7, 131, 629, 128, 129, 131, 6, 634, 133, + 6, 135, 128, 129, 138, 641, 140, 133, 6, 135, + 893, 8, 131, 131, 140, 651, 652, 653, 654, 655, + 131, 131, 629, 133, 131, 5, 133, 663, 131, 131, + 128, 129, 137, 137, 139, 139, 629, 135, 138, 49, + 137, 51, 139, 62, 651, 652, 653, 654, 684, 137, + 4, 139, 8, 137, 131, 139, 663, 138, 651, 652, + 653, 654, 137, 137, 139, 139, 137, 137, 139, 139, + 663, 137, 137, 139, 139, 131, 137, 684, 139, 131, + 137, 1064, 139, 137, 137, 139, 139, 137, 137, 139, + 139, 684, 131, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 131, 138, 745, + 746, 130, 452, 453, 131, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 531, + 763, 138, 6, 130, 767, 132, 137, 6, 139, 775, + 135, 137, 544, 139, 137, 137, 139, 139, 137, 133, + 139, 787, 137, 93, 139, 791, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 137, 6, 139, 809, 130, 137, 137, 139, 139, 519, + 138, 138, 133, 139, 133, 138, 6, 6, 824, 825, + 826, 133, 4, 138, 130, 6, 832, 833, 5, 7, + 836, 135, 133, 839, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 849, 850, 851, 138, 130, 139, 138, + 7, 7, 858, 856, 7, 132, 7, 863, 7, 6, + 90, 137, 839, 138, 132, 132, 137, 6, 4, 134, + 7, 93, 878, 7, 7, 7, 839, 93, 877, 7, + 7, 93, 7, 7, 7, 4, 132, 132, 135, 661, + 132, 132, 898, 6, 134, 7, 139, 7, 904, 905, + 7, 1076, 139, 909, 135, 131, 131, 6, 4, 138, + 7, 6, 918, 6, 6, 6, 133, 6, 118, 49, + 7, 7, 928, 7, 138, 51, 7, 7, 7, 928, + 6, 138, 7, 7, 7, 932, 7, 709, 710, 711, + 946, 7, 7, 7, 1197, 4, 6, 131, 954, 6, + 138, 6, 958, 959, 6, 954, 6, 4, 4, 49, + 4, 671, 672, 6, 674, 4, 676, 677, 6, 131, + 680, 681, 1225, 979, 1227, 1150, 135, 138, 132, 7, + 6, 6, 6, 138, 56, 991, 138, 6, 138, 6, + 138, 6, 1245, 5, 4, 6, 138, 138, 6, 6, + 135, 89, 1008, 6, 4, 7, 12, 13, 6, 6, + 6, 6, 6, 6, 134, 6, 6, 6, 1024, 729, + 730, 731, 1028, 6, 1030, 5, 93, 1033, 6, 6, + 6, 1037, 6, 6, 6, 6, 1042, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 6, 54, 4, + 56, 57, 6, 59, 60, 61, 1033, 6, 6, 137, + 4, 1067, 7, 1069, 836, 1071, 6, 1064, 138, 6, + 1033, 6, 135, 6, 1080, 5, 138, 47, 6, 85, + 86, 87, 1088, 1089, 6, 795, 139, 138, 6, 1095, + 138, 801, 7, 138, 6, 6, 1102, 138, 138, 1105, + 810, 811, 812, 88, 6, 8, 816, 817, 818, 819, + 820, 821, 822, 6, 6, 6, 91, 6, 6, 1125, + 138, 6, 832, 5, 138, 6, 139, 899, 62, 138, + 6, 1137, 137, 139, 1140, 6, 6, 1143, 6, 6, + 6, 1147, 6, 6, 5, 786, 6, 139, 6, 1155, + 138, 8, 1158, 6, 138, 6, 138, 138, 137, 6, + 6, 933, 5, 935, 6, 937, 876, 6, 3, 4, + 138, 138, 138, 138, 9, 10, 11, 138, 6, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 774, 36, 37, 38, 39, 133, 131, 42, 133, 131, - 6, 133, 786, 128, 129, 875, 790, 762, 133, 4, - 135, 766, 123, 124, 125, 140, 131, 6, 133, 130, - 138, 133, 661, 135, 808, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 823, - 824, 825, 137, 130, 139, 6, 5, 831, 832, 135, - 49, 835, 51, 892, 838, 137, 137, 139, 139, 104, - 105, 106, 107, 130, 848, 849, 850, 137, 7, 139, - 709, 710, 711, 133, 858, 8, 121, 122, 948, 863, - 138, 126, 838, 137, 139, 139, 131, 137, 7, 139, - 960, 136, 138, 877, 7, 137, 838, 139, 7, 132, - 876, 856, 6, 8, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 897, 137, 7, 139, 130, 7, 903, - 904, 1074, 90, 137, 908, 139, 137, 137, 139, 139, - 137, 4, 139, 917, 137, 137, 139, 139, 138, 137, - 137, 139, 139, 927, 137, 137, 139, 139, 6, 137, - 1020, 927, 137, 137, 6, 139, 931, 137, 137, 139, - 139, 945, 137, 137, 139, 139, 137, 132, 139, 953, - 137, 137, 139, 139, 958, 959, 132, 953, 4, 112, + 139, 6, 6, 6, 6, 6, 6, 6, 43, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 134, 978, 1148, 835, 130, 7, 132, - 93, 7, 7, 1073, 7, 93, 990, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 8, 7, 1007, 7, 130, 93, 7, 7, 7, - 4, 132, 132, 132, 139, 132, 139, 135, 6, 1023, - 7, 7, 7, 1027, 1114, 1029, 6, 131, 1032, 139, - 135, 131, 1036, 6, 6, 138, 134, 1041, 6, 898, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 6, 6, 1032, 7, 130, 133, - 118, 1065, 7, 1067, 7, 1069, 49, 1062, 7, 51, - 1032, 138, 7, 932, 1078, 934, 7, 936, 7, 6, - 4, 7, 1086, 1087, 7, 7, 7, 7, 7, 1093, - 7, 6, 131, 138, 138, 6, 1100, 6, 6, 1103, - 49, 6, 4, 4, 4, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 1123, - 135, 6, 4, 130, 138, 6, 132, 131, 7, 6, - 138, 1135, 6, 135, 1138, 6, 1195, 1141, 56, 6, - 6, 1145, 138, 138, 6, 138, 5, 4, 6, 1153, - 6, 6, 1156, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 1223, 6, 1225, 138, 130, 138, - 7, 4, 6, 89, 3, 4, 4, 134, 4, 6, - 9, 10, 11, 6, 1243, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 1065, 6, 1067, 6, - 1069, 6, 6, 6, 43, 6, 12, 13, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 6, 5, 93, 6, 130, 64, 65, 66, 67, 68, - 6, 6, 6, 72, 6, 6, 75, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 6, 54, 6, - 56, 57, 6, 59, 60, 61, 6, 6, 137, 6, - 138, 6, 135, 7, 6, 104, 105, 106, 107, 6, - 5, 7, 6, 6, 47, 138, 138, 6, 139, 85, - 86, 87, 121, 122, 138, 138, 138, 126, 138, 6, - 88, 6, 131, 6, 91, 6, 6, 136, 6, 6, - 139, 3, 4, 5, 138, 7, 6, 9, 10, 11, - 138, 6, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 139, 36, 37, 38, 39, 5, 139, - 42, 6, 62, 138, 6, 137, 6, 6, 6, 3, - 4, 6, 139, 6, 6, 9, 10, 11, 6, 5, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 6, 138, 138, 6, 138, 138, 6, 6, 43, - 6, 137, 6, 5, 1123, 138, 98, 138, 138, 138, - 138, 6, 104, 105, 106, 107, 108, 109, 110, 111, - 64, 65, 66, 67, 68, 139, 6, 6, 72, 121, - 122, 75, 6, 6, 126, 6, 128, 129, 6, 131, - 6, 133, 6, 135, 136, 6, 138, 793, 785, 3, - 3, -1, 880, -1, -1, -1, -1, -1, -1, -1, - 104, 105, 106, 107, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 121, 122, -1, - -1, -1, 126, -1, -1, -1, -1, 131, -1, 3, - 4, -1, 136, -1, 138, 9, 10, 11, -1, -1, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, -1, -1, -1, -1, -1, -1, -1, -1, 43, - -1, 12, 13, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 64, 65, 66, 67, 68, 6, -1, -1, 72, -1, - -1, 75, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, -1, 54, -1, 56, 57, -1, 59, 60, - 61, -1, -1, -1, -1, -1, 6, -1, -1, -1, - 104, 105, 106, 107, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 85, 86, 87, 121, 122, -1, - -1, -1, 126, -1, -1, -1, -1, 131, -1, 3, - 4, -1, 136, -1, 138, 9, 10, 11, -1, -1, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, -1, -1, -1, -1, -1, -1, -1, 139, 43, - -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, - 64, 65, 66, 67, 68, -1, -1, -1, 72, -1, - -1, 75, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, - 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 104, 105, 106, 107, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 121, 122, -1, - -1, -1, 126, -1, -1, -1, -1, 131, -1, 3, - 4, 5, 136, -1, 138, 9, 10, 11, -1, -1, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, -1, 36, 37, 38, 39, 3, 4, 42, 12, - 13, -1, 9, 10, 11, -1, -1, 14, 15, 16, + 123, 124, 125, 1125, 794, 3, 3, 130, 181, 64, + 65, 66, 67, 68, 881, -1, 139, 72, -1, 949, + 75, -1, -1, 6, -1, -1, -1, -1, -1, -1, + 960, -1, -1, -1, -1, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 104, + 105, 106, 107, 130, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 121, 122, -1, -1, + 130, 126, -1, -1, -1, 1067, 131, 1069, -1, 1071, + -1, 136, -1, -1, 139, -1, 3, 4, 5, -1, + 7, 1021, 9, 10, 11, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, -1, -1, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - -1, 54, -1, 56, 57, -1, 59, 60, 61, -1, + 27, 28, 29, 30, 31, 32, 33, 34, -1, 36, + 37, 38, 39, -1, -1, 42, -1, 12, 13, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, -1, -1, 1075, -1, 130, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, + -1, 56, 57, -1, 59, 60, 61, -1, -1, -1, + -1, 98, -1, -1, -1, -1, 1116, 104, 105, 106, + 107, 108, 109, 110, 111, -1, -1, -1, -1, -1, + 85, 86, 87, -1, 121, 122, -1, -1, -1, 126, + -1, 128, 129, -1, 131, -1, 133, -1, 135, 136, + -1, 138, 3, 4, 5, -1, -1, -1, 9, 10, + 11, -1, -1, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 139, -1, -1, -1, -1, -1, + -1, -1, 43, -1, 12, 13, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, + -1, 130, -1, 64, 65, 66, 67, 68, -1, -1, + -1, 72, -1, -1, 75, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, -1, 54, -1, 56, 57, + -1, 59, 60, 61, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 104, 105, 106, 107, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 85, 86, 87, + 121, 122, -1, -1, -1, 126, -1, -1, -1, -1, + 131, -1, 3, 4, -1, 136, -1, 138, 9, 10, + 11, -1, -1, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, -1, -1, -1, -1, -1, -1, + -1, 139, 43, -1, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 104, 105, 106, 107, -1, -1, -1, -1, -1, -1, - -1, -1, 85, 86, 87, -1, -1, 121, 122, -1, - -1, -1, 126, -1, -1, -1, -1, 131, -1, -1, - -1, -1, 136, -1, 138, -1, -1, 104, 105, 106, - 107, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 6, 121, 122, -1, -1, -1, 126, - -1, -1, -1, -1, 131, -1, 139, 134, -1, 136, - -1, 138, 3, 4, -1, -1, -1, -1, 9, 10, + -1, -1, -1, 64, 65, 66, 67, 68, -1, -1, + -1, 72, -1, -1, 75, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, -1, 54, -1, 56, 57, + -1, 59, 60, 61, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 104, 105, 106, 107, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 85, 86, 87, + 121, 122, -1, -1, -1, 126, -1, -1, -1, -1, + 131, -1, 3, 4, -1, 136, -1, 138, 9, 10, 11, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, -1, -1, -1, 3, 4, 12, - 13, -1, -1, 9, 10, 11, -1, -1, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, -1, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - -1, 54, -1, 56, 57, -1, 59, 60, 61, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 104, 105, 106, 107, 130, -1, -1, - -1, -1, 85, 86, 87, -1, -1, -1, -1, -1, + 31, 32, 33, 34, -1, -1, -1, -1, -1, -1, + -1, 139, 43, -1, 12, 13, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 64, 65, 66, 67, 68, 6, -1, + -1, 72, -1, -1, 75, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, -1, 54, -1, 56, 57, + -1, 59, 60, 61, -1, -1, -1, -1, -1, 6, + -1, -1, -1, 104, 105, 106, 107, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 85, 86, 87, + 121, 122, -1, -1, -1, 126, -1, -1, -1, -1, + 131, -1, 3, 4, -1, 136, -1, 138, 9, 10, + 11, -1, -1, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, -1, -1, -1, -1, -1, -1, + -1, 139, 43, -1, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, + -1, -1, 130, 64, 65, 66, 67, 68, -1, -1, + -1, 72, -1, -1, 75, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, + -1, -1, -1, 130, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 104, 105, 106, 107, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 121, 122, -1, -1, -1, 126, -1, -1, -1, -1, + 131, -1, 3, 4, 5, 136, -1, 138, 9, 10, + 11, -1, -1, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, -1, 36, 37, 38, 39, 3, + 4, 42, 12, 13, -1, 9, 10, 11, -1, -1, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, -1, -1, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, -1, 54, -1, 56, 57, -1, 59, + 60, 61, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 104, 105, 106, 107, -1, -1, -1, + -1, -1, -1, -1, -1, 85, 86, 87, -1, -1, 121, 122, -1, -1, -1, 126, -1, -1, -1, -1, - 131, -1, -1, 134, -1, 136, -1, 138, 104, 105, - 106, 107, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 121, 122, -1, 62, -1, - 126, -1, -1, -1, -1, 131, 139, 3, 4, -1, - 136, -1, 138, 9, 10, 11, -1, -1, 14, 15, + 131, -1, -1, -1, -1, 136, -1, 138, -1, -1, + 104, 105, 106, 107, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 6, 121, 122, -1, + -1, -1, 126, -1, -1, -1, -1, 131, -1, 139, + 134, -1, 136, -1, 138, 3, 4, -1, -1, -1, + -1, 9, 10, 11, -1, -1, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, -1, -1, -1, + 3, 4, 12, 13, -1, -1, 9, 10, 11, -1, + -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, -1, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, -1, 54, -1, 56, 57, -1, 59, + 60, 61, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 104, 105, 106, 107, + 130, -1, -1, -1, -1, 85, 86, 87, -1, -1, + -1, -1, -1, 121, 122, -1, -1, -1, 126, -1, + -1, -1, -1, 131, -1, -1, 134, -1, 136, -1, + 138, 104, 105, 106, 107, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 121, 122, + -1, -1, -1, 126, -1, -1, -1, -1, 131, 139, + 3, 4, -1, 136, -1, 138, 9, 10, 11, -1, + -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, -1, -1, -1, -1, -1, -1, -1, -1, + 43, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, + -1, 64, 65, 66, 67, 68, 137, 3, 4, 72, + -1, -1, 75, 9, 10, 11, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, -1, - -1, -1, -1, -1, -1, -1, -1, 43, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, -1, -1, -1, -1, 130, -1, 64, 65, - 66, 67, 68, -1, 3, 4, 72, -1, -1, 75, - 9, 10, 11, -1, -1, 14, 15, 16, 17, 18, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 6, + -1, 104, 105, 106, 107, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 121, 122, + -1, -1, -1, 126, 3, 4, 5, -1, 131, -1, + 9, 10, 11, 136, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, -1, -1, 104, 105, - 106, 107, 12, 13, -1, -1, -1, -1, -1, -1, + 29, 30, 31, 32, 33, 34, 6, 36, 37, 38, + 39, -1, -1, 42, -1, -1, -1, -1, 104, 105, + 106, 107, -1, -1, -1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, 121, 122, -1, -1, -1, - 126, -1, -1, -1, -1, 131, -1, -1, -1, -1, - 136, -1, -1, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, -1, 54, -1, 56, 57, -1, 59, - 60, 61, -1, -1, -1, -1, -1, -1, 6, -1, - -1, -1, -1, -1, -1, 104, 105, 106, 107, 12, - 13, -1, -1, -1, -1, 85, 86, 87, -1, -1, - -1, -1, 121, 122, -1, -1, -1, 126, 12, 13, - -1, -1, 131, 6, -1, -1, -1, 136, -1, -1, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - -1, 54, 6, 56, 57, -1, 59, 60, 61, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 139, - 54, 6, 56, 57, -1, 59, 60, 61, -1, -1, - -1, -1, 85, 86, 87, -1, -1, -1, -1, -1, - 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 85, 86, 87, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 6, -1, - -1, -1, 130, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 139, 6, -1, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, -1, -1, 139, 6, 130, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, -1, -1, -1, -1, 130, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 8, -1, -1, -1, 130, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 8, -1, -1, -1, 130, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, + 126, -1, -1, -1, 6, 131, -1, -1, -1, -1, + 136, -1, -1, -1, -1, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 6, + -1, -1, -1, 130, -1, 104, 105, 106, 107, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 6, -1, + -1, -1, 121, 122, -1, -1, -1, 126, -1, -1, + -1, -1, 131, -1, -1, -1, -1, 136, 6, -1, + -1, -1, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, -1, 6, -1, -1, + 130, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, -1, 6, -1, -1, 130, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, -1, -1, -1, 8, 130, -1, + -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 8, + -1, -1, -1, 130, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 8, -1, + -1, -1, 130, -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 8, -1, -1, -1, 130, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 8, -1, -1, -1, 130, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 8, -1, -1, -1, - 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, - -1, -1, -1, 130, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, - -1, -1, 130, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, -1, 0, 1, -1, 130, 4, - -1, -1, -1, -1, -1, -1, -1, 12, 13, -1, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, - 35, -1, -1, -1, -1, 40, 41, 139, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, - 55, 56, 57, 58, 59, 60, 61, -1, 63, 64, - 65, 66, 67, 68, -1, 70, 71, 72, 73, 74, - 75, -1, -1, 78, 79, 4, -1, -1, -1, 84, - 85, 86, 87, 12, 13, 90, -1, 92, -1, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, -1, - -1, -1, -1, -1, -1, -1, 35, -1, -1, -1, - -1, 40, 41, -1, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, -1, 54, 55, 56, 57, 58, - 59, 60, 61, -1, 63, 64, 65, 66, 67, 68, - -1, 70, 71, 72, 73, 74, 75, 12, 13, 78, - 79, -1, -1, -1, -1, 84, 85, 86, 87, -1, - -1, 90, -1, 92, -1, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, -1, -1, -1, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, -1, 54, - -1, 56, 57, -1, 59, 60, 61, -1, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, -1, -1, -1, -1, 130, -1, -1, -1, - 85, 86, 87, 137, -1, 139, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - -1, -1, -1, -1, 130, -1, -1, -1, -1, -1, - -1, 137, -1, 139, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, - -1, -1, 130, -1, -1, -1, -1, -1, -1, 137, - -1, 139, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, - 130, -1, -1, -1, -1, -1, -1, -1, -1, 139, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, - -1, -1, -1, -1, -1, -1, -1, 139, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, -1, -1, -1, -1, 130, -1, -1, -1, - -1, -1, -1, -1, -1, 139, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - -1, -1, -1, -1, 130, -1, -1, -1, -1, -1, - -1, -1, -1, 139, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, - -1, -1, 130, -1, -1, -1, -1, -1, -1, -1, - -1, 139, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, - 130, -1, -1, -1, -1, -1, -1, -1, -1, 139, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, - -1, -1, -1, -1, -1, -1, -1, 139, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, -1, -1, -1, -1, 130, -1, -1, -1, - -1, -1, -1, -1, -1, 139, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - -1, -1, -1, -1, 130, -1, -1, -1, -1, -1, - -1, -1, -1, 139, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, - -1, -1, 130, -1, -1, -1, -1, -1, -1, -1, - -1, 139, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, - 130, -1, -1, -1, -1, -1, -1, -1, -1, 139, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, - -1, -1, -1, -1, -1, -1, -1, 139, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, -1, -1, -1, -1, 130, -1, -1, -1, - -1, -1, -1, -1, -1, 139, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - -1, -1, -1, -1, 130, -1, -1, -1, -1, -1, - -1, -1, -1, 139, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, - -1, -1, 130, -1, -1, -1, -1, -1, -1, -1, - -1, 139, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, - 130, -1, -1, -1, -1, -1, -1, -1, -1, 139, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, - -1, -1, -1, -1, -1, -1, -1, 139, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, -1, -1, -1, -1, 130, -1, -1, -1, - -1, -1, -1, -1, -1, 139, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - -1, -1, -1, -1, 130, -1, -1, -1, -1, -1, - -1, -1, -1, 139, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, - -1, -1, 130, -1, -1, -1, -1, -1, -1, -1, - -1, 139, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, - 130, -1, -1, -1, -1, -1, -1, -1, -1, 139, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, - -1, -1, -1, -1, -1, -1, -1, 139, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, -1, -1, -1, -1, 130, -1, -1, -1, - -1, -1, -1, -1, -1, 139, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - -1, -1, -1, -1, 130, -1, 132, -1, -1, -1, - -1, 137, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, - 130, -1, -1, -1, -1, -1, -1, 137, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, -1, -1, -1, -1, 130, -1, -1, -1, - -1, -1, -1, 137, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, - -1, -1, 130, -1, -1, -1, -1, -1, -1, 137, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, - -1, -1, -1, -1, -1, 137, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - -1, -1, -1, -1, 130, -1, -1, -1, -1, -1, - -1, 137, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, - 130, -1, -1, -1, -1, -1, -1, 137, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, -1, -1, -1, -1, 130, -1, -1, -1, - -1, -1, -1, 137, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, - -1, -1, 130, -1, -1, -1, -1, -1, -1, 137, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, - -1, -1, -1, -1, -1, 137, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - -1, -1, -1, -1, 130, -1, -1, -1, -1, -1, - -1, 137, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, - 130, -1, -1, -1, -1, -1, -1, 137, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, -1, -1, -1, -1, 130, -1, -1, -1, - -1, -1, -1, 137, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, - -1, -1, 130, -1, -1, -1, -1, -1, -1, 137, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, - -1, -1, -1, -1, -1, 137, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - -1, -1, -1, -1, 130, -1, -1, -1, -1, -1, - -1, 137, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, - 130, -1, -1, -1, -1, -1, -1, 137, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, -1, -1, -1, -1, 130, -1, -1, -1, - -1, -1, -1, 137, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, - -1, -1, 130, -1, -1, -1, -1, -1, -1, 137, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, - -1, -1, -1, -1, -1, 137, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - -1, -1, -1, -1, 130, -1, -1, -1, -1, -1, - -1, 137, 112, 113, 114, 115, 116, 117, 118, 119, + -1, -1, -1, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, + -1, 130, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, - 130, -1, -1, -1, -1, -1, -1, 137, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, -1, -1, -1, -1, 130, -1, -1, -1, - -1, -1, -1, 137, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, - -1, -1, 130, -1, -1, -1, -1, -1, -1, 137, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, - -1, -1, -1, -1, -1, 137, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - -1, -1, -1, -1, 130, -1, -1, -1, -1, -1, - -1, 137, 112, 113, 114, 115, 116, 117, 118, 119, + 130, -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, - 130, -1, -1, -1, -1, -1, -1, 137, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, -1, -1, -1, -1, 130, -1, -1, -1, - -1, -1, -1, 137, 112, 113, 114, 115, 116, 117, + 130, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, -1, 0, 1, -1, 130, + 4, -1, -1, -1, -1, -1, -1, -1, 12, 13, + -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, + -1, 35, -1, -1, -1, -1, 40, 41, 139, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, + 54, 55, 56, 57, 58, 59, 60, 61, -1, 63, + 64, 65, 66, 67, 68, -1, 70, 71, 72, 73, + 74, 75, -1, -1, 78, 79, 4, -1, -1, -1, + 84, 85, 86, 87, 12, 13, 90, -1, 92, -1, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + -1, -1, -1, -1, -1, -1, -1, 35, -1, -1, + -1, -1, 40, 41, -1, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, -1, 54, 55, 56, 57, + 58, 59, 60, 61, -1, 63, 64, 65, 66, 67, + 68, -1, 70, 71, 72, 73, 74, 75, 12, 13, + 78, 79, -1, -1, -1, -1, 84, 85, 86, 87, + -1, -1, 90, -1, 92, -1, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, -1, -1, -1, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, + 54, -1, 56, 57, -1, 59, 60, 61, -1, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, -1, -1, -1, -1, 130, -1, -1, + -1, 85, 86, 87, 137, -1, 139, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, -1, -1, -1, -1, 130, -1, -1, -1, -1, + -1, -1, 137, -1, 139, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, + -1, -1, -1, 130, -1, -1, -1, -1, -1, -1, + 137, -1, 139, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, + -1, 130, -1, -1, -1, -1, -1, -1, -1, -1, + 139, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, + -1, -1, -1, -1, -1, -1, -1, -1, 139, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, -1, -1, -1, -1, 130, -1, -1, + -1, -1, -1, -1, -1, -1, 139, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, -1, -1, -1, -1, 130, -1, -1, -1, -1, + -1, -1, -1, -1, 139, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, + -1, -1, -1, 130, -1, -1, -1, -1, -1, -1, + -1, -1, 139, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, + -1, 130, -1, -1, -1, -1, -1, -1, -1, -1, + 139, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, + -1, -1, -1, -1, -1, -1, -1, -1, 139, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, -1, -1, -1, -1, 130, -1, -1, + -1, -1, -1, -1, -1, -1, 139, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, -1, -1, -1, -1, 130, -1, -1, -1, -1, + -1, -1, -1, -1, 139, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, + -1, -1, -1, 130, -1, -1, -1, -1, -1, -1, + -1, -1, 139, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, + -1, 130, -1, -1, -1, -1, -1, -1, -1, -1, + 139, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, + -1, -1, -1, -1, -1, -1, -1, -1, 139, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, -1, -1, -1, -1, 130, -1, -1, + -1, -1, -1, -1, -1, -1, 139, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, -1, -1, -1, -1, 130, -1, -1, -1, -1, + -1, -1, -1, -1, 139, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, + -1, -1, -1, 130, -1, -1, -1, -1, -1, -1, + -1, -1, 139, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, + -1, 130, -1, -1, -1, -1, -1, -1, -1, -1, + 139, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, + -1, -1, -1, -1, -1, -1, -1, -1, 139, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, -1, -1, -1, -1, 130, -1, -1, + -1, -1, -1, -1, -1, -1, 139, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, -1, -1, -1, -1, 130, -1, -1, -1, -1, + -1, -1, -1, -1, 139, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, + -1, -1, -1, 130, -1, -1, -1, -1, -1, -1, + -1, -1, 139, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, + -1, 130, -1, -1, -1, -1, -1, -1, -1, -1, + 139, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, + -1, -1, -1, -1, -1, -1, -1, -1, 139, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, -1, -1, -1, -1, 130, -1, -1, + -1, -1, -1, -1, -1, -1, 139, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, -1, -1, -1, -1, 130, -1, 132, -1, -1, + -1, -1, 137, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, + -1, 130, -1, -1, -1, -1, -1, -1, 137, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, -1, -1, -1, -1, 130, -1, -1, + -1, -1, -1, -1, 137, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, + -1, -1, -1, 130, -1, -1, -1, -1, -1, -1, + 137, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, + -1, -1, -1, -1, -1, -1, 137, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, -1, -1, -1, -1, 130, -1, -1, -1, -1, + -1, -1, 137, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, + -1, 130, -1, -1, -1, -1, -1, -1, 137, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, -1, -1, -1, -1, 130, -1, -1, + -1, -1, -1, -1, 137, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, + -1, -1, -1, 130, -1, -1, -1, -1, -1, -1, + 137, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, + -1, -1, -1, -1, -1, -1, 137, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, -1, -1, -1, -1, 130, -1, -1, -1, -1, + -1, -1, 137, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, + -1, 130, -1, -1, -1, -1, -1, -1, 137, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, -1, -1, -1, -1, 130, -1, -1, + -1, -1, -1, -1, 137, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, + -1, -1, -1, 130, -1, -1, -1, -1, -1, -1, + 137, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, + -1, -1, -1, -1, -1, -1, 137, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, -1, -1, -1, -1, 130, -1, -1, -1, -1, + -1, -1, 137, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, + -1, 130, -1, -1, -1, -1, -1, -1, 137, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, -1, -1, -1, -1, 130, -1, -1, + -1, -1, -1, -1, 137, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, + -1, -1, -1, 130, -1, -1, -1, -1, -1, -1, + 137, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, + -1, -1, -1, -1, -1, -1, 137, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, -1, -1, -1, -1, 130, -1, -1, -1, -1, + -1, -1, 137, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, + -1, 130, -1, -1, -1, -1, -1, -1, 137, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, -1, -1, -1, -1, 130, -1, -1, + -1, -1, -1, -1, 137, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, + -1, -1, -1, 130, -1, -1, -1, -1, -1, -1, + 137, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, + -1, -1, -1, -1, -1, -1, 137, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, -1, -1, -1, -1, 130, -1, -1, -1, -1, + -1, -1, 137, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, + -1, 130, -1, -1, -1, -1, -1, -1, 137, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, -1, -1, -1, -1, 130, -1, -1, + -1, -1, -1, -1, 137, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, + -1, -1, -1, 130, -1, -1, -1, -1, -1, -1, + 137, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, + -1, -1, -1, 134, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, - -1, -1, 130, -1, -1, -1, -1, -1, -1, 137, + -1, -1, 130, -1, -1, -1, 134, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, -1, -1, -1, -1, 130, -1, -1, -1, 134, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, - -1, -1, -1, -1, -1, 137, 112, 113, 114, 115, + -1, -1, 134, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, + -1, 130, -1, -1, -1, 134, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, -1, -1, 134, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, @@ -2572,17 +2613,16 @@ static const yytype_int16 yycheck[] = 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, -1, -1, 134, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, -1, -1, -1, -1, 130, -1, -1, -1, 134, + 125, -1, -1, -1, -1, 130, -1, 132, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, -1, -1, -1, -1, 130, -1, 132, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, -1, -1, -1, -1, 130, -1, 132, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, - -1, -1, 134, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, - -1, 130, -1, -1, -1, 134, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - -1, -1, -1, -1, 130, -1, -1, -1, 134, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, -1, -1, -1, -1, 130, -1, -1, - -1, 134, 112, 113, 114, 115, 116, 117, 118, 119, + 132, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, + -1, 132, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, 132, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, @@ -2676,17 +2716,7 @@ static const yytype_int16 yycheck[] = 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, 132, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - -1, -1, -1, -1, 130, -1, 132, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, -1, -1, -1, -1, 130, -1, 132, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, -1, -1, -1, -1, 130, -1, 132, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, -1, -1, -1, -1, 130, -1, 132, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, -1, -1, -1, -1, 130, -1, - 132, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, -1, -1, -1, -1, 130 + -1, -1, -1, -1, 130 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -2706,119 +2736,119 @@ static const yytype_uint8 yystos[] = 32, 33, 34, 36, 37, 38, 39, 42, 98, 104, 105, 106, 107, 108, 109, 110, 111, 121, 122, 126, 128, 129, 131, 133, 135, 136, 138, 163, 164, 201, - 202, 213, 13, 49, 131, 6, 138, 6, 131, 138, + 202, 214, 13, 49, 131, 6, 138, 6, 131, 138, 131, 131, 69, 131, 138, 131, 131, 69, 138, 131, 131, 53, 49, 131, 49, 49, 49, 46, 49, 51, 51, 43, 46, 49, 51, 49, 131, 138, 121, 122, 131, 138, 203, 204, 203, 138, 43, 46, 49, 138, 203, 49, 49, 46, 4, 98, 138, 4, 6, 46, - 4, 4, 4, 131, 131, 131, 4, 138, 209, 4, - 131, 131, 6, 133, 4, 4, 4, 5, 138, 212, - 213, 138, 212, 4, 133, 135, 140, 164, 138, 213, + 4, 4, 4, 131, 131, 131, 4, 138, 210, 4, + 131, 131, 6, 133, 4, 4, 5, 138, 5, 138, + 4, 133, 135, 140, 164, 138, 5, 214, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, 131, 133, - 131, 133, 131, 131, 131, 131, 7, 131, 4, 201, - 201, 201, 201, 134, 138, 201, 4, 90, 91, 4, - 4, 170, 171, 172, 201, 6, 6, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 130, 6, 6, 201, 5, 201, 201, 4, 43, - 122, 170, 178, 201, 207, 208, 201, 201, 131, 201, - 208, 201, 201, 131, 208, 201, 201, 122, 138, 201, - 206, 207, 131, 201, 138, 131, 131, 206, 206, 138, + 131, 131, 131, 131, 7, 131, 4, 201, 201, 201, + 201, 134, 138, 201, 4, 90, 91, 4, 4, 170, + 171, 172, 201, 6, 6, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 130, + 6, 6, 201, 5, 201, 201, 4, 43, 122, 170, + 178, 201, 208, 209, 201, 201, 131, 201, 209, 201, + 201, 131, 209, 201, 201, 122, 138, 201, 206, 208, + 131, 201, 138, 131, 131, 206, 5, 206, 207, 138, 131, 131, 131, 131, 131, 131, 4, 203, 203, 203, 201, 201, 121, 122, 138, 138, 203, 138, 138, 138, - 121, 122, 131, 172, 203, 138, 206, 206, 131, 4, + 121, 122, 131, 172, 203, 138, 207, 206, 131, 4, 6, 133, 133, 172, 6, 138, 133, 133, 6, 201, 201, 201, 135, 201, 138, 93, 201, 201, 201, 6, - 133, 135, 172, 6, 172, 6, 133, 201, 4, 138, - 148, 6, 201, 201, 201, 201, 201, 201, 201, 201, + 6, 172, 6, 172, 133, 201, 4, 138, 148, 6, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, - 201, 201, 201, 201, 212, 212, 212, 212, 201, 5, - 133, 132, 7, 111, 208, 134, 7, 163, 164, 135, + 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, + 201, 201, 4, 213, 214, 213, 213, 213, 201, 5, + 133, 132, 7, 111, 209, 134, 7, 163, 164, 135, 7, 133, 139, 43, 46, 49, 51, 169, 6, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 6, 132, 137, 137, 132, 133, - 138, 201, 207, 8, 123, 137, 139, 132, 132, 201, + 138, 201, 208, 8, 123, 137, 139, 132, 132, 201, 132, 139, 132, 132, 201, 139, 132, 132, 138, 139, - 208, 123, 7, 201, 132, 201, 201, 201, 7, 7, - 196, 201, 201, 166, 201, 213, 166, 166, 166, 201, + 209, 123, 7, 201, 132, 201, 201, 201, 7, 7, + 196, 201, 201, 166, 201, 214, 166, 166, 166, 201, 132, 137, 137, 137, 203, 203, 171, 171, 137, 201, 201, 201, 201, 182, 137, 172, 7, 197, 7, 201, - 6, 201, 201, 139, 208, 201, 201, 132, 132, 132, - 90, 137, 172, 138, 8, 132, 134, 201, 4, 139, - 139, 201, 134, 164, 201, 4, 80, 81, 82, 83, - 139, 151, 155, 158, 160, 161, 132, 134, 132, 134, + 6, 201, 201, 139, 209, 201, 201, 132, 132, 132, + 90, 137, 172, 138, 8, 132, 134, 139, 139, 201, + 134, 164, 201, 4, 80, 81, 82, 83, 139, 151, + 155, 158, 160, 161, 132, 134, 132, 134, 132, 134, 132, 134, 132, 134, 132, 134, 132, 134, 132, 134, - 132, 134, 132, 134, 132, 134, 132, 134, 137, 137, + 132, 134, 132, 134, 132, 134, 137, 137, 132, 134, 132, 134, 132, 134, 132, 134, 132, 134, 132, 134, - 132, 134, 137, 137, 137, 137, 137, 137, 132, 137, + 137, 137, 137, 137, 137, 137, 133, 135, 132, 137, 137, 132, 132, 6, 137, 201, 206, 206, 139, 7, - 135, 163, 164, 213, 201, 6, 4, 4, 138, 210, - 134, 138, 138, 138, 138, 8, 6, 118, 145, 208, - 201, 7, 134, 138, 201, 201, 201, 207, 201, 207, + 135, 163, 164, 214, 201, 6, 4, 4, 138, 211, + 134, 138, 138, 138, 138, 8, 6, 118, 145, 209, + 201, 7, 134, 138, 201, 201, 201, 208, 201, 208, 93, 7, 7, 132, 7, 93, 7, 7, 132, 93, - 7, 7, 208, 139, 138, 201, 132, 7, 139, 132, + 7, 7, 209, 139, 138, 201, 132, 7, 139, 132, 132, 201, 206, 4, 195, 139, 132, 132, 132, 132, 132, 132, 135, 203, 201, 201, 139, 139, 201, 137, 137, 137, 70, 76, 77, 192, 193, 203, 139, 179, 201, 6, 201, 132, 134, 134, 139, 134, 134, 7, 7, 7, 135, 201, 139, 201, 201, 7, 135, 134, - 134, 135, 164, 212, 139, 152, 131, 131, 138, 162, - 6, 201, 201, 201, 201, 201, 201, 201, 201, 208, - 212, 201, 134, 6, 6, 134, 4, 90, 91, 201, - 6, 6, 6, 7, 133, 209, 211, 6, 208, 208, - 208, 208, 201, 118, 212, 132, 137, 203, 208, 139, - 8, 49, 206, 206, 7, 206, 49, 51, 206, 206, - 7, 51, 206, 206, 139, 208, 6, 7, 138, 7, - 7, 7, 62, 194, 6, 7, 7, 7, 7, 7, - 7, 7, 4, 137, 137, 137, 139, 203, 203, 203, - 6, 138, 131, 139, 193, 137, 192, 6, 138, 6, - 6, 49, 6, 6, 206, 206, 206, 4, 137, 8, - 8, 132, 4, 4, 135, 6, 4, 6, 131, 201, + 135, 164, 213, 139, 152, 131, 131, 138, 162, 6, + 201, 201, 201, 201, 201, 201, 201, 201, 201, 4, + 209, 213, 201, 134, 6, 6, 134, 4, 90, 91, + 201, 6, 6, 6, 7, 133, 210, 212, 6, 209, + 209, 209, 209, 201, 118, 213, 132, 137, 203, 209, + 139, 8, 49, 206, 206, 7, 206, 49, 51, 206, + 206, 7, 51, 206, 206, 139, 209, 6, 7, 138, + 7, 7, 7, 62, 194, 6, 7, 7, 7, 7, + 7, 7, 7, 4, 137, 137, 137, 139, 203, 203, + 203, 6, 138, 131, 139, 193, 137, 192, 6, 138, + 6, 6, 49, 6, 6, 206, 206, 206, 4, 137, + 8, 8, 132, 4, 4, 6, 4, 6, 131, 201, 201, 205, 206, 138, 132, 134, 132, 134, 132, 134, - 132, 134, 132, 132, 132, 163, 7, 163, 164, 135, - 7, 6, 209, 201, 137, 139, 139, 139, 139, 139, - 6, 6, 145, 201, 6, 139, 201, 138, 56, 168, - 168, 206, 6, 138, 138, 6, 6, 206, 138, 6, - 6, 139, 5, 201, 206, 206, 206, 4, 6, 206, - 206, 206, 206, 206, 206, 206, 6, 7, 201, 201, - 201, 138, 137, 139, 137, 139, 137, 139, 201, 206, - 201, 201, 203, 139, 208, 138, 6, 6, 89, 201, - 201, 201, 6, 7, 4, 164, 149, 201, 137, 137, - 137, 139, 150, 201, 206, 213, 201, 6, 4, 210, - 6, 134, 209, 6, 6, 6, 6, 212, 137, 134, - 201, 203, 6, 6, 6, 201, 201, 6, 201, 5, - 137, 6, 6, 93, 167, 201, 6, 6, 6, 6, - 6, 6, 4, 201, 213, 139, 132, 137, 139, 171, - 203, 6, 183, 203, 6, 184, 203, 6, 185, 139, - 137, 132, 139, 137, 139, 201, 206, 137, 139, 8, - 139, 132, 138, 201, 213, 132, 137, 201, 201, 206, - 138, 137, 139, 6, 6, 6, 7, 6, 135, 6, - 201, 139, 139, 139, 139, 5, 201, 47, 6, 138, - 6, 6, 138, 201, 139, 137, 138, 137, 138, 137, - 138, 6, 206, 7, 138, 201, 6, 139, 88, 201, - 201, 208, 6, 6, 153, 201, 137, 137, 205, 201, - 6, 209, 91, 137, 6, 6, 6, 6, 6, 137, - 138, 205, 171, 137, 139, 201, 203, 192, 201, 203, - 192, 201, 203, 192, 137, 139, 206, 172, 139, 201, - 139, 139, 139, 138, 201, 201, 139, 6, 201, 5, - 201, 139, 139, 201, 139, 137, 139, 139, 137, 139, - 139, 137, 139, 206, 6, 62, 139, 180, 138, 6, - 6, 150, 132, 137, 6, 138, 137, 137, 139, 6, - 139, 6, 186, 201, 6, 6, 187, 201, 6, 6, - 188, 201, 6, 139, 201, 192, 172, 139, 156, 201, - 205, 201, 5, 138, 139, 138, 139, 138, 139, 6, - 6, 139, 139, 181, 6, 138, 132, 139, 139, 137, - 192, 6, 189, 192, 6, 190, 192, 6, 191, 192, - 154, 212, 159, 138, 6, 5, 139, 138, 139, 138, - 139, 138, 139, 137, 139, 138, 205, 139, 6, 192, - 6, 192, 6, 192, 212, 6, 157, 212, 139, 6, - 139, 139, 139, 137, 139, 6, 6, 6, 6, 212, - 6 + 132, 134, 134, 132, 132, 132, 163, 7, 163, 164, + 135, 7, 6, 210, 201, 137, 139, 139, 139, 139, + 139, 6, 6, 145, 201, 6, 139, 201, 138, 56, + 168, 168, 206, 6, 138, 138, 6, 6, 206, 138, + 6, 6, 139, 5, 201, 206, 206, 206, 4, 6, + 206, 206, 206, 206, 206, 206, 206, 6, 7, 201, + 201, 201, 138, 137, 139, 137, 139, 137, 139, 201, + 206, 201, 201, 203, 139, 209, 138, 6, 6, 89, + 201, 201, 201, 6, 7, 164, 149, 201, 137, 137, + 137, 139, 150, 201, 135, 206, 214, 201, 6, 4, + 211, 6, 134, 210, 6, 6, 6, 6, 213, 137, + 134, 201, 203, 6, 6, 6, 201, 201, 6, 201, + 5, 137, 6, 6, 93, 167, 201, 6, 6, 6, + 6, 6, 6, 4, 201, 214, 139, 132, 137, 139, + 171, 203, 6, 183, 203, 6, 184, 203, 6, 185, + 139, 137, 132, 139, 137, 139, 201, 206, 137, 139, + 8, 139, 132, 138, 201, 214, 132, 137, 201, 201, + 206, 138, 137, 139, 4, 6, 6, 6, 7, 6, + 135, 6, 201, 139, 139, 139, 139, 5, 201, 47, + 6, 138, 6, 6, 138, 201, 139, 137, 138, 137, + 138, 137, 138, 6, 206, 7, 138, 201, 6, 139, + 88, 201, 201, 209, 6, 6, 153, 201, 137, 137, + 205, 201, 6, 210, 91, 137, 6, 6, 6, 6, + 6, 137, 138, 205, 171, 137, 139, 201, 203, 192, + 201, 203, 192, 201, 203, 192, 137, 139, 206, 172, + 139, 201, 139, 139, 139, 138, 201, 201, 139, 6, + 201, 5, 201, 139, 139, 201, 139, 137, 139, 139, + 137, 139, 139, 137, 139, 206, 6, 62, 139, 180, + 138, 6, 6, 150, 132, 137, 6, 138, 137, 137, + 139, 6, 139, 6, 186, 201, 6, 6, 187, 201, + 6, 6, 188, 201, 6, 139, 201, 192, 172, 139, + 156, 201, 205, 201, 5, 138, 139, 138, 139, 138, + 139, 6, 6, 139, 139, 181, 6, 138, 132, 139, + 139, 137, 192, 6, 189, 192, 6, 190, 192, 6, + 191, 192, 154, 213, 159, 138, 6, 5, 139, 138, + 139, 138, 139, 138, 139, 137, 139, 138, 205, 139, + 6, 192, 6, 192, 6, 192, 213, 6, 157, 213, + 139, 6, 139, 139, 139, 137, 139, 6, 6, 6, + 6, 213, 6 }; #define yyerrok (yyerrstatus = 0) @@ -6511,51 +6541,73 @@ yyreduce: yymsg(0, "Wrong definition of Transfinite Surface: 0, 3 or 4 points needed"); } else{ - for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ - double d; - List_Read((yyvsp[(3) - (6)].l), i, &d); - Surface *s = FindSurface((int)d); - if(s){ - s->Method = MESH_TRANSFINITE; - s->Recombine_Dir = (yyvsp[(5) - (6)].i); - List_Reset(s->TrsfPoints); - for(int j = 0; j < k; j++){ - double p; - List_Read((yyvsp[(4) - (6)].l), j, &p); - Vertex *v = FindPoint((int)fabs(p)); - if(v) - List_Add(s->TrsfPoints, &v); - else - yymsg(0, "Unknown point %d", (int)fabs(p)); + if(!(yyvsp[(3) - (6)].l)){ + List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces); + if(List_Nbr(tmp)){ + for(int i = 0; i < List_Nbr(tmp); i++){ + Surface *s; + List_Read(tmp, i, &s); + s->Method = MESH_TRANSFINITE; + s->Recombine_Dir = (yyvsp[(5) - (6)].i); + List_Reset(s->TrsfPoints); } } else{ - GFace *gf = GModel::current()->getFaceByTag((int)d); - if(gf){ - gf->meshAttributes.Method = MESH_TRANSFINITE; - gf->meshAttributes.transfiniteArrangement = (yyvsp[(5) - (6)].i); + for(GModel::fiter it = GModel::current()->firstFace(); + it != GModel::current()->lastFace(); it++){ + (*it)->meshAttributes.Method = MESH_TRANSFINITE; + (*it)->meshAttributes.transfiniteArrangement = (yyvsp[(5) - (6)].i); + } + } + List_Delete(tmp); + } + else{ + for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ + double d; + List_Read((yyvsp[(3) - (6)].l), i, &d); + Surface *s = FindSurface((int)d); + if(s){ + s->Method = MESH_TRANSFINITE; + s->Recombine_Dir = (yyvsp[(5) - (6)].i); + List_Reset(s->TrsfPoints); for(int j = 0; j < k; j++){ double p; List_Read((yyvsp[(4) - (6)].l), j, &p); - GVertex *gv = GModel::current()->getVertexByTag((int)fabs(p)); - if(gv) - gf->meshAttributes.corners.push_back(gv); + Vertex *v = FindPoint((int)fabs(p)); + if(v) + List_Add(s->TrsfPoints, &v); else yymsg(0, "Unknown point %d", (int)fabs(p)); } } - else - yymsg(0, "Unknown surface %d", (int)d); + else{ + GFace *gf = GModel::current()->getFaceByTag((int)d); + if(gf){ + gf->meshAttributes.Method = MESH_TRANSFINITE; + gf->meshAttributes.transfiniteArrangement = (yyvsp[(5) - (6)].i); + for(int j = 0; j < k; j++){ + double p; + List_Read((yyvsp[(4) - (6)].l), j, &p); + GVertex *gv = GModel::current()->getVertexByTag((int)fabs(p)); + if(gv) + gf->meshAttributes.corners.push_back(gv); + else + yymsg(0, "Unknown point %d", (int)fabs(p)); + } + } + else + yymsg(0, "Unknown surface %d", (int)d); + } } } + List_Delete((yyvsp[(3) - (6)].l)); } - List_Delete((yyvsp[(3) - (6)].l)); List_Delete((yyvsp[(4) - (6)].l)); ;} break; case 218: -#line 2600 "Gmsh.y" +#line 2622 "Gmsh.y" { yymsg(1, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)"); List_Delete((yyvsp[(7) - (8)].l)); @@ -6563,7 +6615,7 @@ yyreduce: break; case 219: -#line 2605 "Gmsh.y" +#line 2627 "Gmsh.y" { int k = List_Nbr((yyvsp[(7) - (8)].l)); if(k != 6 && k != 8){ @@ -6608,32 +6660,53 @@ yyreduce: break; case 220: -#line 2647 "Gmsh.y" +#line 2669 "Gmsh.y" { - for(int i = 0; i < List_Nbr((yyvsp[(3) - (5)].l)); i++){ - double d; - List_Read((yyvsp[(3) - (5)].l), i, &d); - Surface *s = FindSurface((int)d); - if(s){ - s->Recombine = 1; - s->RecombineAngle = (yyvsp[(4) - (5)].i); + if(!(yyvsp[(3) - (5)].l)){ + List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces); + if(List_Nbr(tmp)){ + for(int i = 0; i < List_Nbr(tmp); i++){ + Surface *s; + List_Read(tmp, i, &s); + s->Recombine = 1; + s->RecombineAngle = (yyvsp[(4) - (5)].i); + } } else{ - GFace *gf = GModel::current()->getFaceByTag((int)d); - if(gf){ - gf->meshAttributes.recombine = 1; - gf->meshAttributes.recombineAngle = (yyvsp[(4) - (5)].i); + for(GModel::fiter it = GModel::current()->firstFace(); + it != GModel::current()->lastFace(); it++){ + (*it)->meshAttributes.recombine = 1; + (*it)->meshAttributes.recombineAngle = (yyvsp[(4) - (5)].i); + } + } + List_Delete(tmp); + } + else{ + for(int i = 0; i < List_Nbr((yyvsp[(3) - (5)].l)); i++){ + double d; + List_Read((yyvsp[(3) - (5)].l), i, &d); + Surface *s = FindSurface((int)d); + if(s){ + s->Recombine = 1; + s->RecombineAngle = (yyvsp[(4) - (5)].i); + } + else{ + GFace *gf = GModel::current()->getFaceByTag((int)d); + if(gf){ + gf->meshAttributes.recombine = 1; + gf->meshAttributes.recombineAngle = (yyvsp[(4) - (5)].i); + } + else + yymsg(1, "Unknown surface %d", (int)d); } - else - yymsg(1, "Unknown surface %d", (int)d); } + List_Delete((yyvsp[(3) - (5)].l)); } - List_Delete((yyvsp[(3) - (5)].l)); ;} break; case 221: -#line 2669 "Gmsh.y" +#line 2712 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ double d; @@ -6656,7 +6729,7 @@ yyreduce: break; case 222: -#line 2695 "Gmsh.y" +#line 2738 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); if(s){ @@ -6682,7 +6755,7 @@ yyreduce: break; case 223: -#line 2718 "Gmsh.y" +#line 2761 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); if(s){ @@ -6708,26 +6781,26 @@ yyreduce: break; case 224: -#line 2741 "Gmsh.y" +#line 2784 "Gmsh.y" { ;} break; case 225: -#line 2744 "Gmsh.y" +#line 2787 "Gmsh.y" { ;} break; case 226: -#line 2753 "Gmsh.y" +#line 2796 "Gmsh.y" { ReplaceAllDuplicates(); ;} break; case 227: -#line 2757 "Gmsh.y" +#line 2800 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Geometry")) ReplaceAllDuplicates(); @@ -6740,47 +6813,47 @@ yyreduce: break; case 228: -#line 2772 "Gmsh.y" +#line 2815 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 229: -#line 2773 "Gmsh.y" +#line 2816 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (3)].d); ;} break; case 230: -#line 2774 "Gmsh.y" +#line 2817 "Gmsh.y" { (yyval.d) = -(yyvsp[(2) - (2)].d); ;} break; case 231: -#line 2775 "Gmsh.y" +#line 2818 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (2)].d); ;} break; case 232: -#line 2776 "Gmsh.y" +#line 2819 "Gmsh.y" { (yyval.d) = !(yyvsp[(2) - (2)].d); ;} break; case 233: -#line 2777 "Gmsh.y" +#line 2820 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d); ;} break; case 234: -#line 2778 "Gmsh.y" +#line 2821 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d); ;} break; case 235: -#line 2779 "Gmsh.y" +#line 2822 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d); ;} break; case 236: -#line 2781 "Gmsh.y" +#line 2824 "Gmsh.y" { if(!(yyvsp[(3) - (3)].d)) yymsg(0, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); @@ -6790,307 +6863,307 @@ yyreduce: break; case 237: -#line 2787 "Gmsh.y" +#line 2830 "Gmsh.y" { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d); ;} break; case 238: -#line 2788 "Gmsh.y" +#line 2831 "Gmsh.y" { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); ;} break; case 239: -#line 2789 "Gmsh.y" +#line 2832 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d); ;} break; case 240: -#line 2790 "Gmsh.y" +#line 2833 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d); ;} break; case 241: -#line 2791 "Gmsh.y" +#line 2834 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d); ;} break; case 242: -#line 2792 "Gmsh.y" +#line 2835 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d); ;} break; case 243: -#line 2793 "Gmsh.y" +#line 2836 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d); ;} break; case 244: -#line 2794 "Gmsh.y" +#line 2837 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d); ;} break; case 245: -#line 2795 "Gmsh.y" +#line 2838 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d); ;} break; case 246: -#line 2796 "Gmsh.y" +#line 2839 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d); ;} break; case 247: -#line 2797 "Gmsh.y" +#line 2840 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); ;} break; case 248: -#line 2798 "Gmsh.y" +#line 2841 "Gmsh.y" { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; case 249: -#line 2799 "Gmsh.y" +#line 2842 "Gmsh.y" { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; case 250: -#line 2800 "Gmsh.y" +#line 2843 "Gmsh.y" { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; case 251: -#line 2801 "Gmsh.y" +#line 2844 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; case 252: -#line 2802 "Gmsh.y" +#line 2845 "Gmsh.y" { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; case 253: -#line 2803 "Gmsh.y" +#line 2846 "Gmsh.y" { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; case 254: -#line 2804 "Gmsh.y" +#line 2847 "Gmsh.y" { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; case 255: -#line 2805 "Gmsh.y" +#line 2848 "Gmsh.y" { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; case 256: -#line 2806 "Gmsh.y" +#line 2849 "Gmsh.y" { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; case 257: -#line 2807 "Gmsh.y" +#line 2850 "Gmsh.y" { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; case 258: -#line 2808 "Gmsh.y" +#line 2851 "Gmsh.y" { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} break; case 259: -#line 2809 "Gmsh.y" +#line 2852 "Gmsh.y" { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; case 260: -#line 2810 "Gmsh.y" +#line 2853 "Gmsh.y" { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; case 261: -#line 2811 "Gmsh.y" +#line 2854 "Gmsh.y" { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; case 262: -#line 2812 "Gmsh.y" +#line 2855 "Gmsh.y" { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; case 263: -#line 2813 "Gmsh.y" +#line 2856 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; case 264: -#line 2814 "Gmsh.y" +#line 2857 "Gmsh.y" { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; case 265: -#line 2815 "Gmsh.y" +#line 2858 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 266: -#line 2816 "Gmsh.y" +#line 2859 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 267: -#line 2817 "Gmsh.y" +#line 2860 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;} break; case 268: -#line 2818 "Gmsh.y" +#line 2861 "Gmsh.y" { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;} break; case 269: -#line 2820 "Gmsh.y" +#line 2863 "Gmsh.y" { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; case 270: -#line 2821 "Gmsh.y" +#line 2864 "Gmsh.y" { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; case 271: -#line 2822 "Gmsh.y" +#line 2865 "Gmsh.y" { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; case 272: -#line 2823 "Gmsh.y" +#line 2866 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; case 273: -#line 2824 "Gmsh.y" +#line 2867 "Gmsh.y" { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; case 274: -#line 2825 "Gmsh.y" +#line 2868 "Gmsh.y" { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; case 275: -#line 2826 "Gmsh.y" +#line 2869 "Gmsh.y" { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; case 276: -#line 2827 "Gmsh.y" +#line 2870 "Gmsh.y" { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; case 277: -#line 2828 "Gmsh.y" +#line 2871 "Gmsh.y" { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; case 278: -#line 2829 "Gmsh.y" +#line 2872 "Gmsh.y" { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; case 279: -#line 2830 "Gmsh.y" +#line 2873 "Gmsh.y" { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} break; case 280: -#line 2831 "Gmsh.y" +#line 2874 "Gmsh.y" { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; case 281: -#line 2832 "Gmsh.y" +#line 2875 "Gmsh.y" { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; case 282: -#line 2833 "Gmsh.y" +#line 2876 "Gmsh.y" { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; case 283: -#line 2834 "Gmsh.y" +#line 2877 "Gmsh.y" { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; case 284: -#line 2835 "Gmsh.y" +#line 2878 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; case 285: -#line 2836 "Gmsh.y" +#line 2879 "Gmsh.y" { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; case 286: -#line 2837 "Gmsh.y" +#line 2880 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 287: -#line 2838 "Gmsh.y" +#line 2881 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 288: -#line 2839 "Gmsh.y" +#line 2882 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;} break; case 289: -#line 2840 "Gmsh.y" +#line 2883 "Gmsh.y" { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;} break; case 290: -#line 2849 "Gmsh.y" +#line 2892 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 291: -#line 2850 "Gmsh.y" +#line 2893 "Gmsh.y" { (yyval.d) = 3.141592653589793; ;} break; case 292: -#line 2851 "Gmsh.y" +#line 2894 "Gmsh.y" { (yyval.d) = Msg::GetCommRank(); ;} break; case 293: -#line 2852 "Gmsh.y" +#line 2895 "Gmsh.y" { (yyval.d) = Msg::GetCommSize(); ;} break; case 294: -#line 2853 "Gmsh.y" +#line 2896 "Gmsh.y" { (yyval.d) = Get_GmshMajorVersion(); ;} break; case 295: -#line 2854 "Gmsh.y" +#line 2897 "Gmsh.y" { (yyval.d) = Get_GmshMinorVersion(); ;} break; case 296: -#line 2855 "Gmsh.y" +#line 2898 "Gmsh.y" { (yyval.d) = Get_GmshPatchVersion(); ;} break; case 297: -#line 2860 "Gmsh.y" +#line 2903 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (1)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (1)].c)); @@ -7103,7 +7176,7 @@ yyreduce: break; case 298: -#line 2873 "Gmsh.y" +#line 2916 "Gmsh.y" { char tmpstring[1024]; sprintf(tmpstring, "%s_%d", (yyvsp[(1) - (5)].c), (int)(yyvsp[(4) - (5)].d)) ; @@ -7118,7 +7191,7 @@ yyreduce: break; case 299: -#line 2885 "Gmsh.y" +#line 2928 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){ @@ -7136,7 +7209,7 @@ yyreduce: break; case 300: -#line 2900 "Gmsh.y" +#line 2943 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(2) - (4)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(2) - (4)].c)); @@ -7149,7 +7222,7 @@ yyreduce: break; case 301: -#line 2910 "Gmsh.y" +#line 2953 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (2)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (2)].c)); @@ -7162,7 +7235,7 @@ yyreduce: break; case 302: -#line 2920 "Gmsh.y" +#line 2963 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){ @@ -7180,7 +7253,7 @@ yyreduce: break; case 303: -#line 2938 "Gmsh.y" +#line 2981 "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)); @@ -7188,7 +7261,7 @@ yyreduce: break; case 304: -#line 2943 "Gmsh.y" +#line 2986 "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)); @@ -7196,7 +7269,7 @@ yyreduce: break; case 305: -#line 2948 "Gmsh.y" +#line 2991 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (4)].c), 0, (yyvsp[(3) - (4)].c), d)){ @@ -7209,7 +7282,7 @@ yyreduce: break; case 306: -#line 2958 "Gmsh.y" +#line 3001 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c), d)){ @@ -7222,7 +7295,7 @@ yyreduce: break; case 307: -#line 2968 "Gmsh.y" +#line 3011 "Gmsh.y" { (yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d)); Free((yyvsp[(3) - (6)].c)); @@ -7230,70 +7303,70 @@ yyreduce: break; case 308: -#line 2976 "Gmsh.y" +#line 3019 "Gmsh.y" { memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double)); ;} break; case 309: -#line 2980 "Gmsh.y" +#line 3023 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i]; ;} break; case 310: -#line 2984 "Gmsh.y" +#line 3027 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i]; ;} break; case 311: -#line 2988 "Gmsh.y" +#line 3031 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i]; ;} break; case 312: -#line 2992 "Gmsh.y" +#line 3035 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i]; ;} break; case 313: -#line 2999 "Gmsh.y" +#line 3042 "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 314: -#line 3003 "Gmsh.y" +#line 3046 "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 315: -#line 3007 "Gmsh.y" +#line 3050 "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 316: -#line 3011 "Gmsh.y" +#line 3054 "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 317: -#line 3018 "Gmsh.y" +#line 3061 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(List_T*)); List_Add((yyval.l), &((yyvsp[(1) - (1)].l))); @@ -7301,14 +7374,14 @@ yyreduce: break; case 318: -#line 3023 "Gmsh.y" +#line 3066 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].l))); ;} break; case 319: -#line 3030 "Gmsh.y" +#line 3073 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); @@ -7316,14 +7389,14 @@ yyreduce: break; case 320: -#line 3035 "Gmsh.y" +#line 3078 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 321: -#line 3039 "Gmsh.y" +#line 3082 "Gmsh.y" { // creates an empty list (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -7331,14 +7404,14 @@ yyreduce: break; case 322: -#line 3044 "Gmsh.y" +#line 3087 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); ;} break; case 323: -#line 3048 "Gmsh.y" +#line 3091 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -7349,7 +7422,7 @@ yyreduce: break; case 324: -#line 3056 "Gmsh.y" +#line 3099 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (5)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -7360,7 +7433,26 @@ yyreduce: break; case 325: -#line 3067 "Gmsh.y" +#line 3110 "Gmsh.y" + { + (yyval.l) = (yyvsp[(1) - (1)].l); + ;} + break; + + case 326: +#line 3114 "Gmsh.y" + { + if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all")) + (yyval.l) = 0; + else{ + yyerror("Unknown special string for list replacement"); + (yyval.l) = List_Create(2, 1, sizeof(double)); + } + ;} + break; + + case 327: +#line 3126 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -7370,8 +7462,8 @@ yyreduce: ;} break; - case 326: -#line 3075 "Gmsh.y" + case 328: +#line 3134 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (3)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -7381,8 +7473,8 @@ yyreduce: ;} break; - case 327: -#line 3083 "Gmsh.y" + case 329: +#line 3142 "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)); @@ -7391,8 +7483,8 @@ yyreduce: ;} break; - case 328: -#line 3090 "Gmsh.y" + case 330: +#line 3149 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!(yyvsp[(5) - (5)].d) || ((yyvsp[(1) - (5)].d) < (yyvsp[(3) - (5)].d) && (yyvsp[(5) - (5)].d) < 0) || ((yyvsp[(1) - (5)].d) > (yyvsp[(3) - (5)].d) && (yyvsp[(5) - (5)].d) > 0)){ @@ -7405,8 +7497,8 @@ yyreduce: ;} break; - case 329: -#line 3101 "Gmsh.y" + case 331: +#line 3160 "Gmsh.y" { // Returns the coordinates of a point and fills a list with it. // This allows to ensure e.g. that relative point positions are @@ -7428,8 +7520,8 @@ yyreduce: ;} break; - case 330: -#line 3121 "Gmsh.y" + case 332: +#line 3180 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){ @@ -7441,8 +7533,8 @@ yyreduce: ;} break; - case 331: -#line 3131 "Gmsh.y" + case 333: +#line 3190 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){ @@ -7454,8 +7546,8 @@ yyreduce: ;} break; - case 332: -#line 3141 "Gmsh.y" + case 334: +#line 3200 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c))) @@ -7467,8 +7559,8 @@ yyreduce: ;} break; - case 333: -#line 3151 "Gmsh.y" + case 335: +#line 3210 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c))) @@ -7487,30 +7579,30 @@ yyreduce: ;} break; - case 334: -#line 3171 "Gmsh.y" + case 336: +#line 3230 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); ;} break; - case 335: -#line 3176 "Gmsh.y" + case 337: +#line 3235 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; - case 336: -#line 3180 "Gmsh.y" + case 338: +#line 3239 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].d))); ;} break; - case 337: -#line 3184 "Gmsh.y" + case 339: +#line 3243 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){ double d; @@ -7521,22 +7613,22 @@ yyreduce: ;} break; - case 338: -#line 3196 "Gmsh.y" + case 340: +#line 3255 "Gmsh.y" { (yyval.u) = CTX.PACK_COLOR((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d)); ;} break; - case 339: -#line 3200 "Gmsh.y" + case 341: +#line 3259 "Gmsh.y" { (yyval.u) = CTX.PACK_COLOR((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255); ;} break; - case 340: -#line 3212 "Gmsh.y" + case 342: +#line 3271 "Gmsh.y" { int flag; (yyval.u) = Get_ColorForString(ColorString, -1, (yyvsp[(1) - (1)].c), &flag); @@ -7545,8 +7637,8 @@ yyreduce: ;} break; - case 341: -#line 3219 "Gmsh.y" + case 343: +#line 3278 "Gmsh.y" { unsigned int val = 0; ColorOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(5) - (5)].c), val); @@ -7555,15 +7647,15 @@ yyreduce: ;} break; - case 342: -#line 3229 "Gmsh.y" + case 344: +#line 3288 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); ;} break; - case 343: -#line 3233 "Gmsh.y" + case 345: +#line 3292 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); GmshColorTable *ct = Get_ColorTable((int)(yyvsp[(3) - (6)].d)); @@ -7577,30 +7669,30 @@ yyreduce: ;} break; - case 344: -#line 3248 "Gmsh.y" + case 346: +#line 3307 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); List_Add((yyval.l), &((yyvsp[(1) - (1)].u))); ;} break; - case 345: -#line 3253 "Gmsh.y" + case 347: +#line 3312 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].u))); ;} break; - case 346: -#line 3260 "Gmsh.y" + case 348: +#line 3319 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; - case 347: -#line 3264 "Gmsh.y" + case 349: +#line 3323 "Gmsh.y" { if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){ yymsg(0, "Unknown string variable '%s'", (yyvsp[(1) - (1)].c)); @@ -7615,8 +7707,8 @@ yyreduce: ;} break; - case 348: -#line 3277 "Gmsh.y" + case 350: +#line 3336 "Gmsh.y" { const char *val = ""; StringOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), val); @@ -7626,8 +7718,8 @@ yyreduce: ;} break; - case 349: -#line 3285 "Gmsh.y" + case 351: +#line 3344 "Gmsh.y" { const char *val = ""; StringOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), val); @@ -7637,15 +7729,15 @@ yyreduce: ;} break; - case 350: -#line 3296 "Gmsh.y" + case 352: +#line 3355 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; - case 351: -#line 3300 "Gmsh.y" + case 353: +#line 3359 "Gmsh.y" { (yyval.c) = (char *)Malloc(32 * sizeof(char)); time_t now; @@ -7655,8 +7747,8 @@ yyreduce: ;} break; - case 352: -#line 3308 "Gmsh.y" + case 354: +#line 3367 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (6)].c)) + strlen((yyvsp[(5) - (6)].c)) + 1) * sizeof(char)); strcpy((yyval.c), (yyvsp[(3) - (6)].c)); @@ -7666,8 +7758,8 @@ yyreduce: ;} break; - case 353: -#line 3316 "Gmsh.y" + case 355: +#line 3375 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); int i; @@ -7683,8 +7775,8 @@ yyreduce: ;} break; - case 354: -#line 3330 "Gmsh.y" + case 356: +#line 3389 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); int i; @@ -7700,15 +7792,15 @@ yyreduce: ;} break; - case 355: -#line 3344 "Gmsh.y" + case 357: +#line 3403 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); ;} break; - case 356: -#line 3348 "Gmsh.y" + case 358: +#line 3407 "Gmsh.y" { char tmpstring[1024]; int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring); @@ -7731,7 +7823,7 @@ yyreduce: /* Line 1267 of yacc.c. */ -#line 7735 "Gmsh.tab.cpp" +#line 7827 "Gmsh.tab.cpp" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -7945,7 +8037,7 @@ yyreturn: } -#line 3368 "Gmsh.y" +#line 3427 "Gmsh.y" int PrintListOfDouble(char *format, List_T *list, char *buffer) diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index 9acd25b6bd8d47fa3637130b46f030c05afbcd8c..2ab06858b9b72cfe69e72ade45f78ee9ba168a09 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -108,7 +108,7 @@ void FixRelativePath(const char *in, char *out); %type <i> TransfiniteArrangement RecombineAngle %type <u> ColorExpr %type <c> StringExpr StringExprVar SendToFile -%type <l> FExpr_Multi ListOfDouble RecursiveListOfDouble +%type <l> FExpr_Multi ListOfDouble ListOfDoubleOrAll RecursiveListOfDouble %type <l> RecursiveListOfListOfDouble %type <l> ListOfColor RecursiveListOfColor %type <l> ListOfShapes Transform Extrude MultipleShape @@ -1806,13 +1806,13 @@ Colorify : // V I S I B I L I T Y Visibility : - tShow StringExprVar tEND + tShow tBIGSTR tEND { for(int i = 0; i < 4; i++) VisibilityShape($2, i, 1); Free($2); } - | tHide StringExprVar tEND + | tHide tBIGSTR tEND { for(int i = 0; i < 4; i++) VisibilityShape($2, i, 0); @@ -2548,52 +2548,74 @@ Transfinite : } List_Delete($3); } - | tTransfinite tSurface ListOfDouble TransfiniteCorners TransfiniteArrangement tEND + | tTransfinite tSurface ListOfDoubleOrAll TransfiniteCorners TransfiniteArrangement tEND { int k = List_Nbr($4); if(k != 0 && k != 3 && k != 4){ yymsg(0, "Wrong definition of Transfinite Surface: 0, 3 or 4 points needed"); } else{ - for(int i = 0; i < List_Nbr($3); i++){ - double d; - List_Read($3, i, &d); - Surface *s = FindSurface((int)d); - if(s){ - s->Method = MESH_TRANSFINITE; - s->Recombine_Dir = $5; - List_Reset(s->TrsfPoints); - for(int j = 0; j < k; j++){ - double p; - List_Read($4, j, &p); - Vertex *v = FindPoint((int)fabs(p)); - if(v) - List_Add(s->TrsfPoints, &v); - else - yymsg(0, "Unknown point %d", (int)fabs(p)); + if(!$3){ + List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces); + if(List_Nbr(tmp)){ + for(int i = 0; i < List_Nbr(tmp); i++){ + Surface *s; + List_Read(tmp, i, &s); + s->Method = MESH_TRANSFINITE; + s->Recombine_Dir = $5; + List_Reset(s->TrsfPoints); } } else{ - GFace *gf = GModel::current()->getFaceByTag((int)d); - if(gf){ - gf->meshAttributes.Method = MESH_TRANSFINITE; - gf->meshAttributes.transfiniteArrangement = $5; + for(GModel::fiter it = GModel::current()->firstFace(); + it != GModel::current()->lastFace(); it++){ + (*it)->meshAttributes.Method = MESH_TRANSFINITE; + (*it)->meshAttributes.transfiniteArrangement = $5; + } + } + List_Delete(tmp); + } + else{ + for(int i = 0; i < List_Nbr($3); i++){ + double d; + List_Read($3, i, &d); + Surface *s = FindSurface((int)d); + if(s){ + s->Method = MESH_TRANSFINITE; + s->Recombine_Dir = $5; + List_Reset(s->TrsfPoints); for(int j = 0; j < k; j++){ double p; List_Read($4, j, &p); - GVertex *gv = GModel::current()->getVertexByTag((int)fabs(p)); - if(gv) - gf->meshAttributes.corners.push_back(gv); + Vertex *v = FindPoint((int)fabs(p)); + if(v) + List_Add(s->TrsfPoints, &v); else yymsg(0, "Unknown point %d", (int)fabs(p)); } } - else - yymsg(0, "Unknown surface %d", (int)d); + else{ + GFace *gf = GModel::current()->getFaceByTag((int)d); + if(gf){ + gf->meshAttributes.Method = MESH_TRANSFINITE; + gf->meshAttributes.transfiniteArrangement = $5; + for(int j = 0; j < k; j++){ + double p; + List_Read($4, j, &p); + GVertex *gv = GModel::current()->getVertexByTag((int)fabs(p)); + if(gv) + gf->meshAttributes.corners.push_back(gv); + else + yymsg(0, "Unknown point %d", (int)fabs(p)); + } + } + else + yymsg(0, "Unknown surface %d", (int)d); + } } } + List_Delete($3); } - List_Delete($3); List_Delete($4); } | tElliptic tSurface '{' FExpr '}' tAFFECT ListOfDouble tEND @@ -2643,27 +2665,48 @@ Transfinite : } List_Delete($7); } - | tRecombine tSurface ListOfDouble RecombineAngle tEND + | tRecombine tSurface ListOfDoubleOrAll RecombineAngle tEND { - for(int i = 0; i < List_Nbr($3); i++){ - double d; - List_Read($3, i, &d); - Surface *s = FindSurface((int)d); - if(s){ - s->Recombine = 1; - s->RecombineAngle = $4; + if(!$3){ + List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces); + if(List_Nbr(tmp)){ + for(int i = 0; i < List_Nbr(tmp); i++){ + Surface *s; + List_Read(tmp, i, &s); + s->Recombine = 1; + s->RecombineAngle = $4; + } } else{ - GFace *gf = GModel::current()->getFaceByTag((int)d); - if(gf){ - gf->meshAttributes.recombine = 1; - gf->meshAttributes.recombineAngle = $4; + for(GModel::fiter it = GModel::current()->firstFace(); + it != GModel::current()->lastFace(); it++){ + (*it)->meshAttributes.recombine = 1; + (*it)->meshAttributes.recombineAngle = $4; } - else - yymsg(1, "Unknown surface %d", (int)d); } + List_Delete(tmp); + } + else{ + for(int i = 0; i < List_Nbr($3); i++){ + double d; + List_Read($3, i, &d); + Surface *s = FindSurface((int)d); + if(s){ + s->Recombine = 1; + s->RecombineAngle = $4; + } + else{ + GFace *gf = GModel::current()->getFaceByTag((int)d); + if(gf){ + gf->meshAttributes.recombine = 1; + gf->meshAttributes.recombineAngle = $4; + } + else + yymsg(1, "Unknown surface %d", (int)d); + } + } + List_Delete($3); } - List_Delete($3); } | tSmoother tSurface ListOfDouble tAFFECT FExpr tEND { @@ -3062,6 +3105,22 @@ ListOfDouble : } ; +ListOfDoubleOrAll : + ListOfDouble + { + $$ = $1; + } + | tBIGSTR + { + if(!strcmp($1, "*") || !strcmp($1, "all")) + $$ = 0; + else{ + yyerror("Unknown special string for list replacement"); + $$ = List_Create(2, 1, sizeof(double)); + } + } +; + FExpr_Multi : '-' FExpr_Multi %prec UNARYPREC { diff --git a/Parser/Makefile b/Parser/Makefile index d9279e9646018e881570a93a7a5e36f9b3ad01ed..70c93f3b50894443299220d55b801e8f8c6a44c9 100644 --- a/Parser/Makefile +++ b/Parser/Makefile @@ -56,15 +56,15 @@ depend: Gmsh.tab${OBJEXT}: Gmsh.tab.cpp ../Common/GmshMessage.h ../Numeric/GmshMatrix.h \ ../Common/MallocUtils.h ../Common/ListUtils.h ../Common/TreeUtils.h \ ../Common/avl.h ../Common/ListUtils.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/PartitionOptions.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h \ + ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ + ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ + ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ + ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \ + ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \ + ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \ + ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/Geo.h ../Common/GmshDefines.h \ ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h \ ../Geo/SPoint3.h ../Geo/SVector3.h ../Geo/SBoundingBox3d.h \ @@ -80,8 +80,8 @@ Gmsh.yy${OBJEXT}: Gmsh.yy.cpp ../Common/GmshMessage.h ../Geo/Geo.h \ ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \ ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \ ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \ - Gmsh.tab.hpp + ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Common/TreeUtils.h \ + ../Common/avl.h ../Common/ListUtils.h ../Geo/SPoint2.h \ + ../Geo/ExtrudeParams.h ../Common/SmoothData.h Gmsh.tab.hpp FunctionManager${OBJEXT}: FunctionManager.cpp FunctionManager.h diff --git a/Plugin/Makefile b/Plugin/Makefile index 7c6019118b7c6c0df9036d4e7c2991d2e6a38cdb..185d0d4a1beb8ef62e528b385ef7cc8236337a71 100644 --- a/Plugin/Makefile +++ b/Plugin/Makefile @@ -83,7 +83,8 @@ Levelset${OBJEXT}: Levelset.cpp Levelset.h Plugin.h ../Common/Options.h \ ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ ../Common/ListUtils.h MakeSimplex.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Post/adaptiveData.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Post/adaptiveData.h CutPlane${OBJEXT}: CutPlane.cpp ../Graphics/drawContext.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Fltk/Draw.h CutPlane.h \ Levelset.h Plugin.h ../Common/Options.h ../Post/ColorTable.h \ @@ -118,18 +119,21 @@ Lambda2${OBJEXT}: Lambda2.cpp Lambda2.h Plugin.h ../Common/Options.h \ ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/ListUtils.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h + ../Common/ListUtils.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h Eigenvectors${OBJEXT}: Eigenvectors.cpp Eigenvectors.h Plugin.h \ ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \ ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Numeric/EigSolve.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Numeric/EigSolve.h Eigenvalues${OBJEXT}: Eigenvalues.cpp Eigenvalues.h Plugin.h ../Common/Options.h \ ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/ListUtils.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h + ../Common/ListUtils.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h StreamLines${OBJEXT}: StreamLines.cpp ../Graphics/drawContext.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Fltk/Draw.h StreamLines.h \ Plugin.h ../Common/Options.h ../Post/ColorTable.h \ @@ -175,13 +179,13 @@ Warp${OBJEXT}: Warp.cpp Warp.h Plugin.h ../Common/Options.h ../Post/ColorTable.h ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \ ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/ListUtils.h \ ../Common/SmoothData.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h SphericalRaise${OBJEXT}: SphericalRaise.cpp SphericalRaise.h Plugin.h \ ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \ ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h Skin${OBJEXT}: Skin.cpp Skin.h Plugin.h ../Common/Options.h ../Post/ColorTable.h \ ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \ ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \ @@ -211,7 +215,7 @@ ExtractElements${OBJEXT}: ExtractElements.cpp ExtractElements.h Plugin.h \ ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h ExtractEdges${OBJEXT}: ExtractEdges.cpp ExtractEdges.h Plugin.h \ ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \ ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ @@ -245,26 +249,26 @@ Integrate${OBJEXT}: Integrate.cpp Integrate.h Plugin.h ../Common/Options.h \ ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ ../Common/ListUtils.h ../Post/shapeFunctions.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Post/PViewOptions.h \ - ../Post/ColorTable.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Post/PViewOptions.h ../Post/ColorTable.h Gradient${OBJEXT}: Gradient.cpp Gradient.h Plugin.h ../Common/Options.h \ ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ ../Common/ListUtils.h ../Post/shapeFunctions.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h Curl${OBJEXT}: Curl.cpp Curl.h Plugin.h ../Common/Options.h ../Post/ColorTable.h \ ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \ ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \ ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/ListUtils.h \ ../Post/shapeFunctions.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h Divergence${OBJEXT}: Divergence.cpp Divergence.h Plugin.h ../Common/Options.h \ ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ ../Common/ListUtils.h ../Post/shapeFunctions.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h Annotate${OBJEXT}: Annotate.cpp ../Graphics/drawContext.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Fltk/Draw.h ../Fltk/GUI.h \ Annotate.h Plugin.h ../Common/Options.h ../Post/ColorTable.h \ diff --git a/Post/Makefile b/Post/Makefile index 6ebb0b725b75f35be094ae288ed4d7a27aa62dbc..62a448177bfa245fc02a0532141cfafc4f2919f8 100644 --- a/Post/Makefile +++ b/Post/Makefile @@ -75,20 +75,23 @@ PViewIO${OBJEXT}: PViewIO.cpp PView.h ../Geo/SPoint3.h PViewDataList.h \ PViewData${OBJEXT}: PViewData.cpp PViewData.h ../Geo/SBoundingBox3d.h \ ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/GmshMessage.h \ ../Common/ListUtils.h adaptiveData.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h PViewDataIO${OBJEXT}: PViewDataIO.cpp ../Common/GmshMessage.h \ - ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h + ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h PViewData.h ../Geo/SBoundingBox3d.h \ + ../Geo/SPoint3.h PViewDataList${OBJEXT}: PViewDataList.cpp PViewDataList.h PViewData.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ ../Common/GmshMessage.h ../Common/ListUtils.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Common/SmoothData.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/SmoothData.h ../Common/Context.h ../Geo/CGNSOptions.h \ + ../Mesh/PartitionOptions.h PViewDataListIO${OBJEXT}: PViewDataListIO.cpp PViewDataList.h PViewData.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ ../Common/GmshMessage.h ../Common/ListUtils.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/PartitionOptions.h adaptiveData.h + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \ + ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h \ + adaptiveData.h PViewDataGModel${OBJEXT}: PViewDataGModel.cpp PViewDataGModel.h PViewData.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ ../Common/GmshMessage.h ../Geo/GModel.h ../Geo/GVertex.h \ @@ -103,7 +106,8 @@ PViewDataGModel${OBJEXT}: PViewDataGModel.cpp PViewDataGModel.h PViewData.h \ ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h + ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h PViewDataGModelIO${OBJEXT}: PViewDataGModelIO.cpp ../Common/GmshMessage.h \ PViewDataGModel.h PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ ../Numeric/GmshMatrix.h ../Geo/GModel.h ../Geo/GVertex.h \ @@ -119,7 +123,7 @@ PViewDataGModelIO${OBJEXT}: PViewDataGModelIO.cpp ../Common/GmshMessage.h \ ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \ ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ ../Numeric/Gauss.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ - ../Common/StringUtils.h + ../Numeric/GmshMatrix.h ../Common/StringUtils.h PViewOptions${OBJEXT}: PViewOptions.cpp PViewOptions.h ColorTable.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshMessage.h adaptiveData${OBJEXT}: adaptiveData.cpp adaptiveData.h ../Numeric/GmshMatrix.h \ @@ -139,11 +143,12 @@ OctreePost${OBJEXT}: OctreePost.cpp ../Common/Octree.h \ ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Numeric/Numeric.h \ - ../Numeric/NumericEmbedded.h shapeFunctions.h ../Geo/MElement.h \ - ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \ - ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ + ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h shapeFunctions.h \ + ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ + ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ + ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ColorTable${OBJEXT}: ColorTable.cpp ../Common/GmshMessage.h ColorTable.h \ ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/PartitionOptions.h \ - ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h + ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \ + ../Numeric/GmshMatrix.h diff --git a/configure b/configure index 7735f0be9b289ccaa119cb2429a3ad659fc2674b..56483029459aef3a4ec9320f74440ec6448a83af 100755 --- a/configure +++ b/configure @@ -1290,6 +1290,7 @@ Optional Features: --enable-native-file-chooser enable native file chooser (default=yes, except on Linux) + --enable-tree-browser enable tree browser (default=yes) --enable-mpi enable MPI support (default=no) --enable-minimal build minimal standalone version (default=no) @@ -1968,6 +1969,11 @@ if test "${enable_native_file_chooser+set}" = set; then enableval=$enable_native_file_chooser; fi +# Check whether --enable-tree-browser was given. +if test "${enable_tree_browser+set}" = set; then + enableval=$enable_tree_browser; +fi + # Check whether --enable-mpi was given. if test "${enable_mpi+set}" = set; then enableval=$enable_mpi; @@ -3899,6 +3905,35 @@ fi fi fi + if test "x$enable_tree_browser" != "xno"; then + { echo "$as_me:$LINENO: checking for ./contrib/TreeBrowser/Flu_Tree_Browser.cpp" >&5 +echo $ECHO_N "checking for ./contrib/TreeBrowser/Flu_Tree_Browser.cpp... $ECHO_C" >&6; } +if test "${ac_cv_file___contrib_TreeBrowser_Flu_Tree_Browser_cpp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "./contrib/TreeBrowser/Flu_Tree_Browser.cpp"; then + ac_cv_file___contrib_TreeBrowser_Flu_Tree_Browser_cpp=yes +else + ac_cv_file___contrib_TreeBrowser_Flu_Tree_Browser_cpp=no +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_file___contrib_TreeBrowser_Flu_Tree_Browser_cpp" >&5 +echo "${ECHO_T}$ac_cv_file___contrib_TreeBrowser_Flu_Tree_Browser_cpp" >&6; } +if test $ac_cv_file___contrib_TreeBrowser_Flu_Tree_Browser_cpp = yes; then + TREEBROWSER="yes" +fi + + if test "x${TREEBROWSER}" = "xyes"; then + GMSH_DIRS="${GMSH_DIRS} contrib/TreeBrowser" + GMSH_LIBS="${GMSH_LIBS} -lGmshTreeBrowser" + FLAGS="-DHAVE_TREE_BROWSER ${FLAGS}" + fi + fi + if test "x${OSMESA}" = "xyes"; then GMSH_LIBS="${GMSH_LIBS} `$FLTKCONFIG --use-images --ldflags` -lfltk_gl" FLAGS="${FLAGS} -DHAVE_OSMESA `$FLTKCONFIG --use-images --cxxflags`" @@ -5414,9 +5449,6 @@ fi fi if test "x${CBLAS}" = "xyes"; then - if test "x${BLAS_LAPACK_PREFIX}" != "x"; then - BLAS_PATH="-L${BLAS_LAPACK_PREFIX} -L${BLAS_LAPACK_PREFIX}/lib" - fi FLAGS="${FLAGS} -DHAVE_CBLAS" else if test "x${GSL}" = "xyes"; then @@ -5968,7 +6000,11 @@ fi fi if test "x${BLAS_LIBS}" != "x"; then - GMSH_LIBS="${GMSH_LIBS} ${BLAS_PATH} ${BLAS_LIBS}" + if test "x${BLAS_LAPACK_PREFIX}" != "x"; then + GMSH_LIBS="${GMSH_LIBS} -L${BLAS_LAPACK_PREFIX} -L${BLAS_LAPACK_PREFIX}/lib ${BLAS_LIBS}" + else + GMSH_LIBS="${GMSH_LIBS} ${BLAS_LIBS}" + fi fi if test "x$enable_mpi" = "xyes"; then diff --git a/configure.in b/configure.in index 8e7e30ffe543b9424ba219b6a342c609946b39af..5ad601a895b420e1eaca6a56903ea031eac94111 100644 --- a/configure.in +++ b/configure.in @@ -143,6 +143,9 @@ AC_ARG_ENABLE(universal, AC_ARG_ENABLE(native-file-chooser, AC_HELP_STRING([--enable-native-file-chooser], [enable native file chooser (default=yes, except on Linux)])) +AC_ARG_ENABLE(tree-browser, + AC_HELP_STRING([--enable-tree-browser], + [enable tree browser (default=yes)])) AC_ARG_ENABLE(mpi, AC_HELP_STRING([--enable-mpi], [enable MPI support (default=no)])) @@ -270,6 +273,16 @@ if test "x$enable_gui" != "xno"; then fi fi + dnl Check for tree browser widget + if test "x$enable_tree_browser" != "xno"; then + AC_CHECK_FILE(./contrib/TreeBrowser/Flu_Tree_Browser.cpp,TREEBROWSER="yes") + if test "x${TREEBROWSER}" = "xyes"; then + GMSH_DIRS="${GMSH_DIRS} contrib/TreeBrowser" + GMSH_LIBS="${GMSH_LIBS} -lGmshTreeBrowser" + FLAGS="-DHAVE_TREE_BROWSER ${FLAGS}" + fi + fi + if test "x${OSMESA}" = "xyes"; then GMSH_LIBS="${GMSH_LIBS} `$FLTKCONFIG --use-images --ldflags` -lfltk_gl" FLAGS="${FLAGS} -DHAVE_OSMESA `$FLTKCONFIG --use-images --cxxflags`" @@ -706,9 +719,6 @@ if test "x${CBLAS}" != "xyes"; then AC_CHECK_LIB(cblas,cblas_dgemm,CBLAS="yes" BLAS_LIBS="-lcblas -latlas",[],-latlas) fi if test "x${CBLAS}" = "xyes"; then - if test "x${BLAS_LAPACK_PREFIX}" != "x"; then - BLAS_PATH="-L${BLAS_LAPACK_PREFIX} -L${BLAS_LAPACK_PREFIX}/lib" - fi FLAGS="${FLAGS} -DHAVE_CBLAS" else if test "x${GSL}" = "xyes"; then @@ -751,7 +761,11 @@ if test "x${FM}" = "xyes" -o "x${GSL}" != "xyes"; then fi if test "x${BLAS_LIBS}" != "x"; then - GMSH_LIBS="${GMSH_LIBS} ${BLAS_PATH} ${BLAS_LIBS}" + if test "x${BLAS_LAPACK_PREFIX}" != "x"; then + GMSH_LIBS="${GMSH_LIBS} -L${BLAS_LAPACK_PREFIX} -L${BLAS_LAPACK_PREFIX}/lib ${BLAS_LIBS}" + else + GMSH_LIBS="${GMSH_LIBS} ${BLAS_LIBS}" + fi fi dnl Check for MPI diff --git a/contrib/TreeBrowser/Flu_Tree_Browser.cpp b/contrib/TreeBrowser/Flu_Tree_Browser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..21dbe7f4ee0b7f7ff3787c0873298729df3f3e3a --- /dev/null +++ b/contrib/TreeBrowser/Flu_Tree_Browser.cpp @@ -0,0 +1,3474 @@ +// This is a (fairly heavily) modified version of Jason Bryan's +// Flu_Tree_Browser, for inclusion in Gmsh. +// +// The following changes have been made: +// +// * Removed drag-and-drop code +// * Added pixmaps in the .cpp file +// * Removed IntStack (replaced by std::vector) +// * Removed FluSimpleString (replaced by std::string) +// * Removed animation code +// * Removed the "find" pass when adding a new node (cf. "CG") +// to improve speed (WARNING: this fundamentally changes the +// way the tree works: calling add("/a/b") followed by add("/a/c") +// will create two "a" branches. This is the desired behaviour +// for Gmsh; probably not for you) +// + +/*************************************************************** + * FLU - FLTK Utility Widgets + * Copyright (C) 2002 Ohio Supercomputer Center, Ohio State University + * + * This file and its content is protected by a software license. + * You should have received a copy of this license with this file. + * If not, please contact the Ohio Supercomputer Center immediately: + * Attn: Jason Bryan Re: FLU 1224 Kinnear Rd, Columbus, Ohio 43212 + * + ***************************************************************/ + +#include <math.h> +#include <FL/fl_draw.H> +#include "Flu_Tree_Browser.h" + +static char * plus_xpm[] = { +"15 15 4 1", +" c None", +". c #444444", +"+ c #FFFFFF", +"@ c #000000", +" ", +" ", +" ........... ", +" .+++++++++. ", +" .++++@++++. ", +" .++++@++++. ", +" .++++@++++. ", +" .+@@@@@@@+. ", +" .++++@++++. ", +" .++++@++++. ", +" .++++@++++. ", +" .+++++++++. ", +" ........... ", +" ", +" "}; + +static char * minus_xpm[] = { +"15 15 4 1", +" c None", +". c #444444", +"+ c #FFFFFF", +"@ c #000000", +" ", +" ", +" ........... ", +" .+++++++++. ", +" .+++++++++. ", +" .+++++++++. ", +" .+++++++++. ", +" .+@@@@@@@+. ", +" .+++++++++. ", +" .+++++++++. ", +" .+++++++++. ", +" .+++++++++. ", +" ........... ", +" ", +" "}; + +static char * folder_closed_xpm[] = { +"20 16 44 1", +" c None", +". c #A68A5E", +"+ c #54452F", +"@ c #FEE89E", +"# c #FEE59B", +"$ c #FEE298", +"% c #FEDE95", +"& c #FEDB93", +"* c #CEAB75", +"= c #FEF6A9", +"- c #FEF2A7", +"; c #FEEFA4", +"> c #FEECA1", +", c #FEE99E", +"' c #FEE69C", +") c #FEE399", +"! c #FEDF96", +"~ c #FEDC93", +"{ c #FED991", +"] c #FED68E", +"^ c #FEF3A7", +"/ c #FEF0A4", +"( c #FEEDA2", +"_ c #FEE99F", +": c #FEE097", +"< c #FEDD94", +"[ c #FEDA91", +"} c #FED78E", +"| c #FEF0A5", +"1 c #FEEA9F", +"2 c #FEE79D", +"3 c #FEE49A", +"4 c #FEE197", +"5 c #FEDA92", +"6 c #FED78F", +"7 c #FEEEA3", +"8 c #FEEAA0", +"9 c #FEE198", +"0 c #FEDB92", +"a c #FED88F", +"b c #FEEBA0", +"c c #FED890", +"d c #FEE299", +"e c #FED990", +" ", +" .....+ ", +" .@#$%&.+ ", +" ......*******. ", +" .=-;>,')!~{]].+ ", +" .^/(_'):<[}]].+ ", +" .|(1234<56]]].+ ", +" .78239%0a]]]].+ ", +" .b@#$%&c]]]]].+ ", +" .@#d!~e]]]]]].+ ", +" .')!~{]]]]]]].+ ", +" .):<[}]]]]]]].+ ", +" ..............+ ", +" ++++++++++++++ ", +" ", +" "}; + +static char * folder_open_xpm[] = { +"20 16 34 1", +" c None", +". c #A68A5E", +"+ c #FEF3A7", +"@ c #FEECA1", +"# c #FEE49A", +"$ c #FEDD94", +"% c #FED68E", +"& c #FEF6A9", +"* c #FEEEA3", +"= c #FEE79D", +"- c #FEDF96", +"; c #FED890", +"> c #FEF1A5", +", c #FEE99F", +"' c #FEE298", +") c #FEDA92", +"! c #FEF0A5", +"~ c #FEEBA1", +"{ c #FEE69C", +"] c #FEE198", +"^ c #FEDC93", +"/ c #FED78F", +"( c #54452F", +"_ c #FEF2A6", +": c #FEEDA2", +"< c #FEE299", +"[ c #FEE99E", +"} c #FEDE95", +"| c #FED991", +"1 c #FEEFA4", +"2 c #FEEA9F", +"3 c #FEE59B", +"4 c #FEE096", +"5 c #FEDB92", +" ", +" ..... ", +" .+@#$%. ", +" ......&*=-;%%. ", +" .&&&&&>,')%%%. ", +" .&&&&+@#$%%%%. ", +" .&&............ ", +" .&&.&!~{]^/%%%.( ", +" .&&._:=<$;%%%%.( ", +" .&.+*[#}|%%%%.( ", +" .&.12345%%%%%.( ", +" .!~{]^/%%%%.( ", +" ............( ", +" (((((((((((( ", +" ", +" "}; + +#define MAX( x, y ) ( (x)>(y) ? (x) : (y) ) +#define MIN( x, y ) ( (x)<(y) ? (x) : (y) ) + +bool Flu_Tree_Browser::USE_FLU_WIDGET_CALLBACK = false; + +Flu_Tree_Browser :: NodeList :: NodeList() +{ + _nodes = NULL; + _nNodes = _size = 0; +} + +Flu_Tree_Browser :: NodeList :: ~NodeList() +{ + clear(); +} + +typedef Flu_Tree_Browser::Node* NodeP; + +bool Flu_Tree_Browser :: NodeList :: search( const char *n, int &index ) +{ + index = _nNodes; + if( _nNodes == 0 ) + return false; + + // we know we have at least one node. so use it to get the RData struct to find out what + // the insertion mode is + int iMode = _nodes[0]->tree->insertion_mode(); + + if( iMode == FLU_INSERT_SORTED || iMode == FLU_INSERT_SORTED_REVERSE ) + return( binSearch( n, index ) ); + else + return( linSearch( n, index ) ); +} + +bool Flu_Tree_Browser :: NodeList :: search( Node *n, int &index ) +{ + index = _nNodes; + if( _nNodes == 0 ) + return false; + + // we know we have at least one node. so use it to get the RData struct to find out what + // the insertion mode is + int iMode = _nodes[0]->tree->insertion_mode(); + + if( iMode == FLU_INSERT_SORTED || iMode == FLU_INSERT_SORTED_REVERSE ) + return( binSearch( n, index ) ); + else + return( linSearch( n, index ) ); +} + +bool Flu_Tree_Browser :: NodeList :: linSearch( const char *n, int &index ) +{ + index = _nNodes; + for( int i = 0; i < _nNodes; i++ ) + { + if( strcmp( n, _nodes[i]->label() ) == 0 ) + { + index = i; + return true; + } + } + return false; +} + +bool Flu_Tree_Browser :: NodeList :: linSearch( Node *n, int &index ) +{ + index = _nNodes; + for( int i = 0; i < _nNodes; i++ ) + { + if( n == _nodes[i] ) + { + index = i; + return true; + } + } + return false; +} + +bool Flu_Tree_Browser :: NodeList :: binSearch( Node *n, int &index ) +{ + if( binSearch( n->label(), index ) ) + { + // the search found the first node with the label. since there are identical entries + // allowed, it may not be the actual node we want. therefore search forward until we find it + for( ; index < _nNodes; index++ ) + if( _nodes[index] == n ) + return true; + return false; + } + else + return false; +} + +bool Flu_Tree_Browser :: NodeList :: binSearch( const char *n, int &index ) +{ + // do a binary search for a child with name == "n" + // return true if the child is found, and store its index in "index" + // return false if the child is not found, and store the index it would + // be in in "index" + + // special case: no nodes + if( _nNodes == 0 ) + { + index = 0; + return false; + } + + // we know we have at least one node. so use it to get the RData struct to find out what + // the insertion mode is + int iMode = _nodes[0]->tree->insertion_mode(); + + // special case: 1 node + if( _nNodes == 1 ) + { + int val = strcmp( n, _nodes[0]->label() ); + if( iMode == FLU_INSERT_SORTED_REVERSE ) + val *= -1; + if( val == 0 ) + { + index = 0; + return true; + } + else if( val < 0 ) + index = 0; + else + index = 1; + return false; + } + + int first = 0, last = _nNodes - 1; + int val1, val2, mVal; + for(;;) + { + // the range is down to 2 nodes + if( last == first + 1 ) + { + val1 = strcmp( n, _nodes[first]->label() ); + if( iMode == FLU_INSERT_SORTED_REVERSE ) + val1 = -val1; + if( val1 < 0 ) + { + index = first; + return false; + } + else if( val1 == 0 ) + { + index = first; + break; + } + val2 = strcmp( n, _nodes[last]->label() ); + if( iMode == FLU_INSERT_SORTED_REVERSE ) + val2 = -val2; + if( val2 < 0 ) + { + index = last; + return false; + } + else if( val2 == 0 ) + { + index = last; + break; + } + else + { + index = last+1; + return false; + } + } + + // pick which half of the array to search next + int midpoint = first + ((last-first)>>1); + mVal = strcmp( n, _nodes[midpoint]->label() ); + if( iMode == FLU_INSERT_SORTED_REVERSE ) + mVal = -mVal; + if( mVal < 0 ) + last = midpoint; + else if( mVal > 0 ) + first = midpoint; + else + { + index = midpoint; + break; + } + } + + // we found *a* node equal to "n", now find the first node equal to "n" + // by searching until we hit a node not equal to "n" + for( first = index; first > 0; first-- ) + if( strcmp( n, _nodes[first-1]->label() ) != 0 ) + break; + index = first; + + return true; +} + +int Flu_Tree_Browser :: NodeList :: compareNodes( const void *arg1, const void* arg2 ) +{ + Flu_Tree_Browser::Node *n1 = *((Flu_Tree_Browser::Node**)arg1), *n2 = *((Flu_Tree_Browser::Node**)arg2); + return strcmp( n1->text.c_str(), n2->text.c_str() ); +} + +int Flu_Tree_Browser :: NodeList :: reverseCompareNodes( const void *arg1, const void* arg2 ) +{ + Flu_Tree_Browser::Node *n1 = *((Flu_Tree_Browser::Node**)arg1), *n2 = *((Flu_Tree_Browser::Node**)arg2); + return( -strcmp( n1->text.c_str(), n2->text.c_str() ) ); +} + +void Flu_Tree_Browser :: NodeList :: sort() +{ + if( _nNodes ) + { + // we know we have at least one node. so use it to get the RData struct to find out what + // the insertion mode is + int iMode = _nodes[0]->tree->insertion_mode(); + if( iMode == FLU_INSERT_SORTED ) + qsort( _nodes, _nNodes, sizeof(Node*), compareNodes ); + else if( iMode == FLU_INSERT_SORTED_REVERSE ) + qsort( _nodes, _nNodes, sizeof(Node*), reverseCompareNodes ); + } +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: insert( const char* fullpath, int pos ) +{ + // insert the new node at the back of the tree + int imode = tree->insertion_mode(); + tree->insertion_mode( FLU_INSERT_BACK ); + Node *n = add( fullpath ); + tree->insertion_mode( imode ); + if( !n ) return NULL; + // find the node at position "pos" and + // move the new node before it, so it takes over position "pos" + if( pos < 0 ) pos = 0; + if( pos >= children() ) pos = children()-1; + move( n, MOVE_BEFORE, child(pos) ); + return n; +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: insert_branch( const char* fullpath, int pos ) +{ + std::string p( fullpath ); + if( p.size() && p[p.size()-1] != '/' && p[p.size()-1] != '\\' ) p += "/"; + return insert( p.c_str(), pos ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: insert_leaf( const char* fullpath, int pos ) +{ + std::string p( fullpath ); + if( p.size() && ( p[p.size()-1] == '/' || p[p.size()-1] == '\\' ) ) p[p.size()-1] = '\0'; + return insert( p.c_str(), pos ); +} + +bool Flu_Tree_Browser :: Node :: move( int pos ) +{ + // get this node's position + int i = index(); + if( i == -1 ) return false; + // get the node in our parent at index "pos" + if( !parent() ) return false; + if( pos < 0 ) pos = 0; + if( pos >= parent()->children() ) pos = parent()->children()-1; + Node *n = parent()->child( pos ); + // move this node to be before its sibling, so it takes over position "pos" + return move( this, MOVE_BEFORE, n ); +} + +bool Flu_Tree_Browser :: Node :: swap( Node* n1, Node* n2 ) +{ + if( n1->tree != n2->tree ) return false; + Node *p1 = n1->parent(), *p2 = n2->parent(); + if( !p1 || !p2 ) return false; + int i, index1 = -1, index2 = -1; + for( i = 0; i < p1->children(); i++ ) + { + if( p1->child(i) == n1 ) + { + index1 = i; + break; + } + } + if( index1 == -1 ) return false; + for( i = 0; i < p2->children(); i++ ) + { + if( p2->child(i) == n2 ) + { + index2 = i; + break; + } + } + if( index2 == -1 ) return false; + p1->_children._nodes[index1] = n2; + p2->_children._nodes[index2] = n1; + return true; +} + +bool Flu_Tree_Browser :: Node :: move( Node* n1, int where, Node* n2 ) +{ + if( isMoveValid( n1, where, n2 ) ) + return( NodeList::move( n1, where, n2 ) ); + else + return false; +} + +void Flu_Tree_Browser :: Node :: sort() +{ + _children.sort(); + for( int i = 0; i < _children.size(); i++ ) + _children.child(i)->sort(); +} + +bool Flu_Tree_Browser :: Node :: is_ancestor( Node* n ) +{ + Node *p = parent(); + while( p ) + { + if( p == n ) + return true; + else + p = p->parent(); + } + return false; +} + +bool Flu_Tree_Browser :: Node :: is_descendent( Node* n ) +{ + return n->is_ancestor( this ); +} + +bool Flu_Tree_Browser :: NodeList :: move( Node* n1, int where, Node* n2 ) +{ + if( !n1 || !n2 ) + return false; + + if( n1->tree ) + n1->tree->redraw(); + if( n2->tree ) + n2->tree->redraw(); + + // try to move n1 to the first child position of n2 + if( where == MOVE_INSIDE ) + { + if( !n2->is_branch() ) + return false; + // get the parent of n1 + Node* p1 = n1->parent(); + if( p1 ) + // remove n1 from its parent's list + p1->_children.erase( n1 ); + // insert into n2 + int iMode = n1->tree->insertion_mode(); + if( iMode == FLU_INSERT_SORTED || iMode == FLU_INSERT_SORTED_REVERSE ) + n2->_children.add( n1 ); + else + n2->_children.add( n1, 0 ); + // update the parent of n1 + n1->_parent = n2; + return true; + } + + // find the position of n2 in its parent's list + Node* p2 = n2->parent(); + if( !p2 ) + return false; + int index = 0, removed = -1; + if( p2->_children.search( n2, index ) ) + { + // get the parent of n1 + Node* p1 = n1->parent(); + if( p1 ) + // remove n1 from its parent's list. remember the position it was removed from + removed = p1->_children.erase( n1 ); + + // if n1 and n2 have the same parent, and if n1 came before the spot where + // n2 will be inserted, then our indexing is off by one because n1 has been removed + if( p1 == p2 && removed <= index ) + index--; + + if( where == MOVE_AFTER ) + index++; + + // insert n1 at the proper position + p2->_children.add( n1, index ); + + // update the parent of n1 + n1->_parent = p2; + } + + return true; +} + +void Flu_Tree_Browser :: NodeList :: add( Node* n, int position ) +{ + int i, index; + int mode = n->tree->insertion_mode(); + + // if the list is out of room, allocate a new one that's bigger + if( _nNodes == _size ) + { + int newSize = ( _size == 0 ) ? 1 : _size*2; // double the size of the old list (same behavior as STL vector) + // allocate the new list + Node** newNodes = new NodeP[ newSize ]; + // copy the old list to the new list + memcpy( newNodes, _nodes, _nNodes*sizeof(Node*) ); + // delete the old list and replace it with the new list + delete[] _nodes; + //n->tree->rdata.cbNode = NULL; + _nodes = newNodes; + _size = newSize; + } + + if( position >= 0 ) + { + if( position > _nNodes ) + index = _nNodes; + else + index = position; + } + else if( mode == FLU_INSERT_SORTED || mode == FLU_INSERT_SORTED_REVERSE ) + { + // search through the list until we find where to insert the node + binSearch( n->label(), index ); + } + else if( mode == FLU_INSERT_FRONT ) + { + index = 0; + } + else if( mode == FLU_INSERT_BACK ) + { + index = _nNodes; + } + else + return; + + // shift all entries from the new insertion point down one spot + // to make room for the new node + for( i = _nNodes - 1; i >= index; i-- ) + _nodes[i+1] = _nodes[i]; + + // add the new node + _nodes[index] = n; + + _nNodes++; +} + +int Flu_Tree_Browser :: NodeList :: erase( Node *n ) +{ + if( n == NULL ) + return -1; + + int index; + if( search( n, index ) ) + { + // move all the others down one spot to remove the node + for( int i = index; i < _nNodes-1; i++ ) + _nodes[i] = _nodes[i+1]; + _nNodes--; + + return index; + } + return -1; +} + +int Flu_Tree_Browser :: NodeList :: erase( const char* n ) +{ + if( _nNodes == 0 ) + return -1; + + int index; + if( search( n, index ) ) + { + // move all the others down one spot to remove the node + for( int i = index; i < _nNodes-1; i++ ) + _nodes[i] = _nodes[i+1]; + _nNodes--; + return index; + } + return -1; +} + +void Flu_Tree_Browser :: NodeList :: erase( int n ) +{ + // make sure n is in range + if( ( n < 0 ) || ( n >= _nNodes ) ) + return; + + // move all the others down one spot to remove the node + for( int i = n; i < _nNodes-1; i++ ) + _nodes[i] = _nodes[i+1]; + + _nNodes--; +} + +void Flu_Tree_Browser :: NodeList :: clear() +{ + if( _nodes ) + { + //if( _nNodes ) + //if( _nodes[0] ) + // _nodes[0]->tree->rdata.cbNode = NULL; + delete[] _nodes; + } + _nodes = NULL; + _nNodes = _size = 0; +} + +int Flu_Tree_Browser :: NodeList :: findNum( const char *n ) +{ + if( ( _nNodes == 0 ) || ( n == 0 ) ) + return 0; + + // see if there is a first node equal to "n" + int index, last; + if( !search( n, index ) ) + return 0; + + // now search forward until we hit a node not equal to "n" + for( last = index; last < _nNodes-1; last++ ) + if( strcmp( n, _nodes[last+1]->label() ) != 0 ) + break; + + return last - index + 1; +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: NodeList :: find( const char* n, int which ) +{ + if( ( _nNodes == 0 ) || ( n == 0 ) || ( which == 0 ) ) + return NULL; + + // see if there is a first node equal to "n" + int index, first; + if( !search( n, first ) ) + return NULL; + + // now search forward and try to find the which'th node named "n" + int total = 0; + for( index = first; index < _nNodes; index++ ) + { + if( strcmp( n, _nodes[index]->label() ) == 0 ) + { + total++; + if( total == which ) + break; + } + else + break; + } + if( total != which ) + return NULL; + + return _nodes[index]; +} + +#define SCROLL_SIZE 15 + +Flu_Tree_Browser :: Flu_Tree_Browser( int x, int y, int w, int h, const char *l ) + : Fl_Group( x, y, w, h ) +{ + // add some widgets + _box = new Fl_Group( x, y, w-SCROLL_SIZE, h-SCROLL_SIZE ); + _box->resizable( NULL ); + _box->end(); + //_box->set_output(); + scrollV = new Fl_Scrollbar( x+w-SCROLL_SIZE, y, SCROLL_SIZE, h-SCROLL_SIZE ); + scrollV->type( FL_VERTICAL ); + scrollV->callback( _scrollCB, this ); + scrollV->value( 0, 1, 0, 0 ); + scrollH = new Fl_Scrollbar( x, y+h-SCROLL_SIZE, w-SCROLL_SIZE, SCROLL_SIZE ); + scrollH->type( FL_HORIZONTAL ); + scrollH->callback( _scrollCB, this ); + scrollH->value( 0, 1, 0, 0 ); + scrollBox = new Fl_Group( x+w-SCROLL_SIZE, y+h-SCROLL_SIZE, SCROLL_SIZE, SCROLL_SIZE ); + scrollBox->box( FL_UP_BOX ); + scrollBox->end(); + resizable( _box ); + + // set up the recursive data structure + memset( &rdata, 0, sizeof(rdata) ); + rdata.root = &root; + root.tree = this; + rdata.cbNode = NULL; + rdata.cbReason = FLU_NOTHING; + rdata.tree = this; + rdata.dragging = false; + rdata.forceResize = true; + rdata.shiftSelect = false; + rdata.shiftSelectAll = false; + rdata.nextId = 1; + rdata.searchIndex = 1; + rdata.defaultCollapseIcons[0] = new Fl_Pixmap( (char*const*)plus_xpm ); + rdata.defaultCollapseIcons[1] = new Fl_Pixmap( (char*const*)minus_xpm ); + rdata.defaultBranchIcons[0] = new Fl_Pixmap( (char*const*)folder_closed_xpm ); + rdata.defaultBranchIcons[1] = new Fl_Pixmap( (char*const*)folder_open_xpm ); + + end(); + + // set the default values for the tree + selection_follows_hilight( false ); + select_under_mouse( false ); + open_without_children( true ); + auto_branches( false ); + double_click_opens( true ); + move_only_same_group( false ); + allow_leaf_duplication( true ); + shaded_entry_colors( FL_WHITE, FL_WHITE ); + collapse_icons( NULL, NULL ); + //branch_icons( NULL, NULL ); + rdata.branchIcons[0] = rdata.defaultBranchIcons[0]; + rdata.branchIcons[1] = rdata.defaultBranchIcons[1]; + leaf_icon( NULL ); + branch_text( FL_BLACK, FL_HELVETICA_BOLD, 12 ); + leaf_text( FL_BLACK, FL_HELVETICA, 12 ); + //callback( NULL ); + when( FL_WHEN_CHANGED ); + color( FL_WHITE ); + selection_color( FL_SELECTION_COLOR ); + box( FL_FLAT_BOX ); + connector_style( FL_DARK2, FL_DOT ); + selection_mode( FLU_MULTI_SELECT ); + selection_drag_mode( FLU_DRAG_TO_SELECT ); + insertion_mode( FLU_INSERT_SORTED ); + show_connectors( true ); + show_root( true ); + show_leaves( true ); + show_branches( true ); + open_on_select( false ); + //root_always_open( false ); + horizontal_gap( 2 ); + vertical_gap( 0 ); + widget_gap( 2 ); + set_root( l ); + + resize( x, y, w, h ); +} + +Flu_Tree_Browser :: ~Flu_Tree_Browser() +{ + delete rdata.defaultCollapseIcons[0]; + delete rdata.defaultCollapseIcons[1]; + + delete rdata.defaultBranchIcons[0]; + delete rdata.defaultBranchIcons[1]; +} + +void Flu_Tree_Browser :: auto_branches( bool b ) +{ + rdata.autoBranches = b; +} + +void Flu_Tree_Browser :: collapse_icons( Fl_Image *closed, Fl_Image *open ) +{ + if( closed ) + rdata.collapseIcons[0] = closed; + else + rdata.collapseIcons[0] = rdata.defaultCollapseIcons[0]; + + if( open ) + rdata.collapseIcons[1] = open; + else + rdata.collapseIcons[1] = rdata.defaultCollapseIcons[1]; +} + +void Flu_Tree_Browser :: branch_icons( Fl_Image *closed, Fl_Image *open ) +{ + //if( closed ) + rdata.branchIcons[0] = closed; + //else + //rdata.branchIcons[0] = rdata.defaultBranchIcons[0]; + + //if( open ) + rdata.branchIcons[1] = open; + //else + //rdata.branchIcons[1] = rdata.defaultBranchIcons[1]; +} + +void Flu_Tree_Browser :: set_default_branch_icons() +{ + rdata.branchIcons[0] = rdata.defaultBranchIcons[0]; + rdata.branchIcons[1] = rdata.defaultBranchIcons[1]; +} + +void Flu_Tree_Browser :: leaf_icon( Fl_Image *icon ) +{ + rdata.leafIcon = icon; +} + +bool Flu_Tree_Browser :: inside_entry_area( int x, int y ) +{ + if( scrollH->visible() && scrollV->visible() ) + return( x > _box->x() && y > _box->y() && + x < (_box->x()+_box->w()-scrollV->w()) && + y < (_box->y()+_box->h()-scrollH->h()) ); + else if( !scrollH->visible() && !scrollV->visible() ) + return( x > _box->x() && y > _box->y() && + x < (_box->x()+_box->w()) && + y < (_box->y()+_box->h()) ); + else if( scrollH->visible() ) + return( x > _box->x() && y > _box->y() && + x < (_box->x()+_box->w()) && + y < (_box->y()+_box->h()-scrollH->h()) ); + else + return( x > _box->x() && y > _box->y() && + x < (_box->x()+_box->w()-scrollV->w()) && + y < (_box->y()+_box->h()) ); +} + +void Flu_Tree_Browser :: resize( int X, int Y, int W, int H ) +{ + Fl_Group::resize( X, Y, W, H ); + + int dx = Fl::box_dx(box()), dy = Fl::box_dy(box()), dw = Fl::box_dw(box()), dh = Fl::box_dh(box()); + + rdata.x = X+dx; rdata.y = Y+dy; rdata.totalW = rdata.x; + root.recurse( rdata, Node::MEASURE ); + rdata.totalW -= X-dx; + rdata.totalH = rdata.y - Y-dy; + + // if the size of the tree is bigger than the window, turn on the scrollbars + bool hOn = false, vOn = false; + if( rdata.totalW > W-dw ) + hOn = true; + if( rdata.totalH > H-dh ) + vOn = true; + + // check if turning on one scrollbar actually forces the other to turn on + if( hOn && ( rdata.totalH > H-SCROLL_SIZE ) ) + vOn = true; + if( vOn && ( rdata.totalW > W-SCROLL_SIZE ) ) + hOn = true; + + // now resize the other kids depending on the state of the scrollbars + + _box->resize( X, Y, W, H ); + if( hOn && vOn ) // both scrollbars on + { + scrollH->resize( X+dx, Y+H-SCROLL_SIZE-dy, W-SCROLL_SIZE-dw, SCROLL_SIZE ); + scrollH->show(); + scrollV->resize( X+W-SCROLL_SIZE-dx, Y+dy, SCROLL_SIZE, H-SCROLL_SIZE-dh ); + scrollV->show(); + scrollBox->resize( X+W-SCROLL_SIZE-dx, Y+H-SCROLL_SIZE-dy, SCROLL_SIZE, SCROLL_SIZE ); + scrollBox->show(); + + // set the scrollbar sizes and values + int hDelta = rdata.totalW - W+dw + SCROLL_SIZE, scrollHW = scrollH->w()-SCROLL_SIZE-SCROLL_SIZE; + hDelta = MAX( hDelta, 0 ); + scrollH->value( MIN( scrollH->value(), hDelta ), 1, 0, hDelta ); + scrollH->slider_size( MAX( (float)SCROLL_SIZE/float(scrollHW), float(scrollHW-hDelta)/float(scrollHW) ) ); + + int vDelta = rdata.totalH - H+dh + SCROLL_SIZE, scrollVH = scrollV->h()-SCROLL_SIZE-SCROLL_SIZE; + vDelta = MAX( vDelta, 0 ); + scrollV->value( MIN( scrollV->value(), vDelta ), 1, 0, vDelta ); + scrollV->slider_size( MAX( (float)SCROLL_SIZE/float(scrollVH), float(scrollVH-vDelta)/float(scrollVH) ) ); + _box->resize( X, Y, W-SCROLL_SIZE, H-SCROLL_SIZE ); + } + else if( !hOn && !vOn ) // neither on + { + scrollH->hide(); + scrollV->hide(); + scrollBox->hide(); + } + else if( hOn ) // just horizontal on + { + scrollH->resize( X+dx, Y+H-SCROLL_SIZE-dy, W-dw, SCROLL_SIZE ); + scrollH->show(); + scrollV->hide(); + scrollBox->hide(); + + // set the scrollbar size and value + int hDelta = rdata.totalW - W+dw, scrollHW = scrollH->w()-SCROLL_SIZE-SCROLL_SIZE; + hDelta = MAX( hDelta, 0 ); + scrollH->value( MIN( scrollH->value(), hDelta ), 1, 0, hDelta ); + scrollH->slider_size( MAX( (float)SCROLL_SIZE/float(scrollHW), float(scrollHW-hDelta)/float(scrollHW) ) ); + _box->resize( X, Y, W, H-SCROLL_SIZE ); + } + else if( vOn ) // just vertical on + { + scrollH->hide(); + scrollV->resize( X+W-SCROLL_SIZE-dx, Y+dy, SCROLL_SIZE, H-dh ); + scrollV->show(); + scrollBox->hide(); + + // set the scrollbar size and value + int vDelta = rdata.totalH - H+dh, scrollVH = scrollV->h()-SCROLL_SIZE-SCROLL_SIZE; + vDelta = MAX( vDelta, 0 ); + scrollV->value( MIN( scrollV->value(), vDelta ), 1, 0, vDelta ); + scrollV->slider_size( MAX( (float)SCROLL_SIZE/float(scrollVH), float(scrollVH-vDelta)/float(scrollVH) ) ); + _box->resize( X, Y, W-SCROLL_SIZE, H ); + } + + rdata.browserX = _box->x() + dx; + rdata.browserY = _box->y() + dy; + rdata.browserW = _box->w() - dw; + rdata.browserH = _box->h() - dh; + + redraw(); + + rdata.forceResize = true; // weird hack to get the scrollbars to turn on right the first time +} + +int Flu_Tree_Browser :: handle( int event ) +{ + if( event == FL_NO_EVENT )//|| event == FL_MOVE ) + return 0; + + if( event == FL_FOCUS )//&& rdata.lastHilighted ) + { + //set_hilighted( rdata.lastHilighted ); + //lastEvent = event; + //Fl_Group::handle( event ); + redraw(); + return 1; + } + + if( event == FL_UNFOCUS ) + { + //if( lastEvent != FL_LEAVE ) + //{ + //rdata.lastHilighted = rdata.hilighted; + //} + //set_hilighted( NULL ); + //lastEvent = event; + Fl_Group::handle( event ); + redraw(); + return 1; + } + + if( !rdata.dragging && !( event == FL_MOVE && rdata.selectUnderMouse ) ) + { + if( ! (event == FL_MOVE || event == FL_ENTER || event == FL_LEAVE ) ) + _box->redraw(); + + if( Fl_Group::handle( event ) ) + { + //if( event == FL_KEYDOWN || event == FL_KEYUP ) + // redraw(); + return 1; + } + //if (scrollV && Fl::event_inside(scrollV) && scrollV->handle(event)) return 1; + //if (scrollH && Fl::event_inside(scrollH) && scrollH->handle(event)) return 1; + } + + if( event == FL_RELEASE ) + { + //Fl::focus(this); + rdata.dragging = false; + rdata.grabbed = 0; + rdata.dragNode = 0; + //redraw(); + } + + int dx = Fl::box_dx(box()), dy = Fl::box_dy(box()); + + // set some initial values for the recursive data structure + // account for the scrollbar positions + rdata.x = x()+dx; rdata.y = y()+dy; + if( scrollH->visible() ) + rdata.x -= scrollH->value(); + if( scrollV->visible() ) + rdata.y -= scrollV->value(); + + rdata.previous = NULL; + rdata.delta = 0; + rdata.visibilityChanged = false; + + // catch cursor keys for moving the hilighted entry or selecting all entries + if( event == FL_KEYDOWN ) + { + // move hilighted entry up + if( Fl::event_key() == FL_Up ) + { + rdata.delta = -1; + Fl::focus(this); + redraw(); + } + + // move hilighted entry down + else if( Fl::event_key() == FL_Down ) + { + rdata.delta = 1; + Fl::focus(this); + redraw(); + } + + // select all + else if( Fl::event_state(FL_CTRL) && Fl::event_key() == 'a' ) + { + select_all(); + Fl::focus(this); + redraw(); + return 1; + } + + // check for the Home key + else if( Fl::event_key() == FL_Home ) + { + // set the hilighted entry to be the first entry + if( rdata.showRoot || ( rdata.root->_children.size() == 0 ) ) + set_hilighted( rdata.root ); + else if( rdata.root->_children.size() > 0 ) + set_hilighted( rdata.root->_children.child(0) ); + redraw(); + } + + // check for the End key + else if( Fl::event_key() == FL_End ) + { + // set the hilighted entry to be the last visible entry + if( rdata.showRoot && ( rdata.root->_children.size() == 0 ) ) + set_hilighted( rdata.root ); + else + { + // find the last node by repeatedly looking for the last child until there are no more branches + Node *n = &root; + while( n->_children.size() && n->open() ) + n = n->_children.child( n->_children.size()-1 ); + set_hilighted( n ); + } + redraw(); + } + } + + // pass the event down the tree + int val = root.recurse( rdata, Node::HANDLE, event ); + if( val ) + { + //redraw(); + if( rdata.visibilityChanged ) + root.determineVisibility(); + if( val == 1 ) + return 1; + } + // special case: if multi-select or single-select and user clicks on no items, unselect all items + else if( (rdata.selectionMode != FLU_NO_SELECT) && (event == FL_PUSH) && (!Fl::event_state(FL_CTRL)) ) + { + unselect_all(); + set_hilighted( NULL ); + rdata.forceResize = true; + redraw(); + + return 1; + } + + if( event == FL_SHOW || event == FL_HIDE ) + root.determineVisibility(); + + return Fl_Group::handle( event ); + //return 0; +} + +void Flu_Tree_Browser :: insertion_mode( int m ) +{ + rdata.insertionMode = m; + root.sort(); +} + +void Flu_Tree_Browser :: set_hilighted( Flu_Tree_Browser::Node* n ) +{ + if( rdata.hilighted == n && when() != FL_WHEN_NOT_CHANGED ) + return; + + if( rdata.hilighted ) + rdata.hilighted->do_callback( FLU_UNHILIGHTED ); + rdata.hilighted = n; + if( rdata.hilighted ) + rdata.hilighted->do_callback( FLU_HILIGHTED ); + + if( rdata.hilighted ) + { + if( rdata.selectionFollowsHilight ) + { + if( rdata.selectionMode == FLU_SINGLE_SELECT ) + unselect_all(); + rdata.hilighted->select( true ); + } + + int extraH = scrollH->visible() ? scrollH->h() : 0; + + // if the hilighted entry is below the visible bounds of the browser, move the vertical scrollbar + // so the hilighted entry is the last visible entry + if( rdata.hilighted->currentY-y()+rdata.hilighted->currentH > scrollV->value()+h()-extraH ) + ((Fl_Valuator*)scrollV)->value( rdata.hilighted->currentY-y() - h()+extraH + rdata.hilighted->currentH ); + + // if the hilighted entry is above the visible bounds of the browser, move the vertical scrollbar + // so the hilighted entry is the first visible entry + if( rdata.hilighted->currentY-y() < scrollV->value() ) + ((Fl_Valuator*)scrollV)->value( rdata.hilighted->currentY-y() ); + } + redraw(); +} + +int Flu_Tree_Browser :: num_selected() +{ + return root.recurse( rdata, Node::COUNT_SELECTED ); +} + +int Flu_Tree_Browser :: Node :: num_selected() +{ + return recurse( tree->rdata, COUNT_SELECTED ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: get_selected( int index ) +{ + return root.get_selected( index ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: get_selected( int index ) +{ + tree->rdata.counter = 0; + tree->rdata.searchIndex = index; + Node *n = modify( 0, GET_SELECTED, tree->rdata ); + tree->rdata.searchIndex = 1; + return n; +} + +Flu_Tree_Browser :: Node :: Node( const char *lbl ) +{ + flags = 0; + userData = 0; + _parent = 0; + _widget = 0; + _group = 0; + SET(ACTIVE); + CLEAR(LEAF); + _id = 0; + CLEAR(ALWAYS_OPEN); + SET(COLLAPSED); + SET(MOVABLE); + SET(DROPPABLE); + currentY = currentH = 0; + CLEAR(SELECTED); + CLEAR(EXPAND_TO_WIDTH); + SET(SHOW_LABEL); + if( lbl == 0 ) + text = ""; + else + text = lbl; + + cIcon[0] = cIcon[1] = bIcon[0] = bIcon[1] = lIcon = 0; +} + +Flu_Tree_Browser :: Node :: Node( bool l, const char* n, Node *p, RData &rdata, Fl_Widget *w, bool showLbl ) +{ + _group = 0; + flags = 0; + userData = 0; + SET(LEAF,l); + text = n; + _id = 0; + SET(ACTIVE); + _parent = p; + CLEAR(ALWAYS_OPEN); + SET(COLLAPSED); + CLEAR(SELECTED); + CLEAR(EXPAND_TO_WIDTH); + SET(MOVABLE); + SET(DROPPABLE); + _widget = 0; + currentY = currentH = 0; + cIcon[0] = cIcon[1] = bIcon[0] = bIcon[1] = lIcon = 0; + SET( SHOW_LABEL, showLbl ); + tree = rdata.tree; + + initType(); + + _id = rdata.nextId++; + widget( w ); +} + +void Flu_Tree_Browser :: Node :: initType() +{ + if( is_leaf() ) + { + lIcon = tree->rdata.leafIcon; + textColor = tree->rdata.defLeafColor; + textFont = tree->rdata.defLeafFont; + textSize = tree->rdata.defLeafSize; + } + else + { + cIcon[0] = tree->rdata.collapseIcons[0]; + cIcon[1] = tree->rdata.collapseIcons[1]; + bIcon[0] = tree->rdata.branchIcons[0]; + bIcon[1] = tree->rdata.branchIcons[1]; + textColor = tree->rdata.defBranchColor; + textFont = tree->rdata.defBranchFont; + textSize = tree->rdata.defBranchSize; + } +} + +Flu_Tree_Browser :: Node :: ~Node() +{ + // if this node is in a tree, make sure it isn't holding a reference to us + if( tree ) + { + if( tree->rdata.hilighted == this ) tree->rdata.hilighted = NULL; + //if( tree->rdata.lastHilighted == this ) tree->rdata.lastHilighted = NULL; + if( tree->rdata.grabbed == this ) tree->rdata.grabbed = NULL; + if( tree->rdata.dragNode == this ) tree->rdata.dragNode = NULL; + } + clear(); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: first() +{ + return this; +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: first_branch() +{ + Node *n = first(); + while( n ) + { + if( n->is_branch() ) + return n; + else + n = n->next(); + } + return NULL; +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: first_leaf() +{ + Node *n = first(); + while( n ) + { + if( n->is_leaf() ) + return n; + else + n = n->next(); + } + return NULL; +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: last() +{ + if( children() == 0 ) + return this; + else + return( child( children() - 1 )->last() ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: last_branch() +{ + Node *n = last(); + while( n ) + { + if( n->is_branch() ) + return n; + else + n = n->previous(); + } + return NULL; +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: last_leaf() +{ + Node *n = last(); + while( n ) + { + if( n->is_leaf() ) + return n; + else + n = n->previous(); + } + return NULL; +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: next_sibling() +{ + if( is_root() ) + return NULL; + int index; + for( index = 0; index < _parent->children(); index++ ) + if( _parent->child(index) == this ) + break; + // if we are the last child of our parent, then we have no next sibling + if( index == _parent->children()-1 ) + return NULL; + // otherwise return our next sibling + else + return( _parent->child(index+1) ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: previous_sibling() +{ + if( is_root() ) + return NULL; + int index; + for( index = 0; index < _parent->children(); index++ ) + if( _parent->child(index) == this ) + break; + // if we are the first child of our parent, then we have no previous sibling + if( index == 0 ) + return NULL; + // otherwise return our previous sibling + else + return( _parent->child(index-1) ); +} + +int Flu_Tree_Browser :: Node :: index() const +{ + if( is_root() ) + return -1; + int index; + for( index = 0; index < _parent->children(); index++ ) + if( _parent->child(index) == this ) + return index; + return -1; +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: next() +{ + // take care of the root node as a special case + if( is_root() ) + { + if( children() ) + return child(0); + else + return NULL; + } + + // if we are a branch, then the next node is our first child, unless we don't have any children + if( is_branch() && _children.size() ) + return _children.child(0); + else + { + // otherwise, the next node is our next sibling. if there is no next sibling (because we + // are the last child of our parent), then the next node is the next sibling of our parent (and so on...) + Node *p = parent(), *n = next_sibling(); + while( p ) + { + if( n ) + return n; + else + { + n = p->next_sibling(); + p = p->parent(); + } + } + return NULL; + } +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: next_branch() +{ + Node *n = next(); + while( n ) + { + if( n->is_branch() ) + return n; + else + n = n->next(); + } + return NULL; +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: next_leaf() +{ + Node *n = next(); + while( n ) + { + if( n->is_leaf() ) + return n; + else + n = n->next(); + } + return NULL; +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: previous() +{ + // take care of the root node as a special case + if( is_root() ) + return NULL; + + // the previous node is either our parent's + // previous sibling (if that sibling exists and is a leaf or a branch with no children), + // or the last child of our parent's previous sibling (if that sibling exists and is + // a branch with children). if there is no previous sibling, then the previous node + // is our parent + Node *n = previous_sibling(); + if( !n ) + return _parent; + else + { + if( n->is_leaf() ) // is leaf, so that is the previous node + return n; + else if( n->children() ) // is branch with some children, so previous node is last child + return( n->last() ); + else // is branch with no children, so that is the previous node + return n; + } +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: previous_branch() +{ + Node *n = previous(); + while( n ) + { + if( n->is_branch() ) + return n; + else + n = n->previous(); + } + return NULL; +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: previous_leaf() +{ + Node *n = previous(); + while( n ) + { + if( n->is_leaf() ) + return n; + else + n = n->previous(); + } + return NULL; +} + +void Flu_Tree_Browser :: Node :: determineVisibility( bool parentVisible ) +{ + if( _widget ) + { + if( parentVisible ) + _widget->w->show(); + else + _widget->w->hide(); + } + for( int i = 0; i < _children.size(); i++ ) + _children.child(i)->determineVisibility( parentVisible && open() ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: child( int i ) const +{ + if( i < 0 || i >= _children.size() ) + return 0; + else + return _children.child(i); +} + +void Flu_Tree_Browser :: Node :: clear() +{ + widget(NULL); + for( int i = 0; i < _children.size(); i++ ) + { + //if( tree->rdata.cbNode == _children.child(i) ) + //tree->rdata.cbNode = NULL; + delete _children.child(i); + } + _children.clear(); + if( _group ) + { + if( _group->parent() ) + _group->parent()->remove( *_group ); + while( _group->children() ) + _group->remove( *_group->child(0) ); + delete _group; + _group = NULL; + } +} + +void Flu_Tree_Browser :: Node :: print( int spaces ) +{ + for( int s = 0; s < spaces; s++ ) + printf( " " ); + if( is_leaf() ) + printf( " %s\n", text.c_str() ); + else + printf( "[%s]\n", text.c_str() ); + + for( int i = 0; i < _children.size(); i++ ) + _children.child(i)->print( spaces+2 ); +} + +void Flu_Tree_Browser :: draw() +{ + if( rdata.forceResize ) + { + resize( x(), y(), w(), h() ); + rdata.forceResize = false; + } + + // draw the background color + //fl_draw_box( _box->box(), _box->x(), _box->y(), _box->w(), _box->h(), _box->color() ); + fl_draw_box( box(), x(), y(), w(), h(), color() ); + + int dx = Fl::box_dx(box()), dy = Fl::box_dy(box()), + dw = Fl::box_dw(box()), dh = Fl::box_dh(box()); + + // set up the recursive data structure + rdata.x = x()+dx; rdata.y = y()+dy; + // account for the positions of the scrollbars + if( scrollH->visible() ) + rdata.x -= scrollH->value(); + if( scrollV->visible() ) + rdata.y -= scrollV->value(); + + rdata.last = true; + rdata.bgColor = _box->color(); + rdata.shadedIndex = 0; + + // pick the connector line and selection colors depending on the active state + if( active() ) + { + rdata.lineColor = rdata.defLineColor; + rdata.selectionColor = rdata.defSelectionColor; + } + else + { + rdata.lineColor = fl_inactive( rdata.defLineColor ); + rdata.selectionColor = fl_inactive( rdata.defSelectionColor ); + } + + // draw the tree + fl_push_clip( x()+dx, y()+dy, w()-dw, h()-dh ); + root.recurse( rdata, Node::DRAW ); + + fl_pop_clip(); + + // draw the kids + draw_child( *scrollBox ); + draw_child( *scrollH ); + draw_child( *scrollV ); + + // draw the box last so it's on top + //fl_draw_box( _box->box(), _box->x(), _box->y(), _box->w(), _box->h(), _box->color() ); +} + +inline void draw_T( int x, int y, int w, int h ) +{ + int w2 = w >> 1; + int h2 = h >> 1; + fl_line( x+w2, y, x+w2, y+h ); + fl_line( x+w2, y+h2, x+w, y+h2 ); +} + +inline void draw_L( int x, int y, int w, int h ) +{ + int w2 = w >> 1; + int h2 = h >> 1; + fl_line( x+w2, y, x+w2, y+h2 ); + fl_line( x+w2, y+h2, x+w, y+h2 ); +} + +inline void draw_Lflip( int x, int y, int w, int h ) +{ + int w2 = w >> 1; + int h2 = h >> 1; + fl_line( x+w2, y+h, x+w2, y+h2 ); + fl_line( x+w2, y+h2, x, y+h2 ); +} + +inline void draw_Lflop( int x, int y, int w, int h ) +{ + int w2 = w >> 1; + int h2 = h >> 1; + fl_line( x+w2, y+h, x+w2, y+h2 ); + fl_line( x+w2, y+h2, x+w, y+h2 ); +} + +inline void draw_Ldash( int x, int y, int w, int h ) +{ + w = w >> 1; + h = h >> 1; + fl_line( x, y+h, x+w, y+h ); +} + +inline void draw_vert_dash( int x, int y, int w, int h ) +{ + w = w >> 1; + fl_line( x+w, y+(h>>1), x+w, y+h ); +} + +inline void draw_Rdash( int x, int y, int w, int h ) +{ + h = h >> 1; + fl_line( x+w, y+h, x+(w>>1), y+h ); +} + +void Flu_Tree_Browser :: Node :: draw( RData &rdata, bool measure ) +{ + int which = open(); // i.e. which icon: open or closed? + bool skipCollapser = is_root() && rdata.showRoot && ( CHECK(ALWAYS_OPEN) || rdata.allBranchesAlwaysOpen ); + int halfHGap = rdata.hGap >> 1, halfVGap = rdata.vGap >> 1; + bool doDraw = !measure; + + int X = rdata.x; + int Y = rdata.y; + + Fl_Color bgColor = rdata.shadedColors[rdata.shadedIndex], tColor = textColor, hilightColor = rdata.selectionColor; + + // pick the text color depending on the active state + if( !rdata.tree->active() || !CHECK(ACTIVE)) + tColor = fl_inactive( tColor ); + + if( doDraw ) + { + // draw the background for the entry using the entry background color + fl_draw_box( FL_FLAT_BOX, rdata.browserX, Y, rdata.browserW, currentH, bgColor ); + + // if dragging to the inside of a branch, hilight that branch + if( CHECK(SELECTED) ) + { + bgColor = rdata.selectionColor; + tColor = fl_contrast( tColor, bgColor ); + hilightColor = rdata.bgColor; + fl_draw_box( FL_FLAT_BOX, rdata.browserX, Y, rdata.browserW, currentH, bgColor ); + } + + fl_color( rdata.lineColor ); + fl_line_style( rdata.lineStyle, rdata.lineWidth ); + } + + if( is_leaf() ) // draw leaves one way... + { + // draw the connectors + if( doDraw && rdata.showConnectors && rdata.showBranches ) + { + if( parent()->is_root() && !rdata.showRoot && rdata.first ) + { + if( rdata.last ) + draw_Rdash( X-halfHGap, Y-halfVGap, rdata.branchIconW+rdata.hGap, currentH+rdata.vGap ); + else + draw_Lflop( X-halfHGap, Y-halfVGap, rdata.branchIconW+rdata.hGap, currentH+rdata.vGap ); + } + else if( rdata.last ) + draw_L( X-halfHGap, Y-halfVGap, rdata.branchIconW+rdata.hGap, currentH+rdata.vGap ); + else + draw_T( X-halfHGap, Y-halfVGap, rdata.branchIconW+rdata.hGap, currentH+rdata.vGap ); + } + + // account for leaf icon spacing + if( rdata.showBranches ) + { + if( lIcon ) + X += rdata.collapseIcons[which]->w() + rdata.hGap; + else + X += rdata.collapseIcons[which]->w() + rdata.wGap; + } + else + X += rdata.wGap; + + // draw some more connectors + if( doDraw && rdata.showConnectors && lIcon && rdata.showBranches ) + draw_Ldash( X-halfHGap, Y-halfVGap, lIcon->w()+rdata.hGap, currentH+rdata.vGap ); + + // draw the leaf icon + if( lIcon && !CHECK(ICON_AT_END) ) + { + if( doDraw ) + lIcon->draw( X, Y+(currentH>>1)-(lIcon->h()>>1) ); + X += lIcon->w() + rdata.wGap; + } + } + else // ...and branches another + { + // force the root to the left if it has no visible children + if( is_root() && !CHECK(SOME_VISIBLE_CHILDREN) ) + { + skipCollapser = true; + which = 0; + } + + if( !CHECK(SOME_VISIBLE_CHILDREN) && !rdata.showLeaves ) + which = 0; + + // draw the connectors + if( doDraw && !skipCollapser && rdata.showConnectors && rdata.showBranches ) + { + if( is_root() ) + { + if( CHECK(SOME_VISIBLE_CHILDREN) ) + draw_Rdash( X-halfHGap, Y-halfVGap, rdata.collapseIcons[which]->w()+4+rdata.hGap, currentH+rdata.vGap ); + } + else if( parent()->is_root() && !rdata.showRoot && rdata.first ) + { + if( rdata.last ) + draw_Rdash( X-halfHGap, Y-halfVGap, rdata.branchIconW+rdata.hGap, currentH+rdata.vGap ); + else + draw_Lflop( X-halfHGap, Y-halfVGap, rdata.branchIconW+rdata.hGap, currentH+rdata.vGap ); + } + else if( rdata.last ) + draw_L( X-halfHGap, Y-halfVGap, rdata.branchIconW+rdata.hGap, currentH+rdata.vGap ); + else + draw_T( X-halfHGap, Y-halfVGap, rdata.branchIconW+rdata.hGap, currentH+rdata.vGap ); + } + + // draw the collapsed icons + if( doDraw && !skipCollapser && !CHECK(ALWAYS_OPEN) && !rdata.allBranchesAlwaysOpen ) + { + if( CHECK(SOME_VISIBLE_CHILDREN) || rdata.showLeaves ) + { + if( !rdata.openWOChildren && !CHECK(SOME_VISIBLE_CHILDREN) ) + which = 0; + if( rdata.openWOChildren || CHECK(SOME_VISIBLE_CHILDREN) ) + { + if( _parent==0 ) + cIcon[which]->draw( X, Y+(currentH>>1)-(cIcon[which]->h()>>1) ); + else + cIcon[which]->draw( X+(rdata.branchIconW>>1)-(cIcon[which]->w()>>1), Y+(currentH>>1)-(cIcon[which]->h()>>1) ); + } + } + } + + if( !skipCollapser ) + { + X += cIcon[which]->w(); + if( bIcon[which] ) + X += rdata.hGap; + else + X += rdata.wGap; + } + + // draw some more connectors + if( doDraw && rdata.showConnectors && rdata.showBranches ) + { + int hGap = rdata.hGap; + if( bIcon[which] ) + hGap += bIcon[which]->w(); + if( skipCollapser && CHECK(SOME_VISIBLE_CHILDREN) ) + draw_vert_dash( X-halfHGap, Y-halfVGap, hGap, currentH+rdata.vGap ); + else if( !which || !CHECK(SOME_VISIBLE_CHILDREN) ) + draw_Ldash( X-halfHGap, Y-halfVGap, hGap, currentH+rdata.vGap ); + else + draw_Lflip( X-halfHGap, Y-halfVGap, hGap, currentH+rdata.vGap ); + } + + // draw the branch icon + if( bIcon[which] ) + { + if( doDraw ) + bIcon[which]->draw( X, Y+(currentH>>1)-(bIcon[which]->h()>>1) ); + X += bIcon[which]->w() + rdata.wGap; + } + else + X += rdata.wGap; + } + + if( doDraw ) + fl_line_style( 0 ); + + // draw the entry + if( CHECK(SHOW_LABEL) && !CHECK(SWAP_LABEL_AND_WIDGET) ) + { + if( doDraw ) + { + fl_draw_box( FL_FLAT_BOX, X, Y+(currentH>>1)-(textH>>1), textW, textH, bgColor ); + fl_color( tColor ); + fl_font( textFont, textSize ); + fl_draw( text.c_str(), X, Y+(currentH>>1)-(textH>>1), textW, textH, FL_ALIGN_LEFT ); + } + X += textW; + } + + if( _widget ) + { + int widgetW = _widget->w->w(); + int widgetH = _widget->w->h(); + if( doDraw ) + { + if( CHECK(AUTO_COLOR) ) + _widget->w->color( bgColor ); + if( CHECK(AUTO_LABEL_COLOR) ) + _widget->w->labelcolor( tColor ); + if( CHECK(AUTO_LABEL) ) + _widget->w->label( text.c_str() ); + _widget->w->redraw(); + _widget->w->position( X, Y+(currentH>>1)-(widgetH>>1) ); + if( CHECK(EXPAND_TO_WIDTH) ) + _widget->w->size( MAX( _widget->defaultW, rdata.browserW - (X-rdata.browserX) ), _widget->w->h() ); + _widget->w->draw(); + } + if( CHECK(EXPAND_TO_WIDTH) ) + { + if( _widget->w->w() == _widget->defaultW ) + X += _widget->defaultW; + } + else + X += widgetW; + } + + if( CHECK(SHOW_LABEL) && CHECK(SWAP_LABEL_AND_WIDGET) ) + { + if( doDraw ) + { + fl_draw_box( FL_FLAT_BOX, X, Y+(currentH>>1)-(textH>>1), textW, textH, bgColor ); + fl_color( tColor ); + fl_font( textFont, textSize ); + fl_draw( text.c_str(), X, Y+(currentH>>1)-(textH>>1), textW, textH, FL_ALIGN_LEFT ); + } + X += textW; + } + + // draw the leaf icon to the right of the label and widget + if( is_leaf() && lIcon && CHECK(ICON_AT_END) ) + { + if( doDraw ) + lIcon->draw( X, Y+(currentH>>1)-(lIcon->h()>>1) ); + X += lIcon->w() + rdata.wGap; + } + + // if hilighted, draw a box outlining the entry + if( Fl::focus() == tree && rdata.hilighted == this && doDraw ) + { + fl_color( hilightColor ); + fl_line_style( FL_DOT, 1 ); + fl_rect( rdata.browserX, Y, rdata.browserW, currentH, hilightColor ); + fl_line_style( 0 ); + } + + rdata.totalW = MAX( rdata.totalW, X ); +} + +void Flu_Tree_Browser :: Node :: select( bool b ) +{ + if( (CHECK(SELECTED)==b) && (tree->when() != FL_WHEN_NOT_CHANGED) ) + return; + SET(SELECTED,b); + tree->redraw(); + if( tree->when() == FL_WHEN_RELEASE ) + return; + if( b ) + do_callback( FLU_SELECTED ); + else + do_callback( FLU_UNSELECTED ); +} + +void Flu_Tree_Browser :: Node :: open( bool b ) +{ + if( is_leaf() ) + return; + + if( CHECK(ALWAYS_OPEN) || tree->rdata.allBranchesAlwaysOpen ) + return; + + if( (open() == b) && (tree->when() != FL_WHEN_NOT_CHANGED) ) + return; + + tree->rdata.justOpenedClosed = true; + + SET(COLLAPSED,!b); + + if( open() && (_parent != 0) ) // root node doesn't count as a single open branch + { + if( ( tree->rdata.lastOpenBranch != this ) && tree->rdata.singleBranchOpen ) + tree->rdata.lastOpenBranch->close(); + tree->rdata.lastOpenBranch = this; + } + + tree->rdata.forceResize = true; + tree->rdata.visibilityChanged = true; + if( b ) + do_callback( FLU_OPENED ); + else + do_callback( FLU_CLOSED ); +} + +void Flu_Tree_Browser :: Node :: active( bool b ) +{ + if( CHECK(ACTIVE) == b && tree->when() != FL_WHEN_NOT_CHANGED ) + return; + SET( ACTIVE, b ); + if( _widget ) + { + if( b ) + _widget->w->activate(); + else + _widget->w->deactivate(); + } + if( !CHECK(ACTIVE) ) + { + if( tree->rdata.hilighted == this ) + tree->set_hilighted( NULL ); + select( false ); + open( false ); + } +} + +void Flu_Tree_Browser :: Node :: unselect_all( Node* except ) +{ + if( this != except ) + select( false ); + for( int i = 0; i < _children.size(); i++ ) + _children.child(i)->unselect_all( except ); +} + +void Flu_Tree_Browser :: Node :: select_all() +{ + select( true ); + for( int i = 0; i < _children.size(); i++ ) + _children.child(i)->select_all(); +} + +bool Flu_Tree_Browser :: Node :: isMoveValid( Node* &n1, int &where, Node* &n2 ) +{ + // if n1 is NULL, then check it as if it were a node being moved from another tree + + if( n2 == NULL ) + return false; + + // check the validity of the move: + // 1) the source and destination nodes can't be the same + // 2) you can't move before the root node + // 3) you can't move an unmovable node or move a branch node such that it would become a descendent of itself + // 4) if moving only within the same group, check that the parents are the same + // 5) if moving into a sorted tree, the destination node MUST be a branch + // 6) a move AFTER an OPEN branch is a move BEFORE its first child + // 7) you can't move a node into a non-droppable branch node + + if( n1 == n2 ) + return false; + + if( where==MOVE_BEFORE && n2->is_root() ) + return false; + + if( n1 ) + { + if( !n1->movable() ) + return false; + if( n1->is_branch() ) + if( n1->is_descendent( n2 ) ) + return false; + } + + bool sameGroup = n2->tree->move_only_same_group(); + if( sameGroup && n1 ) + { + if( n1->parent() != n2->parent() || where==MOVE_INSIDE ) + return false; + } + + int iMode = n2->tree->insertion_mode(); + if( iMode == FLU_INSERT_SORTED || iMode == FLU_INSERT_SORTED_REVERSE ) + { + if( n2->is_branch() ) + { + where = MOVE_INSIDE; + return true; + } + else + return false; + } + + if( where==MOVE_AFTER && n2->is_branch() && n2->open() ) + { + // can't move inside a branch if within the same group, unless the first node is dragged + // from outside the tree (in which case n1 is NULL) + if( sameGroup && n1 ) + { + if( n2->_children.size() > 0 ) + return false; + } + else if( n2->_children.size() > 0 ) + { + where = MOVE_BEFORE; + n2 = n2->_children.child(0); + } + else + where = MOVE_INSIDE; + } + + if( where==MOVE_INSIDE ) + { + if( !n2->droppable() ) + return false; + } + else if( n2->parent() ) + if( !n2->parent()->droppable() ) + return false; + + return true; +} + +int Flu_Tree_Browser :: Node :: recurse( RData &rdata, int type, int event ) +{ + int i; + + if( is_root() ) + rdata.first = true; + + if( type == COUNT_SELECTED ) + { + if( is_leaf() ) + return (int)CHECK(SELECTED); + else + { + int total = (int)CHECK(SELECTED); + for( i = 0; i < _children.size(); i++ ) + total += _children.child(i)->recurse( rdata, type, event ); + return total; + } + } + + // see if this entry is even visible + if( rdata.y > rdata.browserY+rdata.browserH ) + { + if( type == DRAW ) + return 1; + else if( type == HANDLE ) + return 0; + } + + int which = open(); + bool skipEntry = ( is_root() && !rdata.showRoot ) || ( is_leaf() && !rdata.showLeaves ) || ( is_branch() && !rdata.showBranches ); + bool skipCollapser = is_root() && rdata.showRoot && ( CHECK(ALWAYS_OPEN) || rdata.allBranchesAlwaysOpen ); + + // find the size of the entry label + if( (type == MEASURE) || (type == MEASURE_THIS_OPEN) ) + { + if( CHECK(SHOW_LABEL) ) + { + int W = 0, H; + fl_font( textFont, textSize ); + fl_measure( text.c_str(), W, H ); + W += 4; H += 4; // hack - it looks better + textW = W; + textH = H; + } + else + { + textW = textH = 0; + } + + // remember vertically where this node is w.r.t the browser + currentY = rdata.y; + + currentH = textH; + + // find the total size of the entry, depending on if there's a widget + if( _widget ) + currentH = MAX( _widget->w->h(), currentH ); + + // find the total height of this entry by taking the max height of the entry and icons + if( is_leaf() ) + { + if( lIcon ) + currentH = MAX( currentH, lIcon->h() ); + } + else + { + currentH = MAX( currentH, cIcon[which]->h() ); + if( bIcon[which] ) + currentH = MAX( currentH, bIcon[which]->h() ); + } + } + + bool skipAhead = (rdata.y + currentH) < rdata.browserY; + + // process the entry + switch( type ) + { + case DRAW: + { + if( skipEntry || skipAhead ) break; + + draw( rdata, false ); + + // draw any vertical connectors connecting our parents, grandparents, etc., + if( rdata.showBranches ) + { + int d = depth()-1; + for( i = 0; i < rdata.branchConnectors.size(); i++ ) + { + if( i != d ) + { + fl_color( rdata.lineColor ); + fl_line_style( rdata.lineStyle, rdata.lineWidth ); + fl_line( rdata.branchConnectors[i], rdata.y, rdata.branchConnectors[i], rdata.y+currentH ); + fl_line_style( 0 ); + } + } + } + + rdata.shadedIndex = 1 - rdata.shadedIndex; // toggle the even/odd entry for shading + } + break; + + case MEASURE: + if( is_leaf() ) + CLEAR( SOME_VISIBLE_CHILDREN ); + else + { + // find out whether the branch has any children that could be visible + bool someVisibleChildren = rdata.showLeaves && ( _children.size() > 0 ); + for( i = 0; i < _children.size(); i++ ) + { + if( _children.child(i)->is_branch() ) + { + someVisibleChildren = true; + break; + } + } + SET( SOME_VISIBLE_CHILDREN, someVisibleChildren ); + } + + case MEASURE_THIS_OPEN: + if( skipEntry ) break; + draw( rdata, true ); + break; + + case HANDLE: + { + if( skipEntry || skipAhead || !CHECK(ACTIVE) ) break; + + if( event != FL_DRAG && event != FL_NO_EVENT ) + rdata.justOpenedClosed = false; + + // if we are trying to select all entries between 2 widgets due to a shift-select... + if( rdata.shiftSelect ) + { + if( (rdata.hilighted == this) || (rdata.grabbed == this) ) + { + if( !rdata.shiftSelectAll ) + { + rdata.shiftSelectAll = true; + select( true ); + if( is_branch() && rdata.openOnSelect ) + { + open( true ); + } + } + else + { + rdata.shiftSelect = false; + rdata.shiftSelectAll = false; + rdata.grabbed = 0; + select( true ); + if( is_branch() && rdata.openOnSelect ) + { + open( true ); + } + } + } + else if( rdata.shiftSelectAll ) + { + select( true ); + if( is_branch() && rdata.openOnSelect ) + { + open( true ); + } + } + break; + } + + // check for the keyboard event + if( event == FL_KEYDOWN ) + { + // check for the spacebar selecting this entry + if( Fl::event_key() == ' ' && rdata.hilighted == this ) + { + if( Fl::event_state(FL_CTRL) ) + select( !CHECK(SELECTED) ); + else + { + rdata.root->unselect_all( this ); + select( true ); + } + if( is_branch() && rdata.openOnSelect ) + { + open( true ); + } + return 1; + } + + // check for the enter key opening/closing this entry + else if( (Fl::event_key() == FL_Enter) && (rdata.hilighted == this) ) + { + open( !open() ); + return 1; + } + + // check for the left/right cursor keys opening/closing this entry + else if( (Fl::event_key() == FL_Left) && (rdata.hilighted == this) ) + { + open( false ); + return 1; + } + else if( (Fl::event_key() == FL_Right) && (rdata.hilighted == this) ) + { + open( true ); + return 1; + } + } + + // check for the "up" cursor key moving the hilighted entry + if( rdata.delta == -1 && rdata.hilighted == this && rdata.previous != NULL ) + { + tree->set_hilighted( rdata.previous ); + rdata.delta = 0; + return 1; + } + + // check for the "down" cursor key moving the hilighted entry + if( rdata.delta == 1 && rdata.hilighted == rdata.previous ) + { + tree->set_hilighted( this ); + rdata.delta = 0; + return 1; + } + + rdata.previous = this; + + // the event is not ours to use + //if( _widget && !rdata.dragging ) + //if( Fl::event_inside( _widget->w ) ) + // return 2; + + bool inExpander = false; + if( is_branch() ) + { + int which = open(); + if( _parent==0 ) + inExpander = Fl::event_inside( rdata.x, rdata.y+(currentH>>1)-(cIcon[which]->h()>>1), + cIcon[which]->w(), cIcon[which]->h() ); + else + inExpander = Fl::event_inside( rdata.x+(rdata.branchIconW>>1)-(cIcon[which]->w()>>1), + rdata.y+(currentH>>1)-(cIcon[which]->h()>>1), + cIcon[which]->w(), cIcon[which]->h() ); + } + + if( event == FL_PUSH ) + { + // check for expand/collapse + if( Fl::event_button() == FL_LEFT_MOUSE && inExpander ) + { + if( rdata.openWOChildren || CHECK(SOME_VISIBLE_CHILDREN) ) + { + open( !open() ); + rdata.dragging = false; + rdata.dragNode = 0; + return 1; + } + } + } + + if( event == FL_DRAG && rdata.justOpenedClosed ) + return 0; + + // if no selections, return + if( rdata.selectionMode == FLU_NO_SELECT ) + break; + + // if the event is not inside us, return + if( !Fl::event_inside( rdata.browserX, rdata.y, rdata.browserW, currentH ) ) + break; + + // single selection + if( rdata.selectionMode == FLU_SINGLE_SELECT ) + { + if( event == FL_MOVE && rdata.selectUnderMouse ) + { + //select_only(); + rdata.root->unselect_all( this ); + SET(SELECTED,true); + tree->redraw(); + } + else if( event == FL_PUSH ) + { + //rdata.dragging = true; + rdata.grabbed = this; + + if( rdata.selectUnderMouse ) + rdata.root->unselect_all(); + else + rdata.root->unselect_all( this ); + tree->set_hilighted( this ); + if( Fl::event_state(FL_CTRL) ) + select( !CHECK(SELECTED) ); + else + select( true ); + + if( is_leaf() ) + { + if( Fl::event_clicks() > 0 ) + { + Fl::event_clicks(0); + do_callback( FLU_DOUBLE_CLICK ); + } + } + else + { + if( Fl::event_clicks() > 0 ) + { + Fl::event_clicks(0); + if( rdata.doubleClickToOpen ) + { + if( rdata.openWOChildren || CHECK(SOME_VISIBLE_CHILDREN) ) + open( !open() ); + } + else + do_callback( FLU_DOUBLE_CLICK ); + } + else if( rdata.openOnSelect ) + { + open( true ); + } + } + Fl::focus(tree); + return 1; + } + else if( event == FL_DRAG ) + { + if( rdata.selectionDragMode == FLU_DRAG_IGNORE ) + return 1; + rdata.dragging = true; + //if( ( rdata.selectionDragMode == FLU_DRAG_IGNORE || rdata.selectionDragMode == FLU_DRAG_TO_MOVE) && ( tree->insertion_mode() == FLU_INSERT_FRONT || tree->insertion_mode() == FLU_INSERT_BACK ) ) + //return 1; + rdata.root->unselect_all( this ); + tree->set_hilighted( this ); + select( true ); + return 1; + } + else if( event == FL_RELEASE && tree->when() == FL_WHEN_RELEASE && selected() && !inExpander ) + { + do_callback( FLU_SELECTED ); + return 1; + } + } + + // multiple selection + else if( rdata.selectionMode == FLU_MULTI_SELECT ) + { + if( event == FL_PUSH ) + { + //rdata.dragging = true; + rdata.grabbed = this; + + if( Fl::event_state(FL_CTRL) ) + { + select( !CHECK(SELECTED) ); + tree->set_hilighted( this ); + } + else if( Fl::event_state(FL_SHIFT) ) + { + // select everything from the last selected entry to this one + if( rdata.hilighted == this ) + { + select( true ); + if( is_branch() ) + { + if( Fl::event_clicks() > 0 ) + { + Fl::event_clicks(0); + if( rdata.doubleClickToOpen ) + { + if( rdata.openWOChildren || CHECK(SOME_VISIBLE_CHILDREN) ) + open( !open() ); + } + else + do_callback( FLU_DOUBLE_CLICK ); + } + else if( rdata.openOnSelect ) + { + open( !open() ); + } + } + } + else + { + rdata.shiftSelectAll = false; + rdata.shiftSelect = true; + rdata.grabbed = this; + rdata.root->recurse( rdata, HANDLE, 0 ); + tree->set_hilighted( this ); + } + } + else + { + rdata.root->unselect_all( this ); + select( true ); + if( is_leaf() ) + { + if( Fl::event_clicks() > 0 ) + { + Fl::event_clicks(0); + do_callback( FLU_DOUBLE_CLICK ); + } + } + else + { + if( Fl::event_clicks() > 0 ) + { + Fl::event_clicks(0); + if( rdata.doubleClickToOpen ) + { + if( rdata.openWOChildren || CHECK(SOME_VISIBLE_CHILDREN) ) + open( !open() ); + } + else + do_callback( FLU_DOUBLE_CLICK ); + } + else if( rdata.openOnSelect ) + { + open( true ); + } + } + tree->set_hilighted( this ); + } + Fl::focus(tree); + return 1; + } + else if( event == FL_DRAG ) + { + if( rdata.selectionDragMode == FLU_DRAG_IGNORE ) + return 1; + rdata.dragging = true; + //if( ( rdata.selectionDragMode == FLU_DRAG_IGNORE || rdata.selectionDragMode == FLU_DRAG_TO_MOVE) && ( tree->insertion_mode() == FLU_INSERT_FRONT || tree->insertion_mode() == FLU_INSERT_BACK ) ) + //return 1; + select( true ); + tree->set_hilighted( this ); + return 1; + } + else if( event == FL_RELEASE && tree->when() == FL_WHEN_RELEASE && selected() && !inExpander ) + { + do_callback( FLU_SELECTED ); + return 1; + } + } + } + break; + } + + // advance the counters vertically to the next entry + if( !skipEntry ) + rdata.y += currentH + rdata.vGap; + + if( !is_root() && rdata.first && !skipEntry ) + rdata.first = false; + + // if we're a leaf, no need to process further + if( is_leaf() ) + return 0; + + // should we bail out already if we're done processing? + if( closed() && !skipEntry && !skipCollapser && ( type != MEASURE_THIS_OPEN ) ) + return 0; + + if( !CHECK(SOME_VISIBLE_CHILDREN) ) + return 0; + + // advance the counters horizontally to the next entry + if( rdata.showBranches ) + { + if( !skipEntry && !skipCollapser ) + rdata.x += cIcon[which]->w() + rdata.hGap; + } + rdata.totalW = MAX( rdata.totalW, rdata.x ); + + // the branchIconW is the width of the branch icon at this level + // it is used to center all children icons under the branch icon + int lastBranchIconW = rdata.branchIconW; + if( rdata.showBranches ) + { + if( bIcon[which] ) + rdata.branchIconW = bIcon[which]->w(); + else + rdata.branchIconW = cIcon[which]->w(); + } + else + rdata.branchIconW = 0; + + // process all children + int val; + int tempW = rdata.branchIconW >> 1; + for( i = 0; i < _children.size(); i++ ) + { + // prepare the recursive data structure for the next level + if( i == 0 ) + rdata.first = true; + rdata.last = (i == _children.size()-1 ); + + // if child "i" is not the last child, + // then there is a long connector that needs drawn between this node and the last child. + // push the horizontal position of the connector onto the stack + if( (type == DRAW) && rdata.showConnectors && ( i < _children.size()-1 ) ) + { + rdata.branchConnectors.push_back( rdata.x+tempW ); + val = _children.child(i)->recurse( rdata, type, event ); + rdata.branchConnectors.pop_back(); + } + else + val = _children.child(i)->recurse( rdata, type, event ); + + if( val ) + return val; + } + + // set the branch icon width back to what it was before we changed it + rdata.branchIconW = lastBranchIconW; + + // move back horizontally from the last entry + if( rdata.showBranches ) + { + if( !skipEntry && !skipCollapser ) + rdata.x -= cIcon[which]->w() + rdata.hGap; + } + + return 0; +} + +void Flu_Tree_Browser :: print() +{ + root.print(); +} + +void Flu_Tree_Browser :: clear() +{ + root.clear(); + root.text = ""; + + while( _box->children() ) + _box->remove( *_box->child(0) ); + + rdata.cbNode = NULL; + rdata.cbReason = FLU_NOTHING; + rdata.hilighted = NULL; + rdata.dragging = false; + rdata.forceResize = true; + rdata.lastOpenBranch = NULL; + rdata.shiftSelect = false; + rdata.shiftSelectAll = false; + rdata.nextId = 1; + rdata.searchIndex = 1; +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: set_root( const char *label, Fl_Widget *w, bool showLabel ) +{ + if( label == 0 ) + label = ""; + root.text = label; + root.widget( w ); + root.SET(Node::SHOW_LABEL,showLabel); + root.cIcon[0] = rdata.collapseIcons[0]; + root.cIcon[1] = rdata.collapseIcons[1]; + root.bIcon[0] = rdata.branchIcons[0]; + root.bIcon[1] = rdata.branchIcons[1]; + root.textColor = rdata.defBranchColor; + root.textFont = rdata.defBranchFont; + root.textSize = rdata.defBranchSize; + rdata.forceResize = true; + + return &root; +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: add( const char* fullpath, Fl_Widget *w, bool showLabel ) +{ + return( root.modify( fullpath, Node::ADD, rdata, w, showLabel ) ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: add( const char* path, const char* text, Fl_Widget *w, bool showLabel ) +{ + // if the path does not end in '/', add it + std::string s = path; + if( path[strlen(path)-1] != '/' ) + s += "/"; + s += text; + + return add( s.c_str(), w, showLabel ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: add_branch( const char* fullpath, Fl_Widget *w, bool showLabel ) +{ + std::string p( fullpath ); + if( p.size() && p[p.size()-1] != '/' && p[p.size()-1] != '\\' ) p += "/"; + return add( p.c_str(), w, showLabel ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: add_branch( const char* path, const char* name, Fl_Widget *w, bool showLabel ) +{ + std::string p( name ); + if( p.size() && p[p.size()-1] != '/' && p[p.size()-1] != '\\' ) p += "/"; + return add( path, p.c_str(), w, showLabel ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: add_leaf( const char* fullpath, Fl_Widget *w, bool showLabel ) +{ + std::string p( fullpath ); + if( p.size() && ( p[p.size()-1] == '/' || p[p.size()-1] == '\\' ) ) p[p.size()-1] = '\0'; + return add( p.c_str(), w, showLabel ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: add_leaf( const char* path, const char* name, Fl_Widget *w, bool showLabel ) +{ + std::string p( name ); + if( p.size() && ( p[p.size()-1] == '/' || p[p.size()-1] == '\\' ) ) p[p.size()-1] = '\0'; + return add( path, p.c_str(), w, showLabel ); +} + +unsigned int Flu_Tree_Browser :: remove( const char *fullpath ) +{ + return( (unsigned int)root.modify( fullpath, Node::REMOVE, rdata ) ); +} + +unsigned int Flu_Tree_Browser :: remove( const char *path, const char *text ) +{ + // if the path does not end in '/', add it + std::string s = path; + if( path[strlen(path)-1] != '/' ) + s += "/"; + s += text; + return remove( s.c_str() ); +} + +unsigned int Flu_Tree_Browser :: remove( unsigned int id ) +{ + return root.remove( id ); +} + +unsigned int Flu_Tree_Browser :: Node :: remove( unsigned int id ) +{ + if( id == 0 ) + return 0; + + for( int i = 0; i < _children.size(); i++ ) + { + Node *n = _children.child(i); + if( n->id() == id ) + { + _children.erase( i ); + tree->rdata.forceResize = true; + //if( tree->rdata.cbNode == n ) + //tree->rdata.cbNode = NULL; + delete n; + if( tree->rdata.autoBranches ) + initType(); + tree->redraw(); + return id; + } + else if( n->remove( id ) ) + return id; + } + + return 0; +} + +unsigned int Flu_Tree_Browser :: remove( Fl_Widget *w ) +{ + return root.remove( w ); +} + +unsigned int Flu_Tree_Browser :: Node :: remove( Fl_Widget *w ) +{ + if( !w ) + return 0; + for( int i = 0; i < _children.size(); i++ ) + { + Node *n = _children.child(i); + if( n->_widget ) + { + if( n->_widget->w == w ) + { + int id = n->id(); + _children.erase( i ); + tree->rdata.forceResize = true; + //if( tree->rdata.cbNode == n ) + //tree->rdata.cbNode = NULL; + delete n; + if( tree->rdata.autoBranches ) + initType(); + tree->redraw(); + return id; + } + } + + int id = n->remove( w ); + if( id ) + return id; + } + + return 0; +} + +int Flu_Tree_Browser :: find_number( const char *fullpath ) +{ + rdata.counter = 0; + root.modify( fullpath, Node::FIND_NUMBER, rdata ); + return rdata.counter; +} + +int Flu_Tree_Browser :: find_number( const char *path, const char *text ) +{ + // if the path does not end in '/', add it + std::string s = path; + if( path[strlen(path)-1] != '/' ) + s += "/"; + s += text; + return find_number( s.c_str() ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: find_next( const char *fullpath, Node* startNode ) +{ + // degenerate case: root node + if( strcmp( fullpath, "/" ) == 0 ) + return &root; + rdata.previous = startNode; + return( root.modify( fullpath, Node::FIND, rdata ) ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: find_next( const char *path, const char *text ) +{ + // if the path does not end in '/', add it + std::string s = path; + if( path[strlen(path)-1] != '/' ) + s += "/"; + s += text; + return find_next( s.c_str() ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: find( const char *path, const char *text ) +{ + // if the path does not end in '/', add it + std::string s = path; + if( path[strlen(path)-1] != '/' ) + s += "/"; + s += text; + return find( s.c_str() ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: find( unsigned int id ) +{ + return root.find( id ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: find( unsigned int id ) +{ + if( id == 0 ) + return NULL; + + if( _id == id ) + return this; + + for( int i = 0; i < _children.size(); i++ ) + { + Node *n = _children.child(i)->find( id ); + if( n ) + return n; + } + + return NULL; +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: find( Fl_Widget *w ) +{ + return root.find( w ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: find( Fl_Widget *w ) +{ + if( _widget ) + if( _widget->w == w ) + return this; + + for( int i = 0; i < _children.size(); i++ ) + { + Node *n = _children.child(i)->find( w ); + if( n ) + return n; + } + + return NULL; +} + + +bool Flu_Tree_Browser :: Node :: findPath( unsigned int id, RData &rdata ) +{ + if( _id == id ) + { + if( is_leaf() ) + rdata.path += text; + else + { + rdata.path += text; + rdata.path += "/"; + } + return true; + } + + if( is_leaf() ) + return false; + + std::string oldPath = rdata.path; + if( _parent != 0 ) + { + rdata.path += text; + rdata.path += "/"; + } + + for( int i = 0; i < _children.size(); i++ ) + { + if( _children.child(i)->findPath( id, rdata ) ) + { + return true; + } + } + + rdata.path = oldPath; + return false; +} + +bool Flu_Tree_Browser :: Node :: findPath( Fl_Widget *w, RData &rdata ) +{ + if( _widget ) + if( _widget->w == w ) + { + if( is_leaf() ) + rdata.path += text; + else + { + rdata.path += text; + rdata.path += "/"; + } + return true; + } + + if( is_leaf() ) + return false; + + std::string oldPath = rdata.path; + if( _parent != 0 ) + { + rdata.path += text; + rdata.path += "/"; + } + + for( int i = 0; i < _children.size(); i++ ) + { + if( _children.child(i)->findPath( w, rdata ) ) + { + return true; + } + } + + rdata.path = oldPath; + + return false; +} + +const char* Flu_Tree_Browser :: find_path( unsigned int id ) +{ + // degenerate case: the root is always id==0 + if( id == 0 ) + return "/"; + rdata.path = "/"; + if( root.findPath( id, rdata ) ) + return rdata.path.c_str(); + else + return ""; +} + +const char* Flu_Tree_Browser :: find_path( Fl_Widget *w ) +{ + rdata.path = "/"; + if( root.findPath( w, rdata ) ) + return rdata.path.c_str(); + else + return ""; +} + +static std::string remove_escape_chars( const char *str ) +{ + // remove any escape characters + std::string text(str); + int tIndex = 0; + for( int pIndex = 0; pIndex < (int)strlen( str ); pIndex++ ) + { + if( str[pIndex] != '\\' ) + text[tIndex++] = str[pIndex]; + } + text.resize(tIndex); + return text; +} + +void Flu_Tree_Browser :: Node :: do_callback( int reason ) +{ + //if( tree->rdata.when == FL_WHEN_NEVER ) + if( tree->when() == FL_WHEN_NEVER ) + return; + //if( tree->rdata.cb ) + { + tree->rdata.cbReason = reason; + tree->rdata.cbNode = this; + //tree->rdata.cb( tree, tree->rdata.cbd ); + ((Fl_Widget*)tree)->do_callback(); + } +} + +unsigned short Flu_Tree_Browser :: Node :: depth() const +{ + int d = 0; + Node *p = _parent; + while( p ) + { + d++; + p = p->_parent; + } + return d; +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: add_branch( const char* fullpath, Fl_Widget *w, bool showLabel ) +{ + std::string p( fullpath ); + if( p.size() && p[p.size()-1] != '/' && p[p.size()-1] != '\\' ) p += "/"; + return add( p.c_str(), w, showLabel ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: add_leaf( const char* fullpath, Fl_Widget *w, bool showLabel ) +{ + std::string p( fullpath ); + if( p.size() && ( p[p.size()-1] == '/' || p[p.size()-1] == '\\' ) ) p[p.size()-1] = '\0'; + return add( p.c_str(), w, showLabel ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: add( const char* path, const char* name, Fl_Widget *w, bool showLabel ) +{ + std::string p( path ); + if( p.size() && p[p.size()-1] != '/' && p[p.size()-1] != '\\' ) p += "/"; + p += name; + return add( p.c_str(), w, showLabel ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: add_branch( const char* path, const char* name, Fl_Widget *w, bool showLabel ) +{ + std::string p( path ); + if( p.size() && p[p.size()-1] != '/' && p[p.size()-1] != '\\' ) p += "/"; + p += name; + return add_branch( p.c_str(), w, showLabel ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: add_leaf( const char* path, const char* name, Fl_Widget *w, bool showLabel ) +{ + std::string p( path ); + if( p.size() && p[p.size()-1] != '/' && p[p.size()-1] != '\\' ) p += "/"; + p += name; + return add_leaf( p.c_str(), w, showLabel ); +} + +Flu_Tree_Browser::Node* Flu_Tree_Browser :: Node :: modify( const char* path, int what, RData &rdata, Fl_Widget *w, bool showLabel ) +{ + // find the selected entry at rdata.searchIndex among all selected entries + if( what == GET_SELECTED ) + { + if( CHECK(SELECTED) ) + { + rdata.counter++; + if( rdata.counter == rdata.searchIndex ) + return this; + } + for( int i = 0; i < _children.size(); i++ ) + { + Node *n = _children.child(i)->modify( path, what, rdata, w ); + if( n ) + return n; + } + return NULL; + } + + // trivial test for a bogus empty path + if( path == 0 ) + return NULL; + + // if the path starts with '/', skip the '/' + if( path[0] == '/' ) + path++; + + // trivial test for a bogus empty path + if( path[0] == '\0' ) + return NULL; + + const char *remainingPath; + std::string nodeName; + bool lastNode, branchNode; + Node *retNode = NULL; + + ///////////// extract the next node name from the path /////////////////// + + // find the next '/' that is not preceded by the escape character '\' + const char *slash = strchr( path, '/' ); + for(;;) + { + // find the next '/' + if( slash == NULL ) // there isn't one, so we're done + break; + // test for escape character + else if( slash[-1] == '\\' ) // path[0] can never be '/', so this is a safe test + slash = strchr( slash+1, '/' ); + // we have it + else + break; + } + + // if there is no slash, then the node name is the path and it is a leaf and the last node in the path + if( slash == NULL ) + { + branchNode = false; + nodeName = remove_escape_chars(path); // remove the escape characters + lastNode = true; + remainingPath = NULL; + } + // otherwise the node name is the path up to the slash, it is also a branch and may not be the last node in the path + else + { + branchNode = true; + nodeName = path; + nodeName.resize(slash-path); + nodeName = remove_escape_chars(nodeName.c_str()); // remove the escape characters + + lastNode = ( slash[1] == '\0' ); // this is the last node if there is nothing after the slash + if( lastNode ) + { + //if( rdata.autoBranches ) + //branchNode = false; + remainingPath = NULL; + } + else + remainingPath = slash+1; + } + + ///////////// process the node /////////////////// + + switch( what ) + { + case ADD: + { + // if the new node is a leaf node, add the string as a leaf and return + if( !branchNode ) + { + // is there already a node with this name? + /* CG REMOVED THIS + Node *n = _children.find( nodeName ); + if( n ) + { + // if that node is a branch node, we can't add a new one with the same name + if( n->is_branch() ) + break; + + // if we are not allowed to add multiple nodes with the same name, + // then just return + if( !rdata.allowDuplication ) + break; + } + */ + + // add a new node + retNode = new Node( true, nodeName.c_str(), this, rdata, w, showLabel ); + _children.add( retNode ); + rdata.forceResize = true; + rdata.visibilityChanged = true; + + if( tree->rdata.autoBranches ) + initType(); + } + // otherwise make sure the node name exists as a branch and recurse on it + else + { + // if there is already a node with this name, just use it + Node *n = NULL; + /* CG REMOVED THIS + n = _children.find( nodeName ); + if( n ) + { + // make sure it is a branch + if( n->is_leaf() ) + break; + } + */ + + // else add a new node + if( n == NULL ) + { + // only add the widget for the last node + n = new Node( false, nodeName.c_str(), this, rdata, lastNode?w:NULL, lastNode?showLabel:true ); + _children.add( n ); + rdata.forceResize = true; + rdata.visibilityChanged = true; + } + + if( tree->rdata.autoBranches ) + initType(); + + // recurse on the remainder of the path, if not the last node + if( lastNode ) + retNode = n; + else + retNode = n->modify( remainingPath, what, rdata, w, showLabel ); + } + } + break; + + case REMOVE: + { + // try to find the indicated node. if we can't find it, just return + Node *n = _children.find( nodeName.c_str() ); + if( !n ) + break; + + // if this is the last node, remove it. + if( lastNode ) + { + int ID = n->id(); + _children.erase( n ); + //if( tree->rdata.cbNode == n ) + //tree->rdata.cbNode = NULL; + delete n; + retNode = (Node*)ID; // non-null return value means remove was successful + rdata.forceResize = true; + rdata.visibilityChanged = true; + + if( tree->rdata.autoBranches ) + initType(); + tree->redraw(); + } + // otherwise recurse on the remainder of the path + else + retNode = n->modify( remainingPath, what, rdata, w, showLabel ); + } + break; + + case FIND: + { + // if this node equals the starting node for a find_next, + // then by clearing rdata.previous we flag that we are allowed to return the next match + if( rdata.previous == this ) + rdata.previous = NULL; + + Node *n = NULL; + + if( !lastNode ) + { + // if, according to the path, this is not the last node, then just recursively + // search for the named node + n = _children.find( nodeName.c_str() ); + if( !n ) + break; + retNode = n->modify( remainingPath, what, rdata, w, showLabel ); + } + else + { + // otherwise, according to the path, this is the last node (i.e. a leaf). + // since only leaves can have multiple identical entries, + // try to find the indicated node, accounting for the possibility + // that it may not be the one we're after + int next = 1; + for(;;) + { + // look for the named node + n = _children.find( nodeName.c_str(), next++ ); + + // if we can't find it, just return, because it's not here + if( !n ) + break; + + // we are only allowed to return a match if the previous node is NULL, + // indicating we have passed the starting node for a find_next + if( rdata.previous == NULL ) + { + retNode = n; + break; + } + + // if the found node equals the starting node for a find_next, + // then by clearing rdata.previous we flag that we are allowed to return the next match + if( rdata.previous == n ) + rdata.previous = NULL; + } + } + } + break; + + case FIND_NUMBER: + { + if( lastNode ) // can only match multiple leaves if the path says this is the last node + { + rdata.counter += _children.findNum( nodeName.c_str() ); + } + else // otherwise recurse down the remaining path + { + Node *n = _children.find( nodeName.c_str() ); + n->modify( remainingPath, what, rdata, w, showLabel ); + } + } + break; + } + + return retNode; +} + +void Flu_Tree_Browser :: Node :: widgetCB() +{ + if( _widget ) + { + if( _widget->CB ) + _widget->CB( _widget->w, _widget->CBData ); + } + do_callback( FLU_WIDGET_CALLBACK ); +} + +void Flu_Tree_Browser :: Node :: widget( Fl_Widget *w ) +{ + tree->rdata.forceResize = true; + + if( _widget ) + { + Fl_Group *p = _widget->w->parent(); + if( p ) + p->remove( *(_widget->w) ); + delete _widget->w; + delete _widget; + _widget = NULL; + } + + if( !w ) + return; + + _widget = new WidgetInfo; + _widget->w = w; + _widget->defaultW = _widget->w->w(); + if( USE_FLU_WIDGET_CALLBACK ) + { + _widget->CB = _widget->w->callback(); + _widget->CBData = _widget->w->user_data(); + _widget->w->callback( _widgetCB, this ); + } + + { + Fl_Group *p = w->parent(); + if( p ) + p->remove( *w ); + } + + if( is_root() ) + tree->_box->add( w ); + else + { + Node *p = parent(); + if( !p->_group ) + { + p->_group = new Fl_Group( tree->_box->x(), tree->_box->y(), tree->_box->w(), tree->_box->h() ); + p->_group->end(); + tree->_box->add( p->_group ); + } + p->_group->add( w ); + } +} + +void Flu_Tree_Browser :: Node :: branch_icons( Fl_Image *closed, Fl_Image *open ) +{ + if( is_branch() ) + { + bIcon[0] = closed; + bIcon[1] = open; + tree->rdata.forceResize = true; + } +} + +void Flu_Tree_Browser :: Node :: collapse_icons( Fl_Image *closed, Fl_Image *open ) +{ + if( is_branch() ) + { + if( !closed || !open ) + { + cIcon[0] = tree->rdata.defaultCollapseIcons[0]; + cIcon[1] = tree->rdata.defaultCollapseIcons[1]; + } + else + { + cIcon[0] = closed; + cIcon[1] = open; + } + tree->rdata.forceResize = true; + } +} + +void Flu_Tree_Browser :: Node :: leaf_icon( Fl_Image *icon ) +{ + if( is_leaf() ) + { + lIcon = icon; + tree->rdata.forceResize = true; + } +} + +bool Flu_Tree_Browser :: Node :: is_branch() const +{ + if( tree->rdata.autoBranches ) + return( _children.size() != 0 ); + else + return !CHECK(LEAF); +} + +bool Flu_Tree_Browser :: Node :: is_leaf() const +{ + if( tree->rdata.autoBranches ) + return( _children.size() == 0 && !is_root() ); + else + return CHECK(LEAF); +} + + +#if 0 // CG test code: set to 1 and run "fltk-config --compile Flu_Tree_Browser.cpp" + +#include <FL/Fl.H> +#include <FL/Fl_Window.H> +#include <FL/Fl_Box.H> +#include <FL/Fl_Input.H> +#include <FL/Fl_Choice.H> +#include <FL/Fl_Check_Button.H> +#include "Flu_Tree_Browser.h" + +void add_points(Flu_Tree_Browser::Node *n) +{ + char str[128]; + for(int i = 0; i < 2; i++){ + sprintf(str, "Point %d", i); + n->add(str); + } +} + +void add_lines(Flu_Tree_Browser::Node *n) +{ + char str[128]; + for(int i = 0; i < 10; i++){ + sprintf(str, "Line %d/", i); + Flu_Tree_Browser::Node *n2 = n->add(str); + add_points(n2); + } +} + +void add_surfaces(Flu_Tree_Browser::Node *n) +{ + char str[128]; + for(int i = 0; i < 100; i++){ + sprintf(str, "Surface %d/", i); + Flu_Tree_Browser::Node *n2 = n->add(str); + //add_lines(n2); + } +} + +void add_volumes(Flu_Tree_Browser::Node *n) +{ + char str[128]; + for(int i = 0; i < 1000; i++){ + sprintf(str, "Volume %d/", i); + Flu_Tree_Browser::Node *n2 = n->add(str); + add_surfaces(n2); + } +} + +int main(int argc, char **argv) +{ + printf("sizeof Node = %d\n", sizeof(Flu_Tree_Browser :: Node)); + + Fl_Window *window = new Fl_Window(300, 600); + Flu_Tree_Browser *tree = new Flu_Tree_Browser(0, 0, 300, 600); + tree->show_root(false); + tree->insertion_mode(FLU_INSERT_BACK); + tree->branch_icons(0, 0); + //tree->open(true); + char str[128]; + for(int i = 0; i < 2; i++){ + sprintf(str, "Model %d <<DLR_F6>>/", i); + Fl_Check_Button *b = new Fl_Check_Button(0, 0, 20, 20); + b->tooltip("Set active"); + Flu_Tree_Browser::Node *n = tree->add(str, b); + Flu_Tree_Browser::Node *e = n->add("Elementary entities/"); + add_volumes(e); + //add_surfaces(e); + //add_lines(e); + //add_points(e); + Flu_Tree_Browser::Node *g = n->add("Physical groups/"); + Flu_Tree_Browser::Node *p = n->add("Mesh partitions/"); + } + Flu_Tree_Browser::Node *p = tree->add("Post-processing views/"); + for(int i = 0; i < 7; i++){ + sprintf(str, "View %d", i); + p->add(str); + } + window->end(); + window->resizable(tree); + window->show(argc, argv); + return Fl::run(); +} + +#endif diff --git a/contrib/TreeBrowser/Flu_Tree_Browser.h b/contrib/TreeBrowser/Flu_Tree_Browser.h new file mode 100644 index 0000000000000000000000000000000000000000..516d9c98534dbf06dc76c47ddaca9ac27ce8b471 --- /dev/null +++ b/contrib/TreeBrowser/Flu_Tree_Browser.h @@ -0,0 +1,1163 @@ +// This is a modified version of Jason Bryan's Flu_Tree_Browser. See +// Flu_Tree_Browser.cpp for a list of changes. + +/*************************************************************** + * FLU - FLTK Utility Widgets + * Copyright (C) 2002 Ohio Supercomputer Center, Ohio State University + * + * This file and its content is protected by a software license. + * You should have received a copy of this license with this file. + * If not, please contact the Ohio Supercomputer Center immediately: + * Attn: Jason Bryan Re: FLU 1224 Kinnear Rd, Columbus, Ohio 43212 + * + ***************************************************************/ + +#ifndef _FLU_TREE_BROWSER_H +#define _FLU_TREE_BROWSER_H + +#include <string> +#include <vector> +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <FL/Fl.H> +#include <FL/Fl_Box.H> +#include <FL/Fl_Pixmap.H> +#include <FL/Fl_Image.H> +#include <FL/Fl_Scrollbar.H> +#include <FL/Fl_Group.H> +#include <FL/Fl_Menu_Button.H> + +/*! Selection modes for FLU widgets that select stuff. +*/ +enum { + FLU_NO_SELECT, + FLU_SINGLE_SELECT, + FLU_MULTI_SELECT +}; + +/*! Data insertion modes for FLU widgets that insert stuff. +*/ +enum { + FLU_INSERT_FRONT, + FLU_INSERT_BACK, + FLU_INSERT_SORTED, + FLU_INSERT_SORTED_REVERSE +}; + +/*! Selection drag modes for FLU widgets that select stuff (used while + the mouse is being dragged). +*/ +enum { + FLU_DRAG_IGNORE, + FLU_DRAG_TO_SELECT, + FLU_DRAG_TO_MOVE +}; + +/*! Callback reasons for FLU widgets that select stuff. +*/ +enum { + FLU_HILIGHTED, + FLU_UNHILIGHTED, + FLU_SELECTED, + FLU_UNSELECTED, + FLU_OPENED, + FLU_CLOSED, + FLU_DOUBLE_CLICK, + FLU_WIDGET_CALLBACK, + FLU_MOVED_NODE, + FLU_NEW_NODE, + FLU_NOTHING +}; + +//! This class provides a browser for hierarchical data representation (i.e. a "tree") +class Flu_Tree_Browser : public Fl_Group +{ + + static bool USE_FLU_WIDGET_CALLBACK; + + public: + + class Node; + friend class Node; + + //! Normal FLTK widget constructor + Flu_Tree_Browser( int x, int y, int w, int h, const char *label = 0 ); + + //! Default destructor + virtual ~Flu_Tree_Browser(); + + //! Add the entry specified by \b fullpath to the tree. If \b w is not \c NULL then that widget is the entry and its label is visible depending on the value of \b showLabel. Note that the widget is destroyed by the tree/node on clear() or the destructor + /*! If \b fullpath ends in a slash ("/"), then the entry is added as a branch, else it is added as a leaf + \return a pointer to the Node of the added entry or NULL if the add failed */ + Node* add( const char* fullpath, Fl_Widget *w = 0, bool showLabel = true ); + + //! Convenience function that is the same as add() except \b path and \b name are concatenated (with a '/' added if necessary) to create the full path + Node* add( const char* path, const char* name, Fl_Widget *w = 0, bool showLabel = true ); + + //! Add entry \b name to node \b n. If \b w is not \c NULL then that widget is the entry and its label is visible depending on the value of \b showLabel. Note that the widget is destroyed by the tree/node on clear() or the destructor + /*! If \b name ends in a slash ("/"), then the entry is added as a branch, else it is added as a leaf + \return a pointer to the Node of the added entry or NULL if the add failed */ + inline Node* add( Node* n, const char* name, Fl_Widget *w = 0, bool showLabel = true ) + { return n->add( name, w, showLabel ); } + + //! Convenience function that is the same as add() except it appends a '/' to \b fullpath if one does not exist + Node* add_branch( const char* fullpath, Fl_Widget *w = 0, bool showLabel = true ); + + //! Convenience function that is the same as add() except \b path and \b name are concatenated (with a '/' added if necessary) to create the full path + Node* add_branch( const char* path, const char* name, Fl_Widget *w = 0, bool showLabel = true ); + + //! Convenience function that is the same as add() except it appends a '/' to \b name if one does not exist + inline Node* add_branch( Node* n, const char* name, Fl_Widget *w = 0, bool showLabel = true ) + { return n->add_branch( name, w, showLabel ); } + + //! Convenience function that is the same as add() except it removes any '/' at the end of \b fullpath + Node* add_leaf( const char* fullpath, Fl_Widget *w = 0, bool showLabel = true ); + + //! Convenience function that is the same as add() except \b path and \b name are concatenated (with a '/' added if necessary) to create the full path + Node* add_leaf( const char* path, const char* name, Fl_Widget *w = 0, bool showLabel = true ); + + //! Convenience function that is the same as add() except it removes any '/' at the end of \b fullpath + inline Node* add_leaf( Node* n, const char* name, Fl_Widget *w = 0, bool showLabel = true ) + { return n->add_leaf( name, w, showLabel ); } + + //! Set whether all branches are always open. Default value is \c false + inline void all_branches_always_open( bool b ) + { rdata.allBranchesAlwaysOpen = b; } + + //! Get whether all branches are always open. Default value is \c false + inline bool all_branches_always_open() + { return rdata.allBranchesAlwaysOpen; } + + //! Set whether multiple leaves with the same path are allowed. Default value is \c true + inline void allow_leaf_duplication( bool b ) + { rdata.allowDuplication = b; } + + //! Get whether multiple leaves with the same path are allowed. + inline bool allow_leaf_duplication() + { return rdata.allowDuplication; } + + //! Set whether the root node is always open. Shortcut for \c get_root()->always_open(b). Default is \c false + inline void always_open( bool b ) + { root.always_open( b ); } + + //! Get whether the root node is always open + inline bool always_open() + { return root.always_open(); } + + //! Set whether the tree automatically determines whether a node is a branch or a leaf based on whether it has any children. Default is \c false + void auto_branches( bool b ); + + //! Get whether the tree automatically determines whether a node is a branch or a leaf based on whether it has any children + inline bool auto_branches() const + { return rdata.autoBranches; } + + //! Get the default branch text color + inline Fl_Color branch_color() const + { return rdata.defBranchColor; } + + //! Get the default branch text font + inline Fl_Font branch_font() const + { return rdata.defBranchFont; } + + //! Get the default branch text size + inline int branch_size() const + { return rdata.defBranchSize; } + + //! Set the default color, font and size to use for the text of all subsequent branches added to the tree + inline void branch_text( Fl_Color color, Fl_Font font, int size ) + { rdata.defBranchColor = color; rdata.defBranchFont = font; rdata.defBranchSize = size; } + + //! Set the default branch icons to use for all subsequent branches added to the tree + /*! Passing in \c NULL for either icon will disable that icon for the branch */ + void branch_icons( Fl_Image *closed, Fl_Image *open ); + + //! Get the type of box to draw the browser in + inline Fl_Boxtype box() const + { return _box->box(); } + + //! Set the type of box to draw the browser in. Default is FL_FLAT_BOX + inline void box( Fl_Boxtype b ) + { _box->box( b ); } + + //! Override of Fl_Widget::callback + //inline void callback( Fl_Callback *c, void *user_data = 0 ) + //{ rdata.cb = c; rdata.cbd = user_data; } + + //! Get the reason why the last callback happened. This can be one of FLU_UNHILIGHTED, FLU_HILIGHTED, FLU_SELECTED, FLU_UNSELECTED, FLU_OPENED, FLU_CLOSED, FLU_DOUBLE_CLICK, FLU_WIDGET_CALLBACK, FLU_MOVED_CALLBACK, FLU_NEW_NODE_CALLBACK + inline int callback_reason() const + { return rdata.cbReason; } + + //! Get the node on which the last callback happened. + /*! \note this node is only guaranteed to be in the tree \b during the callback. If the callback adds/removes nodes, then this node may have changed */ + inline Node* callback_node() const + { return rdata.cbNode; } + + //! Clear all entries from the tree + void clear(); + + //! Set the default collapse icons to use for all subsequent branches added to the tree + void collapse_icons( Fl_Image *closed, Fl_Image *open ); + + //! Get the background color of the browser + inline Fl_Color color() const + { return _box->color(); } + + //! Set the background color of the browser. Default is FL_WHITE + inline void color( Fl_Color c ) + { _box->color( c ); } + + //! Set the background color of the browser. Default is FL_WHITE + inline void color( unsigned c ) + { _box->color( (Fl_Color)c ); } + + //! Set the color, style, and width of the connector lines. Default is FL_DARK2, FL_DOT, 1 + inline void connector_style( Fl_Color color, int style, int width = 1 ) + { rdata.defLineColor = color; rdata.lineStyle = style; rdata.lineWidth = width; } + + //! Get the color of the connector lines + inline Fl_Color connector_color() const + { return rdata.defLineColor; } + + //! Get the style of the connector lines + inline int connector_style() const + { return rdata.lineStyle; } + + //! Get the width of the connector lines + inline int connector_width() const + { return rdata.lineWidth; } + + //! Set whether double-clicking a branch opens/closes it + inline void double_click_opens( bool b ) + { rdata.doubleClickToOpen = b; } + + //! Get whether double-clicking a branch opens/closes it + inline bool double_click_opens() + { return rdata.doubleClickToOpen; } + + //! Get the color to use for shading even entries + inline Fl_Color even_shaded_entry_color() const + { return rdata.shadedColors[0]; } + + //! Find the entry identified by \b fullpath + /*! \return a pointer to the Node of the found entry, or NULL if no matching entry was found */ + inline Node* find( const char *fullpath ) + { return find_next( fullpath ); } + + //! Find entry \b name in path \b path + /*! \return a pointer to the Node of the found entry, or NULL if no matching entry was found */ + Node* find( const char *path, const char *name ); + + //! Find the entry identified by unique id \b id + /*! \return a pointer to the Node of the found entry, or NULL if no matching entry was found */ + Node* find( unsigned int id ); + + //! Search for Node \b n in the tree + /*! \return a pointer to \b n if it is found, or NULL if it is not in the tree */ + inline Node* find( Node *n ) + { if( !n ) return NULL; else return find( n->id() ); } + + //! Find the entry containing the widget \b w + /*! \return a pointer to the Node of the found entry, or NULL if no matching entry was found */ + Node* find( Fl_Widget *w ); + + //! Find the next entry identified by \b fullpath after \b startNode + /*! \return a pointer to the Node of the found entry, or NULL if no matching entry was found */ + Node* find_next( const char *fullpath, Node* startNode = NULL ); + + //! Find the next entry \b name in path \b path after \b startNode + /*! \return a pointer to the Node of the found entry, or NULL if no matching entry was found */ + Node* find_next( const char *path, const char *name ); + + //! \return the number of discovered nodes matching path \b fullpath + int find_number( const char *fullpath ); + + //! \return the number of discovered nodes with name \b name in path \b path + int find_number( const char *path, const char *name ); + + //! \return the full path of the entry identified by unique id \b id, or the empty string if no matching entry was found + /*! \note the returned value is only valid until the next time find_path() is called */ + const char* find_path( unsigned int id ); + + //! \return the full path of the entry containing the widget \b w, or the empty string if no matching entry was found + /*! \note the returned value is only valid until the next time find_path() is called */ + const char* find_path( Fl_Widget *w ); + + //! \return the full path of Node \b n, or the empty string if \b n is not in the tree + /*! \note the returned value is only valid until the next time find_path() is called */ + inline const char* find_path( Node *n ) + { if( !n ) return ""; else return find_path( n->id() ); } + + //! \return the first node in the tree (i.e. the root) + inline Node* first() { return root.first(); } + + //! \return the first branch encountered in a depth-first traversal of the tree. NULL means there are no branches + inline Node* first_branch() { return root.first_branch(); } + + //! \return the first leaf encountered in a depth-first traversal of the tree. NULL means there are no leaves + inline Node* first_leaf() { return root.first_leaf(); } + + //! \return the currently highlighted node + inline Node* get_hilighted() + { return rdata.hilighted; } + + //! \return a pointer to the root node of the tree + inline Node *get_root() { return &root; } + + //! \return the selected Node that is at \b index among all selected nodes, or \c NULL if no Node is selected + /*! For example, \c get_selected(1) will return the first selected node. */ + Node* get_selected( int index ); + + //! Override of Fl_Widget::handle + int handle( int event ); + + //! Set the horizontal icon gap for each entry. Default is 2 + inline void horizontal_gap( int g ) + { rdata.hGap = g; rdata.forceResize = true; } + + //! Get the horizontal icon gap for each entry + inline int horizontal_gap() const + { return rdata.hGap; } + + //! Set how entries are inserted into the tree. This can be one of FLU_INSERT_FRONT, FLU_INSERT_BACK, FLU_INSERT_SORTED, FLU_INSERT_SORTED_REVERSE. Default is FLU_INSERT_SORTED + void insertion_mode( int m ); + + //! Get how entries are inserted into the tree. + inline int insertion_mode() + { return rdata.insertionMode; } + + //! \return whether the point \c (x,y) is inside the entry area (not on the scrollbars) + bool Flu_Tree_Browser :: inside_entry_area( int x, int y ); + + //! Set the title of the Tree (also the label for the root entry) + inline void label( const char *l ) + { root.text = l; } + + //! Get the title of the Tree (also the label for the root entry) + inline const char* label() const + { return root.text.c_str(); } + + //! \return the last node in the tree + inline Node* last() { return root.last(); } + + //! \return the last branch encountered in a depth-first traversal of the tree. NULL means there are no branches + inline Node* last_branch() { return root.last_branch(); } + + //! \return the last leaf encountered in a depth-first traversal of the tree. NULL means there are no leaves + inline Node* last_leaf() { return root.last_leaf(); } + + //! Get the default leaf text color + inline Fl_Color leaf_color() const + { return rdata.defLeafColor; } + + //! Get the default leaf text font + inline Fl_Font leaf_font() const + { return rdata.defLeafFont; } + + //! Get the default leaf text size + inline int leaf_size() const + { return rdata.defLeafSize; } + + //! Set the default leaf icon to use for all subsequent leaves added to the tree + void leaf_icon( Fl_Image *icon ); + + //! Set the default color, font and size to use for the text of all subsequent leaves added to the tree, Default is FL_BLACK, FL_HELVETICA, 12 + inline void leaf_text( Fl_Color color, Fl_Font font, int size ) + { rdata.defLeafColor = color; rdata.defLeafFont = font; rdata.defLeafSize = size; } + + //! Set whether items can be moved only within their group ( \c true ) or can be moved anywhere in the tree ( \c false ). Default is \c false. Used only when selection_drag_mode() is FLU_DRAG_TO_MOVE. + inline void move_only_same_group( bool b ) + { rdata.moveOnlySameGroup = b; } + + //! Get whether items can be moved only within their group ( \c true ) or can be moved anywhere in the tree ( \c false ). Used only when selection_drag_mode() is FLU_DRAG_TO_MOVE. + inline bool move_only_same_group() + { return rdata.moveOnlySameGroup; } + + //! \return the number of selected entries + int num_selected(); + + //! Get the color to use for shading odd entries + inline Fl_Color odd_shaded_entry_color() const + { return rdata.shadedColors[1]; } + + //! Set whether only a single branch (except the root branch) is allowed open at a time. Default is \c false + inline void only_one_open_branch( bool b ) + { rdata.singleBranchOpen = b; } + + //! Get whether only a single branch (except the root branch) is allowed open at a time + inline bool only_one_open_branch() + { return rdata.singleBranchOpen; } + + //! Open or close the root node + inline void open( bool b ) + { root.open( b ); } + + //! Is the root node open or closed? + inline bool open() const + { return root.open(); } + + //! Set whether you can open/close a branch even if it has no children. Default is \c false + inline void open_without_children( bool b ) + { rdata.openWOChildren = b; } + + //! Get whether you can open/close a branch even if it has no children. + inline bool open_without_children() const + { return rdata.openWOChildren; } + + //! Set whether selecting a branch also opens it. Default is \c false + inline void open_on_select( bool b ) + { rdata.openOnSelect = b; } + + //! Get whether selecting a branch also opens it + inline bool open_on_select() const + { return rdata.openOnSelect; } + + //! Print the tree to stdout + void print(); + + //! Remove the entry identified by path \b fullpath from the tree + /*! \return the unique id of the removed entry, or \c 0 if no matching entry was found */ + unsigned int remove( const char *fullpath ); + + //! Remove entry \b name in path \b path from the tree + /*! \return the unique id of the removed entry, or \c 0 if no matching entry was found */ + unsigned int remove( const char *path, const char *name ); + + //! Remove the entry identified by unique id \b id from the tree + /*! \return the unique id of the removed entry, or \c 0 if no matching entry was found */ + unsigned int remove( unsigned int id ); + + //! Remove the entry containing the widget \b w from the tree. Note that the widget is automatically destroyed + /*! \return the unique id of the removed entry, or \c 0 if no matching entry was found */ + unsigned int remove( Fl_Widget *w ); + + //! Remove Node \b n from the tree + /*! \return the id of \b n on successful removal, or \c 0 if \b n is not in the tree */ + inline unsigned int remove( Node* n ) + { if( !n ) return 0; else return remove( n->id() ); } + + //! Override of Fl_Widget::resize + void resize( int X, int Y, int W, int H ); + + //! Convenience routine to set the root label color. See Flu_Tree_Browser::Node::label_color() + inline void root_color( Fl_Color c ) + { get_root()->label_color( c ); } + + //! Convenience routine to set the root label color. See Flu_Tree_Browser::Node::label_color() + inline Fl_Color root_color() + { return get_root()->label_color(); } + + //! Convenience routine to set the root label font. See Flu_Tree_Browser::Node::label_font() + inline void root_font( Fl_Font f ) + { get_root()->label_font( f ); } + + //! Convenience routine to set the root label font. See Flu_Tree_Browser::Node::label_font() + inline Fl_Font root_font() + { return get_root()->label_font(); } + + //! Convenience routine to set the root label size. See Flu_Tree_Browser::Node::label_size() + inline void root_size( unsigned char s ) + { get_root()->label_size( s ); } + + //! Convenience routine to set the root label size. See Flu_Tree_Browser::Node::label_size() + inline unsigned char root_size() + { return get_root()->label_size(); } + + //! Select all entries in the tree + inline void select_all() + { root.select_all(); } + + //! Get the color to use when hilighting selected entries + inline Fl_Color selection_color() const + { return rdata.defSelectionColor; } + + //! Set the color to use when hilighting selected entries. Default is FL_SELECTION_COLOR + inline void selection_color( Fl_Color c ) + { rdata.defSelectionColor = c; } + + //! Set the color to use when hilighting selected entries. Default is FL_SELECTION_COLOR + inline void selection_color( unsigned c ) + { selection_color( (Fl_Color)c ); } + + //! Set how selection is affected when the mouse is dragged. This can be one of FLU_DRAG_IGNORE, FLU_DRAG_TO_SELECT, FLU_DRAG_TO_MOVE. Default is FLU_DRAG_TO_SELECT. + inline void selection_drag_mode( int m ) + { rdata.selectionDragMode = m; } + + //! Get how selection is affected when the mouse is dragged + inline int selection_drag_mode() const + { return rdata.selectionDragMode; } + + //! Set whether the hilighted node is always selected. Default is \c false + inline void selection_follows_hilight( bool b ) + { rdata.selectionFollowsHilight = b; if( b && rdata.hilighted ) rdata.hilighted->select(true); } + + //! Get whether the hilighted node is always selected + inline bool selection_follows_hilight() + { return rdata.selectionFollowsHilight; } + + //! Set how individual entries are selected using the mouse. This can be one of FLU_NO_SELECT, FLU_SINGLE_SELECT, FLU_MULTI_SELECT. Default is FLU_MULTI_SELECT + inline void selection_mode( int m ) + { rdata.selectionMode = m; root.unselect_all(); } + + //! Get how individual entries are selected using the mouse + inline int selection_mode() const + { return rdata.selectionMode; } + + //! If selection_mode() is \c FLU_SINGLE_SELECT, then whichever node is under the mouse will always be selected, with all others unselected. Default is \c false + inline void select_under_mouse( bool b ) + { rdata.selectUnderMouse = b; } + + //! If selection_mode() is \c FLU_SINGLE_SELECT, then whichever node is under the mouse will always be selected, with all others unselected. Default is \c false + inline bool select_under_mouse() const + { return rdata.selectUnderMouse; } + + //! Calling this will cause any newly added branches to use the default branch icon + void set_default_branch_icons(); + + //! Set which node is hilighted and ready to be selected or unselected. This also scrolls the browser so \b n is visible. + void set_hilighted( Node* n ); + + //! Set the title of the root of the tree to \b label. If \b w is not \c NULL then that widget is the entry and its label is visible depending on the value of \b showLabel. Note that the widget is destroyed by the tree/node on clear() or the destructor + /*! The root icons, color, font and size are set to the current branch icons and text color, font and size */ + Node* set_root( const char *label, Fl_Widget *w = 0, bool showLabel = true ); + + //! Set the colors to use for shading every other entry. Default is FL_WHITE, FL_WHITE + inline void shaded_entry_colors( Fl_Color even, Fl_Color odd ) + { rdata.shadedColors[0] = even; rdata.shadedColors[1] = odd; } + + //! Set whether branch entries are visible. Default is \c true + inline void show_branches( bool b ) + { rdata.showBranches = b; rdata.forceResize = true; } + + //! Get whether branch entries are visible + inline bool show_branches() const + { return rdata.showBranches; } + + //! Set whether the connectors between entries are visible. Default is \c true + inline void show_connectors( bool b ) + { rdata.showConnectors = b; } + + //! Get whether the connectors between entries are visible + inline bool show_connectors() const + { return rdata.showConnectors; } + + //! Set whether the root branch (i.e. the name of the tree) is visible. Default is \c true + inline void show_root( bool b ) + { rdata.showRoot = b; rdata.forceResize = true; } + + //! Get whether the root branch (i.e. the name of the tree) is visible + inline bool show_root() const + { return rdata.showRoot; } + + //! Set whether leaf entries are visible. Default is \c true + inline void show_leaves( bool b ) + { rdata.showLeaves = b; rdata.forceResize = true; } + + //! Get whether leaf entries are visible + inline bool show_leaves() const + { return rdata.showLeaves; } + + //! Sort the tree according to insertion_mode() + inline void sort() + { root.sort(); } + + //! Unselect all entries in the tree + inline void unselect_all() + { root.unselect_all(); } + + inline static void use_FLU_WIDGET_CALLBACK( bool b ) + { USE_FLU_WIDGET_CALLBACK = b; } + + //! Set the vertical gap between tree entries. Default is 0 + inline void vertical_gap( int g ) + { rdata.vGap = g; rdata.forceResize = true; } + + //! Get the vertical gap between tree entries + inline int vertical_gap() const + { return rdata.vGap; } + + //! Override of Fl_Widget::when. Currently only FL_WHEN_NEVER, FL_WHEN_CHANGED, and FL_WHEN_NOT_CHANGED are supported. Default value is FL_WHEN_CHANGED + /*! When the callback occurs, you can use callback_reason() to determine exactly what cause the callback and callback_node() + to get the node that was affected. */ + //inline void when( unsigned int w ) + //{ rdata.when = w; } + + //! Override of Fl_Widget::when + //inline unsigned int when() const + //{ return rdata.when; } + + //! Set the gap between the widget and the icon that precedes it. Default is 2 + inline void widget_gap( int g ) + { rdata.wGap = g; rdata.forceResize = true; } + + //! Get the gap between the widget and the icon that precedes it + inline int widget_gap() const + { return rdata.wGap; } + + protected: + + class RData; + + //! Internal class holding an (alphabetically) ordered list of nodes + class NodeList + { + public: + NodeList(); + ~NodeList(); + void add( Node* n, int position = -1 ); + inline Node* child( int n ) const { return _nodes[n]; } + int erase( Node* n ); + int erase( const char* n ); + void erase( int n ); + void clear(); + int findNum( const char *n ); // find the number of nodes in the list with name n + Node* find( const char* n, int which = 1 ); // find the which'th node in the list with name n + inline int size() const { return _nNodes; }; + void sort(); + static bool move( Node* n1, int where, Node* n2 ); + private: + friend class Node; + static int compareNodes( const void *arg1, const void* arg2 ); + static int reverseCompareNodes( const void *arg1, const void* arg2 ); + bool search( Node *n, int &index ); + bool search( const char *n, int &index ); + bool linSearch( Node *n, int &index ); + bool linSearch( const char *n, int &index ); + bool binSearch( Node *n, int &index ); + bool binSearch( const char *n, int &index ); + Node **_nodes; + int _nNodes, _size; + }; + + public: + enum { MOVE_BEFORE, MOVE_INSIDE, MOVE_AFTER }; // where to move a dragged node? + protected: + + //! Recursive data structure passed down through the node tree + class RData { + public: + // volatile objects (from the perspective of each node during a recursive descent) + int x, y, totalW, totalH; + bool first, last, dragging, shiftSelect, shiftSelectAll, visibilityChanged, selectionFollowsHilight; + Node *hilighted, /**lastHilighted, */ *previous, *grabbed, *dragNode; + int delta, shadedIndex, counter, searchIndex, branchIconW, dragPos, dragWhere; + Fl_Color lineColor, bgColor, selectionColor; + bool forceResize; // force the browser to resize on the next draw (which forces a recalculation of the tree layout) + unsigned int nextId; // monotonically increasing id of each entry + std::string path; // used to construct the full path during a findPath() operation + std::vector<int> branchConnectors; + + // static objects (from the perspective of each node during a recursive descent) + int insertionMode; + Fl_Image *defaultCollapseIcons[2], *defaultBranchIcons[2]; + Fl_Image *collapseIcons[2], *branchIcons[2], *leafIcon; + int hGap, vGap, wGap; + int lineStyle, lineWidth, selectionMode, selectionDragMode; + bool showRoot, showConnectors, showLeaves, showBranches, openOnSelect, + allowDuplication, singleBranchOpen, moveOnlySameGroup, justOpenedClosed, + isMoveValid, doubleClickToOpen, allBranchesAlwaysOpen, autoBranches, openWOChildren, + selectUnderMouse; + Fl_Color defLineColor, defSelectionColor, shadedColors[2]; + Fl_Color defLeafColor, defBranchColor; + Fl_Font defLeafFont, defBranchFont; + int defLeafSize, defBranchSize; + int browserX, browserY, browserW, browserH; + Node *root; + Flu_Tree_Browser *tree; + unsigned int cbReason; + Node *cbNode, *lastOpenBranch; + }; + + public: + + //! This class holds a single entry in the tree + class Node + { + + protected: + + enum { ADD, REMOVE, FIND, FIND_NUMBER, GET_SELECTED }; // parameters for modify() + enum { DRAW, MEASURE, MEASURE_THIS_OPEN, HANDLE, COUNT_SELECTED }; // parameters for recurse() + + // flags + enum { SELECTED = 0x0001, COLLAPSED = 0x0002, LEAF = 0x0004, SHOW_LABEL = 0x0008, + ACTIVE = 0x0010, EXPAND_TO_WIDTH = 0x0020, ALWAYS_OPEN = 0x0040, + SOME_VISIBLE_CHILDREN = 0x0080, MOVABLE = 0x0100, DROPPABLE = 0x0200, + AUTO_LABEL_COLOR = 0x0400, AUTO_COLOR = 0x0800, AUTO_LABEL = 0x1000, + SWAP_LABEL_AND_WIDGET = 0x2000, ICON_AT_END = 0x4000 }; + + // flag manipulator functions + inline bool CHECK( unsigned short flag ) const { return flags & flag; } + inline void SET( unsigned short flag ) { flags |= flag; } + inline void SET( unsigned short flag, bool b ) { if(b) SET(flag); else CLEAR(flag); } + inline void CLEAR( unsigned short flag ) { flags &= ~flag; } + + public: + + //! Is this node currently active? + inline bool active() const + { return CHECK(ACTIVE); } + + //! Activate or deactivate this node + void active( bool b ); + + //! Activate this node + inline void activate() + { active(true); } + + //! Add the entry specified by \b fullpath to this node. If \b w is not \c NULL then that widget is the entry and the label (as specified in \b fullPath) is visible depending on the value of \b showLabel. Note that the widget is destroyed by the tree/node on clear() or the destructor + /*! \return a pointer to the Node of the added entry or NULL if the add failed */ + inline Node* add( const char* fullpath, Fl_Widget *w = 0, bool showLabel = true ) + { return( modify( fullpath, ADD, tree->rdata, w, showLabel ) ); } + + //! Convenience function that is the same as add() except it appends a '/' to \b fullpath if one does not exist + Node* add_branch( const char* fullpath, Fl_Widget *w = 0, bool showLabel = true ); + + //! Convenience function that is the same as add() except it removes any '/' at the end of \b fullpath + Node* add_leaf( const char* fullpath, Fl_Widget *w = 0, bool showLabel = true ); + + //! Convenience function that is the same as add() except \b path and \b name are concatenated (with a '/' added if necessary) to create the full path + Node* add( const char* path, const char* name, Fl_Widget *w = 0, bool showLabel = true ); + + //! Convenience function that is the same as add_branch() except \b path and \b name are concatenated (with a '/' added if necessary) to create the full path + Node* add_branch( const char* path, const char* name, Fl_Widget *w = 0, bool showLabel = true ); + + //! Convenience function that is the same as add_leaf() except \b path and \b name are concatenated (with a '/' added if necessary) to create the full path + Node* add_leaf( const char* path, const char* name, Fl_Widget *w = 0, bool showLabel = true ); + + //! Set whether a branch node is always open (only for branch nodes). Default is \c false + inline void always_open( bool b ) + { if( b ) open(true); SET(ALWAYS_OPEN,b); tree->rdata.forceResize = true; } + + //! Get whether this branch node is always open (only for branches) + inline bool always_open() const + { return CHECK(ALWAYS_OPEN); } + + //! Set whether the color of the widget in this node tracks the color of the node itself. This is useful for changing the color of the widget when the node is selected. Default is \c false + inline void auto_color( bool b ) + { SET(AUTO_COLOR,b); } + + //! Get whether the color of the widget in this node tracks the color of the node itself + inline bool auto_color() + { return CHECK(AUTO_COLOR); } + + //! Set whether the label of the widget in this node tracks the label of the node itself. This is useful for when the label of the node changes and you want the widget to reflect the change + inline void auto_label( bool b ) + { SET(AUTO_LABEL,b); } + + //! Set whether the label of the widget in this node tracks the label of the node itself. + inline bool auto_label() + { return CHECK(AUTO_LABEL); } + + //! Set whether the label color of the widget in this node tracks the label color of the node itself. This is useful for changing the label color of the widget when the node is selected. Default is \c false + inline void auto_label_color( bool b ) + { SET(AUTO_LABEL_COLOR,b); } + + //! Get whether the label color of the widget in this node tracks the label color of the node itself + inline bool auto_label_color() + { return CHECK(AUTO_LABEL_COLOR); } + + //! Set the branch icons to use for this node (only for branch nodes) + void branch_icons( Fl_Image *closed, Fl_Image *open ); + + //! Convenience routine to set both branch icons at once + inline void branch_icon( Fl_Image *icon ) + { branch_icons( icon, icon ); } + + //! \return child \b i of this node (base 0). Bounds checking is performed and NULL is returned if the child cannot be found + Node* child( int i ) const; + + //! \return the number of child nodes beneath this node + inline int children() const + { return _children.size(); } + + //! Clear all child entries from this node (does not change the entry of this node) + void clear(); + + //! Close this node (only for branches) + inline void close() + { open( false ); } + + //! Is this node closed? (only for branches) + inline bool closed() + { return !open(); } + + //! Set the collapse icons to use for this node (only for branch nodes) + /*! \note if a NULL icon is passed, the default plus/minus icons are chosen */ + void collapse_icons( Fl_Image *closed, Fl_Image *open ); + + //! Deactivate this node + inline void deactivate() + { active(false); } + + //! Get the depth of this node in the tree + unsigned short depth() const; + + //! Do the tree browser callback. \b reason should be one of FLU_HILIGHTED, FLU_UNHILIGHTED, FLU_SELECTED, FLU_UNSELECTED, FLU_OPENED, FLU_CLOSED, FLU_DOUBLE_CLICK, FLU_WIDGET_CALLBACK + void do_callback( int reason ); + + //! Set whether this node can receive new nodes as a result of dragging-and-dropping (only for branch nodes). Default is \c true + inline void droppable( bool b ) + { SET(DROPPABLE,b); } + + //! Get whether this node can receive new nodes as a result of dragging-and-dropping (only for branch nodes). + inline bool droppable() + { return CHECK(DROPPABLE); } + + //! Set whether to force the size of the embedded widget to expand to fill the visible width of the browser. Default is \c false + inline void expand_to_width( bool b ) + { SET(EXPAND_TO_WIDTH,b); tree->rdata.forceResize = true; } + + //! Get whether to force the size of the embedded widget to expand to fill the visible width of the browser + inline bool expand_to_width() const + { return CHECK(EXPAND_TO_WIDTH); } + + //! Find the entry identified by \b fullpath + /*! \return a pointer to the Node of the found entry, or NULL if no matching entry was found */ + inline Node* find( const char *fullpath ) + { return( modify( fullpath, FIND, tree->rdata ) ); } + + //! Find the entry identified by unique id \b id + /*! \return a pointer to the Node of the found entry, or NULL if no matching entry was found */ + Node* find( unsigned int id ); + + //! Find the entry containing the widget \b w + /*! \return a pointer to the Node of the found entry, or NULL if no matching entry was found */ + Node* find( Fl_Widget *w ); + + //! Search for Node \b n + /*! \return a pointer to \b n if it is found, or NULL if it is not present */ + inline Node* find( Node *n ) + { if( !n ) return NULL; else return find( n->id() ); } + + //! \return the full path of this node + /*! \note the returned value is only valid until the next time find_path() is called */ + inline const char* find_path() + { return tree->find_path( this ); } + + //! \return the first node in this hierarchy (i.e. this node) + Node* first(); + + //! \return the first branch encountered in a depth-first traversal (or this node if it is a branch). NULL means there are no branches + Node* first_branch(); + + //! \return the first leaf encountered in a depth-first traversal (or this node if it is a leaf). NULL means there are no leaves + Node* first_leaf(); + + //! Set whether this node draws the label to the left of the widget (\c false, default) or to the right of the widget (\c true) + inline void swap_label_and_widget( bool b ) + { SET(SWAP_LABEL_AND_WIDGET,b); } + + //! Get whether this node draws the label to the left of the widget (\c false, default) or to the right of the widget (\c true) + inline bool swap_label_and_widget() + { return CHECK(SWAP_LABEL_AND_WIDGET); } + + //! \return the selected Node that is at \b index among all selected nodes, or \c NULL if no Node is selected + /*! For example, \c get_selected(1) will return the first selected node. */ + Node* get_selected( int index ); + + //! Set whether the icon for this node is drawn after the label and widget (\c true) or before (\c false, default) (only for leaf nodes) + inline void icon_at_end( bool b ) + { SET(ICON_AT_END,b); } + + //! Get whether the icon for this node is drawn after the label and widget (\c true) or before (\c false, default) (only for leaf nodes) + inline bool icon_at_end() + { return CHECK(ICON_AT_END); } + + //! Get the unique ID of this node + inline unsigned int id() const + { return _id; } + + //! Get the index this node is (as a child) in its parent's list + /*! \return -1 if this node has no parent, else its index in its parent's list of children */ + int index() const; + + //! Insert a new node at position \b pos + Node* insert( const char* fullpath, int pos ); + + //! Insert a new branch at position \b pos + Node* insert_branch( const char* fullpath, int pos ); + + //! Insert a new leaf at position \b pos + Node* insert_leaf( const char* fullpath, int pos ); + + //! Is node \b n an ancestor of this node? + bool is_ancestor( Node* n ); + + //! Is this node a branch node? + bool is_branch() const; + + //! Is node \b n a descendent of this node? + bool is_descendent( Node* n ); + + //! Is this node a leaf node? + bool is_leaf() const; + + //! Is this node the root node? + inline bool is_root() const + { return( _parent == 0 ); } + + //! Set the label for this node. Note that setting the label may invalidate a sorted tree. Fix by calling Flu_Tree_Browser::sort() + inline void label( const char *l ) + { text = l; tree->redraw(); } + + //! Get the label for this node + inline const char* label() const + { return text.c_str(); } + + //! Set the label color for this node + inline void label_color( Fl_Color c ) + { textColor = c; } + + //! Get the label color for this node + inline Fl_Color label_color() const + { return textColor; } + + //! Set the label font for this node + inline void label_font( Fl_Font f ) + { textFont = f; tree->rdata.forceResize = true; } + + //! Get the label font for this node + inline Fl_Font label_font() const + { return textFont; } + + //! Set the label size for this node + inline void label_size( unsigned char s ) + { textSize = s; tree->rdata.forceResize = true; } + + //! Get the label size for this node + inline unsigned char label_size() const + { return textSize; } + + //! Is the label for this node visible? + inline bool label_visible() const + { return CHECK(SHOW_LABEL); } + + //! Set whether the label for this node is visible + inline void label_visible( bool b ) + { SET(SHOW_LABEL,b); tree->rdata.forceResize = true; } + + //! \return the last node in this hierarchy + Node* last(); + + //! \return the last branch encountered in a depth-first traversal (or this node if it is a branch and has no children). NULL means there are no branches + Node* last_branch(); + + //! \return the last leaf encountered in a depth-first traversal (or this node if it is a leaf). NULL means there are no leaves + Node* last_leaf(); + + //! Set the leaf icon to use for this node (only for leaf nodes) + void leaf_icon( Fl_Image *icon ); + + //! Set whether this node can be moved (either via move() or by dragging with the mouse). Default is \c true + inline void movable( bool b ) + { SET(MOVABLE,b); } + + //! Get whether this node can be moved (either via move() or by dragging with the mouse) + inline bool movable() + { return CHECK(MOVABLE); } + + //! Move this node to absolute position \b pos within its parent + /*! \return \c true if the move was successful, or \c false if the move is not allowed + */ + bool move( int pos ); + + //! Move this node to a position before, after, or inside node \b n + /*! \param where can be one of MOVE_BEFORE, MOVE_AFTER, or MOVE_INSIDE + \return \c true if the move was successful, or \c false if the move is not allowed + */ + inline bool move( int where, Node* n ) + { return( move( this, where, n ) ); } + + //! Move node \b n1 to a position before, after, or inside node \b n2 + /*! \param where can be one of MOVE_BEFORE, MOVE_AFTER, or MOVE_INSIDE + \return \c true if the move was successful, or \c false if the move is not allowed + */ + static bool move( Node* n1, int where, Node* n2 ); + + //! \return the next node (after this node) in this hierarchy (depth-first traversal) + Node* next(); + + //! \return the next branch (after this node) encountered in a depth-first traversal. NULL means there are no more branches + Node* next_branch(); + + //! \return the next leaf (after this node) encountered in a depth-first traversal. NULL means there are no more leaves + Node* next_leaf(); + + //! \return the next sibling (after this node) encountered in a depth-first traversal. NULL means this node is the last child w.r.t. its parent + Node* next_sibling(); + + //! \return the number of selected entries + int num_selected(); + + //! Is this node currently open? (only for branch nodes) + inline bool open() const + { return( !CHECK(COLLAPSED) || tree->rdata.allBranchesAlwaysOpen ); } + + //! Open or close this node (only for branch nodes) + void open( bool b ); + + //! Get the node that is the parent of this node, or NULL if there is no parent + inline Node* parent() const + { return _parent; } + + //! \return the previous node (before this node) in this hierarchy (depth-first traversal) + Node* previous(); + + //! \return the previous branch (before this node) encountered in a depth-first traversal. NULL means there are no more branches + Node* previous_branch(); + + //! \return the previous leaf (before this node) encountered in a depth-first traversal. NULL means there are no more leaves + Node* previous_leaf(); + + //! \return the previous sibling (before this node) encountered in a depth-first traversal. NULL means this node is the first child w.r.t. its parent + Node* previous_sibling(); + + //! Print this node and its children to stdout + void print( int spaces = 0 ); + + //! Remove the entry identified by path \b fullpath from this node + /*! \return the unique id of the removed entry, or \c 0 if no matching entry was found */ + inline unsigned int remove( const char *fullpath ) + { return( (unsigned int)modify( fullpath, REMOVE, tree->rdata ) ); } + + //! Remove the entry identified by unique id \b id from this node + /*! \return the unique id of the removed entry, or \c 0 if no matching entry was found */ + unsigned int remove( unsigned int id ); + + //! Remove the node containing the widget \b w from this node. Note that the widget is automatically destroyed + /*! \return the unique id of the removed entry, or \c 0 if no matching entry was found */ + unsigned int remove( Fl_Widget *w ); + + //! Remove Node \b n + /*! \return the id of \b n on successful removal, or \c 0 if \b n is present */ + inline unsigned int remove( Node* n ) + { if( !n ) return 0; else return remove( n->id() ); } + + //! Select this entry and all child entries + void select_all(); + + //! Is this node currently selected? + inline bool selected() const + { return CHECK(SELECTED); } + + //! Select or unselect this node + void select( bool b ); + + //! Select only this node + inline void select_only() + { tree->unselect_all(); select(true); } + + //! Sort this node's children according to Flu_Tree_Browser::insertion_mode() + inline void sort_children() + { sort(); } + + //! Swap this node and node \b n in their respective trees + /*! \return \c true if the swap was successful, else \c false */ + inline bool swap( Node* n ) + { return swap( this, n ); } + + //! Swap nodes \b n1 and \b n2 in their respective trees + /*! \return \c true if the swap was successful, else \c false */ + static bool swap( Node* n1, Node* n2 ); + + //! Unselect this entry and all child entries (except for Node \b except ) + void unselect_all( Node* except = NULL ); + + //! Get the user-specific data stored in this node + inline void* user_data() + { return userData; } + + //! Set the user-specific data stored in this node + inline void user_data( void *d ) + { userData = d; } + + //! Get the widget in this node, or NULL if there is no widget. Note that the widget is destroyed by the tree/node on clear() or the destructor + inline Fl_Widget* widget() const + { return( _widget ? _widget->w : NULL ); } + + //! Set the widget in this node. Note that the widget is destroyed by the tree/node on clear() or the destructor + void widget( Fl_Widget *w ); + + protected: + + friend class Flu_Tree_Browser; + friend class NodeList; + + // Root node constructor + Node( const char *lbl = 0 ); + + // Non-root constructor + Node( bool l, const char* n, Node *p, RData &rdata, Fl_Widget *w, bool showLabel ); + + ~Node(); + + // add/remove/find/get + Node* modify( const char* path, int what, RData &rdata, Fl_Widget *w = 0, bool showLabel = true ); + + void initType(); + + void sort(); + + void determineVisibility( bool parentVisible = true ); + + static bool isMoveValid( Node* &n1, int &where, Node* &n2 ); + + // handle/draw/measure/count + int recurse( RData &rdata, int type, int event = 0 ); + + void draw( RData &rdata, bool measure ); + + // recursively finding the full path of the node identified by id + bool findPath( unsigned int id, RData &rdata ); + + // recursively finding the full path of the node containing w + bool findPath( Fl_Widget *w, RData &rdata ); + + class WidgetInfo + { + public: + Fl_Widget *w; + int defaultW; // the initial width of the widget + void (*CB)(Fl_Widget*,void*); + void *CBData; + }; + + unsigned int _id; // the unique id of this node + unsigned short flags; + NodeList _children; + Node *_parent; + Flu_Tree_Browser *tree; + std::string text; + WidgetInfo *_widget; // memory overhead deferred to WidgetInfo. present only if widget is + Fl_Group *_group; + void *userData; + Fl_Image *cIcon[2], *bIcon[2], *lIcon; + Fl_Color textColor; + Fl_Font textFont; + unsigned char textSize; // the font size of the entry label text + unsigned short textW, textH; // how big the entry label actually is (stored within the node for performance reasons) + int currentY; // needed for animation + unsigned short currentH; + + inline static void _widgetCB( Fl_Widget* w, void* arg ) + { ((Node*)arg)->widgetCB(); } + void widgetCB(); + }; + + protected: + + inline static void _scrollCB( Fl_Widget* w, void* arg ) + { ((Flu_Tree_Browser*)arg)->redraw(); } + + /* override of Fl_Double_Window::draw() */ + void draw(); + + Fl_Group *scrollBox; + Fl_Scrollbar *scrollH, *scrollV; + Fl_Group *_box; + Node root; + RData rdata; +}; + +#endif diff --git a/contrib/TreeBrowser/LICENSE b/contrib/TreeBrowser/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..273fc091dbaeab7c3c7941971d865deeb784a48d --- /dev/null +++ b/contrib/TreeBrowser/LICENSE @@ -0,0 +1,569 @@ +/*************************************************************** + * FLU - FLTK Utility Widgets + * Copyright (C) 2002 Jason Bryan, Ohio Supercomputer Center, Ohio State University + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * To contribute, advise, suggest, berate, recommend, criticise, + * or otherwise communicate with me: jbryan@osc.edu + * Ohio Supercomputer Center + * 1224 Kinnear Rd + * Columbus, Ohio 43212 + ***************************************************************/ + + +----------------------------------------------------------------------- + + This library depends on the following GPL free libraries: + FLTK + + This library also uses OpenGL, which is a registered trademark of Silicon + Graphics, Inc. (SGI), and Doxygen, a free HTML page generator for documentation + of C++ classes. + + + This library is hereby distributed under the same LGPL license as FLTK. + Have fun with it! + +----------------------------------------------------------------------- + + FLTK License + December 11, 2001 + +The FLTK library and included programs are provided under the terms +of the GNU Library General Public License (LGPL) with the following +exceptions: + + 1. Modifications to the FLTK configure script, config + header file, and makefiles by themselves to support + a specific platform do not constitute a modified or + derivative work. + + The authors do request that such modifications be + contributed to the FLTK project - send all + contributions to "fltk-bugs@fltk.org". + + 2. Widgets that are subclassed from FLTK widgets do not + constitute a derivative work. + + 3. Static linking of applications and widgets to the + FLTK library does not constitute a derivative work + and does not require the author to provide source + code for the application or widget, use the shared + FLTK libraries, or link their applications or + widgets against a user-supplied version of FLTK. + + If you link the application or widget to a modified + version of FLTK, then the changes to FLTK must be + provided under the terms of the LGPL in sections + 1, 2, and 4. + + 4. You do not have to provide a copy of the FLTK license + with programs that are linked to the FLTK library, nor + do you have to identify the FLTK license in your + program or documentation as required by section 6 + of the LGPL. + + However, programs must still identify their use of FLTK. + The following example statement can be included in user + documentation to satisfy this requirement: + + [program/widget] is based in part on the work of + the FLTK project (http://www.fltk.org). + +----------------------------------------------------------------------- + + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + [This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + <one line to give the library's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + <signature of Ty Coon>, 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/contrib/TreeBrowser/Makefile b/contrib/TreeBrowser/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..712f911182d9bf1b772c68c3fdc9581d8005cd58 --- /dev/null +++ b/contrib/TreeBrowser/Makefile @@ -0,0 +1,42 @@ +# Gmsh - Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +include ../../variables + +LIB = ../../lib/libGmshTreeBrowser${LIBEXT} + +INC = ${DASH}I. + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} + +SRC = Flu_Tree_Browser.cpp + +OBJ = ${SRC:.cpp=${OBJEXT}} + +.SUFFIXES: ${OBJEXT} .cpp + +${LIB}: ${OBJ} + ${AR} ${ARFLAGS}${LIB} ${OBJ} + ${RANLIB} ${LIB} + +cpobj: ${OBJ} + cp -f ${OBJ} ../../lib/ + +.cpp${OBJEXT}: + ${CXX} ${CFLAGS} ${DASH}c $< + +clean: + ${RM} *.o *.obj + +depend: + (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ + ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ + ) > Makefile.new + cp Makefile Makefile.bak + cp Makefile.new Makefile + rm -f Makefile.new + +# DO NOT DELETE THIS LINE +Flu_Tree_Browser${OBJEXT}: Flu_Tree_Browser.cpp Flu_Tree_Browser.h diff --git a/doc/CREDITS.txt b/doc/CREDITS.txt index 58105ce8d0fd415ff662dbf73da0d335febeba73..736ca06308b0d169203083d8f2eae68cfbe2421d 100644 --- a/doc/CREDITS.txt +++ b/doc/CREDITS.txt @@ -75,21 +75,25 @@ Free Software Foundation, Inc: check the configuration options. This version of Gmsh may contain code (in the contrib/Metis subdirectory) written by George Karypis (karypis at cs.umn.edu), -copyright (C) 1998, Regents of the University of Minnesota: check the +copyright (C) 1998 Regents of the University of Minnesota: check the configuration options. This version of Gmsh may contain code (in the -contrib/NativeFileChooser subdirectory), copyright (C) 2004 by Greg +contrib/NativeFileChooser subdirectory), copyright (C) 2004 Greg Ercolano: check the configuration options. This version of Gmsh may contain code (in the contrib/Netgen -subdirectory) copyright (C) 1994-2004, Joachim Sch"oberl: check the +subdirectory) copyright (C) 1994-2004 Joachim Sch"oberl: check the configuration options. This version of Gmsh may contain code (in the contrib/Tetgen subdirectory) copyright (C) 2002-2007 Hang Si: check the configuration options. +This version of Gmsh may contain code (in the contrib/TreeBrowser +subdirectory), copyright (C) 2002 Jason Bryan, Ohio Supercomputer +Center, Ohio State University: check the configuration options. + This version of Gmsh may contain code (in the contrib/gmm subdirectory) copyright (C) 2002-2008 Yves Renard: check the configuration options. diff --git a/doc/VERSIONS.txt b/doc/VERSIONS.txt index 0523613101359a7882ecf685260425ab539fb474..c00ca283d9fd974784d8b6d11b786de49581d23d 100644 --- a/doc/VERSIONS.txt +++ b/doc/VERSIONS.txt @@ -1,10 +1,10 @@ -$Id: VERSIONS.txt,v 1.24 2008-12-19 09:45:32 geuzaine Exp $ +$Id: VERSIONS.txt,v 1.25 2008-12-28 10:26:35 geuzaine Exp $ 2.3.0 (?): restored full-quad recombine algorithm; fixed clipping planes when more than 32 views are present ({Geometry,Mesh,View}.Clip replaces General.Clip); modified arrow size (View.ArrowSize{Min,Max} -replaces View.ArrowSize) and Transform options; major graphics and GUI -code refactoring. +replaces View.ArrowSize) and Transform options; improved visibility +browser; major graphics and GUI code refactoring. 2.2.6 (Nov 21, 2008): better transfinite smoothing and automatic corner selection; fixed high order meshing crashes on Windows and diff --git a/doc/texinfo/gmsh.texi b/doc/texinfo/gmsh.texi index 4b7072bba6aa8f80a5917dd2b7975494368f4cc9..67d0b1b7f4c5b2e684383e76bd81e92e8953de62 100644 --- a/doc/texinfo/gmsh.texi +++ b/doc/texinfo/gmsh.texi @@ -549,7 +549,8 @@ preceding rule. @findex /*, */ @findex // -All Gmsh ASCII text input files support both C and C++ style comments: +All parsed input files (@file{.geo}, @file{.pos}) support both C and C++ +style comments: @enumerate @item @@ -562,6 +563,10 @@ These commands won't have the described effects inside double quotes or inside keywords. Also note that `white space' (spaces, tabs, new line characters) is ignored inside all expressions. +You can add comments in a mesh file (@file{.msh}) by creating a section +with an unrecognized label (e.g. @code{$Comments}/@code{$EndComments}): +see @ref{MSH ASCII file format}. + @c ========================================================================= @c General tools @c ========================================================================= @@ -2094,7 +2099,7 @@ line. (A deprecated synonym for @code{Progression} is @code{Power}.) -@item Transfinite Surface @{ @var{expression} @} < = @{ @var{expression-list} @} > < Left | Right | Alternate > ; +@item Transfinite Surface @{ @var{expression} @} | "*" < = @{ @var{expression-list} @} > < Left | Right | Alternate > ; Selects the surface @var{expression} to be meshed with the 2D transfinite algorithm. The @var{expression-list} should contain the identification numbers of three or four points on the boundary of the @@ -2136,7 +2141,7 @@ Hides the mesh of the entity @var{char-expression}, if @code{General.VisibilityMode} is set to @code{0} or @code{2} (@var{char-expression} can for example be @code{"*"}). -@item Recombine Surface @{ @var{expression-list} @} < = @var{expression} >; +@item Recombine Surface @{ @var{expression-list} @} | "*" < = @var{expression} >; Recombines the triangular meshes of the surfaces listed in @var{expression-list} into mixed triangular/quadrangular meshes. The optional @var{expression} on the right hand side specifies the maximum