diff --git a/Common/GmshDefines.h b/Common/GmshDefines.h index 4a5652d9796139ad607c030e03510c943c5c15fa..7acc67776bd7027f1fbe3cc062b4ed8559ff00a9 100644 --- a/Common/GmshDefines.h +++ b/Common/GmshDefines.h @@ -227,4 +227,12 @@ #define MESH_TRANSFINITE 1 #define MESH_UNSTRUCTURED 2 +// QuadTri options (structured/unstructured coupling with pyramids) +#define NO_QUADTRI 0 +#define QUADTRI_DBL_1 1 +#define QUADTRI_DBL_1_RECOMB 2 +#define QUADTRI_SNGL_1 3 +#define QUADTRI_SNGL_1_RECOMB 4 +#define TRANSFINITE_QUADTRI_1 5 + #endif diff --git a/Geo/ExtrudeParams.cpp b/Geo/ExtrudeParams.cpp index 1f530f1562a7aa4d7db290d8a3a66abd2738fac9..2849c7db072a4ee0111d871e346f8d9fcd362774 100644 --- a/Geo/ExtrudeParams.cpp +++ b/Geo/ExtrudeParams.cpp @@ -26,6 +26,7 @@ ExtrudeParams::ExtrudeParams(int ModeEx) geo.Source = -1; mesh.ExtrudeMesh = false; mesh.Recombine = false; + mesh.QuadToTri = NO_QUADTRI; mesh.ViewIndex = -1; mesh.BoundaryLayerIndex = 0; } diff --git a/Geo/ExtrudeParams.h b/Geo/ExtrudeParams.h index 9b5d399fcaf258863acd774477cbf5345d16ed2f..89e4898b6347f25251dec7036ef332a9151b50ae 100644 --- a/Geo/ExtrudeParams.h +++ b/Geo/ExtrudeParams.h @@ -38,6 +38,7 @@ public : struct{ bool ExtrudeMesh; bool Recombine; + int QuadToTri; int NbLayer; std::vector<int> NbElmLayer; std::vector<double> hLayer; diff --git a/Geo/GRegion.cpp b/Geo/GRegion.cpp index c2b04e704208d12428a5d35f887cea54180026c8..57c7d0ba5098dafdf1803d1837e1ff7c890299ae 100644 --- a/Geo/GRegion.cpp +++ b/Geo/GRegion.cpp @@ -109,6 +109,7 @@ void GRegion::resetMeshAttributes() { meshAttributes.Method = MESH_UNSTRUCTURED; meshAttributes.extrude = 0; + meshAttributes.QuadTri = NO_QUADTRI; } SBoundingBox3d GRegion::bounds() const @@ -239,6 +240,9 @@ void GRegion::writeGEO(FILE *fp) fprintf(fp, "}"); } fprintf(fp, ";\n"); + + if(meshAttributes.QuadTri != NO_QUADTRI ) + fprintf(fp, "TransfQuadTri {%d};\n", tag()); } } diff --git a/Geo/GRegion.h b/Geo/GRegion.h index 4a199e85b5bab37f1bfb626aa25acf5a949cf4ba..f869c133a9a6de69b6317fd011875a06b3b7d145 100644 --- a/Geo/GRegion.h +++ b/Geo/GRegion.h @@ -96,6 +96,8 @@ class GRegion : public GEntity { ExtrudeParams *extrude; // corners of the transfinite interpolation std::vector<GVertex*> corners; + // structured/unstructured coupling using pyramids + int QuadTri; } meshAttributes ; // a array for accessing the transfinite vertices using a triplet of diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp index 776a25aa766e35ca99865374dd1405ae4c4d4aba..09b08170d6405f46774900f924e30f51ee8da586 100644 --- a/Geo/Geo.cpp +++ b/Geo/Geo.cpp @@ -626,6 +626,7 @@ Volume *Create_Volume(int Num, int Typ) std::max(GModel::current()->getGEOInternals()->MaxVolumeNum, Num); pV->Typ = Typ; pV->Method = MESH_UNSTRUCTURED; + pV->QuadTri = NO_QUADTRI; pV->TrsfPoints = List_Create(6, 6, sizeof(Vertex *)); pV->Surfaces = List_Create(1, 2, sizeof(Surface *)); pV->SurfacesOrientations = List_Create(1, 2, sizeof(int)); @@ -1047,6 +1048,7 @@ static void CopyVolume(Volume *v, Volume *vv, bool copyMeshingMethod) vv->Typ = v->Typ; if(copyMeshingMethod){ vv->Method = v->Method; + vv->QuadTri = v->QuadTri; if(List_Nbr(v->TrsfPoints)) Msg::Warning("Only automatic transfinite volume specifications can be copied"); } diff --git a/Geo/Geo.h b/Geo/Geo.h index 45d3e72b025216258bd88bd370ad2abcb48a1daf..0810ff0d07eae0f7f01d669517b6127a3d1fc10c 100644 --- a/Geo/Geo.h +++ b/Geo/Geo.h @@ -182,6 +182,7 @@ class Volume { int Typ; char Visible; int Method; + int QuadTri; ExtrudeParams *Extrude; List_T *TrsfPoints; List_T *Surfaces; diff --git a/Geo/gmshRegion.cpp b/Geo/gmshRegion.cpp index 784ca7be47a39406d61df59c84e4fe077aea3a01..70fa9eb4ca9bbaa7e1d4fddc514e12a189d8d233 100644 --- a/Geo/gmshRegion.cpp +++ b/Geo/gmshRegion.cpp @@ -43,6 +43,7 @@ gmshRegion::gmshRegion(GModel *m, ::Volume *volume) void gmshRegion::resetMeshAttributes() { meshAttributes.Method = v->Method; + meshAttributes.QuadTri = v->QuadTri; meshAttributes.extrude = v->Extrude; if(meshAttributes.Method == MESH_TRANSFINITE){ meshAttributes.corners.clear(); diff --git a/Mesh/CMakeLists.txt b/Mesh/CMakeLists.txt index 3f626aff6c361a6b3f96e83aec525d398f46e8a9..6429511992fb85bce1159589de6310f10a5d66f6 100644 --- a/Mesh/CMakeLists.txt +++ b/Mesh/CMakeLists.txt @@ -28,6 +28,8 @@ set(SRC meshPartitionOptions.cpp meshRefine.cpp multiscalePartition.cpp + QuadTriUtils.cpp + QuadTriExtruded2D.cpp QuadTriExtruded3D.cpp QuadTriTransfinite3D.cpp ) file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) diff --git a/Mesh/QuadTriExtruded2D.cpp b/Mesh/QuadTriExtruded2D.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5e485a533cdd5602dd25dc4d91144198a23e1d31 --- /dev/null +++ b/Mesh/QuadTriExtruded2D.cpp @@ -0,0 +1,625 @@ +/************************************************************************************************** +QuadTriExtruded2D.cpp + +The code in this file was written by Dr. Trevor S. Strickler. +email: <trevor.strickler@gmail.com> + +This file is part of the QuadTri contribution to Gmsh. QuadTri allows the conformal interface +of quadrangle faces to triangle faces using pyramids and other mesh elements. + +See READMEQUADTRI.txt for more information. The license information is in LICENSE.txt. + +Trevor S. Strickler hereby transfers copyright of QuadTri files to +Christophe Geuzaine and J.-F. Remacle with the understanding that +his contribution shall be cited appropriately. + +All reused or original Gmsh code is Copyright (C) 1997-2011 C. Geuzaine, J.-F. Remacle +Gmsh is available at: www.geuz.org/gmsh + +For Gmsh license information, see the LICENSE.txt file for license information. Please report all +Gmsh bugs and problems to <gmsh@geuz.org>. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License, Version 2, +as published by the Free Software Foundation, or (at your option) +any later version, with or without the exception given in the +LICENSE.txt file supplied with this code and with Gmsh. + +This program 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 General Public License for more details. + +****************************************************************************************************/ + +#include "QuadTriExtruded2D.h" + +// By Geuzaine, Remacle... +static void addTriangle(MVertex* v1, MVertex* v2, MVertex* v3, + GFace *to, MElement* source) +{ + MTriangle* newTri = new MTriangle(v1, v2, v3); + to->triangles.push_back(newTri); +} + +// By Geuzaine, Remacle... +static void addQuadrangle(MVertex* v1, MVertex* v2, MVertex* v3, MVertex* v4, + GFace *to, MElement* source) +{ + MQuadrangle* newQuad = new MQuadrangle(v1, v2, v3, v4); + to->quadrangles.push_back(newQuad); +} + + +// The function that tests whether a 2D surface is a lateral of a valid QuadToTri +// region and whether there are conflicts. If surface is not part of valid QuadToTri region +// or if there are QuadToTri conflicts, return 0. Note that RemoveDuplicateSurfaces() +// makes this DIFFICULT. Also, the tri_quad_flag determins whether the surface +// should be meshed with triangles or quadrangles: +// tri_quad_values: 0 = no override, 1 = mesh as quads, 2 = mesh as triangles. +// Added 2010-12-09. +int IsValidQuadToTriLateral(GFace *face, int *tri_quad_flag, bool *detectQuadToTriLateral ) +{ + (*tri_quad_flag) = 0; + (*detectQuadToTriLateral) = false; + + GModel *model = face->model(); + + + ExtrudeParams *ep = face->meshAttributes.extrude; + + if( !ep || !ep->mesh.ExtrudeMesh || !ep->geo.Mode == EXTRUDED_ENTITY ){ + Msg::Error("In IsValidQuadToTriLateral(), face %d is not a structured extrusion.", + face->tag() ); + return 0; + } + + GEdge *face_source = model->getEdgeByTag( std::abs( ep->geo.Source ) ); + if( !face_source ){ + Msg::Error("In IsValidQuadToTriLateral(), face %d has no source edge.", + face->tag() ); + } + + // It seems the member pointers to neighboring regions for extruded lateral faces are not set. + // For now, have to loop through + // ALL the regions to see if the presently considered face belongs to the region and if + // any neighboring region is QUADTRI. + // The following loop will find all the regions that the face bounds, and determine + // whether the face is a lateral of the region (including whether the region is even extruded). + // After that information is determined, function can test for QuadToTri neighbor conflicts. + + std::vector<GRegion *> lateral_regions; + std::vector<GRegion *> adjacent_regions; + int numRegions = 0; + int numLateralRegions = 0; + + numRegions = GetNeighborRegionsOfFace(face, adjacent_regions); + for( int i_reg = 0; i_reg < numRegions; i_reg++ ){ + GRegion *region = adjacent_regions[i_reg]; + + // is region in the current model's region's or is it deleted? + if( !FindVolume( ( region->tag() ) ) ) + continue; + + // is the region mesh extruded? + if( !region->meshAttributes.extrude || + ( region->meshAttributes.extrude && + !region->meshAttributes.extrude->mesh.ExtrudeMesh ) ) + continue; + if( region->meshAttributes.extrude->geo.Mode != EXTRUDED_ENTITY ) + continue; + + // Test whether the face is a lateral + if( IsSurfaceALateralForRegion(region, face) ){ + lateral_regions.push_back(region); + numLateralRegions++; + if( region->meshAttributes.extrude->mesh.QuadToTri ) + (*detectQuadToTriLateral) = true; + } + + } + + // MAIN test of whether this is even a quadToTri extrusion lateral + // the only return 0 path that is NOT an error + if( !(*detectQuadToTriLateral) ) + return 0; + + // now will start conflict checks + + if(numRegions > 2){ + Msg::Error("In IsValidQuadToTriLateral(), too many regions adjacent to surface %d.", + face->tag() ); + return 0; + } + + bool detect_conflict = false; + + + // Set the tri_quad_flag that lets extrudeMesh override ep->Recombine; + // tri_quad_values: 0 = no override, 1 = mesh as quads, 2 = mesh as triangles. + + // if this face is a free surface: + if( adjacent_regions.size() == 1 ){ + if( lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_SNGL_1_RECOMB || + lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_DBL_1_RECOMB ) + (*tri_quad_flag) = 1; + else if( lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_SNGL_1 || + lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_DBL_1 ) + (*tri_quad_flag) = 2; + else + (*tri_quad_flag) = 0; + } + else if( adjacent_regions.size() > 1 ){ + GRegion *adj_region = NULL; + ExtrudeParams *adj_ep = NULL; + if( lateral_regions[0] == adjacent_regions[0] ) + adj_region = adjacent_regions[1]; + else + adj_region = adjacent_regions[0]; + adj_ep = adj_region->meshAttributes.extrude; + + // if Neighbor is Transfinite, go with the default, non-QuadTri recombine for this surface + if( adj_region && adj_region->meshAttributes.Method == MESH_TRANSFINITE ) + (*tri_quad_flag) = 0; + // if a neighbor + // has no extrusion structure, + // don't even consider QuadToTri Recomb on this face. + else if( adj_region && !(adj_ep && adj_ep->mesh.ExtrudeMesh) ) + (*tri_quad_flag) = 2; + // This face is the source face of a second + // neighboring extrusion. + else if( adj_ep && adj_ep->mesh.ExtrudeMesh && + model->getFaceByTag( std::abs( adj_ep->geo.Source ) ) == face ){ + if( lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_SNGL_1_RECOMB || + lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_DBL_1_RECOMB ) + (*tri_quad_flag) = 1; + else if( lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_SNGL_1 || + lateral_regions[0]->meshAttributes.extrude->mesh.QuadToTri == QUADTRI_DBL_1 ) + (*tri_quad_flag) = 2; + else + (*tri_quad_flag) = 0; + } + // if both neighbors are structured but none of the previous apply: + else if( adj_ep && adj_ep->mesh.ExtrudeMesh ){ + if( adj_ep && !adj_ep->mesh.QuadToTri && adj_ep->mesh.Recombine || + ep && !ep->mesh.QuadToTri && ep->mesh.Recombine ) + (*tri_quad_flag) = 1; + else if( adj_ep && !adj_ep->mesh.QuadToTri && !adj_ep->mesh.Recombine || + ep && !ep->mesh.QuadToTri && !ep->mesh.Recombine ) + (*tri_quad_flag) = 2; + // if both are quadToTri and either are quadToTri recomblaterals, recombine + else if( ep->mesh.QuadToTri == QUADTRI_SNGL_1_RECOMB || + adj_ep && adj_ep->mesh.QuadToTri == QUADTRI_SNGL_1_RECOMB ) + (*tri_quad_flag) = 1; + else if( ep->mesh.QuadToTri == QUADTRI_DBL_1_RECOMB || + adj_ep && adj_ep->mesh.QuadToTri == QUADTRI_DBL_1_RECOMB ) + (*tri_quad_flag) = 1; + else + (*tri_quad_flag) = 2; + } + // any other adjacent surface, just default to the QuadToTri region's non-QuadToTri + // default recombination method. Any mistakes at this point are not this feature's. + else + (*tri_quad_flag) = 0; + } + // if this executes, there's a mistake here : + else{ + detect_conflict = true; + (*tri_quad_flag) = 0; + } + + if( detect_conflict ) + return 0; + else + return 1; + +} + + + +// The function that tests whether a surface is a QuadToTri top surface and whether +// there are conflicts. If surface is not a top for a valid QuadToTri region or if +// there are QuadToTri conflicts, return 0. Note that RemoveDuplicateSurfaces() +// makes this DIFFICULT. Also, the type of QuadToTri interface is placed into the +// pointer argument quadToTri. . +// Added 2010-12-09. +int IsValidQuadToTriTop(GFace *face, int *quadToTri, bool *detectQuadToTriTop) +{ + (*quadToTri) = NO_QUADTRI; + (*detectQuadToTriTop) = false; + + GModel *model = face->model(); + + // It seems the member pointers to neighboring regions for extruded top faces are not set. + // For now, have to loop through + // ALL the regions to see if the presently considered face belongs to the region. + // The following loop will find all the regions that the face bounds, and determine + // whether the face is a top face of the region (including whether the region is even extruded). + // After that information is determined, function can test for QuadToTri neighbor conflicts. + + std::vector<GRegion *> top_regions; + std::vector<GRegion *> adjacent_regions; + std::vector<GRegion *> all_regions; + int numRegions = 0; + int numTopRegions = 0; + + std::set<GRegion *, GEntityLessThan>::iterator itreg; + for( itreg = model->firstRegion(); itreg != model->lastRegion(); itreg++ ) + all_regions.push_back( (*itreg) ); + + for( int i_reg = 0; i_reg < all_regions.size(); i_reg++ ){ + + // save time + if( numRegions >= 2 ) + break; + + GRegion *region = all_regions[i_reg]; + + // is region in the current model's regions or is it deleted? + if( !FindVolume( ( region->tag() ) ) ) + continue; + + // does face belong to region? + std::list<GFace *> region_faces = std::list<GFace *>( region->faces() ); + if( std::find( region_faces.begin(), region_faces.end(), face ) != + region_faces.end() ){ + adjacent_regions.push_back(region); + numRegions++; + } + else + continue; + + // is region extruded? + if( !region->meshAttributes.extrude ) + continue; + if( region->meshAttributes.extrude->geo.Mode != EXTRUDED_ENTITY ) + continue; + + // Test whether the face is a top for the region + if( IsSurfaceATopForRegion(region, face) ){ + top_regions.push_back(region); + numTopRegions++; + if( region->meshAttributes.extrude->mesh.QuadToTri ) + (*detectQuadToTriTop) = true; + } + + } + + // MAIN test of whether this is even a quadToTri extrusion lateral + // the only return 0 path that is NOT an error + if( !(*detectQuadToTriTop) ) + return 0; + + + + ExtrudeParams *ep = face->meshAttributes.extrude; + + if(!ep){ + Msg::Error("In IsValidQuadToTriTop(), no extrude info for surface %d.", + face->tag() ); + return 0; + } + + if( ep->geo.Mode != COPIED_ENTITY){ + Msg::Error("In IsValidQuadToTriTop(), surface %d is not copied from source.", + face->tag() ); + return 0; + } + + if( ep->mesh.QuadToTri == 0){ + Msg::Error("In IsValidQuadToTriTop(), surface %d was determined to be the top surface " + "for a QuadToTri extrusion, but does not have QuadToTri parameters set within itself.", + face->tag() ); + return 0; + } + + GFace *face_source = model->getFaceByTag(std::abs(ep->geo.Source)); + if(!face_source){ + Msg::Error("In IsValidQuadToTriTop(), unknown source face number %d.", + face->meshAttributes.extrude->geo.Source); + return 0; + } + + if(numRegions > 2){ + Msg::Error("In IsValidQuadToTriTop(), too many regions adjacent to surface %d.", + face->tag() ); + return 0; + } + + + if( top_regions.size() ){ + (*quadToTri) = top_regions[0]->meshAttributes.extrude->mesh.QuadToTri; + } + + // Make sure that face is the top for only one region. if not, then there will likely + // be conflicts (two regions extruded into each other). + if( top_regions.size() > 1 ){ + Msg::Error("In IsValidQuadToTriTop(), QuadToTri top surface %d identified as top " + "surface for more than one region. Likely conflict.", face->tag() ); + return 0; + } + + return 1; +} + + +// this function specifically meshes a quadToTri top in an unstructured way +// return 1 if success, return 0 if failed. +// Added 2010-12-20 +static int MeshQuadToTriTopUnstructured(GFace *from, GFace *to, + std::set<MVertex*, MVertexLessThanLexicographic> &pos) +{ + + // if the source is all triangles, then just return 1. + if( from->triangles.size() && !from->quadrangles.size() ) + return 1; + + if( !to->meshAttributes.extrude || !to->meshAttributes.extrude->mesh.QuadToTri ) + return 0; + + + // in weird case of NO quads and NO tri + if( !from->triangles.size() && !from->quadrangles.size() ) + return 0; + + + // make set of source edge vertices + std::set<MVertex*, MVertexLessThanLexicographic> pos_src_edge; + QuadToTriInsertFaceEdgeVertices(from, pos_src_edge); + + // Loop through all the quads and make the triangles with diagonals running + // in a selected direction. + + to->triangles.reserve(to->triangles.size()+from->quadrangles.size()*2); + std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp; + + for(unsigned int i = 0; i < from->quadrangles.size(); i++){ + std::vector<MVertex*> verts; + for(int j = 0; j < from->quadrangles[i]->getNumVertices(); j++){ + MVertex *v = from->quadrangles[i]->getVertex(j); + MVertex tmp(v->x(), v->y(), v->z(), 0, -1); + ExtrudeParams *ep = to->meshAttributes.extrude; + ep->Extrude(ep->mesh.NbLayer - 1, ep->mesh.NbElmLayer[ep->mesh.NbLayer - 1], + tmp.x(), tmp.y(), tmp.z()); + itp = pos.find(&tmp); + if(itp == pos.end()){ // FIXME: workaround + Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z()); + itp = tmp.linearSearch(pos); + } + if(itp == pos.end()) { + Msg::Error("Could not find extruded vertex (%.16g, %.16g, %.16g) in surface %d", + tmp.x(), tmp.y(), tmp.z(), to->tag()); + to->triangles.reserve(to->triangles.size()+1); + return 0; + } + verts.push_back(*itp); + } + + + if( verts.size() != 4 ){ + Msg::Error("During mesh of QuadToTri surface %d, %d vertices found " + "in quad of source surface %d.", to->tag(), verts.size(), + from->tag() ); + return 0; + } + + // make the element + MElement *element = from->quadrangles[i]; + + // draw other diagonals to minimize difference in average edge length with diagonal length, in quadrature + + double mag_sq_ave = 0.0; + for( int p = 0; p < 4; p++ ){ + int d_leg = verts[p]->distance(verts[(p+1)%4]); + mag_sq_ave += d_leg*d_leg; + } + mag_sq_ave /= 4; + + double d1 = verts[0]->distance(verts[2]); + double d2 = verts[1]->distance(verts[3]); + + if( std::fabs(d1*d1-mag_sq_ave) <= std::fabs(d2*d2-mag_sq_ave) ){ + addTriangle(verts[0],verts[1],verts[2],to,element); + addTriangle(verts[0],verts[2],verts[3],to,element); + } + else{ + addTriangle(verts[1],verts[2],verts[3],to,element); + addTriangle(verts[1],verts[3],verts[0],to,element); + } + } + + return 1; +} + + +// This function meshes the top surface of a QuadToTri extrusion. It returns 0 if it is given a +// non-quadToTri extrusion or if it fails. +// Args: +// 'GFace *to' is the top surface to mesh, 'from' is the source surface, 'pos' is a std::set +// of vertex positions for the top surface. +int MeshQuadToTriTopSurface( GFace *from, GFace *to, std::set<MVertex*, + MVertexLessThanLexicographic> &pos) +{ + if( !to->meshAttributes.extrude || !to->meshAttributes.extrude->mesh.QuadToTri ) + return 0; + + // if the source is all triangles, then just let this function is not needed. Return 1. + if( from->triangles.size() && !from->quadrangles.size() ) + return 1; + + // in weird case of NO quads and NO tri + if( !from->triangles.size() && !from->quadrangles.size() ) + return 0; + + // record number of triangles currently in the top surface and make sure they don't change + // if defaulting to unstructured in either of the structured methods fail below. Otherwise, return 0. + unsigned int num_triangles = to->triangles.size(); + + ExtrudeParams *ep = to->meshAttributes.extrude; + if( !ep || !ep->mesh.ExtrudeMesh || !ep->geo.Mode == COPIED_ENTITY ){ + Msg::Error("In MeshQuadToTriTopSurface(), incomplete or no " + "extrude information for top face %d.", to->tag() ); + return 0; + } + + ExtrudeParams *from_ep = from->meshAttributes.extrude; + + // number of extrusion layers + int num_layers = 0; + for( int p = 0; p < ep->mesh.NbLayer; p++ ) + num_layers += ep->mesh.NbElmLayer[p]; + + // is this a valid double layer extrusion? + bool is_dbl = false; + if( num_layers >= 2 && ( ep->mesh.QuadToTri == QUADTRI_DBL_1 || ep->mesh.QuadToTri == QUADTRI_DBL_1_RECOMB ) ) + is_dbl = true; + + // IF this is a SINGLE layer quadToTri, mesh the surfaces according to this modified + // least point value method: if a 3 boundary point quad, draw diagonals from middle corner toward + // interior. If a a 2- or 1- point boundary quad, draw toward lowest pointer number NOT on boundary. + // All interior quad, draw diagonal to vertex with lowest pointer number. + + if( !is_dbl ){ + + std::set<MVertex*, MVertexLessThanLexicographic> pos_src_edge; + QuadToTriInsertFaceEdgeVertices(from, pos_src_edge); + std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp; + + // loop through each element source quadrangle and extrude + for(unsigned int i = 0; i < from->quadrangles.size(); i++){ + std::vector<MVertex*> verts; + for(int j = 0; j < from->quadrangles[i]->getNumVertices(); j++){ + MVertex *v = from->quadrangles[i]->getVertex(j); + MVertex tmp(v->x(), v->y(), v->z(), 0, -1); + ExtrudeParams *ep = to->meshAttributes.extrude; + ep->Extrude(ep->mesh.NbLayer - 1, ep->mesh.NbElmLayer[ep->mesh.NbLayer - 1], + tmp.x(), tmp.y(), tmp.z()); + itp = pos.find(&tmp); + if(itp == pos.end()){ // FIXME: workaround + Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z()); + itp = tmp.linearSearch(pos); + } + if(itp == pos.end()) { + Msg::Error("In MeshQuadToTriTopSurface(), Could not find " + "extruded vertex (%.16g, %.16g, %.16g) in surface %d", + tmp.x(), tmp.y(), tmp.z(), to->tag()); + to->triangles.reserve(to->triangles.size()+1); + return 0; + } + verts.push_back(*itp); + } + + + if( verts.size() != 4 ){ + Msg::Error("During mesh of QuadToTri surface %d, %d vertices found " + "in quad of source surface %d.", to->tag(), verts.size(), + from->tag() ); + return 0; + } + + // make the element + MElement *element = from->quadrangles[i]; + + // count vertices that are on a boundary edge + int edge_verts_count = 0; + int skip_index = 0; + int bnd_indices[4]; + for( int p = 0; p < element->getNumVertices(); p++ ){ + if( pos_src_edge.find( element->getVertex(p) ) != pos_src_edge.end() ){ + edge_verts_count++; + bnd_indices[p] = 1; + } + else{ + skip_index = p; + bnd_indices[p] = 0; + } + } + + // Apply modified lowest vertex pointer diagonalization + int low_index = -1; + if( edge_verts_count == 3 || edge_verts_count == 2 || edge_verts_count == 1 ){ + for( int p = 0; p < 4; p++ ){ + if( !bnd_indices[p] && verts[p] != element->getVertex(p) ){ + if( low_index < 0 ) + low_index = p; + else if( verts[p] < verts[low_index] ) + low_index = p; + } + } + if( low_index < 0 ) // what if they are all degenerate? Avoid the out-of-bounds error. + low_index = 0; + } + + // lowest possible vertex pointer, regardless of if on edge or not + else if( edge_verts_count == 4 || edge_verts_count == 0 ) + low_index = getIndexForLowestVertexPointer(verts); + + addTriangle( verts[low_index],verts[(low_index+1)%verts.size()], + verts[(low_index+2)%verts.size()],to,element); + addTriangle( verts[low_index],verts[(low_index+2)%verts.size()], + verts[(low_index+3)%verts.size()],to,element); + } + return 1; + } + + + // AFTER THIS POINT IN FUNCTION, CODE IS ALL FOR DOUBLE LAYER EXTRUSIONS (Less restrictive). + + // if double layer and unstructured, can try to make the top mesh a little neater + GFace *root_source = findRootSourceFaceForFace( from ); + ExtrudeParams *ep_src = root_source->meshAttributes.extrude; + bool struct_root = false; + if( root_source && + ( ep_src && ep_src->mesh.ExtrudeMesh && ep_src->geo.Mode == EXTRUDED_ENTITY || + root_source->meshAttributes.Method == MESH_TRANSFINITE ) ) + struct_root = true; + + if( !struct_root && MeshQuadToTriTopUnstructured(from, to, pos) ) + return 1; + + // And top surface for a structured double layer can be meshed quite easily + else{ + std::set<MVertex *, MVertexLessThanLexicographic >::iterator itp; + // loop through each element source quadrangle and extrude + for(unsigned int i = 0; i < from->quadrangles.size(); i++){ + std::vector<MVertex*> verts; + for(int j = 0; j < from->quadrangles[i]->getNumVertices(); j++){ + MVertex *v = from->quadrangles[i]->getVertex(j); + MVertex tmp(v->x(), v->y(), v->z(), 0, -1); + ExtrudeParams *ep = to->meshAttributes.extrude; + ep->Extrude(ep->mesh.NbLayer - 1, ep->mesh.NbElmLayer[ep->mesh.NbLayer - 1], + tmp.x(), tmp.y(), tmp.z()); + itp = pos.find(&tmp); + if(itp == pos.end()){ // FIXME: workaround + Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z()); + itp = tmp.linearSearch(pos); + } + if(itp == pos.end()) { + Msg::Error("In MeshQuadToTriTopSurface(), Could not find " + "extruded vertex (%.16g, %.16g, %.16g) in surface %d", + tmp.x(), tmp.y(), tmp.z(), to->tag()); + to->triangles.reserve(to->triangles.size()+1); + return 0; + } + verts.push_back(*itp); + } + + + if( verts.size() != 4 ){ + Msg::Error("During mesh of QuadToTri surface %d, %d vertices found " + "in quad of source surface %d.", to->tag(), verts.size(), + from->tag() ); + return 0; + } + + // make the element + MElement *element = from->quadrangles[i]; + addTriangle( verts[0],verts[2], verts[3],to,element); + addTriangle( verts[0],verts[1], verts[2],to,element); + } + return 1; + } + + return 0; + +} diff --git a/Mesh/QuadTriExtruded2D.h b/Mesh/QuadTriExtruded2D.h new file mode 100644 index 0000000000000000000000000000000000000000..bd8b46a467a3c63f0a8f810334faae5a31ad7299 --- /dev/null +++ b/Mesh/QuadTriExtruded2D.h @@ -0,0 +1,83 @@ +/************************************************************************************************** +QuadTriExtruded2D.h + +The code in this file was written by Dr. Trevor S. Strickler. +email: <trevor.strickler@gmail.com> + +This file is part of the QuadTri contribution to Gmsh. QuadTri allows the conformal interface +of quadrangle faces to triangle faces using pyramids and other mesh elements. + +See READMEQUADTRI.txt for more information. The license information is in LICENSE.txt. + +Trevor S. Strickler hereby transfers copyright of QuadTri files to +Christophe Geuzaine and J.-F. Remacle with the understanding that +his contribution shall be cited appropriately. + +All reused or original Gmsh code is Copyright (C) 1997-2011 C. Geuzaine, J.-F. Remacle +Gmsh is available at: www.geuz.org/gmsh + +For Gmsh license information, see the LICENSE.txt file for license information. Please report all +Gmsh bugs and problems to <gmsh@geuz.org>. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License, Version 2, +as published by the Free Software Foundation, or (at your option) +any later version, with or without the exception given in the +LICENSE.txt file supplied with this code and with Gmsh. + +This program 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 General Public License for more details. + +****************************************************************************************************/ +#if !defined(_QTEXTR2D_H_) +#define _QTEXTR2D_H_ + +#include "Geo.h" +#include "GEntity.h" +#include "GFace.h" +#include "GEdge.h" +#include "GModel.h" +#include "ExtrudeParams.h" +#include "GmshDefines.h" +#include "MVertex.h" +#include "Context.h" +#include "GModel.h" +#include "meshGFace.h" +#include "MLine.h" +#include "MTriangle.h" +#include "MQuadrangle.h" +#include "Numeric.h" +#include <map> +#include <math.h> +#include "QuadTriUtils.h" + +// The function that tests whether a 2D surface is a lateral of a valid QuadToTri +// region and whether there are conflicts. If surface is not part of valid QuadToTri region +// or if there are QuadToTri conflicts, return 0. Note that RemoveDuplicateSurfaces() +// makes this DIFFICULT. Also, the tri_quad_flag determins whether the surface +// should be meshed with triangles or quadrangles: +// tri_quad_values: 0 = no override, 1 = mesh as quads, 2 = mesh as triangles. +// Added 2010-12-09. +int IsValidQuadToTriLateral(GFace *face, int *tri_quad_flag, bool *detectQuadToTriLateral ); + + +// The function that tests whether a surface is a QuadToTri top surface and whether +// there are conflicts. If surface is not a top for a valid QuadToTri region or if +// there are QuadToTri conflicts, return 0. Note that RemoveDuplicateSurfaces() +// makes this DIFFICULT. Also, the type of QuadToTri interface is placed into the +// pointer argument quadToTri. . +// Added 2010-12-09. +int IsValidQuadToTriTop(GFace *face, int *quadToTri, bool *detectQuadToTriTop); + + +// This function meshes the top surface of a QuadToTri extrusion. It returns 0 if it is given a +// non-quadToTri extrusion or if it fails. +// Args: +// 'GFace *to' is the top surface to mesh, 'from' is the source surface, 'pos' is a std::set +// of vertex positions for the top surface. +int MeshQuadToTriTopSurface( GFace *from, GFace *to, std::set<MVertex*, + MVertexLessThanLexicographic> &pos); + +#endif diff --git a/Mesh/QuadTriExtruded3D.cpp b/Mesh/QuadTriExtruded3D.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2b6b0d2de400f17f9b397d0933e19eaa87e07695 --- /dev/null +++ b/Mesh/QuadTriExtruded3D.cpp @@ -0,0 +1,5835 @@ +/************************************************************************************************** +QuadTriExtruded3D.cpp + +The code in this file was written by Dr. Trevor S. Strickler. +email: <trevor.strickler@gmail.com> + +This file is part of the QuadTri contribution to Gmsh. QuadTri allows the conformal interface +of quadrangle faces to triangle faces using pyramids and other mesh elements. + +See READMEQUADTRI.txt for more information. The license information is in LICENSE.txt. + +Trevor S. Strickler hereby transfers copyright of QuadTri files to +Christophe Geuzaine and J.-F. Remacle with the understanding that +his contribution shall be cited appropriately. + +All reused or original Gmsh code is Copyright (C) 1997-2011 C. Geuzaine, J.-F. Remacle +Gmsh is available at: www.geuz.org/gmsh + +For Gmsh license information, see the LICENSE.txt file for license information. Please report all +Gmsh bugs and problems to <gmsh@geuz.org>. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License, Version 2, +as published by the Free Software Foundation, or (at your option) +any later version, with or without the exception given in the +LICENSE.txt file supplied with this code and with Gmsh. + +This program 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 General Public License for more details. + +****************************************************************************************************/ + +#include "QuadTriExtruded3D.h" + +// By Geuzaine, Remacle... +static void addTetrahedron(MVertex* v1, MVertex* v2, MVertex* v3, MVertex* v4, + GRegion *to, MElement* source) +{ + MTetrahedron* newElem = new MTetrahedron(v1, v2, v3, v4); + to->tetrahedra.push_back(newElem); +} + +// By Geuzaine, Remacle... +static void addPyramid(MVertex* v1, MVertex* v2, MVertex* v3, MVertex* v4, + MVertex* v5, GRegion *to, MElement* source) +{ + MPyramid* newElem = new MPyramid(v1, v2, v3, v4, v5); + to->pyramids.push_back(newElem); +} + +// By Geuzaine, Remacle... +static void addPrism(MVertex* v1, MVertex* v2, MVertex* v3, MVertex* v4, + MVertex* v5, MVertex* v6, GRegion *to, MElement* source) +{ + MPrism* newElem = new MPrism(v1, v2, v3, v4, v5, v6); + to->prisms.push_back(newElem); +} + +// By Geuzaine, Remacle... +static void addHexahedron(MVertex* v1, MVertex* v2, MVertex* v3, MVertex* v4, + MVertex* v5, MVertex* v6, MVertex* v7, MVertex* v8, + GRegion *to, MElement* source) +{ + MHexahedron* newElem = new MHexahedron(v1, v2, v3, v4, v5, v6, v7, v8); + to->hexahedra.push_back(newElem); +} + + +// Does the pair of MVertex pointers v1 and v2 exist in the set 'edges'? +static int edgeExists(MVertex *v1, MVertex *v2, + std::set<std::pair<MVertex*, MVertex*> > &edges) +{ + std::pair<MVertex*, MVertex*> p(std::min(v1, v2), std::max(v1, v2)); + return edges.count(p); +} + + +// Create the pair of MVertex pointers v1 and v2 exist in the set 'edges.' +static void createEdge(MVertex *v1, MVertex *v2, + std::set<std::pair<MVertex*, MVertex*> > &edges) +{ + std::pair<MVertex*, MVertex*> p(std::min(v1, v2), std::max(v1, v2)); + edges.insert(p); +} + + +// Create the entry for a forbidden edge in forbidden_edges (note that all four verts are +// forbidden, but only store two, using lowest vertex pointer diagonal). +static void createForbidden(std::vector<MVertex*> v, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges) +{ + if( v.size() != 4 ){ + Msg::Error("In createForbidden(), number of vertices not equal 4."); + return; + } + int ind_low = 0; + if( v[1] < v[ind_low] ) ind_low = 1; + if( v[2] < v[ind_low] ) ind_low = 2; + if( v[3] < v[ind_low] ) ind_low = 3; + + std::pair<MVertex*, MVertex*> p( v[ind_low], v[(ind_low+2)%4] ); + forbidden_edges.insert(p); +} + + +// Is the given vector of quad vertices forbidden to diagonalize (it is in forbidden_edges)? +static int forbiddenExists(std::vector<MVertex*> v, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges) +{ + + if( v.size() != 4 ){ + Msg::Error("forbiddenExists() was passed a vector argument that was not of size 4."); + return 0; + } + + int ind_low = 0; + if( v[1] < v[ind_low] ) ind_low = 1; + if( v[2] < v[ind_low] ) ind_low = 2; + if( v[3] < v[ind_low] ) ind_low = 3; + + std::pair<MVertex*, MVertex*> pair( v[ind_low], v[(ind_low+2)%4] ); + return forbidden_edges.count(pair); +} + + +// delete a pair of vertex pointers v1 and v2 from 'edges.' +static void deleteEdge(MVertex *v1, MVertex *v2, + std::set<std::pair<MVertex*, MVertex*> > &edges) +{ + std::pair<MVertex*, MVertex*> p(std::min(v1, v2), std::max(v1, v2)); + edges.erase(p); +} + + +// Get the two mesh vertices extruded from vertices v0 and v1 on a lateral face at layer j, element k. +// Added 2010-01-26 +static std::vector<MVertex*> getExtrudedLateralVertices( MVertex *v0, MVertex *v1, GEntity *entity, + unsigned int j, unsigned int k, ExtrudeParams *loop_ep, + std::set<MVertex*, MVertexLessThanLexicographic> &pos) +{ + + std::vector<MVertex*> verts; + std::set<MVertex *, MVertexLessThanLexicographic>::iterator itp; + double x[4] = {v0->x(), v1->x(), v0->x(), v1->x()}; + double y[4] = {v0->y(), v1->y(), v0->y(), v1->y()}; + double z[4] = {v0->z(), v1->z(), v0->z(), v1->z()}; + for(int p = 0; p < 2; p++){ + loop_ep->Extrude(j, k, x[p], y[p], z[p]); + loop_ep->Extrude(j, k + 1, x[p + 2], y[p + 2], z[p + 2]); + } + for(int p = 0; p < 4; p++){ + MVertex tmp(x[p], y[p], z[p], 0, -1); + itp = pos.find(&tmp); + if(itp == pos.end()){ // FIXME: workaround + Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z()); + itp = tmp.linearSearch(pos); + } + if(itp == pos.end()){ + Msg::Error("Could not find extruded vertex (%.16g, %.16g, %.16g) in geometrical entity %d", + tmp.x(), tmp.y(), tmp.z(), entity->tag()); + + verts.clear(); + return verts; + } + verts.push_back(*itp); + } + + return verts; + +} + + +// Get the extruded vertices from MElement *elem at layer j, element k. +// Added 2010-01-26 +static int get2DExtrudedVertices( MElement *elem, ExtrudeParams *ep, unsigned int j, unsigned int k, + std::set<MVertex*, MVertexLessThanLexicographic> &pos, + std::vector<MVertex *> &verts ) +{ + std::vector<MVertex*> source_verts; + elem->getVertices( source_verts ); + + std::set<MVertex *, MVertexLessThanLexicographic>::iterator itp; + int sz = source_verts.size(); + double x[sz], y[sz], z[sz]; + for( int p = 0; p < sz; p++ ){ + x[p] = source_verts[p]->x(); + y[p] = source_verts[p]->y(); + z[p] = source_verts[p]->z(); + } + for(int p = 0; p < sz; p++){ + ep->Extrude(j, k, x[p], y[p], z[p]); + MVertex tmp(x[p], y[p], z[p], 0, -1); + itp = pos.find(&tmp); + if(itp == pos.end()){ // FIXME: workaround + Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z()); + itp = tmp.linearSearch(pos); + } + if(itp == pos.end()){ + Msg::Error("Could not find extruded vertex (%.16g, %.16g, %.16g).", + tmp.x(), tmp.y(), tmp.z() ); + + verts.clear(); + return verts.size(); + } + verts.push_back(*itp); + } + + return verts.size(); + +} + + +// Copied from meshGRegionExtruded.cpp, By Geuzaine, Remacle... +// Extrudes a set of source vertices in 3D +// added 2010-01-18 +static int getExtrudedVertices(MElement *ele, ExtrudeParams *ep, int j, int k, + std::set<MVertex*, MVertexLessThanLexicographic> &pos, + std::vector<MVertex*> &verts) +{ + std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp; + double x[8], y[8], z[8]; + int n = ele->getNumVertices(); + for(int p = 0; p < n; p++){ + MVertex *v = ele->getVertex(p); + x[p] = x[p + n] = v->x(); + y[p] = y[p + n] = v->y(); + z[p] = z[p + n] = v->z(); + } + for(int p = 0; p < n; p++){ + ep->Extrude(j, k, x[p], y[p], z[p]); + ep->Extrude(j, k + 1, x[p + n], y[p + n], z[p + n]); + } + for(int p = 0; p < 2 * n; p++){ + MVertex tmp(x[p], y[p], z[p], 0, -1); + itp = pos.find(&tmp); + if(itp == pos.end()){ // FIXME: workaround + Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z()); + itp = tmp.linearSearch(pos); + } + if(itp == pos.end()) + Msg::Error("Could not find extruded vertex (%.16g, %.16g, %.16g)", + tmp.x(), tmp.y(), tmp.z()); + else + verts.push_back(*itp); + } + return verts.size(); +} + + +// Determines whether the region is a valid QuadToTri region. Performs some +// basic checks, including whether there is a valid top, valid source, +// and that the surfaces serving as laterals are structured +// Added 2010-12-30 +bool IsValidQuadToTriRegion(GRegion *region, bool *allNonGlobalSharedLaterals) +{ + ExtrudeParams *ep = region->meshAttributes.extrude; + + if( !ep || !ep->mesh.QuadToTri || !ep->mesh.ExtrudeMesh ) + return false; + + GModel *model = region->model(); + + // find source face + GFace *reg_source = model->getFaceByTag( std::abs( ep->geo.Source ) ); + if( !reg_source ){ + Msg::Error("In IsValidQuadToTriRegion(), could not find source face " + "%d for region %d.", std::abs( ep->geo.Source ), + region->tag() ); + return false; + } + + // Find a source surface. Then find a COPIED_ENTITY that is the top surface. + // Then determine if all the laterals are either all quad or all triangle. + // If shared laterals are all static (quad or non subdivide triangles), + // set the allNonGlobalSharedLaterals argument to true. + // If any lateral is unstructured, error. + + bool foundTop = false, foundSource = false, + foundNoStruct = false; + + std::list<GFace *> faces = region->faces(); + std::list<GFace *>::iterator it = faces.begin(); + + (*allNonGlobalSharedLaterals) = true; + + for( it = faces.begin(); it != faces.end(); it++ ){ + ExtrudeParams *face_tmp_ep = (*it)->meshAttributes.extrude; + if( (*it) == reg_source ) + foundSource = true; + else if( face_tmp_ep && face_tmp_ep->geo.Mode == + COPIED_ENTITY ){ + GFace *top_source_tmp = model->getFaceByTag( + std::abs( face_tmp_ep->geo.Source ) ); + if( !top_source_tmp ){ + Msg::Error("In IsValidQuadToTriRegion(), could not find source face " + "%d for copied surface %d of region %d.", + std::abs( face_tmp_ep->geo.Source ), + (*it)->tag(), region->tag() ); + return false; + } + else if( top_source_tmp == reg_source && + !IsSurfaceALateralForRegion(region, *it) ) + foundTop = true; + } + // This is a check to see if there are lateral surface triangles that need to be edged globally in subdivide operation + else if( IsSurfaceALateralForRegion(region, *it) ){ + std::vector<GRegion *> neighbors; + if( (*allNonGlobalSharedLaterals) && (*it)->triangles.size() && !(*it)->quadrangles.size()&& + GetNeighborRegionsOfFace(*it, neighbors) > 1 ){ + GRegion *other_region = neighbors[0] != region ? neighbors[0] : neighbors[1]; + ExtrudeParams *oth_ep = other_region->meshAttributes.extrude; + if( ep && ep->mesh.ExtrudeMesh && !ep->mesh.Recombine || + oth_ep && oth_ep->mesh.ExtrudeMesh && !oth_ep->mesh.Recombine && + IsSurfaceALateralForRegion(other_region, *it) ) + (*allNonGlobalSharedLaterals) = false; + } + } + else + foundNoStruct = true; + } + + + // test for errors + bool detectConflict = false; + if( !foundTop ){ + Msg::Error("In IsValidQuadToTriRegion(), could not find top face " + "of region %d.", region->tag() ); + detectConflict = true; + } + if( !foundSource ){ + Msg::Error("In IsValidQuadToTriRegion(), source " + "face %d of region %d was not found in region.", + region->tag() ); + detectConflict = true; + } + if( foundNoStruct ){ + Msg::Error("In IsValidQuadToTriRegion(), found unstructured " + "lateral in QuadToTri region %d.", region->tag() ); + detectConflict = true; + } + + if( detectConflict ) + return false; + + // no errors, return true + return true; +} + + +// This function returns a vector of integer values, each of which are codes for the +// status of each face of an undivided prism or hexahedron (including degenerate versions): +// 0 = degenerate line, 1 = single triangle, 2 = recombined quad, +// 3 = fixed diagonal, 4 = adjustable diagonal, 5 = totally free to diagonalize or not. +// Ordering of faces starts with the lateral face containing verts[0] and verts[1], then goes in order +// of increasing vertex index around element. Finally, the bottom, then the top. +// Added 2010-01-21 +static std::map<std::string, std::vector<int> > getFaceTypes(GRegion *gr, MElement *elem, int j, int k, + std::vector<MVertex *> &verts, + std::set<MVertex*, MVertexLessThanLexicographic> &pos_src_edge, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges, + std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags, + std::vector<bool> &vert_bnd, std::vector<int> &nfix1, + std::vector<int> &nfix2, std::vector<int> &nadj1, + std::vector<int> &nadj2, std::vector<int> &free_flag ) +{ + std::map<std::string, std::vector<int> > face_types; + ExtrudeParams *ep = gr->meshAttributes.extrude; + + if( !ep || !ep->mesh.QuadToTri || !ep->mesh.ExtrudeMesh ){ + Msg::Error("In getFaceTypes(), invalid extrusion " + "in region %d for performing QuadToTri mesh generation.", + gr->tag() ); + return face_types; + } + + // get the starting indices of the top quadToTri layer + unsigned int j_top_start = 0, k_top_start = 0; + j_top_start = ep->mesh.NbLayer-1; + k_top_start = ep->mesh.NbElmLayer[ep->mesh.NbLayer-1]-1; + + + + // check nature of each face + int n_lat_tmp = 0; + if( verts.size() == 6 ) + n_lat_tmp = 3; + else if( verts.size() == 8 ) + n_lat_tmp = 4; + else{ + Msg::Error("In getFaceTypes(), size of verts vector was not 6 or 8 (region %d).", + gr->tag() ); + return face_types; + } + + const int n_lat = n_lat_tmp; + + // set defaults for the nfix, nadj vectors that store the nodes for each fixed or adjustable diagonal + // And set the defaults for free_flag which tells whether a face is free (0) + nfix1.clear(); nfix1.assign(n_lat+2, 0); + nfix2.clear(); nfix2.assign(n_lat+2, 0); + nadj1.clear(); nadj1.assign(n_lat+2, 0); + nadj2.clear(); nadj2.assign(n_lat+2, 0); + free_flag.clear(); free_flag.assign(n_lat+2, 0); + for( int p = 0; p < n_lat+2; p++ ){ + nfix1[p] = -p*p-p-1; + nfix2[p] = -p*p-p-2; + nadj1[p] = -p*p-p-1; + nadj2[p] = -p*p-p-2; + free_flag[p] = 0; + } + + // create an array that holds info about whether a face touches a boundary + int touch_bnd[n_lat]; + + fill_touch_bnd(touch_bnd, vert_bnd, n_lat); + + // Classify the laterals of each little mesh volume: + + for( int p = 0; p < n_lat; p++ ){ + int p2 = (p+1)%n_lat; + std::vector<MVertex*> v_face; + v_face.assign(4, (MVertex*)(0)); + v_face[0] = verts[p]; v_face[1] = verts[p2]; + v_face[2] = verts[p2+n_lat]; v_face[3] = verts[p+n_lat]; + + // is the face a degenerate line: + if( verts[p] == verts[n_lat+p] && + verts[p2] == verts[n_lat+p2] ){ + face_types["degen"].push_back(p); + } + // is face a single triangle? + else if( verts[p] == verts[n_lat+p] && + verts[p2] != verts[n_lat+p2] || + verts[p] != verts[n_lat+p] && + verts[p2] == verts[n_lat+p2] ){ + face_types["single_tri"].push_back(p); + } + // is face a recombined quad? + else if( forbiddenExists( v_face, forbidden_edges ) ) + face_types["recomb"].push_back(p); + + // Does face contain a fixed diagonal edge? + else if( edgeExists( verts[p], verts[p2+n_lat], quadToTri_edges ) ){ + nfix1[p] = p; nfix2[p] = p2+n_lat; + face_types["fixed_diag"].push_back(p); + } + else if( edgeExists( verts[n_lat+p], verts[p2], quadToTri_edges ) ){ + nfix1[p] = p+n_lat; nfix2[p] = p2; + face_types["fixed_diag"].push_back(p); + } + + // Does the face have an adjustable but required diagonal? + // ( this else if requires that the previous one about fixed diagonals + // comes FIRST ) + else if( edgeExists( verts[p], verts[p2+n_lat], lat_tri_diags ) ){ + nadj1[p] = p; nadj2[p] = p2+n_lat; + face_types["adj_diag"].push_back(p); + } + else if( edgeExists( verts[n_lat+p], verts[p2], lat_tri_diags ) ){ + nadj1[p] = p+n_lat; nadj2[p] = p2; + face_types["adj_diag"].push_back(p); + } + + // If no previous option was true, then this face is an internal face. + + // If this face has NO vertices on a lateral surface, and is a triangle or + // not in the top quadToTri layer: + // then the face is a recombined quad (QuadToTri only used in recombined extrusions). + else if( !touch_bnd[p] && + ( j < j_top_start || j == j_top_start && k < k_top_start ) ) + face_types["recomb"].push_back(p); + + // Face is possibly free...will need to do tests after this loop is complete to + // finalize that. But, for now.... + else{ + face_types["free"].push_back(p); + free_flag[p] = 1; + } + } + + + // set the bottom: + if( n_lat == 3 ) + face_types["single_tri"].push_back(3); + + else{ + std::vector<MVertex *> v_bot; + v_bot.assign(4, (MVertex*)(0)); + v_bot[0] = verts[0]; v_bot[1] = verts[1]; + v_bot[2] = verts[2]; v_bot[3] = verts[3]; + // is forbidden? + if ( j == 0 && k == 0 || forbiddenExists( v_bot, forbidden_edges ) ) + face_types["recomb"].push_back(4); + else if( edgeExists( verts[0], verts[2], quadToTri_edges ) ){ + nfix1[4] = 0; nfix2[4] = 2; + face_types["fixed_diag"].push_back(4); + } + else if( edgeExists( verts[1], verts[3], quadToTri_edges ) ){ + nfix1[4] = 1; nfix2[4] = 3; + face_types["fixed_diag"].push_back(4); + } + // Does the face have an adjustable but required diagonal? + // ( this else if requires that the previous one about fixed diagonals + // comes FIRST ) + // NOTE: THIS SITUATION SHOULD NEVER HAPPEN ON THIS FACE + else if( edgeExists( verts[0], verts[2], lat_tri_diags ) ){ + nadj1[4] = 0; nadj2[4] = 2; + face_types["adj_diag"].push_back(4); + } + else if( edgeExists( verts[1], verts[3], lat_tri_diags ) ){ + nadj1[4] = 1; nadj2[4] = 3; + face_types["adj_diag"].push_back(4); + } + else{ + face_types["free"].push_back(4); + free_flag[4] = 1; + } + } + + // set the top: + if( n_lat == 3 ) + face_types["single_tri"].push_back(4); + // if a hexahedron: + else{ + std::vector<MVertex *> v_top; + v_top.assign(4, (MVertex*)(0)); + v_top[0] = verts[4]; v_top[1] = verts[5]; + v_top[2] = verts[6]; v_top[3] = verts[7]; + // is forbidden ? + if( forbiddenExists(v_top, forbidden_edges) ) + face_types["recomb"].push_back(5); + // search for a fixed edge: + else if( edgeExists( verts[4], verts[6], quadToTri_edges ) ){ + nfix1[5] = 4; nfix2[5] = 6; + face_types["fixed_diag"].push_back(5); + } + else if( edgeExists( verts[5], verts[7], quadToTri_edges ) ){ + nfix1[5] = 5; nfix2[5] = 7; + face_types["fixed_diag"].push_back(5); + } + // Does the face have an adjustable but required diagonal? + // ( this else if requires that the previous one about fixed diagonals + // comes FIRST ) + // NOTE: THIS SITUATION SHOULD NEVER HAPPEN ON THIS FACE + else if( edgeExists( verts[4], verts[6], lat_tri_diags ) ){ + nadj1[5] = 4; nadj2[5] = 6; + face_types["adj_diag"].push_back(5); + } + else if( edgeExists( verts[5], verts[7], lat_tri_diags ) ){ + nadj1[5] = 5; nadj2[5] = 7; + face_types["adj_diag"].push_back(5); + } + else{ + face_types["free"].push_back(5); + free_flag[5] = 1; + } + } + + // now return face_types + return face_types; + +} + + +// Generate face diagonals used to subdivide prisms by BRUTE FORCE...NOT RECOMMENDED for general use, but it +// is required for some elements which have all vertices on an external region boundary. +// Added 2010-01-29 +static void bruteForceEdgeQuadToTriPrism( GRegion *gr, MElement *elem, + int j, int k, std::vector<MVertex *> verts, + std::map<std::string, std::vector<int> > &face_types, + std::set<std::pair<MVertex*, MVertex*> > &edges_new, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_new, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges, + std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems, + std::vector<int> nfix1, std::vector<int> nfix2, + std::vector<int> nadj1, std::vector<int> nadj2, + std::vector<int> free_flag ) +{ + + ExtrudeParams *ep = gr->meshAttributes.extrude; + + if( !ep || !ep->mesh.QuadToTri || !ep->mesh.ExtrudeMesh ){ + Msg::Error("In bruteForceEdgeQuadToTriPrism(), invalid extrusion " + "in region %d for performing QuadToTri mesh generation.", + gr->tag() ); + return; + } + + GModel *model = gr->model(); + if( !model ){ + Msg::Error("In bruteForceEdgeQuadToTriPrism(), invalid model for region " + "%d.", gr->tag() ); + return; + } + + // now find and verify the source of region + + GFace *reg_source = model->getFaceByTag( std::abs( ep->geo.Source ) ); + if( !reg_source ){ + Msg::Error("In bruteForceEdgeQuadToTriPrism(), invalid source face for region " + "%d.", gr->tag() ); + return; + } + + // verify number of vertices + int n_lat; + if( verts.size() != 6 ){ + Msg::Error("In bruteForceEdgeQuadToTriPrism(), number of vertices not equal " + "6."); + return; + } + else + n_lat = 3; + + + // NOTE THAT FACES ARE NUMBERED CONSECUTIVELY FROM 0, starting from vertex 0 and moving around laterally. + // Hence, the face after vertex 0 is face 0, and so forth. The bottom and top faces are numbered + // (number of laterals + 1) and (number of laterals + 2), respectively. + + // numbers of each type of face + int num_degen = face_types["degen"].size(); + int num_single_tri = face_types["single_tri"].size(); + int num_recomb = face_types["recomb"].size(); + int num_fixed_diag = face_types["fixed_diag"].size(); + int num_adj_diag = face_types["adj_diag"].size(); + int num_free = face_types["free"].size(); + + // Make sure all faces marked forbidden in face_types have all diagonals in forbidden_edges; + for( int p = 0; p < num_recomb; p++){ + int ind = face_types["recomb"][p]; + std::vector<MVertex*> v; + v.push_back(verts[ind]); v.push_back(verts[(ind+1)%3]); v.push_back(verts[(ind+1)%3+3]); + v.push_back(verts[ind+3]); + createForbidden(v, forbidden_new ); + createForbidden(v, forbidden_edges ); + } + + // following must be true if this is a triangle extrusion + if( find(face_types["single_tri"].begin(), face_types["single_tri"].end(), 3) == + face_types["single_tri"].end() || + find(face_types["single_tri"].begin(), face_types["single_tri"].end(), 4) == + face_types["single_tri"].end() ){ + Msg::Error("In bruteForceEdgeQuadToTriPrism(), invalid face code for top and/or " + "bottom (region %d).", gr->tag() ); + return; + } + + + // Take care of the trivial case: tetrahedron: + if( num_single_tri == 4 && num_degen == 1 ) + return; + + // Pyramid also very easy: + + else if ( num_single_tri == 4 ){ + int ind = 0; + if( num_adj_diag ){ + ind = face_types["adj_diag"][0]; + createEdge( verts[nadj1[ind]], verts[nadj2[ind]], edges_new ); + createEdge( verts[nadj1[ind]], verts[nadj2[ind]], quadToTri_edges ); + } + return; + } + + + // A PRISM IS MORE DIFFICULT: + + // First case, if exactly two laterals are forbidden to diagonalize: + if( num_recomb == 2 ){ + if( num_free ){ + for( int p = 0; p < num_free; p++){ + int ind = face_types["free"][p]; + std::vector<MVertex*> v; + v.push_back(verts[ind]); v.push_back(verts[(ind+1)%3]); + v.push_back(verts[(ind+1)%3+3]); v.push_back(verts[ind+3]); + createForbidden(v, forbidden_new ); + createForbidden(v, forbidden_edges ); + } + } + else{ + if( num_adj_diag ){ + int ind = face_types["adj_diag"][0]; + createEdge(verts[nadj1[ind]], verts[nadj2[ind]], quadToTri_edges ); + createEdge(verts[nadj1[ind]], verts[nadj2[ind]], edges_new ); + } + std::pair<unsigned int, unsigned int> jkpair(j,k); + problems[elem].insert(jkpair); + problems_new[elem].insert(jkpair); + } + return; + } + + // If 1 lateral is forbidden to diagonalize and two free, diagonalize to lowest point vector on free edge: + if( num_recomb == 1 && num_free == 2 ){ + int p_recomb = face_types["recomb"][0]; + int p_free = (p_recomb + 2)%3; + int ind_low = verts[p_free] < verts[p_free+3] + ? p_free : p_free+3; + int add = ind_low < 3 ? 0 : 3; + createEdge( verts[ind_low], verts[(ind_low-add+1)%3+3-add], quadToTri_edges ); + createEdge( verts[ind_low], verts[(ind_low-add+1)%3+3-add], edges_new ); + createEdge( verts[ind_low], verts[(ind_low-add+2)%3+3-add], quadToTri_edges ); + createEdge( verts[ind_low], verts[(ind_low-add+2)%3+3-add], edges_new ); + + return; + } + + + // If all faces are free, then diagonalize TWO faces based on smallest vertex pointer + if( num_free >= 3 ){ + int ind_low, ind2; + ind_low = 0; + for( int p = 1; p < 6; p++ ){ + if( verts[ind_low] > verts[p] ) + ind_low = p; + } + + int add = ind_low < 3 ? 0 : 3; + + createEdge( verts[ind_low], verts[(ind_low-add+1)%3+3-add], quadToTri_edges ); + createEdge( verts[ind_low], verts[(ind_low-add+1)%3+3-add], edges_new ); + createEdge( verts[ind_low], verts[(ind_low-add+2)%3+3-add], quadToTri_edges ); + createEdge( verts[ind_low], verts[(ind_low-add+2)%3+3-add], edges_new ); + + return; + } + + + // If reach this point, then go through the loop of progressively permitting more face types + // to be considered for diagonalization. This loop could be slow, that's why previous special cases were + // tried first. + // t=0, fixed and preferred diagonals only. + // t=1, allow preferred diagonals to be meshed with lowest vertex pointer in diagonal + // t=2, allow free faces to be meshed with lowest vertex pointer in diagonal + // t=3, allow any diagonal that works + bool valid_division = false; + int face_done[2]; // holds the face numbers for the two faces that are done + for( int t = 0; t < 4; t++ ){ + + // variables that hold the face diagonal nodes. + int n1[3], n2[3]; + + // if the face is completely free (t==3), face_is_free = true; + bool face_is_free[3]; + + // set default values of the n variables + // to unique negative numbers; bool to false. + for( int p = 0; p < 3; p++ ){ + n1[p] = -p*p-p-1; + n2[p] = -p*p-p-2; + face_is_free[p] = false; + } + + for( int p = 0; p < 3; p++ ){ + // fixed diagonals + if( nfix1[p] >= 0 ){ + n1[p] = nfix1[p]; n2[p] = nfix2[p]; + } + // preferred adjustable diagonals + else if( !t && nadj1[p] >= 0 ){ + n1[p] = nadj1[p]; n2[p] = nadj2[p]; + } + // choose lowest vertex for t < 3, any vertex for t == 3 + else if( t >= 1 && t < 3 && nadj1[p] >= 0 || + t == 2 && free_flag[p] ){ + if( verts[p] < verts[(p+1)%3] && + verts[p] < verts[p+3] || + verts[(p+1)%3+3] < verts[(p+1)%3] && + verts[(p+1)%3+3] < verts[p+3] ){ + n1[p] = p; n2[p] = (p+1)%3+3; + } + else{ + n1[p] = p+3; n2[p] = (p+1)%3; + } + } + else if( t==3 && (nadj1[p] >= 0 || free_flag[p]) ) + face_is_free[p] = true; + } + + // search for two faces that have diagonals which meet at a vertex + for( int p = 0; p < 3; p++ ){ + // if both faces are free, fix one by using lowest vertex pointer + if( face_is_free[p] && face_is_free[(p+1)%3] ){ + face_is_free[p] = false; + if( verts[(p+1)%3] < verts[(p+1)%3+3] ){ + n1[p] = p+3; + n2[p] = (p+1)%3; + } + else{ + n1[p] = p; + n2[p] = (p+1)%3+3; + } + } + // if first face is free and the other has a definite diagonal + if( face_is_free[p] && n1[(p+1)%3] >= 0 ){ + valid_division = true; + face_done[0] = p; + face_done[1] = (p+1)%3; + if( n1[(p+1)%3] == (p+1)%3 || n2[(p+1)%3] == (p+1)%3 ){ + n1[p] = p+3; + n2[p] = (p+1)%3; + } + else{ + n1[p] = p; + n2[p] = (p+1)%3+3; + } + } + // if second face is free and the other has a definite diagonal + else if( face_is_free[(p+1)%3] && n1[p] >= 0 ){ + valid_division = true; + face_done[0] = p; + face_done[1] = (p+1)%3; + if( n2[p] == (p+1)%3 || n1[p] == (p+1)%3 ){ + n1[(p+1)%3] = (p+1)%3; + n2[(p+1)%3] = (p+2)%3+3; + } + else{ + n1[(p+1)%3] = (p+1)%3+3; + n2[(p+1)%3] = (p+2)%3; + } + } + // if both faces had definite diagonals + else if( n2[p] == n1[(p+1)%3] || n2[p] == n2[(p+1)%3] || + n1[p] == n1[(p+1)%3] || n1[p] == n2[(p+1)%3] ){ + valid_division = true; + face_done[0] = p; + face_done[1] = (p+1)%3; + } + + if( valid_division ){ + createEdge( verts[n1[p]], verts[n2[p]], quadToTri_edges ); + createEdge( verts[n1[p]], verts[n2[p]], edges_new ); + createEdge( verts[n1[(p+1)%3]], verts[n2[(p+1)%3]], quadToTri_edges ); + createEdge( verts[n1[(p+1)%3]], verts[n2[(p+1)%3]], edges_new ); + break; + } + } + + // At this point, can break out if valid_division... OR if there is NO valid division AND + // if num_fixed_diag == 3, or 2 and a recomb + // break out of loop. This will need an internal vertex. + if( valid_division || !valid_division && num_fixed_diag + num_recomb == 3 ) + break; + + } // end of outer t-loop + + // create adjustable but required diagonals that weren't yet added + for( int s = 0; s < num_adj_diag; s++ ){ + int ind = face_types["adj_diag"][s]; + if( ind != face_done[0] && ind != face_done[1] ){ + createEdge( verts[nadj1[ind]], verts[nadj2[ind]], edges_new ); + createEdge( verts[nadj1[ind]], verts[nadj2[ind]], quadToTri_edges ); + } + } + + if( !valid_division ){ + std::pair<unsigned int, unsigned int> jk_pair(j,k); + problems[elem].insert(jk_pair); + problems_new[elem].insert(jk_pair); + } + + return; + +} // end of bruteForceEdgeQuadToTriPrism() + + + +// Divide hexahedron degenerated at two points (degenerate face is a line) by brute force +static void addEdgesForQuadToTriTwoPtDegenHexa( GRegion *gr, MElement *elem, ExtrudeParams *ep, + int j, int k, std::vector<MVertex *> verts, + std::map<std::string, std::vector<int> > &face_types, + std::set<std::pair<MVertex*, MVertex*> > &edges_new, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_new, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges, + std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems, + std::set<MVertex*, MVertexLessThanLexicographic> &pos, + std::vector<int> nfix1, std::vector<int> nfix2, + std::vector<int> nadj1, std::vector<int> nadj2, + std::vector<int> free_flag ) +{ + + if( !ep ) + return; + + // numbers of each type of face + int num_degen = face_types["degen"].size(); + int num_single_tri = face_types["single_tri"].size(); + int num_recomb = face_types["recomb"].size(); + int num_fixed_diag = face_types["fixed_diag"].size(); + int num_adj_diag = face_types["adj_diag"].size(); + int num_free = face_types["free"].size(); + + int degen_face = face_types["degen"][0]; + + // If all faces are free, then diagonalize TWO faces based on smallest vertex pointer + if( num_free >= 3 ){ + int ind_low; + ind_low = 0; + for( int p = 1; p < 8; p++ ){ + if( verts[ind_low] > verts[p] ) + ind_low = p; + } + + int add = ind_low < 4 ? 0 : 4; + + if( verts[ind_low-add] == verts[ind_low+4-add] ){ + createEdge( verts[ind_low], verts[(ind_low-add+2)%4], quadToTri_edges ); + createEdge( verts[ind_low], verts[(ind_low-add+2)%4], edges_new ); + createEdge( verts[ind_low], verts[(ind_low-add+2)%4+4], quadToTri_edges ); + createEdge( verts[ind_low], verts[(ind_low-add+2)%4+4], edges_new ); + } + else{ + createEdge( verts[ind_low], verts[(ind_low-add+2)%4+4-add], quadToTri_edges ); + createEdge( verts[ind_low], verts[(ind_low-add+2)%4+4-add], edges_new ); + int ind2; + if( verts[(ind_low-add+1)%4] == verts[(ind_low-add+1)%4+4] ) + ind2 = (ind_low-add+3)%4+4-add; + else + ind2 = (ind_low-add+1)%4+4-add; + createEdge( verts[ind_low], verts[ind2], quadToTri_edges ); + createEdge( verts[ind_low], verts[ind2], edges_new ); + } + + return; + } + + // If faces of prism not all free, look for a way to diagonalize and subdivide. + // t = 0, fixed and preferred adjustable diagonals + // t >= 1 < 3, lowest pointer on adjustables + // t = 2, include free faces, lowest vertex pointer diagonal on adjustable and free + // t = 3, not lowest vertex pointer diagonal on adjustable and free + + int face_done[2]; + face_done[0] = -1; + face_done[1] = -2; + + // valid_division tells whether a valid division was found + bool valid_division = false; + + for( int t = 0; t < 4; t++ ){ + // these variables hold the faces and their diagonal nodes in (n1,n2) + int p_top = 5, n1_top = -2, n2_top = -3; + bool p_top_is_free = false; + int p_bot = 4, n1_bot = -4, n2_bot = -5; + bool p_bot_is_free = false; + int p_lat = (degen_face+2)%4, n1_lat = -10, n2_lat = -11; + bool p_lat_is_free = false; + for( int s = 0; s < 3; s++ ){ + int p_tmp, *n1_tmp, *n2_tmp; + bool *p_is_free_tmp; + if( !s ){ + p_tmp = p_bot; + n1_tmp = &n1_bot; + n2_tmp = &n2_bot; + p_is_free_tmp = &p_bot_is_free; + } + if( s==1 ){ + p_tmp = p_top; + n1_tmp = &n1_top; + n2_tmp = &n2_top; + p_is_free_tmp = &p_top_is_free; + } + if( s==2 ){ + p_tmp = p_lat; + n1_tmp = &n1_lat; + n2_tmp = &n2_lat; + p_is_free_tmp = &p_lat_is_free; + } + + // fixed diagonals + if( nfix1[p_tmp] >= 0 ){ + *n1_tmp = nfix1[p_tmp]; *n2_tmp = nfix2[p_tmp]; + } + // preferred adjustable diagonals + else if( !t && nadj1[p_tmp] >= 0 ){ + *n1_tmp = nadj1[p_tmp]; *n2_tmp = nadj2[p_tmp]; + } + // choose lowest vertex for t < 3, non-lowest vertex for t == 3 + else if( t >= 1 && t < 3 && nadj1[p_tmp] >= 0 || + t == 2 && free_flag[p_tmp] ){ + if( p_tmp < 4 ){ + if( verts[p_tmp] < verts[(p_tmp+1)%4] && + verts[p_tmp] < verts[p_tmp+4] || + verts[(p_tmp+1)%4+4] < verts[(p_tmp+1)%4] && + verts[(p_tmp+1)%4+4] < verts[p_tmp+4] ){ + *n1_tmp = p_tmp; *n2_tmp = (p_tmp+1)%4+4; + } + else{ + *n1_tmp = p_tmp+4; *n2_tmp = (p_tmp+1)%4; + } + } + else{ + int add = p_tmp==4 ? 0 : 4; + if( verts[0+add] < verts[1+add] && verts[0+add] < verts[3+add] || + verts[2+add] < verts[1+add] && verts[2+add] < verts[3+add] ){ + *n1_tmp = 0+add; *n2_tmp = 2+add; + } + else{ + *n1_tmp = 1+add; *n2_tmp = 3+add; + } + } + } + else if( t==3 && (nadj1[p_tmp] >= 0 || free_flag[p_tmp]) ) + *p_is_free_tmp = true; + + } + + // Find any diagonals that meet at a vertex: + + // start with top surface and bottom surface + if( ( n1_top >= 0 || p_top_is_free ) && + ( n1_bot >= 0 || p_bot_is_free ) ){ + if( p_top_is_free && p_bot_is_free ){ + if( verts[4] < verts[5] && verts[4] < verts[7] || + verts[6] < verts[5] && verts[6] < verts[7] ){ + n1_top = 4; n2_top = 6; + } + else{ + n1_top = 5; n2_top = 7; + } + n1_bot = n1_top-4; + n2_bot = n2_top-4; + } + else if( n1_top >= 0 && p_bot_is_free ){ + n1_bot = n1_top-4; + n2_bot = n2_top-4; + } + else if( n1_bot >= 0 && p_top_is_free ){ + n1_top = n1_bot+4; + n2_top = n2_bot+4; + } + if( verts[n1_top] == verts[n1_bot] || + verts[n1_top] == verts[n2_bot] || + verts[n2_top] == verts[n1_bot] || + verts[n2_top] == verts[n2_bot] ){ + valid_division = true; + face_done[0] = p_top; + face_done[1] = p_bot; + createEdge( verts[n1_top], verts[n2_top], quadToTri_edges ); + createEdge( verts[n1_top], verts[n2_top], edges_new ); + createEdge( verts[n1_bot], verts[n2_bot], quadToTri_edges ); + createEdge( verts[n1_bot], verts[n2_bot], edges_new ); + } + } + + // Top surface and lateral surface + if( !valid_division && + ( n1_top >= 0 || p_top_is_free ) && + ( n1_lat >= 0 || p_lat_is_free ) ){ + + if( p_top_is_free && p_lat_is_free ){ + if( verts[4] < verts[5] && verts[4] < verts[7] || + verts[6] < verts[5] && verts[6] < verts[7] ){ + n1_top = 4; n2_top = 6; + } + else{ + n1_top = 5; n2_top = 7; + } + if( n1_top == (degen_face+2)%4+4 || + n2_top == (degen_face+2)%4+4 ){ + n1_lat = (degen_face+2)%4+4; + n2_lat = (n1_lat-4+1)%4; + } + else{ + n1_lat = (degen_face+3)%4+4; + n2_lat = (n1_lat-4+3)%4; + } + } + else if( n1_top >= 0 && p_lat_is_free ){ + if( n1_top == (degen_face+2)%4+4 || + n2_top == (degen_face+2)%4+4 ){ + n1_lat = (degen_face+2)%4+4; + n2_lat = (n1_lat-4+1)%4; + } + else{ + n1_lat = (degen_face+3)%4+4; + n2_lat = (n1_lat-4+3)%4; + } + } + else if( n1_lat >= 0 && p_top_is_free ){ + if( n1_lat == (degen_face+2)%4+4 || + n2_lat == (degen_face+2)%4+4 ){ + n1_top = (degen_face+2)%4+4; + n2_top = (n1_top-4+2)%4+4; + } + else{ + n1_top = (degen_face+3)%4+4; + n2_top = (n1_top-4+2)%4+4; + } + } + if( verts[n1_top] == verts[n1_lat] || + verts[n1_top] == verts[n2_lat] || + verts[n2_top] == verts[n1_lat] || + verts[n2_top] == verts[n2_lat] ){ + valid_division = true; + face_done[0] = p_top; + face_done[1] = p_lat; + createEdge( verts[n1_top], verts[n2_top], quadToTri_edges ); + createEdge( verts[n1_top], verts[n2_top], edges_new ); + createEdge( verts[n1_lat], verts[n2_lat], quadToTri_edges ); + createEdge( verts[n1_lat], verts[n2_lat], edges_new ); + } + } + + // Bottom surface and lateral surface + if( !valid_division && + ( n1_bot >= 0 || p_bot_is_free ) && + ( n1_lat >= 0 || p_lat_is_free ) ){ + + if( p_bot_is_free && p_lat_is_free ){ + if( verts[0] < verts[1] && verts[0] < verts[3] || + verts[2] < verts[1] && verts[2] < verts[3] ){ + n1_bot = 0; n2_bot = 2; + } + else{ + n1_bot = 1; n2_bot = 3; + } + if( n1_bot == (degen_face+2)%4 || + n2_bot == (degen_face+2)%4 ){ + n1_lat = (degen_face+2)%4; + n2_lat = (n1_lat+1)%4+4; + } + else{ + n1_lat = (degen_face+3)%4; + n2_lat = (n1_lat+3)%4+4; + } + } + else if( n1_bot >= 0 && p_lat_is_free ){ + if( n1_bot == (degen_face+2)%4 || + n2_bot == (degen_face+2)%4 ){ + n1_lat = (degen_face+2)%4; + n2_lat = (n1_lat+1)%4+4; + } + else{ + n1_lat = (degen_face+3)%4; + n2_lat = (n1_lat+3)%4+4; + } + } + else if( n1_lat >= 0 && p_bot_is_free ){ + if( n1_lat == (degen_face+2)%4 || + n2_lat == (degen_face+2)%4 ){ + n1_bot = (degen_face+2)%4; + n2_bot = (n1_bot+2)%4; + } + else{ + n1_bot = (degen_face+3)%4; + n2_bot = (n1_bot+2)%4; + } + } + if( verts[n1_bot] == verts[n1_lat] || + verts[n1_bot] == verts[n2_lat] || + verts[n2_bot] == verts[n1_lat] || + verts[n2_bot] == verts[n2_lat] ){ + valid_division = true; + face_done[0] = p_bot; + face_done[1] = p_lat; + createEdge( verts[n1_bot], verts[n2_bot], quadToTri_edges ); + createEdge( verts[n1_bot], verts[n2_bot], edges_new ); + createEdge( verts[n1_lat], verts[n2_lat], quadToTri_edges ); + createEdge( verts[n1_lat], verts[n2_lat], edges_new ); + } + } + + if( valid_division ) + break; + + } // end of t-loop (outer loop) + + // take care of any adjustable but required diagonals not yet added + for( int s = 0; s < face_types["adj_diag"].size(); s++ ){ + int ind = face_types["adj_diag"][s]; + if( ind != face_done[0] && ind != face_done[1] ){ + createEdge( verts[nadj1[ind]], verts[nadj2[ind]], quadToTri_edges ); + createEdge( verts[nadj1[ind]], verts[nadj2[ind]], edges_new ); + } + } + + // if no division top found, need internal vertex. + if( !valid_division ){ + std::pair<unsigned int, unsigned int> jkpair(j,k); + problems[elem].insert(jkpair); + problems_new[elem].insert(jkpair); + } + + return; + +} // end of addEdgesForQuadToTriTwoPtDegenHexa() + + +// Divide a hexahedron degenerate at one point (one degenerate corner) by brute force. +static void addEdgesForQuadToTriOnePtDegenHexa( GRegion *gr, MElement *elem, ExtrudeParams *ep, + int j, int k, std::vector<MVertex *> verts, + std::map<std::string, std::vector<int> > &face_types, + std::set<std::pair<MVertex*, MVertex*> > &edges_new, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_new, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges, + std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems, + std::set<MVertex*, MVertexLessThanLexicographic> &pos, + std::vector<int> nfix1, std::vector<int> nfix2, + std::vector<int> nadj1, std::vector<int> nadj2, + std::vector<int> free_flag ) +{ + + if( !ep ) + return; + + // numbers of each type of face + int num_degen = face_types["degen"].size(); + int num_single_tri = face_types["single_tri"].size(); + int num_recomb = face_types["recomb"].size(); + int num_fixed_diag = face_types["fixed_diag"].size(); + int num_adj_diag = face_types["adj_diag"].size(); + int num_free = face_types["free"].size(); + + // index of the degenerate corner + int degen_ind = verts[face_types["single_tri"][0]] + == verts[face_types["single_tri"][0]+4] + ? face_types["single_tri"][0] : face_types["single_tri"][1]; + + // If all faces are free, slice from degen corner top and bottom. done. + if( num_free >= 4 ){ + createEdge( verts[degen_ind], verts[(degen_ind+2)%4], quadToTri_edges ); + createEdge( verts[degen_ind], verts[(degen_ind+2)%4], edges_new ); + createEdge( verts[degen_ind], verts[(degen_ind+2)%4+4], quadToTri_edges ); + createEdge( verts[degen_ind], verts[(degen_ind+2)%4+4], edges_new ); + return; + } + + // If faces of degenerated hexahedron are not all free, + // look for a way to diagonalize and subdivide. + // t = 0, fixed and preferred adjustable diagonals + // t >= 1 < 3, lowest pointer on adjustables + // t = 2, include free faces, lowest vertex pointer diagonal on adjustable and free + // t = 3, not lowest vertex pointer diagonal on adjustable and free + int face_done[3]; + face_done[0] = -1; + face_done[1] = -2; + face_done[2] = -3; + bool valid_division = false; + for( int t = 0; t < 4; t++ ){ + // first test for top bottom parallel diagonals (g=0), then pyramid with + // top on corner opposite degen corner (g=1), then pyramid with top on a corner + // NOT opposite to the degenerate corner (g=2), then test for non-adjoining + // lateral face diagonals (g=3). + int p_top = 5, n1_top = -2, n2_top = -3; + bool p_top_is_free = false; + int p_bot = 4, n1_bot = -4, n2_bot = -5; + bool p_bot_is_free = false; + int p_lat1 = (degen_ind+1)%4, n1_lat1 = -10, n2_lat1 = -11; + bool p_lat1_is_free = false; + int p_lat2 = (degen_ind+2)%4, n1_lat2 = -12, n2_lat2 = -13; + bool p_lat2_is_free = false; + + // get diagonals: + for( int s = 0; s < 4; s++ ){ + int *n1_tmp, *n2_tmp, p_tmp; + bool *p_tmp_is_free; + if( !s ){ + p_tmp = p_top; + n1_tmp = &n1_top; + n2_tmp = &n2_top; + p_tmp_is_free = &p_top_is_free; + } + else if( s==1 ){ + p_tmp = p_bot; + n1_tmp = &n1_bot; + n2_tmp = &n2_bot; + p_tmp_is_free = &p_bot_is_free; + } + else if( s==2 ){ + p_tmp = p_lat1; + n1_tmp = &n1_lat1; + n2_tmp = &n2_lat1; + p_tmp_is_free = &p_lat1_is_free; + } + else{ + p_tmp = p_lat2; + n1_tmp = &n1_lat2; + n2_tmp = &n2_lat2; + p_tmp_is_free = &p_lat2_is_free; + } + // fixed diagonals + if( nfix1[p_tmp] >= 0 ){ + *n1_tmp = nfix1[p_tmp]; *n2_tmp = nfix2[p_tmp]; + } + // preferred adjustable diagonals + else if( !t && nadj1[p_tmp] >= 0 ){ + *n1_tmp = nadj1[p_tmp]; *n2_tmp = nadj2[p_tmp]; + } + // choose lowest vertex for t < 3, any vertex for t == 3 + else if( t >= 1 && t < 3 && nadj1[p_tmp] >= 0 || + t == 2 && free_flag[p_tmp] ){ + int ind_low = -1; + if( p_tmp < 4 ){ + if( verts[p_tmp] < verts[(p_tmp+1)%4] && + verts[p_tmp] < verts[p_tmp+4] || + verts[(p_tmp+1)%4+4] < verts[(p_tmp+1)%4] && + verts[(p_tmp+1)%4+4] < verts[p_tmp+4] ){ + *n1_tmp = p_tmp; *n2_tmp = (p_tmp+1)%4+4; + } + else{ + *n1_tmp = p_tmp+4; *n2_tmp = (p_tmp+1)%4; + } + } + else{ + int add = p_tmp==4 ? 0 : 4; + if( verts[0+add] < verts[1+add] && verts[0+add] < verts[3+add] || + verts[2+add] < verts[1+add] && verts[2+add] < verts[3+add] ){ + *n1_tmp = 0+add; *n2_tmp = 2+add; + } + else{ + *n1_tmp = 1+add; *n2_tmp = 3+add; + } + } + } + else if( t==3 && (nadj1[p_tmp] >= 0 || free_flag[p_tmp]) ) + *p_tmp_is_free = true; + } + + // Look for valid diagonalizations + + // look for aligned top and bottom diags. + if( !valid_division ){ + // assign diagonals to the 'free' faces from above + if( p_top_is_free && p_bot_is_free ){ + if( verts[0] < verts[1] && verts[0] < verts[3] || + verts[2] < verts[1] && verts[2] < verts[3] ){ + n1_bot = 0; n2_bot = 2; + } + else{ + n1_bot = 1; n2_bot = 3; + } + n1_top = n1_bot+4; + n2_top = n2_bot+4; + } + else if( p_top_is_free && n1_bot >= 0 ){ + n1_top = n1_bot+4; n2_top = n2_bot+4; + } + else if( p_bot_is_free && n1_top >= 0 ){ + n1_bot = n1_top-4; n2_bot = n2_top-4; + } + // test for valid division + if( n1_top-4 == n1_bot || n2_top-4 == n1_bot || + n1_top-4 == n2_bot || n2_top-4 == n2_bot ){ + valid_division = true; + face_done[0] = 4; face_done[1] = 5; + createEdge( verts[n1_top], verts[n2_top], quadToTri_edges ); + createEdge( verts[n1_top], verts[n2_top], edges_new ); + createEdge( verts[n1_bot], verts[n2_bot], quadToTri_edges ); + createEdge( verts[n1_bot], verts[n2_bot], edges_new ); + } + } + + // pyramid with top opposite degenerate corner + if( !valid_division ){ + if( ( n1_top == (degen_ind+2)%4+4 || n2_top == (degen_ind+2)%4+4 || + p_top_is_free ) && + ( n2_lat1 == (degen_ind+2)%4+4 || p_lat1_is_free ) && + ( n1_lat2 == (degen_ind+2)%4+4 || p_lat2_is_free ) ){ + valid_division = true; + if( p_top_is_free ){ + n1_top = degen_ind+4; n2_top = (degen_ind+2)%4+4; + } + if( p_lat1_is_free ){ + n1_lat1 = (degen_ind+1)%4; n2_lat1 = (degen_ind+2)%4+4; + } + if( p_lat2_is_free ){ + n1_lat2 = (degen_ind+2)%4+4; n2_lat2 = (degen_ind+3)%4; + } + face_done[0] = 5; + face_done[1] = (degen_ind+1)%4; + face_done[2] = (degen_ind+2)%4; + createEdge( verts[n1_top], verts[n2_top], quadToTri_edges ); + createEdge( verts[n1_top], verts[n2_top], edges_new ); + } + else if( ( n1_bot == (degen_ind+2)%4 || n2_bot == (degen_ind+2)%4 || + p_bot_is_free ) && + ( n2_lat1 == (degen_ind+2)%4 || p_lat1_is_free ) && + ( n1_lat2 == (degen_ind+2)%4 || p_lat2_is_free ) ){ + valid_division = true; + if( p_bot_is_free ){ + n1_bot = degen_ind; n2_bot = (degen_ind+2)%4; + } + if( p_lat1_is_free ){ + n1_lat1 = (degen_ind+1)%4+4; n2_lat1 = (degen_ind+2)%4; + } + if( p_lat2_is_free ){ + n1_lat2 = (degen_ind+2)%4; n2_lat2 = (degen_ind+3)%4+4; + } + face_done[0] = 4; + face_done[1] = (degen_ind+1)%4; + face_done[2] = (degen_ind+2)%4; + createEdge( verts[n1_bot], verts[n2_bot], quadToTri_edges ); + createEdge( verts[n1_bot], verts[n2_bot], edges_new ); + + } + + if( valid_division ){ + createEdge( verts[n1_lat1], verts[n2_lat1], quadToTri_edges ); + createEdge( verts[n1_lat1], verts[n2_lat1], edges_new ); + createEdge( verts[n1_lat2], verts[n2_lat2], quadToTri_edges ); + createEdge( verts[n1_lat2], verts[n2_lat2], edges_new ); + } + } + + // Pyramid top on corner NOT opposite to degenerate corner + if( !valid_division ){ + // pyramid top on top face + if( n1_top >= 0 && n1_top != (degen_ind+2)%4+4 && n2_top != (degen_ind+2)%4+4 || + p_top_is_free ){ + if( n1_lat1 == (degen_ind+1)%4+4 || p_lat1_is_free ){ + valid_division = true; + face_done[0] = (degen_ind+1)%4; + if( p_lat1_is_free ){ + n1_lat1 = (degen_ind+1)%4+4; n2_lat1 = (degen_ind+2)%4; + } + createEdge( verts[n1_lat1], verts[n2_lat1], quadToTri_edges ); + createEdge( verts[n1_lat1], verts[n2_lat1], edges_new ); + } + else if( n2_lat2 == (degen_ind+3)%4+4 || p_lat2_is_free ){ + valid_division = true; + face_done[0] = (degen_ind+2)%4; + if( p_lat2_is_free ){ + n1_lat2 = (degen_ind+2)%4; n2_lat2 = (degen_ind+3)%4+4; + } + createEdge( verts[n1_lat2], verts[n2_lat2], quadToTri_edges ); + createEdge( verts[n1_lat2], verts[n2_lat2], edges_new ); + } + if( valid_division ){ + face_done[1] = 5; + if( p_top_is_free ){ + n1_top = (degen_ind+1)%4+4; n2_top = (degen_ind+3)%4+4; + } + createEdge( verts[n1_top], verts[n2_top], quadToTri_edges ); + createEdge( verts[n1_top], verts[n2_top], edges_new ); + } + } + // pyramid top on bottom face + if( !valid_division && n1_bot >= 0 && + n1_bot != (degen_ind+2)%4 && n2_bot != (degen_ind+2)%4 || + p_bot_is_free ){ + if( n1_lat1 == (degen_ind+1)%4 || p_lat1_is_free ){ + valid_division = true; + face_done[0] = (degen_ind+1)%4; + if( p_lat1_is_free ){ + n1_lat1 = (degen_ind+1)%4; n2_lat1 = (degen_ind+2)%4+4; + } + createEdge( verts[n1_lat1], verts[n2_lat1], quadToTri_edges ); + createEdge( verts[n1_lat1], verts[n2_lat1], edges_new ); + } + else if( n2_lat2 == (degen_ind+3)%4 || p_lat2_is_free ){ + valid_division = true; + face_done[0] = (degen_ind+2)%4; + if( p_lat2_is_free ){ + n1_lat2 = (degen_ind+2)%4+4; n2_lat2 = (degen_ind+3)%4; + } + createEdge( verts[n1_lat2], verts[n2_lat2], quadToTri_edges ); + createEdge( verts[n1_lat2], verts[n2_lat2], edges_new ); + } + if( valid_division ){ + face_done[1] = 4; + if( p_bot_is_free ){ + n1_bot = (degen_ind+1)%4; n2_bot = (degen_ind+3)%4; + } + createEdge( verts[n1_bot], verts[n2_bot], quadToTri_edges ); + createEdge( verts[n1_bot], verts[n2_bot], edges_new ); + } + } + } + // see if the lateral diagonals have non-adjoining diagonals + if( !valid_division ){ + if( ( n1_lat1 == (degen_ind+1)%4 || p_lat1_is_free ) && + ( n1_lat2 == (degen_ind+2)%4 || p_lat2_is_free ) ){ + valid_division = true; + n1_lat1 = (degen_ind+1)%4; + n2_lat1 = (degen_ind+2)%4+4; + n1_lat2 = (degen_ind+2)%4; + n2_lat2 = (degen_ind+3)%4+4; + } + else if( ( n1_lat1 == (degen_ind+1)%4+4 || p_lat1_is_free ) && + ( n1_lat2 == (degen_ind+2)%4+4 || p_lat2_is_free ) ){ + valid_division = true; + n1_lat1 = (degen_ind+1)%4+4; + n2_lat1 = (degen_ind+2)%4; + n1_lat2 = (degen_ind+2)%4+4; + n2_lat2 = (degen_ind+3)%4; + } + if( valid_division ){ + face_done[0] = (degen_ind+1)%4; + face_done[1] = (degen_ind+2)%4; + createEdge( verts[n1_lat1], verts[n2_lat1], quadToTri_edges ); + createEdge( verts[n1_lat1], verts[n2_lat1], edges_new ); + createEdge( verts[n1_lat2], verts[n2_lat2], quadToTri_edges ); + createEdge( verts[n1_lat2], verts[n2_lat2], edges_new ); + } + } + + if( valid_division ) + break; + } + + + // if no subdivisiion, still take care of any adjustable but required diagonals not yet added + for( int s = 0; s < face_types["adj_diag"].size(); s++ ){ + int ind = face_types["adj_diag"][s]; + if( ind != face_done[0] && ind != face_done[1] && ind != face_done[2] ){ + createEdge( verts[nadj1[ind]], verts[nadj2[ind]], quadToTri_edges ); + createEdge( verts[nadj1[ind]], verts[nadj2[ind]], edges_new ); + } + } + + // if no division top found, need internal vertex. + if( !valid_division ){ + std::pair<unsigned int, unsigned int> jkpair(j,k); + problems[elem].insert(jkpair); + problems_new[elem].insert(jkpair); + } + +} // end of addEdgesForQuadToTriOnePtDegenHexa() + + + +// Divide a fully non-degenerate hexahedron by brute force. +static void addEdgesForQuadToTriFullHexa( GRegion *gr, MElement *elem, ExtrudeParams *ep, + int j, int k, std::vector<MVertex *> verts, + std::map<std::string, std::vector<int> > &face_types, + std::set<std::pair<MVertex*, MVertex*> > &edges_new, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_new, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges, + std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems, + std::set<MVertex*, MVertexLessThanLexicographic> &pos, + std::vector<int> nfix1, std::vector<int> nfix2, + std::vector<int> nadj1, std::vector<int> nadj2, + std::vector<int> free_flag ) +{ + + // There are 4 main possibilities for minimum diags to guarantee slice: + // 1. Three diagonals at a corner + // 2. One PAIR of opposite diagonals, ABSOLUTELY ALL OTHER FACES FORBIDDEN + // 2. Two PAIRS of opposite diags + // 3. One PAIR of opposite diags PLUS a vertex with two ADDITIONAL diags meeting on it. + + if( !ep ) + return; + + // numbers of each type of face + int num_degen = face_types["degen"].size(); + int num_single_tri = face_types["single_tri"].size(); + int num_recomb = face_types["recomb"].size(); + int num_fixed_diag = face_types["fixed_diag"].size(); + int num_adj_diag = face_types["adj_diag"].size(); + int num_free = face_types["free"].size(); + + // If all faces are free, then diagonalize the three faces adjacent to vertex with + // smallest vertex pointer + if( num_free >= 6 ){ + int ind_low = getIndexForLowestVertexPointer(verts); + int add = ind_low < 4 ? 0 : 4; + + createEdge( verts[ind_low], verts[(ind_low-add+2)%4+add], quadToTri_edges ); + createEdge( verts[ind_low], verts[(ind_low-add+2)%4+add], edges_new ); + createEdge( verts[ind_low], verts[(ind_low-add+1)%4+4-add], quadToTri_edges ); + createEdge( verts[ind_low], verts[(ind_low-add+1)%4+4-add], edges_new ); + createEdge( verts[ind_low], verts[(ind_low-add+3)%4+4-add], quadToTri_edges ); + createEdge( verts[ind_low], verts[(ind_low-add+3)%4+4-add], edges_new ); + return; + } + + + // Start the loop to progressively become more permissive in what diagonals to allow for + // subdivision. + // On t-loop, select types of diagonals to look for. + // t = 0, fixed and preferred adjustables. + // t = 1, include non-preferred adjustables with lowest vertex. + // t = 2, include free face diagonal, lowest vertex. + // t = 3, on adjustable or free faces, take any diagonal that works. + + // this variable records the faces selected for diagonalization + int face_done[4]; + for(int p = 0; p < 4; p++ ) + face_done[p] = -1-p; + + // if find just two diagonals that could slice a prism with no other diags, remember ('hold') those diagonals until + // end of loop in the following 'hold' variables. + // Might have to resort to forbidding free surfaces and cutting two prisms only. + // don't really want to forbid surfaces, though...that's why two prisms are not immediately + // cut when found. + int p1_hold = -1, p2_hold = -2; // if found two opposite diags that could work alone + int n1_hold[2], n2_hold[2]; // hold diag nodes for p1_hold, p2_hold. + bool valid_division = false; + + for( int t = 0; t < 4; t++ ){ + + // variables that hold the face diagonal nodes. + int n1[6], n2[6]; + + // if the face is completely free (t==3), face_is_free = true; + bool face_is_free[6]; + + // set default values of the n variables + // to unique negative numbers; bool to false. + for( int p = 0; p < 6; p++ ){ + n1[p] = -p*p-p-1; + n2[p] = -p*p-p-2; + face_is_free[p] = false; + } + + for( int p = 0; p < 6; p++ ){ + // fixed diagonals + if( nfix1[p] >= 0 ){ + n1[p] = nfix1[p]; n2[p] = nfix2[p]; + } + // preferred adjustable diagonals + else if( !t && nadj1[p] >= 0 ){ + n1[p] = nadj1[p]; n2[p] = nadj2[p]; + } + // choose lowest vertex for t < 3, any vertex for t == 3 + else if( t >= 1 && t < 3 && nadj1[p] >= 0 || + t == 2 && free_flag[p] ){ + if( p < 4 ){ + if( verts[p] < verts[(p+1)%4] && + verts[p] < verts[p+4] || + verts[(p+1)%4+4] < verts[(p+1)%4] && + verts[(p+1)%4+4] < verts[p+4] ){ + n1[p] = p; n2[p] = (p+1)%4+4; + } + else{ + n1[p] = p+4; n2[p] = (p+1)%4; + } + } + else{ + int add = p==4 ? 0 : 4; + if( verts[0+add] < verts[1+add] && verts[0+add] < verts[3+add] || + verts[2+add] < verts[1+add] && verts[2+add] < verts[3+add] ){ + n1[p] = 0+add; n2[p] = 2+add; + } + else{ + n1[p] = 1+add; n2[p] = 3+add; + } + } + } + else if( t==3 && (nadj1[p] >= 0 || free_flag[p]) ) + face_is_free[p] = true; + } + + // Now perform the tests to find the valid subdivision + + // first, do the test to find opposite aligned diagonals for "prism slice through" + // Not verified, but I believe this gives better quality elements than 3-diag corners + if( !valid_division ){ + for( int p = 0; p < 3; p++ ){ + int p1 = -1, p2 = -2; + // prism slicing faces + if( p > 1){ + p1 = 4; p2 = 5; + } + else{ + p1 = p; p2 = (p+2)%4; + } + + // if these two faces do not work for opposite aligned diagonals, continue + if( n1[p1] < 0 && !face_is_free[p1] || + n1[p2] < 0 && !face_is_free[p2] ) + continue; + if( n1[p1] >= 0 && n1[p2] >= 0 ){ + if( p1 < 4 ){ + if( ( n1[p1] == p1 || n2[p1] == p1 ) && + n1[p2] != p2+4 && n2[p2] != p2+4 || + ( n1[p1] == p1+4 || n2[p1] == p1+4 ) && + n1[p2] != p2 && n2[p2] != p2 ) + continue; + } + else{ + int add = p1==4 ? 4 : -4; + if( n1[p1]+add != n1[p2] && n2[p1]+add != n1[p2] ) + continue; + } + } + + // if TWO faces are free, set one to the lowest pointer + if( face_is_free[p1] && face_is_free[p2] ){ + face_is_free[p1] = false; + if( p1 < 4 ){ + if( verts[p1] < verts[p1+4] && verts[p1] < verts[(p1+1)%4] || + verts[(p1+1)%4+4] < verts[p1+4] && + verts[(p1+1)%4+4] < verts[(p1+1)%4] ){ + n1[p1] = p1; + n2[p1] = (p1+1)%4+4; + } + else{ + n1[p1] = (p1+4); + n2[p1] = (p1+1)%4; + } + } + else{ + int add = p1==4 ? 0 : 4; + if( verts[0+add] < verts[1+add] && verts[0+add] < verts[3+add] || + verts[2+add] < verts[1+add] && verts[2+add] < verts[3+add] ){ + n1[p1] = 0+add; + n2[p1] = 2+add; + } + else{ + n1[p1] = 1+add; + n2[p1] = 3+add; + } + } + } + + // if one and ONLY one face is free, go ahead and set it to match the other now. + if( n1[p1] >= 0 && face_is_free[p2] ){ + if( p1 < 4 ){ + if( n1[p1] == p1 || n2[p1] == p1 ){ + n1[p2] = p2+4; + n2[p2] = (p2+1)%4; + } + else{ + n1[p2] = p2; + n2[p2] = (p2+1)%4+4; + } + } + else{ + int add = p1==4 ? 4 : -4; + n1[p2] = n1[p1]+add; + n2[p2] = n2[p1]+add; + } + face_is_free[p2] = false; + } + else if( n1[p2] >= 0 && face_is_free[p1] ){ + if( p1 < 4 ){ + if( n1[p2] == p2 || n2[p2] == p2 ){ + n1[p1] = p1+4; + n2[p1] = (p1+1)%4; + } + else{ + n1[p1] = p1; + n2[p1] = (p1+1)%4+4; + } + } + else{ + int add = p2==4 ? 4 : -4; + n1[p1] = n1[p2]+add; + n2[p1] = n2[p2]+add; + } + face_is_free[p1] = false; + } + + // In case the whole loop finishes and + // cannot make further diagonalizations on any faces to make the prism slice work, + // AND if there are no oter required diagonals other than among these two diagonals, + // then it will be possible to come back to these two opposing diagonals to make a + // simple two-prism slice. So, if there are no other diags, hold these two valid opposing + // diagonals in case we want to come back to them later to just have two + // opposing diagonals with the other faces forbidden. + if( p1_hold < 0 || p2_hold < 0 ){ + int required_diag_count = 0; + if( nfix1[p1] >= 0 || nadj1[p1] >= 0 ) + required_diag_count++; + if( nfix1[p2] >= 0 || nadj1[p2] >= 0 ) + required_diag_count++; + if( p1_hold < 0 && num_fixed_diag + num_adj_diag <= required_diag_count ){ + p1_hold = p1; + p2_hold = p2; + n1_hold[0] = n1[p1]; + n2_hold[0] = n2[p1]; + n1_hold[1] = n1[p2]; + n2_hold[1] = n2[p2]; + } + } + + // Two tests to see if this prism slice-through will work: + // 1: if there is another set of opposing faces with aligned diagonals. + // 2: if two diagonals on one of the remaining 4 faces meet, valid. + + + // Test 1: Another set of opposite, aligned diagonals. + for( int s = 0; s < 3; s++ ){ + if( s == p1 || s>1 && (p1==4 || p1==5) ) + continue; + int s1, s2; + if( s > 1){ + s1 = 4; s2 = 5; + } + else{ + s1 = s; s2 = (s+2)%4; + } + // if these two faces do not work for opposite aligned diagonals, continue + if( n1[s1] < 0 && !face_is_free[s1] || + n1[s2] < 0 && !face_is_free[s2] ) + continue; + if( n1[s1] >= 0 && n1[s2] >= 0 ){ + if( s1 < 4 ){ + if( ( n1[s1] == s1 || n2[s1] == s1 ) && + n1[s2] != s2+4 && n2[s2] != s2+4 || + ( n1[s1] == s1+4 || n2[s1] == s1+4 ) && + n1[s2] != s2 && n2[s2] != s2 ) + continue; + } + else{ + int add = s1==4 ? 4 : -4; + if( n1[s1]+add != n1[s2] && n2[s1]+add != n1[s2] ) + continue; + } + } + + valid_division = true; + face_done[0] = p1; + face_done[1] = p2; + face_done[2] = s1; + face_done[3] = s2; + + // if TWO faces are free, set one to the lowest pointer + if( face_is_free[s1] && face_is_free[s2] ){ + face_is_free[s1] = false; + if( s1 < 4 ){ + if( verts[s1] < verts[s1+4] && verts[s1] < verts[(s1+1)%4] || + verts[(s1+1)%4+4] < verts[s1+4] && + verts[(s1+1)%4+4] < verts[(s1+1)%4] ){ + n1[s1] = s1; + n2[s1] = (s1+1)%4+4; + } + else{ + n1[s1] = (s1+4); + n2[s1] = (s1+1)%4; + } + } + else{ + int add = s1==4 ? 0 : 4; + if( verts[0+add] < verts[1+add] && verts[0+add] < verts[3+add] || + verts[2+add] < verts[1+add] && verts[2+add] < verts[3+add] ){ + n1[s1] = 0+add; + n2[s1] = 2+add; + } + else{ + n1[s1] = 1+add; + n2[s1] = 3+add; + } + } + } + + // if ONLY one face is free, go ahead and set it to match the other now. + if( n1[s1] >= 0 && face_is_free[s2] ){ + if( s1 < 4 ){ + if( n1[s1] == s1 || n2[s1] == s1 ){ + n1[s2] = s2+4; + n2[s2] = (s2+1)%4; + } + else{ + n1[s2] = s2; + n2[s2] = (s2+1)%4+4; + } + } + else{ + int add = s1==4 ? 4 : -4; + n1[s2] = n1[s1]+add; + n2[s2] = n2[s1]+add; + } + face_is_free[s2] = false; + } + else if( n1[s2] >= 0 && face_is_free[s1] ){ + if( s1 < 4 ){ + if( n1[s2] == s2 || n2[s2] == s2 ){ + n1[s1] = s1+4; + n2[s1] = (s1+1)%4; + } + else{ + n1[s1] = s1; + n2[s1] = (s1+1)%4+4; + } + } + else{ + int add = s2==4 ? 4 : -4; + n1[s1] = n1[s2]+add; + n2[s1] = n2[s2]+add; + } + face_is_free[s1] = false; + } + + if( valid_division ) + break; + } + + + // Test 2: any vertex has two diagonals meeting at it, NOT including the diagonals on + // p1, p2; + if( !valid_division ){ + for( int s = 0; s < 8; s++ ){ // looping over vertices now, be careful + int add = s<4 ? 0 : 4; + std::vector<int> faces; + faces.assign(2,-1); + int third_face = s<4 ? 4 : 5; + int count_diags = 0; + if( s-add != p1 && s-add != p2 && + ( n1[(s-add)] == s || n2[(s-add)] == s || face_is_free[(s-add)] ) ){ + faces[count_diags] = s-add; + count_diags++; + } + if( (s-add+3)%4 != p1 && (s-add+3)%4 != p2 && + ( n1[(s-add+3)%4] == s || n2[(s-add+3)%4] == s || face_is_free[(s-add+3)%4] ) ){ + faces[count_diags] = (s-add+3)%4; + count_diags++; + } + if( count_diags < 2 && third_face != p1 && third_face != p2 && + ( n1[third_face] == s || n2[third_face] == s || face_is_free[third_face] ) ){ + faces[count_diags] = third_face; + count_diags++; + } + + // if valid subdivision NOT found + if( count_diags < 2 ) + continue; + + // if valid subdivision found + + valid_division = true; + + face_done[0] = p1; + face_done[1] = p2; + face_done[2] = faces[0]; + face_done[3] = faces[1]; + + if( face_is_free[s-add] ){ + n1[s-add] = s; + n2[s-add] = (s-add+1)%4+4-add; + } + if( face_is_free[(s-add+3)%4] ){ + n1[(s-add+3)%4] = s; + n2[(s-add+3)%4] = (s-add+3)%4+4-add; + } + if( face_is_free[third_face] ){ + n1[third_face] = s; + n2[third_face] = (s-add+2)%4+add; + } + + if( valid_division ) + break; + } + } // end of test 2 + + if( valid_division ){ + createEdge( verts[n1[face_done[0]]], verts[n2[face_done[0]]], quadToTri_edges ); + createEdge( verts[n1[face_done[0]]], verts[n2[face_done[0]]], edges_new ); + createEdge( verts[n1[face_done[1]]], verts[n2[face_done[1]]], quadToTri_edges ); + createEdge( verts[n1[face_done[1]]], verts[n2[face_done[1]]], edges_new ); + createEdge( verts[n1[face_done[2]]], verts[n2[face_done[2]]], quadToTri_edges ); + createEdge( verts[n1[face_done[2]]], verts[n2[face_done[2]]], edges_new ); + createEdge( verts[n1[face_done[3]]], verts[n2[face_done[3]]], quadToTri_edges ); + createEdge( verts[n1[face_done[3]]], verts[n2[face_done[3]]], edges_new ); + break; + } + } // end of p loop over first set of opposite faces + } + + // Test for 3 diagonals on a corner. + if( !valid_division ){ + for( int p = 0; p < 8; p++ ){ // looping over vertices now, be careful + int add = p<4 ? 0 : 4; + int third_face = p<4 ? 4 : 5; + if( ( n1[(p-add)] == p || n2[(p-add)] == p || face_is_free[(p-add)] ) && + ( n1[(p-add+3)%4] == p || n2[(p-add+3)%4] == p || face_is_free[(p-add+3)%4] ) && + ( n1[third_face] == p || n2[third_face] == p || face_is_free[third_face] ) ){ + valid_division = true; + if( face_is_free[p-add] ){ + n1[p-add] = p; + n2[p-add] = (p-add+1)%4+4-add; + } + if( face_is_free[(p-add+3)%4] ){ + n1[(p-add+3)%4] = p; + n2[(p-add+3)%4] = (p-add+3)%4+4-add; + } + if( face_is_free[third_face] ){ + n1[third_face] = p; + n2[third_face] = (p-add+2)%4+add; + } + + face_done[0] = (p-add); + face_done[1] = (p-add+3)%4; + face_done[2] = third_face; + + createEdge( verts[n1[(p-add)]], verts[n2[(p-add)]], quadToTri_edges ); + createEdge( verts[n1[(p-add)]], verts[n2[(p-add)]], edges_new ); + createEdge( verts[n1[(p-add+3)%4]], verts[n2[(p-add+3)%4]], quadToTri_edges ); + createEdge( verts[n1[(p-add+3)%4]], verts[n2[(p-add+3)%4]], edges_new ); + createEdge( verts[n1[third_face]], verts[n2[third_face]], quadToTri_edges ); + createEdge( verts[n1[third_face]], verts[n2[third_face]], edges_new ); + break; + } + } + } + + if( valid_division ) + break; + + } // end of t loop (outer loop) + + // If no valid division yet but yet there were two opposite faces once + // ( if this won't work, should be the case that p1_hold < 0 here ) + if( !valid_division && p1_hold >= 0 ){ + valid_division = true; + face_done[0] = p1_hold; + face_done[1] = p2_hold; + createEdge( verts[n1_hold[0]], verts[n2_hold[0]], quadToTri_edges ); + createEdge( verts[n1_hold[0]], verts[n2_hold[0]], edges_new ); + createEdge( verts[n1_hold[1]], verts[n2_hold[1]], quadToTri_edges ); + createEdge( verts[n1_hold[1]], verts[n2_hold[1]], edges_new ); + + // create forbidden faces + for( int s = 0; s < face_types["free"].size(); s++ ){ + int s_tmp = face_types["free"][s]; + std::vector<MVertex*> v_free; + if( s_tmp == p1_hold || s_tmp == p2_hold ) + continue; + if( s_tmp < 4 ){ + v_free.push_back(verts[s_tmp]); v_free.push_back(verts[(s_tmp+1)%4]); + v_free.push_back(verts[(s_tmp+1)%4+4]); v_free.push_back(verts[s_tmp+4]); + } + else{ + int add = s_tmp==4 ? 0 : 4; + v_free.push_back(verts[add]); v_free.push_back(verts[add+1]); + v_free.push_back(verts[add+2]); v_free.push_back(verts[add+3]); + } + createForbidden( v_free, forbidden_edges ); + createForbidden( v_free, forbidden_new ); + } + } + + // take care of any adjustable but required diagonals not yet added + for( int s = 0; s < face_types["adj_diag"].size(); s++ ){ + int ind = face_types["adj_diag"][s]; + if( ind == face_done[0] || ind == face_done[1] || ind == face_done[2] || ind == face_done[3] ) + continue; + createEdge( verts[nadj1[ind]], verts[nadj2[ind]], quadToTri_edges ); + createEdge( verts[nadj1[ind]], verts[nadj2[ind]], edges_new ); + } + + // if no valid division found, problematic. + if( !valid_division ){ + std::pair<unsigned int, unsigned int> jkpair(j,k); + problems[elem].insert(jkpair); + problems_new[elem].insert(jkpair); + } + +} // end of addEdgesForQuadToTriFullHexa(); + + +// Generate face diagonals to subdivide hexahedra by BRUTE FORCE. Not recommended for general use, but it +// is required for some elements which have all vertices on an external region boundary. +// Added 2010-01-29 +static void bruteForceEdgeQuadToTriHexa( GRegion *gr, MElement *elem, + int j, int k, std::vector<MVertex *> verts, + std::map<std::string, std::vector<int> > &face_types, + std::set<std::pair<MVertex*, MVertex*> > &edges_new, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_new, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges, + std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems, + std::set<MVertex*, MVertexLessThanLexicographic> &pos, + std::vector<int> nfix1, std::vector<int> nfix2, + std::vector<int> nadj1, std::vector<int> nadj2, + std::vector<int> free_flag ) +{ + + ExtrudeParams *ep = gr->meshAttributes.extrude; + + if( !ep || !ep->mesh.QuadToTri || !ep->mesh.ExtrudeMesh ){ + Msg::Error("In bruteForceEdgeQuadToTriHexa(), invalid extrusion " + "in region %d for performing QuadToTri mesh generation.", + gr->tag() ); + return; + } + + GModel *model = gr->model(); + if( !model ){ + Msg::Error("In bruteForceEdgeQuadToTriHexa(), invalid model for region " + "%d.", gr->tag() ); + return; + } + + // now find and verify the source and the top of region + + GFace *reg_source = model->getFaceByTag( std::abs( ep->geo.Source ) ); + if( !reg_source ){ + Msg::Error("In bruteForceEdgeQuadToTriHexa(), invalid source face for region " + "%d.", gr->tag() ); + return; + } + + // verify number of vertices + int n_lat; + if( verts.size() != 8 ){ + Msg::Error("In bruteForceEdgeQuadToTriHexa(), number of vertices not equal 8."); + return; + } + else + n_lat = 4; + + // numbers of each type of face + int num_degen = face_types["degen"].size(); + int num_single_tri = face_types["single_tri"].size(); + int num_recomb = face_types["recomb"].size(); + int num_fixed_diag = face_types["fixed_diag"].size(); + int num_adj_diag = face_types["adj_diag"].size(); + int num_free = face_types["free"].size(); + + + // Make sure all faces marked forbidden in face_types have all diagonals in forbidden_edges; + for( int p = 0; p < num_recomb; p++){ + int ind = face_types["recomb"][p]; + std::vector<MVertex*> v; + if( ind == 4 || ind == 5 ){ + int add = (ind == 4 ) ? 0 : 4; + v.push_back(verts[0+add]); v.push_back(verts[1+add]); v.push_back(verts[2+add]); + v.push_back(verts[3+add]); + } + else{ + v.push_back(verts[ind]); v.push_back(verts[(ind+1)%4]); v.push_back(verts[(ind+1)%4+4]); + v.push_back(verts[ind+4]); + } + + createForbidden(v, forbidden_new ); + createForbidden(v, forbidden_edges ); + } + + + // If this element is marked problematic, make all the adjustable diags (none should exist if it's already + // marked as a problem, but just make sure) and return. + std::pair<unsigned int, unsigned int> jkpair(j,k); + if( problems.find(elem) != problems.end() && problems[elem].count(jkpair) ){ + for( int s = 0; s < num_adj_diag; s++ ){ + int ind = face_types["adj_diag"][s]; + createEdge( verts[nadj1[ind]], verts[nadj2[ind]], quadToTri_edges ); + createEdge( verts[nadj1[ind]], verts[nadj2[ind]], edges_new ); + } + return; + } + + // test for right number of triangles with degenerate edges + if( face_types["single_tri"].size() != 0 && face_types["single_tri"].size() != 2 || + face_types["degen"].size() && face_types["single_tri"].size() != 2 ){ + Msg::Error("In bruteForceEdgeQuadToTriHexa(), bad degenerated extrusion encountered."); + std::pair<unsigned int, unsigned int> jkpair(j,k); + problems[elem].insert(jkpair); + problems_new[elem].insert(jkpair); + if( num_adj_diag ){ + int ind = face_types["adj_diag"][0]; + if( nadj1[ind] >= 0 ){ + createEdge( verts[nadj1[ind]], verts[nadj2[ind]], edges_new ); + createEdge( verts[nadj1[ind]], verts[nadj2[ind]], quadToTri_edges ); + } + } + return; + } + + // if there are not enough diagonals: + if( 6 - face_types["single_tri"].size() - face_types["recomb"].size() < 2 ){ + // Can't be meshed without internal vertex + if( face_types["adj_diag"].size() + face_types["fixed_diag"].size() ){ + std::pair<unsigned int, unsigned int> jkpair(j,k); + problems[elem].insert(jkpair); + problems_new[elem].insert(jkpair); + for( int s = 0; s < face_types["adj_diag"].size(); s++ ){ + int ind = face_types["adj_diag"][s]; + createEdge( verts[nadj1[ind]], verts[nadj2[ind]], quadToTri_edges ); + createEdge( verts[nadj1[ind]], verts[nadj2[ind]], edges_new ); + } + } + // set the (at most) one free surface to forbidden and return + else if( face_types["free"].size() ){ + int p_tmp = face_types["free"][0]; + std::vector<MVertex*> v_free; + if( p_tmp < 4 ){ + v_free.push_back(verts[p_tmp]); + v_free.push_back(verts[(p_tmp+1)%4]); + v_free.push_back(verts[(p_tmp+1)%4+4]); + v_free.push_back(verts[p_tmp+4]); + } + else{ + int add = p_tmp==4 ? 0 : 4; + v_free.push_back(verts[add]); + v_free.push_back(verts[add+1]); + v_free.push_back(verts[add+2]); + v_free.push_back(verts[add+3]); + } + createForbidden( v_free, forbidden_edges ); + createForbidden( v_free, forbidden_new ); + } + return; + } + + + // Start looking at the different shape possibilities: + + + // First shape: A PRISM + // Only two possibilities. Either the bottom can be divided along same diagonal as the top, + // or the one quad side can be divided joining the top diagonal. Otherwise, problem. + if( face_types["degen"].size() ){ + addEdgesForQuadToTriTwoPtDegenHexa( gr, elem, ep, j, k, verts, face_types, edges_new, forbidden_new, + quadToTri_edges, forbidden_edges, lat_tri_diags, problems_new, + problems, pos, nfix1, nfix2, nadj1, nadj2, free_flag ); + return; + } + + // Second shape type: DEGENERATED HEXAHEDRON + // Since this shape can be divided to create legitimate tets and/or pyramids, + // let us try it. + if( !face_types["degen"].size() && face_types["single_tri"].size() == 2 ){ + addEdgesForQuadToTriOnePtDegenHexa( gr, elem, ep, j, k, verts, face_types, edges_new, forbidden_new, + quadToTri_edges, forbidden_edges, lat_tri_diags, problems_new, + problems, pos, nfix1, nfix2, nadj1, nadj2, free_flag ); + return; + } + + // Third SHAPE: FULL HEXAHEDRON + // There are 4 main possibilities for minimum diags to guarantee slice: + // 1. Three diagonals at a corner + // 2. One PAIR of opposite diagonals, ABSOLUTELY ALL OTHER FACES FORBIDDEN + // 2. Two PAIRS of opposite diags + // 3. One PAIR of opposite diags PLUS a vertex with two ADDITIONAL diags meeting on it. + if( !face_types["single_tri"].size() && !face_types["degen"].size() ){ + + addEdgesForQuadToTriFullHexa( gr, elem, ep, j, k, verts, face_types, edges_new, forbidden_new, + quadToTri_edges, forbidden_edges, lat_tri_diags, problems_new, + problems, pos, nfix1, nfix2, nadj1, nadj2, free_flag ); + return; + } + +} // end of bruteForceEdgeQuadToTriHexa() + + + +// This is a shortcut function to simply copy face diagonals all the way up a vertical column of extruded elements. +// This function may not save very many operations, but it is going to stay... +static int ExtrudeDiags( GRegion *gr, std::vector<MVertex*> v, unsigned int j_start, + unsigned int k_start, unsigned int j_top, unsigned int k_top, + MElement *elem, ExtrudeParams *loop_ep, + std::set<std::pair<MVertex*, MVertex*> > &edges_new, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_new, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems, + std::set<MVertex*, MVertexLessThanLexicographic> &pos ) +{ + + if( !loop_ep || !loop_ep->mesh.QuadToTri || !loop_ep->mesh.ExtrudeMesh ){ + Msg::Error("In ExtrudeDiags(), invalid extrusion " + "in region %d for performing QuadToTri mesh generation.", + gr->tag() ); + return 0; + } + + GModel *model = gr->model(); + if( !model ){ + Msg::Error("In ExtrudeDiags(), invalid model for region " + "%d.", gr->tag() ); + return 0; + } + + int elem_size = elem->getNumVertices(); + if( !( v.size() == 6 && elem_size == 3 || + v.size() == 8 && elem_size == 4 ) ){ + Msg::Error("In ExtrudeDiags(), vertex number mismatch " + "between 2D source element and extruded volume."); + return 0; + } + + // first add the forbidden edges, then the new quadToTri_edges + // w = 0 forbidden, w = 1 quadToTri_edges (fixed) + for( int w = 0; w < 2; w++ ){ + std::set<std::pair<MVertex*, MVertex*> >::iterator it; + std::set<std::pair<MVertex*, MVertex*> >::iterator it_start; + std::set<std::pair<MVertex*, MVertex*> >::iterator it_end; + it_start = (!w) ? forbidden_new.begin() : edges_new.begin(); + it_end = (!w) ? forbidden_new.end() : edges_new.end(); + + for( it = it_start; it != it_end; it++ ){ + MVertex *v1, *v2; + v1 = (*it).first; v2 = (*it).second; + // find indices in v vector + int ind1 = -1, ind2 = -1; + for( int p = 0; p < v.size(); p++){ + if( v[p] == v1 ) + ind1 = p; + if( v[p] == v2 ) + ind2 = p; + } + if( ind1 < 0 || ind2 < 0 ){ + Msg::Error("Error in ExtrudeDiags(): could not find vertex indices."); + return 0; + } + // source verts: + MVertex *sv1 = (ind1 < elem_size ) ? elem->getVertex(ind1) : elem->getVertex(ind1-elem_size); + MVertex *sv2 = (ind2 < elem_size ) ? elem->getVertex(ind2) : elem->getVertex(ind2-elem_size); + // extrude these two verts + for( unsigned int j = j_start; j <= j_top; j++ ){ + int k_start_tmp = (j == j_start ) ? k_start+1 : 0; + int k_stop = ( j == j_top ) ? k_top : loop_ep->mesh.NbElmLayer[j]; + for( unsigned int k = k_start_tmp; k < k_stop; k++ ){ + std::vector<MVertex*> v_extr = getExtrudedLateralVertices(sv1, sv2, gr, j, k, loop_ep, pos); + if( v_extr.size() != 4 ) + return 0; + if( !w ){ + // reorder v_ext + MVertex *tmp = v_extr[2]; v_extr[2] = v_extr[3]; v_extr[3] = tmp; + createForbidden( v_extr, forbidden_edges ); + } + else{ + MVertex *v_final_1 = (ind1 < elem_size) ? v_extr[0] : v_extr[2]; + MVertex *v_final_2 = (ind2 < elem_size) ? v_extr[1] : v_extr[3]; + createEdge( v_final_1, v_final_2, quadToTri_edges ); + } + } + } + } + } + + // add problem elements + std::pair<unsigned int, unsigned int> jk_start (j_start, k_start); + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > >::iterator itprob; + + if( problems_new.size() ){ + for( itprob = problems_new.begin(); itprob != problems_new.end(); itprob++ ){ + for( unsigned int j = j_start; j <= j_top; j++ ){ + int k_start_tmp = (j == j_start ) ? k_start+1 : 0; + int k_stop = ( j == j_top ) ? k_top : loop_ep->mesh.NbElmLayer[j]; + for( unsigned int k = k_start_tmp; k < k_stop; k++ ){ + std::pair<unsigned int, unsigned int> pair_tmp (j, k); + problems[(*itprob).first].insert(pair_tmp); + } + } + } + } + + return 1; +} + + +// Get set of locally fixed edges, forbidden edges, and all lateral surface diagonals. +// Fixed edges include top surface diagonals and any lateral surface diagonals that cannot be swapped. +// Added 2010-01-24 +static bool QuadToTriGetRegionDiags(GRegion *gr, + std::set<std::pair<MVertex*,MVertex*> > &quadToTri_edges, + std::set<std::pair<MVertex*,MVertex*> > &forbidden_edges, + std::set<std::pair<MVertex*,MVertex*> > &lat_tri_diags, + std::set<MVertex *, MVertexLessThanLexicographic> &pos) +{ + + ExtrudeParams *ep = gr->meshAttributes.extrude; + + if( !ep || !ep->mesh.QuadToTri || !ep->mesh.ExtrudeMesh ) + return false; + + GModel *model = gr->model(); + + // find source face + GFace *reg_source = model->getFaceByTag( std::abs( ep->geo.Source ) ); + if( !reg_source ){ + Msg::Error("In QuadToTriGetRegionDiags(), could not find source face " + "%d for region %d.", std::abs( ep->geo.Source ), + gr->tag() ); + return false; + } + + // Find a source surface, find a COPIED_ENTITY that is the top surface, + + bool foundSource = false, foundTop = false; + GFace *reg_top = NULL; + std::list<GFace *> faces = gr->faces(); + std::list<GFace *>::iterator it = faces.begin(); + + for( it = faces.begin(); it != faces.end(); it++ ){ + ExtrudeParams *face_tmp_ep = (*it)->meshAttributes.extrude; + if( (*it) == reg_source ) + foundSource = true; + else if( face_tmp_ep && face_tmp_ep->geo.Mode == + COPIED_ENTITY ){ + GFace *top_source_tmp = model->getFaceByTag( + std::abs( face_tmp_ep->geo.Source ) ); + if( !top_source_tmp ){ + Msg::Error("In QuadToTriGetRegionDiags(), could not find source face " + "%d for copied surface %d of region %d.", + std::abs( face_tmp_ep->geo.Source ), + (*it)->tag(), gr->tag() ); + } + else if( top_source_tmp == reg_source ){ + foundTop = true; + reg_top = (*it); + } + } + } + + if( !foundTop ) + Msg::Warning("In QuadToTriGetRegionDiags(), could not find top face " + "for region %d.", gr->tag() ); + + + if( !foundSource ){ + Msg::Error("In QuadToTriGetRegionDiags(), source face " + "for region %d is not found in region face list.", gr->tag() ); + return false; + } + + + // Get Fixed and adjustable lateral diagonal element edges + int counter = 0; + for( it = faces.begin(); it != faces.end(); it++ ){ + counter++; + // true if surface is a lateral... + // ...The conditional is redundant for a reason. + if( (*it) != reg_top && (*it) != reg_source && + IsSurfaceALateralForRegion(gr, *it) ){ + + // take care of forbidden edges + for( unsigned int i = 0; i < (*it)->quadrangles.size(); i++){ + std::vector<MVertex*> v; + (*it)->quadrangles[i]->getVertices(v); + createForbidden(v, forbidden_edges ); + } + + // at this point, if there are no triangles or if there are quads, continue + if( !(*it)->triangles.size() || (*it)->quadrangles.size() ) + continue; + + ExtrudeParams *face_ep_tmp = (*it)->meshAttributes.extrude; + // If face is shared with a neighbor region that ALREADY has elements, + // if face is the source of the neighbor, if the neighbor is TRANSFINITE, + // or if the face is not an EXTRUDED_ENTITY, then these edges are fixed. + std::vector<GRegion *> neighbors; + GetNeighborRegionsOfFace(*it, neighbors); + GRegion *other_region = NULL; + ExtrudeParams *oth_ep = NULL; + ExtrudeParams *face_ep = (*it)->meshAttributes.extrude; + if(neighbors.size() > 1){ + other_region = neighbors[0] != gr ? neighbors[0] : neighbors[1]; + oth_ep = other_region->meshAttributes.extrude; + } + bool is_fixed = false; + + // see if neighbor has already been meshed + if( other_region && + ( other_region->pyramids.size() || + other_region->tetrahedra.size() || + other_region->hexahedra.size() || + other_region->prisms.size() || + other_region->polyhedra.size() || + other_region->getNumMeshElements() ) ){ + is_fixed = true; + } + // see if the diagonals are fixed for other reasons + if( !( face_ep_tmp && face_ep_tmp->mesh.ExtrudeMesh && + face_ep_tmp->geo.Mode == EXTRUDED_ENTITY ) || + other_region && oth_ep && oth_ep->mesh.ExtrudeMesh && + (*it) == model->getFaceByTag( std::abs( oth_ep->geo.Source ) ) || + other_region && other_region->meshAttributes.Method == MESH_TRANSFINITE ){ + is_fixed = true; + } + + // Now extrude all vertices and find diagonal edges. + // NOTE: This seems like the "hard way" because it is written to work + // even if the original lateral for the region is replaced by another structured + // surface. + // (first find common edge between source and this lateral) + std::list<GEdge*> source_edges = reg_source->edges(); + std::list<GEdge*> face_edges = (*it)->edges(); + std::list<GEdge*>::iterator itse; + GEdge *common = NULL; + int common_count = 0; + for( itse = source_edges.begin(); itse != source_edges.end(); itse++ ){ + if( std::find( face_edges.begin(), face_edges.end(), (*itse) ) != + face_edges.end() ){ + common = (*itse); common_count++; } + } + if( !common || common_count != 1 ) + Msg::Error("In QuadToTriGetRegionDiags(), lateral surface and " + "source surface of region %d do not share one and only one edge.", + gr->tag() ); + + + // now find face source edge, if it exists: + GEdge *face_source = NULL; + if( face_ep && face_ep->mesh.ExtrudeMesh && + face_ep->geo.Mode == EXTRUDED_ENTITY ){ + face_source = model->getEdgeByTag( std::abs( face_ep->geo.Source ) ); + if( !face_source ){ + Msg::Error("In QuadToTriGetRegionDiags(), extruded face %d " + "has invalid source.", (*it)->tag() ); + } + } + // set up vertex finding loops according to whether this surface + // is extruded or not (alternative to extruded is unrecombined transfinite surf with vertices + // coincidentally in the right place). + unsigned int num_lines = 0; + std::vector<MLine *> *source_lines = NULL; + ExtrudeParams *loop_ep = NULL; + if( face_source ){ + num_lines = face_source->lines.size(); + source_lines = &face_source->lines; + loop_ep = face_ep; + } + else{ + num_lines = common->lines.size(); + source_lines = &common->lines; + loop_ep = ep; + } + unsigned int index_guess = 0; + + for( unsigned int i = 0; i < num_lines; i++ ){ + MVertex *v0 = (*source_lines)[i]->getVertex(0); + MVertex *v1 = (*source_lines)[i]->getVertex(1); + + std::vector<MVertex*> verts; + // test to see if this is a degenerate quad as triangle. If so, continue. + verts = getExtrudedLateralVertices(v0, v1, (*it), 0, 0, loop_ep, pos); + if( verts[0]==verts[2] || verts[1]==verts[3] ){ + for( int p = 0; p < loop_ep->mesh.NbLayer; p++ ) + index_guess += loop_ep->mesh.NbElmLayer[p]; + continue; + } + for(int j = 0; j < loop_ep->mesh.NbLayer; j++) { + for(int k = 0; k < loop_ep->mesh.NbElmLayer[j]; k++) { + verts.clear(); + verts = getExtrudedLateralVertices(v0, v1, (*it), j, k, loop_ep, pos); + + // Find diagonal: + + std::pair<int,int> diag (0,0); + diag = FindDiagonalEdgeIndices( verts, (*it), true, index_guess ); + if( diag.first || diag.second ){ + int add = diag.first < 2 ? 1 : -1; + // have to test if conflicting edge already exists in quadToTri_edges in case of global subdivide + if( !edgeExists( verts[diag.first+add], verts[diag.second-add], quadToTri_edges ) ){ + createEdge( verts[diag.first], verts[diag.second], lat_tri_diags ); + if( is_fixed ) + createEdge( verts[diag.first], verts[diag.second], quadToTri_edges ); + } + else + createEdge( verts[diag.first+add], verts[diag.second-add], lat_tri_diags ); + } + else + Msg::Error("In QuadToTriGetRegionDiags(), failed to find a diagonal on unrecombined lateral surface %d.", (*it)->tag() ); + + index_guess += 2; + /* + + std::vector<MVertex*> vface; + vface.push_back(verts[0]); + vface.push_back(verts[1]); + vface.push_back(verts[3]); + vface.push_back(verts[2]); + if( k==2 && ( counter == 3 || counter == 3) ){ + if( k==0 || k ){ + createEdge( verts[1], verts[2], lat_tri_diags ); + createEdge( verts[1], verts[2], quadToTri_edges ); + } + else{ + createEdge( verts[0], verts[3], lat_tri_diags ); + createEdge( verts[0], verts[3], quadToTri_edges ); + } + } + else if( k==2 && (counter == 5 || counter == 4 || counter == 6 ) ){ + createEdge( verts[0], verts[3], lat_tri_diags ); + createEdge( verts[0], verts[3], quadToTri_edges ); + } + else if( k<2 ) + createForbidden(vface, forbidden_edges); + else + createEdge( elemEdge_tmp.first, elemEdge_tmp.second, lat_tri_diags ); + */ + + } + } + } + } + + } + // Insert diagonals of the COPIED top surface into quadToTri_edges; + unsigned int index_guess = reg_source->triangles.size(); + if( reg_top->quadrangles.size() ){ + Msg::Error("In QuadToTriGetRegionDiags(), top surface of region " + "%d has quads.", gr->tag() ); + return false; + } + + for( unsigned int i = 0; i < reg_source->quadrangles.size(); i++){ + int j_top = ep->mesh.NbLayer-1; + int k_top = ep->mesh.NbElmLayer[ep->mesh.NbLayer-1]; + + MElement *elem = reg_source->quadrangles[i]; + std::vector<MVertex *> verts; + int vert_num = get2DExtrudedVertices( elem, ep, j_top, k_top, pos, verts ); + if( verts.size() != 4 ) break; + + // Find diagonal: + std::pair<int,int> diag(0,0); + diag = FindDiagonalEdgeIndices( verts, reg_top, false, index_guess ); + if( diag.first || diag.second ) + createEdge( verts[diag.first], verts[diag.second], quadToTri_edges ); + else + Msg::Error("In QuadToTriGetRegionDiags(), failed to find a diagonal on top surface %d.", reg_top->tag() ); + + index_guess += 2; + } + +} + + +// For use in QuadToTriEdgeGenerator: Controls BRUTE FORCE edging of elements with ALL vertices +// on a lateral boundary surface. +// Added 04/08/2011 +static int makeEdgesForElemsWithAllVertsOnBnd( GRegion *gr, bool is_dbl, + CategorizedSourceElements &cat_src_elems, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges, + std::map<MElement*, std::set<std::pair<unsigned int, + unsigned int> > > &problems, + std::set<MVertex*, MVertexLessThanLexicographic> &pos ) +{ + + ExtrudeParams *ep = gr->meshAttributes.extrude; + + if( !ep || !ep->mesh.QuadToTri || !ep->mesh.ExtrudeMesh ){ + Msg::Error("In makeEdgesForElemsWithAllVertsOnBnd(), invalid extrusion " + "in region %d for performing QuadToTri mesh generation.", + gr->tag() ); + return 0; + } + + GModel *model = gr->model(); + if( !model ){ + Msg::Error("In makeEdgesForElemsWithAllVertsOnBnd(), invalid model for region " + "%d.", gr->tag() ); + return 0; + } + + GFace *reg_source = model->getFaceByTag( std::abs( ep->geo.Source ) ); + if( !reg_source ){ + Msg::Error("In makeEdgesForElemsWithAllVertsOnBnd(), invalid source face for region " + "%d.", gr->tag() ); + return 0; + } + + if( gr != cat_src_elems.region || reg_source != cat_src_elems.source_face ){ + Msg::Error("In makeEdgesForElemsWithAllVertsOnBnd(), too many elements in the CategorizedSourceElements " + " structure for given source face %d.", reg_source->tag() ); + return 0; + } + + // find edge verts of source face + std::set<MVertex *, MVertexLessThanLexicographic> pos_src_edge; + QuadToTriInsertFaceEdgeVertices(reg_source, pos_src_edge ); + + + // while Loop to diagonalize 3-boundary point triangles and 4-boundary point quadrangles: + bool finish_all_tri = false; + // can afford temporary copies since these sets should be relatively small for all cases. + std::set<unsigned int> tri_tmp, quad_tmp; + tri_tmp = cat_src_elems.three_bnd_pt_tri; + // if is_dbl, then don't track the quads + if( !is_dbl ) + quad_tmp = cat_src_elems.four_bnd_pt_quad; + + while( tri_tmp.size() || quad_tmp.size() ){ + std::set<unsigned int>::iterator it; + std::vector<unsigned int> done; + // 3 bnd point triangle and 4 bnd point quad loop + // s = 0 for triangles, s = 1 for quads + for( int s = 0; s < 2; s++ ){ + std::set<unsigned int> *set_elems; + std::set<std::pair<MVertex*,MVertex*> > edges_new, forbidden_new; + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > problems_new; + if( !s ) set_elems = &tri_tmp; + else set_elems = &quad_tmp; + + for( it = set_elems->begin(); it != set_elems->end(); it++ ){ + MElement *elem; + if( !s ) elem = reg_source->triangles[(*it)]; + else elem = reg_source->quadrangles[(*it)]; + + int elem_size = elem->getNumVertices(); + + std::vector<bool> vert_bnd; + if( !s ) vert_bnd.insert( vert_bnd.begin(), cat_src_elems.tri_bool.begin()+(4*(*it)+1), + cat_src_elems.tri_bool.begin()+(4*(*it)+4) ); + else vert_bnd.insert( vert_bnd.begin(), cat_src_elems.quad_bool.begin()+(5*(*it)+1), + cat_src_elems.quad_bool.begin()+(5*(*it)+5) ); + int j_start, k_start; + + // if has lat_tri_diags or is a rotation with quads (may have to do the one point bnd quads to + // get rid of degenerate hexahedra...they are invalid mesh volumes. + if( lat_tri_diags.size() || ( reg_source->quadrangles.size() && ( + ep->geo.Type == ROTATE || ep->geo.Type == TRANSLATE_ROTATE ) ) ){ + j_start = 0; + k_start = 0; + } + else{ + j_start = ep->mesh.NbLayer-1; + k_start = ep->mesh.NbElmLayer[ep->mesh.NbLayer-1]-1; + } + + int num_levels = 0; + if( lat_tri_diags.size() || ( reg_source->quadrangles.size() && ( + ep->geo.Type == ROTATE || ep->geo.Type == TRANSLATE_ROTATE ) ) ){ + for( int p = 0; p < ep->mesh.NbLayer; p++ ) + num_levels += ep->mesh.NbElmLayer[p]; + } + else + num_levels = 1; + + int num_edged = 0; + + // before starting extrusion loop, get the node numbers for the diagonal + // in the region's top surface extruded from this source element + // (will need this below) + std::vector<MVertex *> verts_top; + int ntop1 = -1, ntop2 = -2; + int vert_num_top = getExtrudedVertices( elem, ep, ep->mesh.NbLayer-1, + ep->mesh.NbElmLayer[ep->mesh.NbLayer-1]-1, pos, verts_top); + if( edgeExists( verts_top[4], verts_top[6], quadToTri_edges ) ){ + ntop1 = 4; ntop2 = 6; + } + else if( edgeExists( verts_top[5], verts_top[7], quadToTri_edges ) ){ + ntop1 = 5; ntop2 = 7; + } + + // start extrusion loop + for( int j = j_start; j < ep->mesh.NbLayer; j++ ){ + int k_start_tmp, k_stop; + if( j == j_start ) + k_start_tmp = k_start; + else + k_start_tmp = 0; + k_stop = ep->mesh.NbElmLayer[j]; + for( int k = k_start_tmp; k < k_stop; k++ ){ + std::vector<MVertex*> verts; + std::map<std::string, std::vector<int> > face_types; + std::vector<int> nfix1, nfix2, nadj1, nadj2, free_flag; + int vert_num = getExtrudedVertices(elem, ep, j, k, pos, verts); + // if just starting and there is no diagonal on the bottom edge, + // forbid it (this prevents some conflicts) + if( vert_num == 8 && j==j_start && k==k_start && + !edgeExists(verts[0], verts[2], quadToTri_edges) && + !edgeExists(verts[1], verts[3], quadToTri_edges) ){ + std::vector<MVertex *> v_bot; + v_bot.assign(4, (MVertex*)(0)); + v_bot[0] = verts[0]; v_bot[1] = verts[1]; + v_bot[2] = verts[2]; v_bot[3] = verts[3]; + createForbidden(v_bot, forbidden_edges); + createForbidden(v_bot, forbidden_new); + } + + if( !s ){ + face_types = getFaceTypes( gr, elem, j, k, verts, pos_src_edge, quadToTri_edges, + forbidden_edges, lat_tri_diags, vert_bnd, nfix1, nfix2, + nadj1, nadj2, free_flag); + + if( finish_all_tri || face_types["free"].size() + face_types["adj_diag"].size() < 2 ){ + bruteForceEdgeQuadToTriPrism( gr, elem, j, k, verts, face_types, edges_new, + forbidden_new, quadToTri_edges, forbidden_edges, + lat_tri_diags, problems_new, problems, nfix1, nfix2, + nadj1, nadj2, free_flag); + //IMPORTANT + num_edged++; + } + } + else if( s ){ + // a loop to try to force the top diagonal to align with the diagonal in the region's + // top surface above this element. + bool changed_diag = false; + for( int g=0; g < 2; g++ ){ + // on first step, see if can put in the aligned top diagonal + if( g==0 && ntop1 >=0 && ntop2 >= 0 && + !edgeExists( verts[4], verts[6], quadToTri_edges ) && + !edgeExists( verts[5], verts[7], quadToTri_edges ) ){ + std::vector<MVertex *> v_top; + v_top.assign(4, (MVertex*)(0)); + v_top[0] = verts[4]; v_top[1] = verts[5]; + v_top[2] = verts[6]; v_top[3] = verts[7]; + if( !forbiddenExists( v_top, forbidden_edges ) ){ + changed_diag = true; + createEdge( verts[ntop1], verts[ntop2], quadToTri_edges ); + } + } + // on second step, see if a problem was created from inserting aligned diagonal + // if so, remove it and try again. + std::pair<unsigned int, unsigned int> jk_pair(j,k); + if( g==1 && changed_diag && + problems[elem].find( jk_pair ) != problems[elem].end() ){ + problems[elem].erase( jk_pair ); + if( !problems[elem].size() ) + problems.erase( elem ); + deleteEdge( verts[ntop1], verts[ntop2], quadToTri_edges ); + } + else if( g==1 ){ + if( !problems[elem].size() ) + problems.erase( elem ); + break; + } + face_types = getFaceTypes( gr, elem, j, k, verts, pos_src_edge, quadToTri_edges, + forbidden_edges, lat_tri_diags, vert_bnd, nfix1, nfix2, + nadj1, nadj2, free_flag); + + bruteForceEdgeQuadToTriHexa( gr, elem, j, k, verts, face_types, edges_new, + forbidden_new, quadToTri_edges, forbidden_edges, + lat_tri_diags, problems_new, problems, pos, nfix1, nfix2, + nadj1, nadj2, free_flag); + } + //IMPORTANT + num_edged++; + } + } + } + + // IMPORTANT + if( num_edged == num_levels ) + done.push_back((*it)); + + // If quads, break ( only do quads one at a time so can keep 3 bnd point triangles from + // being trapped so that they can't be meshed without an internal vertex) + if( s ) + break; + + } // end loop over set of element indices (tri or quad) + + // remove elements that are done from list + if( done.size() ){ + for( int i = 0; i < done.size(); i++ ) + set_elems->erase( done[i] ); + done.clear(); + } + + // skip over quads on this iteration if some modifications were made to triangle extrusion elements + // ( need to make sure no triangles left with only one adjustable or free face or else + // meshing a quad might trap them so they can't be meshed without internal vertex ). + if( !s && ( edges_new.size() || problems_new.size() ) ) + s = -1; + + // if quads are done, finish all triangles + if( !quad_tmp.size() ) + finish_all_tri = true; + + } // end of s-loop to choose between tri or quad + + } // end of while + + return 1; + +} // end of makeEdgesForElemsWithAllVertsOnBnd + + + + +// For use in QuadToTriEdgeGenerator: Does the edging of prisms with some but not all vertices +// on a lateral boundary surface. +// Added 04/08/2011 +static int makeEdgesForOtherBndPrisms( GRegion *gr, bool is_dbl, CategorizedSourceElements &cat_src_elems, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges, + std::map<MElement*, std::set<std::pair<unsigned int, + unsigned int> > > &problems, + std::set<MVertex*, MVertexLessThanLexicographic> &pos ) +{ + + ExtrudeParams *ep = gr->meshAttributes.extrude; + + if( !ep || !ep->mesh.QuadToTri || !ep->mesh.ExtrudeMesh ){ + Msg::Error("In makeEdgesForOtherBndPrisms(), invalid extrusion " + "in region %d for performing QuadToTri mesh generation.", + gr->tag() ); + return 0; + } + + GModel *model = gr->model(); + if( !model ){ + Msg::Error("In makeEdgesForOtherBndPrisms(), invalid model for region " + "%d.", gr->tag() ); + return 0; + } + + GFace *reg_source = model->getFaceByTag( std::abs( ep->geo.Source ) ); + if( !reg_source ){ + Msg::Error("In makeEdgesForOtherBndPrisms(), invalid source face for region " + "%d.", gr->tag() ); + return 0; + } + + if( gr != cat_src_elems.region || reg_source != cat_src_elems.source_face ){ + Msg::Error("In makeEdgesForOtherBndPrisms(), CatergorizedSourceElements structure data " + " does not correspond to region %d.", reg_source->tag() ); + return 0; + } + + std::set<unsigned int >::iterator it; + + // skip the whole thing if this is true...NO reason to divide!! + if( !lat_tri_diags.size() && !reg_source->quadrangles.size() ) + return 1; + + + // edge other_bnd triangles loop + // (draw from boundaries up toward interior) + for( it = cat_src_elems.other_bnd_tri.begin(); + it != cat_src_elems.other_bnd_tri.end(); it++ ){ + + + std::set<std::pair<MVertex*,MVertex*> > edges_new, forbidden_new; + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > problems_new; + std::vector<MVertex*> verts; + std::vector<bool> vert_bnd; + MElement *elem = reg_source->triangles[(*it)]; + int elem_size = elem->getNumVertices(); + + vert_bnd.insert( vert_bnd.begin(), cat_src_elems.tri_bool.begin()+(4*(*it)+1), + cat_src_elems.tri_bool.begin()+(4*(*it)+4) ); + + int j_start, k_start; + // if has lat_tri_diags or is a rotation with quads (may have to do the one point bnd quads to + // get rid of degenerate hexahedra...they are invalid mesh volumes. + if( lat_tri_diags.size() || ( reg_source->quadrangles.size() && ( + ep->geo.Type == ROTATE || ep->geo.Type == TRANSLATE_ROTATE ) ) ){ + j_start = 0; + k_start = 0; + } + else{ + j_start = ep->mesh.NbLayer-1; + k_start = ep->mesh.NbElmLayer[ep->mesh.NbLayer-1]-1; + } + + // add edges + for( int j = j_start; j < ep->mesh.NbLayer; j++ ){ + int k_start_tmp, k_stop; + if( j == j_start ) + k_start_tmp = k_start; + else + k_start_tmp = 0; + k_stop = ep->mesh.NbElmLayer[j]; + for( int k = k_start_tmp; k < k_stop; k++ ){ + std::vector<MVertex *> verts; + int vert_num = getExtrudedVertices(elem, ep, j, k, pos, verts); + // NOTE: bnd_face might not really be a bnd_face, but the code takes that into account below. + for( int p = 0; p < elem_size; p++ ){ + if( vert_bnd[p] ){ + bool degen = false; + int p2 = (p+1)%elem_size; + int p3 = (p+elem_size-1)%elem_size; + // test for degeneracy + if( verts[p] == verts[p+elem_size] ) + degen = true; + if( !degen && !vert_bnd[p2] ){ + createEdge( verts[p], verts[p2+elem_size], quadToTri_edges ); + createEdge( verts[p], verts[p2+elem_size], edges_new ); + } + if( !degen && !vert_bnd[p3] ){ + createEdge( verts[p], verts[p3+elem_size], quadToTri_edges ); + createEdge( verts[p], verts[p3+elem_size], edges_new ); + } + + // make the adjustable diag (if it exists) + // Note: p might not really be a bnd face, but this takes that into account + if( edgeExists( verts[p], verts[p2+elem_size], lat_tri_diags ) && + !edgeExists( verts[p+elem_size], verts[p2], quadToTri_edges ) ) + createEdge( verts[p], verts[p2+elem_size], quadToTri_edges ); + else if( edgeExists( verts[p+elem_size], verts[p2], lat_tri_diags ) && + !edgeExists( verts[p], verts[p2+elem_size], quadToTri_edges ) ) + createEdge( verts[p+elem_size], verts[p2], quadToTri_edges ); + } + } + } + } + + } // end of boundary triangles loop + + return 1; + +} // end of makeEdgesForOtherBndPrisms() + + + +// For use in QuadToTriEdgeGenerator: Does the edging of hexahedra with some but not all vertices +// on a lateral boundary surface. +// Added 04/08/2011 +static int makeEdgesForOtherBndHexa( GRegion *gr, bool is_dbl, CategorizedSourceElements &cat_src_elems, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges, + std::map<MElement*, std::set<std::pair<unsigned int, + unsigned int> > > &problems, + std::set<MVertex*, MVertexLessThanLexicographic> &pos ) +{ + + // Edge creation for extruded quadrangles with some but not all vertices on a boundary. + // (draw from boundaries up toward interior) + // If no lat_tri_diags, just do the top layer. + // Follow these instructions: + // For 2 pts on boundary: + // Below top level, draw top diags only if there are lat_tri_diags touching elemnt or if + // element is not adjacent to any boundary (only touching it) + // Order of precedence in top edging decisions: + // a. if bottom diag exists, align top diagonal to it. + // b. if bnd vertices are on diametrically opposite corners, draw top diag NOT on them. + // c. if lateral surface diagonals touch element, connect to one at some vertex. + // d. otherwise, don't draw top diagonal. + // In any case, draw the lateral edges up from bottom boundary vertices toward interior. + // At top level, top diagonals should already be done in 2D mesh step. + // For 3 pts on boundary: + // Draw the top diag from corner inward. Draw laterals up from bottom boundary vertices. + // For 1 point on boundary: + // Draw lateral diagonals up from bottom boundary verts, draw top diagonal completely off the boundary. + // Draw diagonals toward the "pivot vertex", which is the vertex in the top element face + // diametrically opposite to the top face vertex on the boundary. Actually, this is only + // done in the first two extrusion layers, if those layers are not in the top layer. + // In first layer, draw diags to the top vertex diametrically opposite bnd vert, in the second + // layer, draw them down to the bottom such vertex. Same vertex for both layers. This is + // done to ensure that a one pt boundary quad in an unstructured surface can be divided without + // dividing the entire bottom layer. If two pivot vertices share an edge and these rules would conflict, + // just give precedence to the first pivot vertex encountered in the edging loop (this works, yes). + // Also, the internal elements touching this pivot vertex should + // have diagonals drawn to pivot vertex as well (done in different function, with same precedence). + + ExtrudeParams *ep = gr->meshAttributes.extrude; + + if( !ep || !ep->mesh.QuadToTri || !ep->mesh.ExtrudeMesh ){ + Msg::Error("In makeEdgesForOtherBndHexa(), invalid extrusion " + "in region %d for performing QuadToTri mesh generation.", + gr->tag() ); + return 0; + } + + GModel *model = gr->model(); + if( !model ){ + Msg::Error("In makeEdgesForOtherBndHexa(), invalid model for region " + "%d.", gr->tag() ); + return 0; + } + + GFace *reg_source = model->getFaceByTag( std::abs( ep->geo.Source ) ); + if( !reg_source ){ + Msg::Error("In makeEdgesForOtherBndHexa(), invalid source face for region " + "%d.", gr->tag() ); + return 0; + } + + if( gr != cat_src_elems.region || reg_source != cat_src_elems.source_face ){ + Msg::Error("In makeEdgesForOtherBndHexa(), CatergorizedSourceElements structure data " + " does not correspond to region %d.", reg_source->tag() ); + return 0; + } + + std::set<unsigned int>::iterator it; + + for( it = cat_src_elems.other_bnd_quad.begin(); + it != cat_src_elems.other_bnd_quad.end(); it++ ){ + + MElement *elem = reg_source->quadrangles[(*it)]; + const int elem_size = elem->getNumVertices(); + + std::vector<bool> vert_bnd; + vert_bnd.insert( vert_bnd.begin(), cat_src_elems.quad_bool.begin()+(5*(*it)+1), + cat_src_elems.quad_bool.begin()+(5*(*it)+5) ); + + // these locally hold each added edge/problem element temporarily + std::set< std::pair<MVertex *, MVertex *> > edges_new; + std::set< std::pair<MVertex *, MVertex *> > forbidden_new; + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > problems_new; + + // Get a count of bnd verts. If one point, that index will be in one_point_ind. + // For 3 bnd vert quads record the empty spot in 'skip.' + int bnd_count = 0, skip, one_point_ind; + for( int s = 0; s < elem_size; s++ ){ + if( vert_bnd[s] ){ + bnd_count++; + one_point_ind = s; + } + else skip = s; + } + + unsigned int j_start, k_start; + + // if has lat_tri_diags or is a rotation with quads (may have to do the one point bnd quads to + // get rid of degenerate hexahedra...they are invalid mesh volumes. + if( lat_tri_diags.size() || ( reg_source->quadrangles.size() && ( + ep->geo.Type == ROTATE || ep->geo.Type == TRANSLATE_ROTATE ) ) ){ + j_start = 0; + k_start = 0; + } + else{ + j_start = ep->mesh.NbLayer-1; + k_start = ep->mesh.NbElmLayer[ep->mesh.NbLayer-1]-1; + } + + // start of top layer + int j_top_start = ep->mesh.NbLayer-1; + int k_top_start = ep->mesh.NbElmLayer[ep->mesh.NbLayer-1]-1; + + // add edges: + + // lateral diags in any case + for( int j = j_start; j < ep->mesh.NbLayer; j++ ){ + int k_start_tmp, k_stop; + if( j == j_start ) + k_start_tmp = k_start; + else + k_start_tmp = 0; + k_stop = ep->mesh.NbElmLayer[j]; + for( int k = k_start_tmp; k < k_stop; k++ ){ + std::vector<MVertex *> verts; + int vert_num = getExtrudedVertices(elem, ep, j, k, pos, verts); + int bnd_face = -1; + // NOTE: bnd_face might not really be a bnd_face, but don't worry--it won't be diagonalized if not + for( int p = 0; p < elem_size; p++ ){ + int p2 = (p+1)%elem_size; + int p3 = (p+elem_size-1)%elem_size; + if( vert_bnd[p] ){ + bool degen = false; + // test for degeneracy + if( verts[p] == verts[p+elem_size] ) + degen = true; + if( !degen && !vert_bnd[p2] ) + createEdge( verts[p], verts[p2+elem_size], quadToTri_edges ); + if( !degen && !vert_bnd[p3] ) + createEdge( verts[p], verts[p3+elem_size], quadToTri_edges ); + + // make the adjustable diag + if( edgeExists( verts[p], verts[p2+elem_size], lat_tri_diags ) && + !edgeExists( verts[p+elem_size], verts[p2], quadToTri_edges ) ) + createEdge( verts[p], verts[p2+elem_size], quadToTri_edges ); + else if( edgeExists( verts[p+elem_size], verts[p2], lat_tri_diags ) && + !edgeExists( verts[p], verts[p2+elem_size], quadToTri_edges ) ) + createEdge( verts[p+elem_size], verts[p2], quadToTri_edges ); + } + // if face not on boundary and in top layer...make an internal lateral + else if( j == j_top_start && k == k_top_start && !vert_bnd[p2] ){ + int ind_low, ind2; + if( verts[p+elem_size] < verts[p2+elem_size] ){ + ind_low = p+elem_size; + ind2 = p2; + } + else{ + ind_low = p2+elem_size; + ind2 = p; + } + createEdge( verts[ind_low], verts[ind2], quadToTri_edges ); + } + + } + } + } + + + // Add top diags for 2-bnd point quads, below top layer + // If there is a lateral diagonal, connect to it. If this is a two boundary point quad + // that is not adjacent to a boundary (it is possible), draw diagonal completely off boundary. + // If neither of the above, don't make the top diagonal. + // IF degenerate, be careful. + if( bnd_count == 2 ){ + for( int j = j_start; j < ep->mesh.NbLayer; j++ ){ + int k_start_tmp, k_stop; + if( j == j_start ) + k_start_tmp = k_start; + else + k_start_tmp = 0; + k_stop = ep->mesh.NbElmLayer[j]; + if( j == ep->mesh.NbLayer-1 ) + k_stop--; // dont go to top elements + for( int k = k_start_tmp; k < k_stop; k++ ){ + std::vector<MVertex *> verts; + int vert_num = getExtrudedVertices(elem, ep, j, k, pos, verts); + int p1 = -1, p2 = -1; + for( int p = 0; p < elem_size; p++ ){ + if( vert_bnd[p] ){ + p1 = p; + int p2_tmp = (p+1)%elem_size; + int p3_tmp = (p+elem_size-1)%elem_size; + if( vert_bnd[p2_tmp] ){ + p1 = p; p2 = p2_tmp; + } + else if( vert_bnd[p3_tmp] ){ + p1 = p3_tmp; p2 = p; + } + break; + } + } + if( p2 < 0 && p1 < 0 ){ + Msg::Error("In makeEdgesForOtherBndHexa(), error finding boundary points on " + "2-boundary point quadrangle."); + break; + } + + // First, if bottom diagonal exists, align top diagonal to it, OTHERWISE: + // if bnd verts oppose each other, draw top diagonal off boundary + // otherwise, connect to any existing lateral diagonal either totally ON boundary or totally OFF, + // but ONLY draw top diag if such a lateral exists + // NOTE: since laterals were added first, any lat_tri_diag here is in quadToTri_edges already + if( edgeExists( verts[0], verts[2], quadToTri_edges ) ) + createEdge( verts[4], verts[6], quadToTri_edges ); + else if( edgeExists( verts[1], verts[3], quadToTri_edges ) ) + createEdge( verts[5], verts[7], quadToTri_edges ); + else if( p2 < 0 && p1 >= 0 ) + createEdge( verts[(p1+1)%elem_size+elem_size], + verts[(p1+elem_size-1)%elem_size+elem_size], quadToTri_edges ); + else if( p1 >= 0 && edgeExists( verts[p1], verts[p2+elem_size], quadToTri_edges ) ) + createEdge( verts[p2+elem_size], verts[(p2+2)%elem_size+elem_size], quadToTri_edges ); + else if( p1 >= 0 && edgeExists( verts[p1+elem_size], verts[p2], quadToTri_edges ) ) + createEdge( verts[p1+elem_size], verts[(p1+2)%elem_size+elem_size], quadToTri_edges ); + } + } + } + + + // top diags on corner quad ( I *think* this always works for non-degen stuff, even for free wall spanning cases ) + else if( bnd_count == 3 && ( j_start < j_top_start || k_start < k_top_start ) ){ + std::vector<MVertex *> verts; + int vert_num = getExtrudedVertices(elem, ep, j_start, k_start, pos, verts); + problems_new.clear(); + forbidden_new.clear(); + edges_new.clear(); + createEdge( verts[skip+elem_size], verts[(skip+2)%elem_size+elem_size], quadToTri_edges ); + createEdge( verts[skip+elem_size], verts[(skip+2)%elem_size+elem_size], edges_new ); + // copies the diags in edges_new on up the extrusion but NOT on the top surface + ExtrudeDiags( gr, verts, j_start, k_start, j_top_start, k_top_start, + elem, ep, edges_new, forbidden_new, + quadToTri_edges, forbidden_edges, problems_new, problems, pos); + } + + // finally, top diagonal and other two laterals for 1 bnd point quad + else if( bnd_count == 1 && ( j_start < j_top_start || k_start < k_top_start ) ){ + std::vector<MVertex*> verts; + int vert_num = getExtrudedVertices(elem, ep, j_start, k_start, pos, verts); + int p = one_point_ind; + + // to determine if there is a second level above the start but not in top layer + int j_next, k_next; + bool divide_next = false; + std::vector<MVertex*> verts_next; + if( ep->mesh.NbElmLayer[0] > 1 ){ + j_next = 0; + k_next = 1; + } + else{ + j_next = std::min(ep->mesh.NbLayer-1, 1); + k_next = 0; + } + if( j_next < j_top_start || k_next < k_top_start ){ + divide_next = true; + getExtrudedVertices(elem, ep, j_next, k_next, pos, verts_next); + } + + problems_new.clear(); + forbidden_new.clear(); + edges_new.clear(); + + // Create the laterals that run up to the "pivot vertex" for this 1 bnd pt quad + // Other internal elements have diagonals converging on the pivot index. + // Only create it if there is NO conflicting diagonal in place, though--this CAN happen, + // but this approach still give no conflicts. + // NOTE THAT THESE ARE NOT PROPAGATED UP THE ENTIRE EXTRUSION. + int p2 = (p+1)%elem_size; + int p3 = (p+2)%elem_size; + int p4 = (p+elem_size-1)%elem_size; + if( !edgeExists( verts[p2+elem_size], verts[p3], quadToTri_edges ) ) + createEdge( verts[p2], verts[p3+elem_size], quadToTri_edges ); + if( !edgeExists( verts[p4+elem_size], verts[p3], quadToTri_edges ) ) + createEdge( verts[p4], verts[p3+elem_size], quadToTri_edges ); + + // if there is a second extrusion level not on the top layer, add the 'reverse' of the + // previous two diagonals + if( divide_next && !edgeExists( verts_next[p2], verts_next[p3+elem_size], quadToTri_edges ) ) + createEdge( verts_next[p2+elem_size], verts_next[p3], quadToTri_edges ); + if( divide_next && !edgeExists( verts_next[p4], verts_next[p3+elem_size], quadToTri_edges ) ) + createEdge( verts_next[p4+elem_size], verts_next[p3], quadToTri_edges ); + + // If this quad has degenerate vertex on boundary and the pivot laterals run to the + // top pivot vertex and there is no pre-existing + // top diagonal on other two vertices, draw diagonal out to + // the pivot_vertex. Otherwise, draw it on the other two verts + if( verts[p] == verts[p+elem_size] && + ( edgeExists( verts[p2], verts[p3+elem_size], quadToTri_edges ) || + verts[p2] == verts[p2+elem_size] ) && + ( edgeExists( verts[p4], verts[p3+elem_size], quadToTri_edges ) || + verts[p4] == verts[p4+elem_size] ) && + !edgeExists( verts[p2+elem_size], verts[p4+elem_size], quadToTri_edges ) ){ + createEdge( verts[p+elem_size], verts[p3+elem_size], quadToTri_edges ); + createEdge( verts[p+elem_size], verts[p3+elem_size], edges_new ); + } + else{ + createEdge( verts[p2+elem_size], verts[p4+elem_size], quadToTri_edges ); + createEdge( verts[p2+elem_size], verts[p4+elem_size], edges_new ); + } + // copies the top diag in edges_new up the extrusion but NOT to the top surface of region. + ExtrudeDiags( gr, verts, 0, 0, j_top_start, k_top_start, + elem, ep, edges_new, forbidden_new, + quadToTri_edges, forbidden_edges, problems_new, problems, pos); + } + + } // end of boundary quadrangles loop + + return 1; + +} // end of makeEdgesForOtherBndHexa() + + +// For use in QuadToTriEdgeGenerator: Does the lateral edging of internal elements that touch +// a pivot vertex of a hexahedral element that has ONE SOURCE vertex on a lateral boundary surface. +// See inside function for a definition of the "pivot vertex." +// Added 04/08/2011 + static int makeEdgesForElemsTouchPivotVert( GRegion *gr, bool is_dbl, CategorizedSourceElements &cat_src_elems, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags, + std::set<std::pair<MVertex*, MVertex*> > &forbidden_edges, + std::set<MVertex*, MVertexLessThanLexicographic> &pos ) +{ + + // Draw diagonals toward the "pivot vertex" of a hexahedron whose source quad has only one + // vertex on a lateral boundary. Actually, this is only + // done in the first two extrusion layers, if those layers are not in the top layer. The pivot + // vertex is the vertex in the top face of the element that is diametrically opposite the top vertex + // on the lateral boundary of the region. + // In first layer, draw diags up from bottom to the pivot vertex, in the second + // layer, draw them down to pivot vertex. Same vertex for both layers. This is + // done to ensure that a one pt boundary quad in an unstructured surface can be divided without + // dividing the entire bottom layer. + // If two pivot vertices share an edge and these rules would conflict, + // just give precedence to the first pivot vertex encountered in the edging loop (this works, yes). + + + ExtrudeParams *ep = gr->meshAttributes.extrude; + + if( !ep || !ep->mesh.QuadToTri || !ep->mesh.ExtrudeMesh ){ + Msg::Error("In makeEdgesForElemsTouchPivotVert(), invalid extrusion " + "in region %d for performing QuadToTri mesh generation.", + gr->tag() ); + return 0; + } + + GModel *model = gr->model(); + if( !model ){ + Msg::Error("In makeEdgesForElemsTouchPivotVert(), invalid model for region " + "%d.", gr->tag() ); + return 0; + } + + GFace *reg_source = model->getFaceByTag( std::abs( ep->geo.Source ) ); + if( !reg_source ){ + Msg::Error("In makeEdgesForForElemsTouchPivotVert(), invalid source face for region " + "%d.", gr->tag() ); + return 0; + } + + if( gr != cat_src_elems.region || reg_source != cat_src_elems.source_face ){ + Msg::Error("In makeEdgesForElemsTouchPivotVert(), CatergorizedSourceElements structure data " + " does not correspond to region %d.", reg_source->tag() ); + return 0; + } + + // no need to do this if there are no lateral surface diagonals and if not a rotation with quadrangles. + if( !lat_tri_diags.size() && ( !reg_source->quadrangles.size() || + ep->geo.Type != ROTATE && ep->geo.Type != TRANSLATE_ROTATE ) ) + return 1; + + int j_top_start, k_top_start; + j_top_start = ep->mesh.NbLayer-1; + k_top_start = ep->mesh.NbElmLayer[ep->mesh.NbLayer-1]-1; + + // s = 0 for triangles; s = 1 for quadrangles + // These diags are all repeated identically up the extrusion. + for( int s = 0; s < 2; s++ ){ + + + std::set<unsigned int> *set_elems; + std::set<unsigned int>::iterator it; + + if( !s ) + set_elems = &cat_src_elems.internal_tri_touch_one_bnd_pt_quad; + else + set_elems = &cat_src_elems.internal_quad_touch_one_bnd_pt_quad; + + for( it = set_elems->begin(); it != set_elems->end(); it++ ){ + MElement *elem; + if( !s ) + elem = reg_source->triangles[(*it)]; + else + elem = reg_source->quadrangles[(*it)]; + + int elem_size = elem->getNumVertices(); + + // find pivot vertex index + int v_index; + bool v_index_found = false; + for( int p = 0; p < elem_size; p++ ){ + if( !s && cat_src_elems.tri_bool[4*(*it)+1+p] ){ + v_index = p; v_index_found = true; break; + } + else if( s && cat_src_elems.quad_bool[5*(*it)+1+p] ){ + v_index = p; v_index_found = true; break; + } + } + if( !v_index_found ){ + Msg::Error("In makeEdgesForElemsTouchPivotVert(), could not find the pivot vertex for an element touching " + "a quad with one vertex on a face edge boundary in region %d. Skipping...", gr->tag() ); + continue; + } + + std::vector<MVertex*> verts; + int vert_num = getExtrudedVertices(elem, ep, 0, 0, pos, verts); + + // determine the j, k for the next layer above 0,0 so that the elements directly above + // the base elements can divided AND higher layers may be closed off + // (no need to divide the elements all the way up) + int j_next, k_next; + bool divide_next = false; + std::vector<MVertex*> verts_next; + if( ep->mesh.NbElmLayer[0] > 1 ){ + j_next = 0; + k_next = 1; + } + else{ + j_next = std::min(ep->mesh.NbLayer-1, 1); + k_next = 0; + } + if( j_next < j_top_start || k_next < k_top_start ){ + divide_next = true; + getExtrudedVertices(elem, ep, j_next, k_next, pos, verts_next); + } + + // add the lateral diagonals (skip faces that are already diagonalized) + // note these are created in two layers, mirrored about the plane separating the layers + int p2 = (v_index+1)%elem_size; + int p3 = (v_index+elem_size-1)%elem_size; + if( !edgeExists( verts[v_index], verts[p2+elem_size], quadToTri_edges ) ){ + createEdge( verts[v_index+elem_size], verts[p2], quadToTri_edges ); + if( divide_next ) + createEdge( verts_next[v_index], verts_next[p2+elem_size], quadToTri_edges ); + } + if( !edgeExists( verts[v_index], verts[p3+elem_size], quadToTri_edges ) ){ + createEdge( verts[v_index+elem_size], verts[p3], quadToTri_edges ); + if( divide_next ) + createEdge( verts_next[v_index], verts_next[p3+elem_size], quadToTri_edges ); + } + // make top diagonals for quads -- note: can't just draw to the preferred pivot because + // it can touch two and the other might have laterals drawn to it already. have to find + // the one with two lateral diagonals drawn to it. + if( s==1 && verts[v_index+elem_size] != verts[v_index] && + !edgeExists( verts[p2+elem_size], verts[p3+elem_size], quadToTri_edges ) ) + createEdge( verts[v_index+elem_size], verts[(v_index+2)%elem_size+elem_size], quadToTri_edges ); + + } + } + + + // Now revisit the boundary quads that touched a one boundary point quad pivot. These MAY have had + // edges added and now need a top diagonal + std::set<unsigned int>::iterator it; + for( it = cat_src_elems.two_bnd_pt_quad_touch_one_bnd_pt_quad.begin(); + it != cat_src_elems.two_bnd_pt_quad_touch_one_bnd_pt_quad.end(); it++ ){ + MElement *elem = reg_source->quadrangles[(*it)]; + int elem_size = elem->getNumVertices(); + std::vector<bool> vert_bnd; + vert_bnd.insert( vert_bnd.begin(), cat_src_elems.quad_bool.begin()+(5*(*it)+1), + cat_src_elems.quad_bool.begin()+(5*(*it)+5) ); + // find num boundary points + int bnd_count = 0; + for( int s = 0; s < elem_size; s++ ){ + if( vert_bnd[s] ) + bnd_count++; + } + if( bnd_count != 2 ) + continue; + + std::vector<MVertex*> verts; + int vert_num = getExtrudedVertices(elem, ep, 0, 0, pos, verts); + int p1 = -1, p2 = -1; + for( int p = 0; p < elem_size; p++ ){ + if( vert_bnd[p] ){ + p1 = p; + int p2_tmp = (p+1)%elem_size; + int p3_tmp = (p+elem_size-1)%elem_size; + if( vert_bnd[p2_tmp] ){ + p1 = p; p2 = p2_tmp; + } + else if( vert_bnd[p3_tmp] ){ + p1 = p3_tmp; p2 = p; + } + break; + } + } + if( p2 < 0 && p1 < 0 ){ + Msg::Error("In makeEdgesForElemsTouchPivotVert(), error finding boundary points on " + "2-boundary point quadrangle."); + break; + } + + // find lateral boundary or internal lateral diagonals. If found, add top diagonal + std::set< std::pair<MVertex*, MVertex*> > edges_new; + std::set< std::pair<MVertex*, MVertex*> > forbidden_new; + std::map< MElement*, std::set< std::pair<unsigned int, unsigned int> > > problems, problems_new; + if( p1 >= 0 && p2 >= 0 && + edgeExists( verts[(p1+2)%elem_size], verts[(p1+elem_size-1)%elem_size+elem_size], quadToTri_edges ) && + !edgeExists( verts[p1+elem_size], verts[(p1+2)%elem_size+elem_size], quadToTri_edges ) ){ + createEdge( verts[(p1+1)%elem_size+elem_size], verts[(p1+elem_size-1)%elem_size+elem_size], quadToTri_edges ); + createEdge( verts[(p1+1)%elem_size+elem_size], verts[(p1+elem_size-1)%elem_size+elem_size], edges_new ); + } + else if( p1 >= 0 && p2 >= 0 && + edgeExists( verts[(p1+2)%elem_size+elem_size], verts[(p1+elem_size-1)%elem_size], quadToTri_edges ) && + !edgeExists( verts[(p1+1)%elem_size+elem_size], verts[(p1+elem_size-1)%elem_size+elem_size], quadToTri_edges ) ){ + createEdge( verts[p1+elem_size], verts[(p1+2)%elem_size+elem_size], quadToTri_edges ); + createEdge( verts[p1+elem_size], verts[(p1+2)%elem_size+elem_size], edges_new ); + } + + if( edges_new.size() ){ + ExtrudeDiags( gr, verts, 0, 0, j_top_start, k_top_start, + elem, ep, edges_new, forbidden_new, + quadToTri_edges, forbidden_edges, problems_new, problems, pos); + } + } + + return 1; + +} // end of makeEdgesForElemsTouchPivotVert() + + +// For use in QuadToTriEdgeGenerator: Does the lateral edging of internal elements in the top extrusion +// layer by lowest vertex pointer value in TOP FACE. +// Added 04/08/2011 +static int makeEdgesInternalTopLayer( GRegion *gr, bool is_dbl, CategorizedSourceElements &cat_src_elems, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::set<MVertex*, MVertexLessThanLexicographic> &pos ) +{ + + ExtrudeParams *ep = gr->meshAttributes.extrude; + + if( !ep || !ep->mesh.QuadToTri || !ep->mesh.ExtrudeMesh ){ + Msg::Error("In makeEdgesInternalTopLayer(), invalid extrusion " + "in region %d for performing QuadToTri mesh generation.", + gr->tag() ); + return 0; + } + + GModel *model = gr->model(); + if( !model ){ + Msg::Error("In makeEdgesInternalTopLayer(), invalid model for region " + "%d.", gr->tag() ); + return 0; + } + + GFace *reg_source = model->getFaceByTag( std::abs( ep->geo.Source ) ); + if( !reg_source ){ + Msg::Error("In makeEdgesForInternalTopLayer(), invalid source face for region " + "%d.", gr->tag() ); + return 0; + } + + if( gr != cat_src_elems.region || reg_source != cat_src_elems.source_face ){ + Msg::Error("In makeEdgesInternalTopLayer(), CatergorizedSourceElements structure data " + " does not correspond to region %d.", reg_source->tag() ); + return 0; + } + + // s = 0 for triangles; s = 1 for quadrangles + for( int s = 0; s < 2; s++ ){ + + // no need to do this if there are no quads!!! + if( !reg_source->quadrangles.size() ) + break; + + std::set<unsigned int> *set_elems; + std::set<unsigned int>::iterator it; + + if( !s ) + set_elems = &cat_src_elems.internal_tri; + else + set_elems = &cat_src_elems.internal_quad; + + for( it = set_elems->begin(); it != set_elems->end(); it++ ){ + + MElement *elem; + if( !s ) + elem = reg_source->triangles[(*it)]; + else + elem = reg_source->quadrangles[(*it)]; + int elem_size = elem->getNumVertices(); + std::vector<MVertex*> verts; + int j = ep->mesh.NbLayer-1; + int k = ep->mesh.NbElmLayer[ep->mesh.NbLayer-1]-1; + + int vert_num = getExtrudedVertices(elem, ep, j, k, pos, verts); + + // do this by lowest pointer value IN THE TOP SURFACE + for( int p = 0; p < elem_size; p++ ){ + int ind_low = p+elem_size; + int ind_2 = (p+1)%elem_size; + if( verts[ind_2+elem_size] < verts[ind_low] ){ + ind_low = ind_2+elem_size; + ind_2 = p; + } + createEdge( verts[ind_low], verts[ind_2], quadToTri_edges ); + } + } + } + + return 1; + +} // End of makeEdgesInternalTopLayer() + + +// Generate the set of QuadToTri diagonal edges to subdivide elements, +// and records problematic elements that need to be subvided with an internal vertex. +// Added 2010-01-19 +int QuadToTriEdgeGenerator(GRegion *gr, CategorizedSourceElements &cat_src_elems, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::set<std::pair<MVertex*, MVertex*> > &lat_tri_diags, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems, + std::set<MVertex*, MVertexLessThanLexicographic> &pos ) +{ + + ExtrudeParams *ep = gr->meshAttributes.extrude; + + if( !ep || !ep->mesh.QuadToTri || !ep->mesh.ExtrudeMesh ){ + Msg::Error("In QuadToTriEdgeGenerator(), invalid extrusion " + "in region %d for performing QuadToTri mesh generation.", + gr->tag() ); + return 0; + } + + GModel *model = gr->model(); + if( !model ){ + Msg::Error("In QuadToTriEdgeGenerator(), invalid model for region " + "%d.", gr->tag() ); + return 0; + } + + // number of extrusion layers + int num_layers = 0; + for( int p = 0; p < ep->mesh.NbLayer; p++ ) + num_layers += ep->mesh.NbElmLayer[p]; + + // is this a valid double layer extrusion? + bool is_dbl = false; + if( num_layers >= 2 && ( ep->mesh.QuadToTri == QUADTRI_DBL_1 || ep->mesh.QuadToTri == QUADTRI_DBL_1_RECOMB ) ) + is_dbl = true; + + + // now find and verify the source and the top of region + + GFace *reg_source = model->getFaceByTag( std::abs( ep->geo.Source ) ); + if( !reg_source ){ + Msg::Error("In QuadToTriEdgeGenerator(), invalid source face for region " + "%d.", gr->tag() ); + return 0; + } + + std::list<GFace *> reg_faces = gr->faces(); + std::list<GFace *>::iterator itf = reg_faces.begin(); + + // find top surface of extrusion + GFace *reg_top = NULL; + for( itf = reg_faces.begin(); itf != reg_faces.end(); itf++ ){ + ExtrudeParams *face_ep = (*itf)->meshAttributes.extrude; + if( face_ep && face_ep->geo.Mode == COPIED_ENTITY && + reg_source == model->getFaceByTag( std::abs(face_ep->geo.Source) ) ){ + reg_top = (*itf); + break; + } + } + + ExtrudeParams *top_ep = NULL; + if( !reg_top ){ + Msg::Error("In QuadToTriEdgeGenerator(), invalid top surface for region " + "%d.", gr->tag() ); + return 0; + } + + // list of forbidden edges and boundary verts that are in triangles + std::set<std::pair<MVertex*, MVertex*> > forbidden_edges; + + // insert ALL fixed edges into quadToTri_edges, all forbidden edges on recombined quads + // into forbidden_edges, and insert into lat_tri_diags ALL lateral diagonal edges. + QuadToTriGetRegionDiags( gr, quadToTri_edges, forbidden_edges, lat_tri_diags, pos ); + /*unsigned int Rnum = gr->tag()-1; + std::vector<MVertex*> verts; + MElement *elem; + elem = reg_source->triangles[0]; + int vert_num = getExtrudedVertices(elem, ep, 0, 0, pos, verts); + const int elem_size = verts.size() == 8 ? 4 : 3; + for( int p = 0; p < elem_size; p++ ){ + int state = Rnum / std::pow(3,(elem_size-1-p)); + Rnum -= state*std::pow(3,(elem_size-1-p)); + if( p < elem_size ){ + if( verts[p] == verts[p+elem_size] || verts[(p+1)%elem_size] == verts[(p+1)%elem_size+elem_size] ) + continue; + if( state == 1 ){ + //createEdge( verts[p], verts[(p+1)%elem_size+elem_size], quadToTri_edges ); + createEdge( verts[p], verts[(p+1)%elem_size+elem_size], lat_tri_diags ); + } + else if( state == 2 ){ + //createEdge( verts[p+elem_size], verts[(p+1)%elem_size], quadToTri_edges ); + createEdge( verts[p+elem_size], verts[(p+1)%elem_size], lat_tri_diags ); + } + else if( state == 0 ){ + std::vector<MVertex *> v_face; + v_face.assign(4, (MVertex*)(NULL) ); + v_face[0] = verts[p]; v_face[1] = verts[(p+1)%elem_size]; + v_face[2] = verts[(p+1)%elem_size+elem_size]; + v_face[3] = verts[p+elem_size]; + createForbidden(v_face, forbidden_edges); + } + else if( state != 0 ) + Msg::Error("Failed in finding all combos...state = %d.", state); + } + else{ + int add = (p==4) ? 0 : 4; + if( state == 1 ) + createEdge( verts[0+add], verts[2+add], quadToTri_edges ); + else if( state == 2 ) + createEdge( verts[1+add], verts[3+add], quadToTri_edges ); + else if( state == 0 ){ + std::vector<MVertex *> v_face; + v_face.assign(4, (MVertex*)(NULL) ); + v_face[0] = verts[0+add]; v_face[1] = verts[1+add]; + v_face[2] = verts[2+add]; v_face[3] = verts[3+add]; + createForbidden(v_face, forbidden_edges); + } + else + Msg::Error("Failed in finding all combos...state = %d.", state); + } + }*/ + + // if this is a double layer extrusion, don't need adjustable lateral edges, so + // put all lat_tri_diags into quadToTri_edges + if( is_dbl) + quadToTri_edges.insert(lat_tri_diags.begin(), lat_tri_diags.end()); + + // If there are no lat_tri_diags and no quads, there is nothing left to do + if( !lat_tri_diags.size() && !reg_source->quadrangles.size() ) + return 1; + + + // can return now if this is a double layer extrusion...nothing left to do + if( is_dbl ) + return 1; + + + // BRUTE FORCE diagonalization of elements with all vertices on a lateral boundary of region: + // This has to be done for all cases with such elements if + if( !makeEdgesForElemsWithAllVertsOnBnd( gr, is_dbl, cat_src_elems, quadToTri_edges, + lat_tri_diags, forbidden_edges, problems, pos ) ){ + Msg::Error("In QuadToTriEdgeGenerator(), failed to make edges for the elements in region %d " + "with all vertices on a lateral boundary", gr->tag() ); + return 0; + } + + // now do the "elegant" diagonalization of all the rest of the surface elements.... + + + // Extrude source triangles that are on the source boundary edges and find any diagonals + if( !makeEdgesForOtherBndPrisms( gr, is_dbl, cat_src_elems, quadToTri_edges, + lat_tri_diags, forbidden_edges, problems, pos ) ){ + Msg::Error("In QuadToTriEdgeGenerator(), failed to make edges for the prism extrusions in region %d with " + "source triangles having some but not all vertices on the boundary", gr->tag() ); + return 0; + } + + + // For a region with a structured all-quad source surface, none of the previous edging will be executed, + // so this is the first place a region with a structured quad source surface starts getting + // edges. + + // The rest of this function is only necessary for a single layer quadToTri method extrusions: + + + // Edge creation for extruded quadrangles with some but not all vertices on a boundary. + if( !makeEdgesForOtherBndHexa( gr, is_dbl, cat_src_elems, quadToTri_edges, + lat_tri_diags, forbidden_edges, problems, pos ) ){ + Msg::Error("In QuadToTriEdgeGenerator(), failed to make edges for the hexahedral extrusions in region %d with " + "source quads having some but not all vertices on the boundary", gr->tag() ); + return 0; + } + + + // Find diagonals for elements touching a "pivot vertex" of a hexa element that has + // a source quad with only one vertex on a lateral boundary (see inside makeEdgesForOtherBndHexa() and + // makeEdgesForElemsTouchingPivotVert() for details of "pivot vertex". + if( !makeEdgesForElemsTouchPivotVert( gr, is_dbl, cat_src_elems, quadToTri_edges, + lat_tri_diags, forbidden_edges, pos ) ){ + Msg::Error("In QuadToTriEdgeGenerator(), failed to make edges for " + "the elements in region %d touching a \'pivot vertex\' of a " + "hexa element with source quad having one vertex on a boundary.", gr->tag() ); + return 0; + } + + // Mesh internal elements in the top layer (just add lateral diagonals for the + // Do this by lowest pointer in top surface + if( !makeEdgesInternalTopLayer( gr, is_dbl, cat_src_elems, quadToTri_edges, pos ) ){ + Msg::Error("In QuadToTriEdgeGenerator(), failed to make internal edges " + "in top extrusion layer of region %d.", gr->tag() ); + return 0; + } + + return 1; + +} // End of QuadToTriEdgeGenerator() + + +// Remesh the lateral 2D faces of QuadToTri regions using edges in quadToTri_edges as contraints +// Added 2010-01-24 +static bool QuadToTriLateralRemesh( GRegion *gr, std::set<std::pair<MVertex*,MVertex*> > &quadToTri_edges ) +{ + + ExtrudeParams *ep = gr->meshAttributes.extrude; + + if( !ep || !ep->mesh.QuadToTri || !ep->mesh.ExtrudeMesh ) + return false; + + GModel *model = gr->model(); + + // find source face + GFace *reg_source = model->getFaceByTag( std::abs( ep->geo.Source ) ); + if( !reg_source ){ + Msg::Error("In QuadToTriLateralRemesh(), could not find source face " + "%d for region %d.", std::abs( ep->geo.Source ), + gr->tag() ); + return false; + } + + + // Find a source surface, find a COPIED_ENTITY that is the top surface, + // If shared laterals are all static (quad or non subdivide triangles), + // set the allStaticSharedLaterals argument to true. + // If any lateral is unstructured, error. + + bool foundSource = false, foundTop = false; + GFace *reg_top = NULL; + std::list<GFace *> faces = gr->faces(); + std::list<GFace *>::iterator it = faces.begin(); + + for( it = faces.begin(); it != faces.end(); it++ ){ + ExtrudeParams *face_tmp_ep = (*it)->meshAttributes.extrude; + if( face_tmp_ep && face_tmp_ep->geo.Mode == + COPIED_ENTITY ){ + GFace *top_source_tmp = model->getFaceByTag( + std::abs( face_tmp_ep->geo.Source ) ); + if( !top_source_tmp ){ + Msg::Error("In QuadToTriLateralRemesh(), could not find source face " + "%d for copied surface %d of region %d.", + std::abs( face_tmp_ep->geo.Source ), + (*it)->tag(), gr->tag() ); + } + else if( top_source_tmp == reg_source ){ + foundTop = true; + reg_top = (*it); + } + } + } + + if( !foundTop ) + Msg::Warning("In QuadToTriLateralRemesh(), could not find top face " + "for region %d.", gr->tag() ); + + Msg::Info("Remeshing lateral surfaces for QuadToTri region %d.", gr->tag() ); + + // now loop through faces again, remeshing all laterals that need it. + for( it = faces.begin(); it != faces.end(); it++ ){ + if( (*it) != reg_top && (*it) != reg_source && + IsSurfaceALateralForRegion(gr, *it) + && + (*it)->triangles.size() && !(*it)->quadrangles.size() ){ + + ExtrudeParams *face_ep_tmp = (*it)->meshAttributes.extrude; + + // *** JUST REMESH EVERY TRIANGLE SURFACE AGAIN TO BE SURE *** + + for(unsigned int i = 0; i < (*it)->triangles.size(); i++) + delete (*it)->triangles[i]; + (*it)->triangles.clear(); + for(unsigned int i = 0; i < (*it)->quadrangles.size(); i++) + delete (*it)->quadrangles[i]; + (*it)->quadrangles.clear(); + MeshExtrudedSurface((*it), &quadToTri_edges); + } + } + +} + + +// Adds the face- or body-center vertices needed for some QuadToTri elements +static bool addFaceOrBodyCenteredVertices( GRegion *to, CategorizedSourceElements &c, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems, + bool is_dbl, unsigned int lat_tri_diags_size, + std::set<MVertex *, MVertexLessThanLexicographic> &pos ) +{ + + ExtrudeParams *ep = to->meshAttributes.extrude; + if( !ep || !ep->mesh.ExtrudeMesh || !ep->mesh.QuadToTri ) + return false; + + GModel *model = to->model(); + GFace *from = model->getFaceByTag( std::abs(ep->geo.Source) ); + if( !from ) + return false; + + // need these for double layer extrusion purposes + int j_second_from_top, k_second_from_top; + if( ep->mesh.NbElmLayer[ep->mesh.NbLayer-1] > 1 ){ + j_second_from_top = ep->mesh.NbLayer-1; + k_second_from_top = ep->mesh.NbElmLayer[j_second_from_top]-2; + } + else{ + j_second_from_top = std::max(ep->mesh.NbLayer-2, 0); + k_second_from_top = ep->mesh.NbElmLayer[j_second_from_top]-1; + } + + // find number of layers; + unsigned int num_layer = 0; + for( int p = 0; p < ep->mesh.NbLayer; p++ ) + num_layer += ep->mesh.NbElmLayer[p]; + + // If !is_dbl, make the body centered internal vertices for all "problem" elements + // If is_dbl, make face-centered verts where needed + unsigned int num_tri = from->triangles.size(); + unsigned int num_quad = from->quadrangles.size(); + + // create reserve capacity for the temp vector of new vertices: + unsigned int cap_add = 0; + if( !is_dbl ){ + std::map<MElement *, std::set< std::pair<unsigned int, unsigned int> > >::iterator itmap; + for( itmap = problems.begin(); itmap != problems.end(); itmap++ ) + cap_add += itmap->second.size(); + to->mesh_vertices.reserve(to->mesh_vertices.size()+cap_add); + } + else{ + unsigned int NbBndElems = c.four_bnd_pt_quad.size() + c.three_bnd_pt_tri.size() + + c.other_bnd_quad.size() + c.other_bnd_tri.size(); + unsigned int NbSourceElems = from->triangles.size() + from->quadrangles.size(); + cap_add = NbSourceElems + NbBndElems * ( num_layer-2 > 0 ? num_layer-2 : 0 ); + } + + // first the !is_dbl case + if( problems.size() && !is_dbl ){ + std::map<MElement *, std::set< std::pair<unsigned int, unsigned int> > >::iterator itmap; + for( itmap = problems.begin(); itmap != problems.end(); itmap++ ){ + MElement *elem = itmap->first; + std::set< std::pair<unsigned int, unsigned int> >::iterator itpairs; + for( itpairs = itmap->second.begin(); itpairs != itmap->second.end(); itpairs++ ){ + std::vector<MVertex *> verts; + int j = (*itpairs).first; + int k = (*itpairs).second; + getExtrudedVertices(elem, ep, j, k, pos, verts); + QtMakeCentroidVertex(verts, &(to->mesh_vertices), to, pos); + } + } + } + + if( !is_dbl ) + return 1; + + // The rest of the function works for is_dbl, double layer quadToTri extrusion + + + //Holds the new vertices...put them in to->mesh_vertices only at the end + std::vector<MVertex *> v_tmp; + v_tmp.reserve(cap_add); + + // triangles and quadrangles + // t =0 triangles, t=1 quadrangles + std::vector<MVertex*> verts3D; + for( int t = 0; t < 2; t++ ){ + for( int s = 0; s < 3; s++ ){ + std::set<unsigned int> *set_elems; + if( !t ){ + if( !s ) set_elems = &c.three_bnd_pt_tri; + else if( s==1 ) set_elems = &c.other_bnd_tri; + else set_elems = &c.internal_tri; + } + else{ + if( !s ) set_elems = &c.four_bnd_pt_quad; + else if( s==1 ) set_elems = &c.other_bnd_quad; + else set_elems = &c.internal_quad; + } + std::set<unsigned int>::iterator itset; + for( itset = set_elems->begin(); itset != set_elems->end(); itset++ ){ + MElement *elem; + if( !t ) elem = from->triangles[(*itset)]; + else elem = from->quadrangles[(*itset)]; + int elem_size = elem->getNumVertices(); + // see if this element is on a boundary with lat_tri_diags or a degenerated hexahedron (always divide those) + bool found_diags = false; + bool degen_hex = false; + verts3D.resize(0); + getExtrudedVertices( elem, ep, 0, 0, pos, verts3D); + for( int p = 0; p < elem_size; p++ ){ + // always look for degen hex + if( t && verts3D[p] == verts3D[p+elem_size] && + verts3D[(p+1)%elem_size] != verts3D[(p+1)%elem_size+elem_size] && + verts3D[(p+elem_size-1)%elem_size] != verts3D[(p+elem_size-1)%elem_size+elem_size] ){ + degen_hex = true; + break; + } + // skip the rest if no lat_tri_diags or if not on lateral boundary + if( !lat_tri_diags_size || s >= 2 ) + continue; + // if a triangle face, skip it + if( verts3D[p] == verts3D[p+elem_size] || + verts3D[(p+1)%elem_size] == verts3D[(p+1)%elem_size+elem_size] ) + continue; + else if( edgeExists( verts3D[p], verts3D[(p+1)%elem_size+elem_size], quadToTri_edges ) ) + found_diags = true; + else if( edgeExists( verts3D[p+elem_size], verts3D[(p+1)%elem_size], quadToTri_edges ) ) + found_diags = true; + } + // triangle extrusions don't need face centered verts if NO diags found or if not on lateral boundary + if( !t && ( !found_diags || s==2 ) ) + continue; + + int j_start, k_start; + if( s < 2 && found_diags || degen_hex ){ + j_start = 0; + k_start = 0; + } + else{ // only non quads not extruded into degen hexa should execute this + j_start = j_second_from_top; + k_start = k_second_from_top; + } + std::vector<MVertex*> v_face; + for( int j = j_start; j < ep->mesh.NbLayer; j++ ){ + int k_start_tmp = (j == j_start) ? k_start : 0; + int k_stop = (j == ep->mesh.NbLayer-1) + ? ep->mesh.NbElmLayer[j]-1 : ep->mesh.NbElmLayer[j]; + for( int k = k_start_tmp; k < k_stop; k++ ){ + v_face.resize(0); + get2DExtrudedVertices( elem, ep, j, k+1, pos, v_face); + QtMakeCentroidVertex(v_face, &v_tmp, to, pos); + } + } + } + } + } + // Don't forget to add v_tmp to to->mesh_vertices!!! + to->mesh_vertices.reserve( to->mesh_vertices.size() + v_tmp.size() ); + for( int p = 0; p < v_tmp.size(); p++ ) + to->mesh_vertices.push_back(v_tmp[p]); + return 1; + +} + + + +// Meshes either a prism or a hexahedral set of mesh vertices with an internal vertex +// created here in the function. +// Added 2010-03-30 +static void MeshWithInternalVertex( GRegion *to, MElement *source, std::vector<MVertex *> v, std::vector<int> n1, + std::vector<int> n2, std::set<MVertex *, MVertexLessThanLexicographic> &pos ) +{ + + int v_size = v.size(); + int n_lat_tmp; + if( v_size == 6 ) + n_lat_tmp = 3; + else if( v_size == 8 ) + n_lat_tmp = 4; + else{ + Msg::Error("In MeshWithInternalVertex(), number of element vertices does not equal 6 or 8."); + return; + } + + const int n_lat = n_lat_tmp; + + if( n_lat == 3 && n1.size() != 3 || n_lat == 4 && n2.size() != 6 ){ + Msg::Error("In MeshWithInternalVertex(), size of diagonal node vectors is not does not equal 3 or 6."); + return; + } + + // find the internal vertex + std::vector<double> centroid = QtFindVertsCentroid(v); + MVertex tmp(centroid[0], centroid[1], centroid[2], 0, -1); + + // it's too dangerous to use the 'new' command in here even with face-centered vertices. + + std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp; + itp = pos.find(&tmp); + if(itp == pos.end()){ // FIXME: workaround + Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z()); + itp = tmp.linearSearch(pos); + } + if(itp == pos.end()){ + Msg::Error("Could not find extruded vertex (%.16g, %.16g, %.16g) in geometrical entity %d", + tmp.x(), tmp.y(), tmp.z(), to->tag()); + Msg::Error("MeshWithInternalVertex() failed to find body-centered vertex."); + return; + } + + MVertex *v_int = (*itp); + + // build all pyramids/tetra + for( int p = 0; p < n_lat; p++ ){ + int p2 = (p+1)%n_lat; + if( v[p] == v[p+n_lat] && v[p2] == v[p2+n_lat] ) + continue; + else if( v[p] == v[p+n_lat] || v[p2] == v[p2+n_lat] ){ + MVertex *v_dup = (v[p] == v[p+n_lat]) ? v[p] : v[p2]; + MVertex *v_non_dup = (v_dup == v[p]) ? v[p2] : v[p]; + MVertex *v_non_dup2 = (v_non_dup == v[p]) ? v[p+n_lat] : v[p2+n_lat]; + addTetrahedron( v_dup, v_non_dup, v_non_dup2, v_int, to, source ); + } + else if( n1[p] == p || n2[p] == p ){ + addTetrahedron( v[p], v[p2], v[p2+n_lat], v_int, to, source ); + addTetrahedron( v[p], v[p2+n_lat], v[p+n_lat], v_int, to, source ); + } + else if( n1[p] == p+n_lat || n2[p] == p+n_lat ){ + addTetrahedron( v[p], v[p2], v[p+n_lat], v_int, to, source ); + addTetrahedron( v[p2], v[p2+n_lat], v[p+n_lat], v_int, to, source ); + } + else + addPyramid( v[p], v[p2], v[p2+n_lat], v[p+n_lat], v_int, to, source ); + } + + if( n_lat == 3){ + // bottom and top + addTetrahedron( v[0], v[1], v[2], v_int, to, source); + addTetrahedron( v[3], v[5], v[4], v_int, to, source); + } + else if( n_lat == 4 ){ + for( int p = 4; p < 6; p++ ){ + int add = (p == 4) ? 0 : 4; + if( n1[p] == 0+add || n2[p] == 0+add ){ + addTetrahedron( v[add], v[1+add], v[2+add], v_int, to, source ); + addTetrahedron( v[add], v[2+add], v[3+add], v_int, to, source ); + } + else if( n1[p] == 1+add || n2[p] == 1+add ){ + addTetrahedron( v[1+add], v[2+add], v[3+add], v_int, to, source ); + addTetrahedron( v[1+add], v[3+add], v[add], v_int, to, source ); + } + else + addPyramid( v[add], v[1+add], v[2+add], v[3+add], v_int, to, source ); + } + } + +} + +// Meshes either a prism or a hexahedral set of mesh vertices with face centered vertices +// Can pick top or bottom faces to have the vertex, or both, based on the top_flag and bottom_flag args. +// created here in the code +// Added 2010-04-05 +static void MeshWithFaceCenteredVertex( GRegion *to, MElement *source, std::vector<MVertex *> v, std::vector<int> n1, + std::vector<int> n2, bool bottom_flag, bool top_flag, + std::set<MVertex *, MVertexLessThanLexicographic> &pos ) +{ + + int v_size = v.size(); + int n_lat_tmp; + if( v_size == 6 ) + n_lat_tmp = 3; + else if( v_size == 8 ) + n_lat_tmp = 4; + else{ + Msg::Error("In MeshWithFaceCenteredVertex(), number of element vertices does not equal 6 or 8."); + return; + } + + const int n_lat = n_lat_tmp; + + if( !top_flag && !bottom_flag ){ + Msg::Error("In MeshWithFaceCenteredVertex(), neither the top nor the bottom face were selected for vertex creation."); + return; + } + + if( n_lat == 3 && n1.size() != 3 || n_lat == 4 && n2.size() != 6 ){ + Msg::Error("In MeshWithFaceCenteredVertex(), size of diagonal node vectors is not does not equal 3 or 6."); + return; + } + + std::vector<MVertex *> face_vertices; + // create the face-centered vertices + for( int s = 0; s < 2; s++ ){ + if( !s && !bottom_flag || s && !top_flag ) + continue; + std::vector<MVertex *> v_face; + v_face.assign(n_lat, (MVertex*)(NULL) ); + int add = !s ? 0 : n_lat; + for( int t = 0; t < n_lat; t++ ) + v_face[t] = v[t+add]; + + std::vector<double> centroid = QtFindVertsCentroid(v_face); + MVertex tmp(centroid[0], centroid[1], centroid[2], 0, -1); + + // it's too dangerous to use the 'new' command in here on face-centered vertices. + + std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp; + itp = pos.find(&tmp); + if(itp == pos.end()){ // FIXME: workaround + Msg::Info("Linear search for (%.16g, %.16g, %.16g)", tmp.x(), tmp.y(), tmp.z()); + itp = tmp.linearSearch(pos); + } + if(itp == pos.end()){ + Msg::Error("Could not find extruded vertex (%.16g, %.16g, %.16g) in geometrical entity %d", + tmp.x(), tmp.y(), tmp.z(), to->tag()); + Msg::Error("MeshWithFaceCenteredVertex() failed to find face-centered vertex."); + return; + } + + face_vertices.push_back(*itp); + + } + + // If just one face-centered vertex, make a pyramid/tetra (or base-divided pyramid ) + // with the face-centered vertex as the apex. Fill in + // pyramids/tetra aroud it laterally. + if( face_vertices.size() == 1 ){ + int base, add; + if( top_flag ){ + base = n_lat; + add = 0; + } + else{ + base = n_lat+1; + add = n_lat; + } + if( n_lat == 4 && n1[base] >= 0 ){ + addTetrahedron( v[n1[base]], v[n2[base]], v[(n1[base]-add+1)%n_lat+add], face_vertices[0], to, source ); + addTetrahedron( v[n1[base]], v[n2[base]], v[(n1[base]-add+n_lat-1)%n_lat+add], face_vertices[0], to, source ); + } + else if( n_lat == 4 ) + addPyramid( v[0+add], v[1+add], v[2+add], v[3+add], face_vertices[0], to, source ); + else + addTetrahedron( v[0+add], v[1+add], v[2+add], face_vertices[0], to, source ); + + for( int p = 0; p < n_lat; p++ ){ + int p2 = (p+1)%n_lat; + if( v[p] == v[p+n_lat] && v[p2] == v[p2+n_lat] ) + continue; + else if( v[p] == v[p+n_lat] || v[p2] == v[p2+n_lat] ){ + MVertex *v_dup = (v[p] == v[p+n_lat]) ? v[p] : v[p2]; + MVertex *v_non_dup = (v_dup == v[p]) ? v[p2] : v[p]; + MVertex *v_non_dup2 = (v_non_dup == v[p]) ? v[p+n_lat] : v[p2+n_lat]; + addTetrahedron( v_dup, v_non_dup, v_non_dup2, face_vertices[0], to, source ); + } + else if( n1[p] >= 0 ){ + int add_2 = n1[p] < n_lat ? n_lat : -n_lat; + addTetrahedron( v[n1[p]], v[n2[p]], v[n1[p]+add_2], face_vertices[0], to, source ); + addTetrahedron( v[n1[p]], v[n2[p]], v[n2[p]-add_2], face_vertices[0], to, source ); + } + else + addPyramid( v[p], v[p+n_lat], v[p2+n_lat], v[p2], face_vertices[0], to, source ); + } + return; + } + + // If two face-centered vertices, make prisms around the central axis formed by the face-centered vertices. + // Divide the prisms on the two inside faces to make the validity of the subdivision independent of the outer + // later surface states (diagonalized or not) + else if( face_vertices.size() == 2 ){ + for( int p = 0; p < n_lat; p++ ){ + int p2 = (p+1)%n_lat; + if( v[p] == v[p+n_lat] && v[p2] == v[p2+n_lat] ){ + addTetrahedron( v[p], v[p2], face_vertices[0], face_vertices[1], to, source ); + } + else if( v[p] == v[p+n_lat] || v[p2] == v[p2+n_lat] ){ + MVertex *v_dup = (v[p] == v[p+n_lat]) ? v[p] : v[p2]; + MVertex *v_non_dup = (v_dup == v[p]) ? v[p2] : v[p]; + MVertex *v_non_dup2 = (v_non_dup == v[p]) ? v[p+n_lat] : v[p2+n_lat]; + addTetrahedron( v_non_dup, v_non_dup2, face_vertices[1], v_dup, to, source ); + addTetrahedron( v_non_dup, face_vertices[0], face_vertices[1], v_dup, to, source ); + } + else{ + addTetrahedron( v[p], v[(p+1)%n_lat], face_vertices[1], face_vertices[0], to, source ); + if( n1[p] >= 0 ){ + int add_2 = n1[p] < n_lat ? n_lat : -n_lat; + addTetrahedron( v[n1[p]], v[n2[p]], v[n1[p]+add_2], face_vertices[1], to, source ); + addTetrahedron( v[n1[p]], v[n2[p]], v[n2[p]-add_2], face_vertices[1], to, source ); + } + else + addPyramid( v[p], v[p+n_lat], v[(p+1)%n_lat+n_lat], v[(p+1)%n_lat], face_vertices[1], to, source ); + } + } + return; + } + + // If execute to here, send error message + Msg::Error("MeshWithFaceCenteredVertex() failed. on region %d", to->tag() ); + +} + + +// Construct the elements that subdivide a prism (or degenerated prism) in a QuadToTri interface; +// Added 2010-01-24 +static inline void QuadToTriPriPyrTet(std::vector<MVertex*> &v, GRegion *to, int j, + int k, MElement* source, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new, + unsigned int lat_tri_diags_size, bool bnd_elem, bool is_dbl, bool diag_search, + std::set<MVertex*, MVertexLessThanLexicographic> &pos ) +{ + int dup[3]; + int m = 0; + for(int i = 0; i < 3; i++) + if(v[i] == v[i + 3]) + dup[m++] = i; + + + ExtrudeParams *ep = to->meshAttributes.extrude; + + // need these for double layer extrusion purposes + unsigned int j_second_from_top = 0, k_second_from_top = 0; + if( ep ){ + if( ep->mesh.NbElmLayer[ep->mesh.NbLayer-1] > 1 ){ + j_second_from_top = ep->mesh.NbLayer-1; + k_second_from_top = ep->mesh.NbElmLayer[j_second_from_top]-2; + } + else{ + j_second_from_top = std::max(ep->mesh.NbLayer-2, 0); + k_second_from_top = ep->mesh.NbElmLayer[j_second_from_top]-1; + } + } + + + bool is_problem = false; + if( !is_dbl ){ + std::pair<unsigned int, unsigned int> jk_pair (j,k); + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > >::iterator itprob; + itprob = problems.find(source); + if( itprob != problems.end() ){ + if( (*itprob).second.find(jk_pair) != (*itprob).second.end() ) + is_problem = true; + } + } + + if( m && is_problem ){ + Msg::Error("In QuadToTriPriPyrTet(), non-prismatic extrusion of triangle in region %d " + "marked as needing internal vertex to complete. Skipping....", to->tag() ); + return; + } + + // BAD SHAPE + if( m > 2 || m < 0 ){ + Msg::Error("In QuadToTriPriPyrTet(), bad number of degenerate corners."); + return; + } + + // find vertex node indices for diagonalized faces + std::vector<int> n1, n2; + bool found_diags = false; + n1.assign(3, -1); + n2.assign(3, -2); + if( diag_search ){ + for( int p = 0; p < 3; p++ ){ + n1[p] = -p*p-p-1; n2[p] = -p*p-p-2; + if( v[p] == v[p+3] || v[(p+1)%3] == v[(p+1)%3+3] ) + continue; + else if( edgeExists( v[p], v[(p+1)%3+3], quadToTri_edges ) ){ + n1[p] = p; n2[p] = (p+1)%3+3; + found_diags = true; + } + else if( edgeExists( v[p+3], v[(p+1)%3], quadToTri_edges ) ){ + n1[p] = p+3; n2[p] = (p+1)%3; + found_diags = true; + } + } + } + + // mesh double layer + // is this prism part of a QuadToTri Double Layer extrusion and does it need to be extruded as such? + if( is_dbl && bnd_elem && found_diags ){ + if( j==0 && k==0 ) + MeshWithFaceCenteredVertex( to, source, v, n1, n2, 0, 1, pos ); + else if( j >= ep->mesh.NbLayer-1 && k >= ep->mesh.NbElmLayer[ep->mesh.NbLayer-1]-1 ) + MeshWithFaceCenteredVertex( to, source, v, n1, n2, 1, 0, pos ); + else + MeshWithFaceCenteredVertex( to, source, v, n1, n2, 1, 1, pos ); + return; + } + + // The rest are for single layer extrusions or degenerate prisms: + + + // tetrahedron + if( m == 2 && !is_problem ) { + int dup_face = (dup[0]+1)%3 == dup[1] ? dup[0] : dup[1]; + addTetrahedron(v[dup_face], v[(dup_face+1)%3], v[(dup_face+2)%3], v[(dup_face+2)%3+3], to, source); + return; + } + // pyramid + else if( m == 1 && !is_problem ) { + int p = (dup[0]+1)%3; + // determine if the pyramid is sliced into two tetrahedra + if( n1[p] >= 0 ){ + int add = n1[p] < 3 ? 3 : -3; + addTetrahedron(v[n1[p]], v[n2[p]], v[n1[p]+add], v[dup[0]], to, source); + addTetrahedron(v[n1[p]], v[n2[p]-add], v[n2[p]], v[dup[0]], to, source); + } + else // pyramid + addPyramid( v[p], v[p+3], v[(p+1)%3+3], v[(p+1)%3], v[dup[0]], to, source); + + return; + } + + + // Full prism: Start looking for a diagonal on a lateral. + else if( m == 0 && !is_problem ){ + if( !found_diags ){ + addPrism( v[0], v[1], v[2], v[3], v[4], v[5], to, source ); + return; + } + else{ + for( int p = 0; p < 3; p++ ){ + if( n1[p] >= 0 && n2[p] == n1[(p+1)%3] ){ + int add = n2[p] < 3 ? 3 : -3; + int tet_top = n2[p]+add; + int pyr_top = n2[p]; + int base = (p+2)%3; + addTetrahedron( v[n1[p]], v[n2[p]], v[n2[(p+1)%3]], v[tet_top], to, source ); + if( n1[(p+2)%3] >= 0 ){ + int add_2 = n1[base] < 3 ? 3 : -3; + addTetrahedron( v[n1[base]], v[n2[base]], v[n1[base]+add_2], v[pyr_top], to, source ); + addTetrahedron( v[n1[base]], v[n2[base]], v[n2[base]-add_2], v[pyr_top], to, source ); + } + else + addPyramid( v[base], v[base+3], v[(base+1)%3+3], v[(base+1)%3], v[pyr_top], to, source ); + return; + } + } + } + } + + + // At this point, if the function has not returned, element must be meshed with an additional vertex + + if( !is_problem ) { + Msg::Error("In QuadToTriPriPyrTet(), Extruded prism needs subdivision, but cannot " + " be divided without internal vertex, but was not previously detected as such. " + " This is a bug. Please Report."); + Msg::Error("j: %d, k: %d", j, k); + QtMakeCentroidVertex( v, &(to->mesh_vertices), to, pos ); + std::pair<unsigned int, unsigned int> jk_pair(j,k); + problems_new[source].insert(jk_pair); + is_problem = true; + } + + if( is_problem ){ + MeshWithInternalVertex( to, source, v, n1, n2, pos ); + return; + } + + + +} + + +// Construct the elements that subdivde a two-point degenerated hexahedron (prism). +static inline bool createTwoPtDegenHexElems( std::vector<MVertex*> &v, GRegion *to, ExtrudeParams *ep, int j, + int k, int dup[], MElement* source, std::vector<int> n1, std::vector<int> n2, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new, + unsigned int lat_tri_diags_size, bool bnd_elem, bool is_dbl, bool found_diags, + std::set<MVertex*, MVertexLessThanLexicographic> &pos ) +{ + + if( !ep ) + return 0; + + // first find out what is the degenerate face + int degen_face = (dup[0]+1)%4 == dup[1] ? dup[0] : dup[1]; + + // if no diags found, make a prism and return + if( !found_diags ){ + addPrism( v[degen_face], v[(degen_face+3)%4], v[(degen_face+3)%4+4], + v[(degen_face+1)%4], v[(degen_face+2)%4], v[(degen_face+2)%4+4], to, source ); + return 1; + } + + int tet_top = -1; + int pyr_top = -2; + + // if faces 4 and 5 can make a slice + if( n1[4] >= 0 && + ( n1[4]+4 == n1[5] || n2[4]+4 == n1[5] ) ){ + if( n1[4] == degen_face || n2[4] == degen_face ){ + pyr_top = degen_face; + tet_top = (degen_face+1)%4; + } + else{ + pyr_top = (degen_face+1)%4; + tet_top = degen_face; + } + addTetrahedron( v[pyr_top], v[(pyr_top+2)%4], v[(pyr_top+2)%4+4], v[tet_top], to, source ); + + int base = (degen_face+2)%4; + if( n1[base] >= 0 ){ + int add = n1[base] > 3 ? -4 : 4; + addTetrahedron( v[n1[base]], v[n2[base]], v[n1[base]+add], v[pyr_top], to, source ); + addTetrahedron( v[n1[base]], v[n2[base]-add], v[n2[base]], v[pyr_top], to, source ); + } + else + addPyramid( v[base], v[base+4], v[(base+1)%4+4], v[(base+1)%4], v[pyr_top], to, source ); + + return 1; + } + + // if faces 4 and (degen_face+2)%4 make a slice + if( tet_top < 0 && n1[4] >= 0 && + ( n1[4] == n1[(degen_face+2)%4] || n2[4] == n1[(degen_face+2)%4] || + n1[4] == n2[(degen_face+2)%4] || n2[4] == n2[(degen_face+2)%4] ) ){ + pyr_top = n1[(degen_face+2)%4] < 4 ? n1[(degen_face+2)%4] : n2[(degen_face+2)%4]; + tet_top = pyr_top==(degen_face+2)%4 ? (degen_face+3)%4 : (degen_face+2)%4; + + addTetrahedron( v[pyr_top], v[tet_top+4], v[(pyr_top+2)%4], v[tet_top], to, source ); + + int base = 5; + if( n1[base] >= 0 ){ + addTetrahedron( v[n1[base]], v[n2[base]], v[(n1[base]-4+1)%4+4], v[pyr_top], to, source ); + addTetrahedron( v[n1[base]], v[n2[base]], v[(n1[base]-4+3)%4+4], v[pyr_top], to, source ); + } + else + addPyramid( v[4], v[5], v[6], v[7], v[pyr_top], to, source ); + + return 1; + + } + + // if faces 5 and (degen_face+2)%4 make a slice + if( tet_top < 0 && n1[5] >= 0 && + ( n1[5] == n1[(degen_face+2)%4] || n2[5] == n1[(degen_face+2)%4] || + n1[5] == n2[(degen_face+2)%4] || n2[5] == n2[(degen_face+2)%4] ) ){ + pyr_top = n1[(degen_face+2)%4] < 4 ? n2[(degen_face+2)%4] : n1[(degen_face+2)%4]; + tet_top = pyr_top==(degen_face+2)%4+4 ? (degen_face+3)%4+4 : (degen_face+2)%4+4; + + addTetrahedron( v[pyr_top], v[(pyr_top-4+2)%4+4], v[tet_top-4], v[tet_top], to, source ); + + int base = 4; + if( n1[base] >= 0 ){ + addTetrahedron( v[n1[base]], v[n2[base]], v[(n1[base]+1)%4], v[pyr_top], to, source ); + addTetrahedron( v[n1[base]], v[n2[base]], v[(n1[base]+3)%4], v[pyr_top], to, source ); + } + else + addPyramid( v[0], v[1], v[2], v[3], v[pyr_top], to, source ); + + return 1; + } + + return 0; + +} // end of createTwoPtDegenHexElems() + + + +// Construct the elements that subdivide a one-point degenerated hexahedron extrusion +static inline bool createOnePtDegenHexElems( std::vector<MVertex*> &v, GRegion *to, ExtrudeParams *ep, int j, + int k, int dup[], MElement* source, std::vector<int> n1, std::vector<int> n2, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new, + unsigned int lat_tri_diags_size, bool bnd_elem, bool is_dbl, bool found_diags, + std::set<MVertex*, MVertexLessThanLexicographic> &pos ) +{ + + if( !ep ) + return 0; + + // if no diags, then just make the degenerate hexahedron and be done + if( !found_diags ){ + addHexahedron( v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], to, source ); + Msg::Error("Degenerated hexahedron in extrusion of volume %d", to->tag()); + return 1; + } + // test for top and bottom diagonals parallel and incident on degen vertex + else if( ( n1[4] == dup[0] || n2[4] == dup[0] ) && + ( n1[5] == dup[0]+4 || n2[5] == dup[0]+4 ) ){ + // first pyramid / tet set + if( n1[(dup[0]+1)%4] >= 0 ){ + if( n1[(dup[0]+1)%4] == (dup[0]+1)%4 ){ + addTetrahedron( v[(dup[0]+1)%4], v[(dup[0]+1)%4+4], v[(dup[0]+2)%4+4], v[dup[0]], to, source ); + addTetrahedron( v[(dup[0]+1)%4], v[(dup[0]+2)%4+4], v[(dup[0]+2)%4], v[dup[0]], to, source ); + } + else if( n1[(dup[0]+1)%4] == (dup[0]+1)%4+4 ){ + addTetrahedron( v[(dup[0]+1)%4+4], v[(dup[0]+2)%4], v[(dup[0]+1)%4], v[dup[0]], to, source ); + addTetrahedron( v[(dup[0]+1)%4+4], v[(dup[0]+2)%4+4], v[(dup[0]+2)%4], v[dup[0]], to, source ); + } + else + Msg::Error("1: In QuadToTriHexPri(), badly subdivided degenerate hexahedron. Mesh for region %d has errors.", + to->tag() ); + } + else + addPyramid( v[(dup[0]+1)%4], v[(dup[0]+1)%4+4], v[(dup[0]+2)%4+4], v[(dup[0]+2)%4], v[dup[0]], to, source ); + // second pyramid / tet set + if( n1[(dup[0]+2)%4] >= 0 ){ + if( n1[(dup[0]+2)%4] == (dup[0]+2)%4 ){ + addTetrahedron( v[(dup[0]+2)%4], v[(dup[0]+2)%4+4], v[(dup[0]+3)%4+4], v[dup[0]], to, source ); + addTetrahedron( v[(dup[0]+2)%4], v[(dup[0]+3)%4+4], v[(dup[0]+3)%4], v[dup[0]], to, source ); + } + else if( n1[(dup[0]+2)%4] == (dup[0]+2)%4+4 ){ + addTetrahedron( v[(dup[0]+2)%4+4], v[(dup[0]+3)%4], v[(dup[0]+2)%4], v[dup[0]], to, source ); + addTetrahedron( v[(dup[0]+2)%4+4], v[(dup[0]+3)%4+4], v[(dup[0]+3)%4], v[dup[0]], to, source ); + } + else + Msg::Error("2: In QuadToTriHexPri(), badly subdivided degenerate hexahedron. Mesh for region %d has errors.", + to->tag() ); + } + else + addPyramid( v[(dup[0]+2)%4], v[(dup[0]+2)%4+4], v[(dup[0]+3)%4+4], v[(dup[0]+3)%4], v[dup[0]], to, source ); + return 1; + } + + // test for top and bottom diagonals parallel and NOT on degen vertex + else if( ( n1[4] == (dup[0]+1)%4 || n2[4] == (dup[0]+1)%4 ) && + ( n1[5] == (dup[0]+1)%4+4 || n2[5] == (dup[0]+1)%4+4 ) ){ + // See if the prism section has to be divided and if it requires the inner surface to be cut + + int tet_top = -1; + int n_inner[2]; + n_inner[0] = -1; + n_inner[1] = -2; + if( n1[(dup[0]+1)%4] >= 0 && n1[(dup[0]+2)%4] != n2[(dup[0]+1)%4] ){ + tet_top = n1[(dup[0]+1)%4]; + n_inner[0] = n1[(dup[0]+1)%4]; + int add = n_inner[0] > 3 ? 0 : 4; + n_inner[1] = (dup[0]+3)%4+add; + } + else if( n1[(dup[0]+2)%4] >= 0 && n1[(dup[0]+2)%4] != n2[(dup[0]+1)%4] ){ + tet_top = n2[(dup[0]+2)%4]; + n_inner[1] = n2[(dup[0]+2)%4]; + int add = n_inner[1] > 3 ? 0 : 4; + n_inner[0] = (dup[0]+1)%4+add; + } + else if( n1[(dup[0]+1)%4] >= 0 ) + tet_top = n2[(dup[0]+1)%4]; + + if( tet_top >= 0 ){ + int add = tet_top > 3 ? 0 : 4; + addTetrahedron( v[(dup[0]+1)%4+add], v[(dup[0]+2)%4+add], v[(dup[0]+3)%4+add], v[tet_top], to, source ); + if( n_inner[0] < 0 ) + addPyramid( v[(dup[0]+1)%4], v[(dup[0]+1)%4+4], v[(dup[0]+3)%4+4], v[(dup[0]+3)%4], v[tet_top], to, source ); + else{ + int base = tet_top-4+add == (dup[0]+1)%4 ? (dup[0]+2)%4 : (dup[0]+1)%4; + if( n1[base] < 0 ) + addPyramid( v[base], v[base+4], v[(base+1)%4+4], v[(base+1)%4], v[tet_top], to, source ); + else{ + int add_2 = n1[base] > 3 ? -4 : 4; + addTetrahedron( v[n1[base]], v[n1[base]+add_2], v[n2[base]], v[tet_top], to, source ); + addTetrahedron( v[n1[base]], v[n2[base]], v[n2[base]-add_2], v[tet_top], to, source ); + } + } + } + else + addPrism( v[(dup[0]+1)%4], v[(dup[0]+2)%4], v[(dup[0]+3)%4], v[(dup[0]+1)%4+4], v[(dup[0]+2)%4+4], + v[(dup[0]+3)%4+4], to, source ); + // add the pyramid or tets that include the degen vertex + if( n_inner[0] < 0 ) + addPyramid( v[(dup[0]+1)%4], v[(dup[0]+1)%4+4], v[(dup[0]+3)%4+4], v[(dup[0]+3)%4], v[dup[0]], to, source ); + else{ + int add = n_inner[0] > 3 ? -4 : 4; + addTetrahedron( v[n_inner[0]], v[n_inner[0]+add], v[n_inner[1]], v[dup[0]], to, source ); + addTetrahedron( v[n_inner[0]], v[n_inner[1]], v[n_inner[1]-add], v[dup[0]], to, source ); + } + return 1; + } + + // see if there is a way to divide non-parallel top and bottom verts + else if( n1[(dup[0]+1)%4] >= 0 || n1[(dup[0]+2)%4] >= 0 ){ + // parameters for a pyramid (that may or may not be divided into tets) + int base = -1, top = -2; + // if corner opposite degen corner has two diagonals meeting on it: + if( n2[(dup[0]+1)%4] >= 0 && n1[(dup[0]+2)%4] == n2[(dup[0]+1)%4] ){ + if( n1[4] == n1[(dup[0]+2)%4] || n2[4] == n1[(dup[0]+2)%4] ){ + top = n1[(dup[0]+2)%4]; + base = 5; + } + else if( n1[5] == n1[(dup[0]+2)%4] || n2[5] == n1[(dup[0]+2)%4] ){ + top = n1[(dup[0]+2)%4]; + base = 4; + } + } + // if a side corner not opposite the degenerate vertex has two diagonals meeting + if( base < 0 && n2[(dup[0]+2)%4] >= 0 ){ + if( n2[(dup[0]+2)%4] == (dup[0]+3)%4+4 && + ( n1[5] == (dup[0]+3)%4+4 || n2[5] == (dup[0]+3)%4+4 ) ){ + top = (dup[0]+3)%4+4; + base = 4; + } + else if( n2[(dup[0]+2)%4] == (dup[0]+3)%4 && + ( n1[4] == (dup[0]+3)%4 || n2[4] == (dup[0]+3)%4 ) ){ + top = (dup[0]+3)%4; + base = 5; + } + } + if( base < 0 && n1[(dup[0]+1)%4] >= 0 ){ + if( n1[(dup[0]+1)%4] == (dup[0]+1)%4+4 && + ( n1[5] == (dup[0]+1)%4+4 || n2[5] == (dup[0]+1)%4+4 ) ){ + top = (dup[0]+1)%4+4; + base = 4; + } + else if( n1[(dup[0]+1)%4] == (dup[0]+1)%4 && + ( n1[4] == (dup[0]+1)%4 || n2[4] == (dup[0]+1)%4 ) ){ + top = (dup[0]+1)%4; + base = 5; + } + } + + // if 4-corner lateral faces have diagonals that don't meet... + if( base < 0 && n1[(dup[0]+1)%4] >= 0 && n1[(dup[0]+2)%4] >= 0 && + n1[(dup[0]+2)%4] != n2[(dup[0]+1)%4] ){ + top = n1[(dup[0]+1)%4]; + base = (top < 4) ? 5 : 4; + } + + // if there is a valid top and base, make the element + if( base >= 0 && top >= 0 ){ + // if pyramid top is NOT opposite degen vertex + if( top == n1[(dup[0]+1)%4] || top == n2[(dup[0]+2)%4] ){ + int add = base == 4 ? 0 : 4; + if( n1[base] < 0 ){ + addPyramid( v[0+add], v[1+add], v[2+add], v[3+add], v[top], to, source ); + } + else{ + addTetrahedron( v[n1[base]], v[(n1[base]-add+1)%4+add], + v[n2[base]], v[top], to, source ); + addTetrahedron( v[n1[base]], v[n2[base]], + v[(n1[base]-add+3)%4+add], v[top], to, source ); + } + int base2 = -1; + if( base==4 && ( n1[5] == top || n2[5] == top ) ){ + base2 = top==(dup[0]+1)%4+4 ? (dup[0]+2)%4 : (dup[0]+1)%4; + } + else if( base==5 && ( n1[4] == top || n2[4] == top ) ){ + base2 = top==(dup[0]+1)%4 ? (dup[0]+2)%4 : (dup[0]+1)%4; + } + else + base2 = base==5 ? 4 : 5; + + if( base2 != 4 && base2 != 5 ){ + addTetrahedron( v[top], v[(top-4+add+2)%4], v[(top-4+add+2)%4+4], v[dup[0]], to, source ); + if( n1[base2] >= 0 ){ + int add_base2 = n1[base2]<4 ? 4 : -4; + addTetrahedron( v[n1[base2]], v[n1[base2]+add_base2], v[n2[base2]], v[top], to, source ); + addTetrahedron( v[n1[base2]], v[n2[base2]], v[n2[base2]-add_base2], v[top], to, source ); + } + else + addPyramid( v[base2], v[(base2+4)], v[(base2+1)%4+4], v[(base2+1)%4], v[top], to, source ); + } + else{ + int top2 = (top-4+add+2)%4+add; + if( n1[base2] >= 0 ){ + addTetrahedron( v[n1[base2]], v[(n1[base2]-4+add+1)%4+4-add], v[n2[base2]], v[top2], to, source ); + addTetrahedron( v[n1[base2]], v[(n1[base2]-4+add+3)%4+4-add], v[n2[base2]], v[top2], to, source ); + } + else + addPyramid( v[0+4-add], v[1+4-add], v[2+4-add], v[3+4-add], v[top2], to, source ); + + int tet_base = top2-add==(dup[0]+1)%4 ? (dup[0]+1)%4 : (dup[0]+2)%4; + if( tet_base == (dup[0]+1)%4 ){ + int add_tet_base = n2[tet_base] > 3 ? -4 : 4; + addTetrahedron( v[n1[tet_base]], v[n2[tet_base]], v[n2[tet_base]+add_tet_base], v[top], to, source ); + } + else{ + int add_tet_base = n1[tet_base] > 3 ? -4 : 4; + addTetrahedron( v[n1[tet_base]], v[n2[tet_base]], v[n1[tet_base]+add_tet_base], v[top], to, source ); + } + } + return 1; + } + + // if pyramid top is opposite degenerate vertex + else if( top == (dup[0]+2)%4 || top == (dup[0]+2)%4+4 ){ + int add = base == 4 ? 0 : 4; + if( n1[base] >= 0 ){ + addTetrahedron( v[n1[base]], v[(n1[base]-add+1)%4+add], v[n2[base]], v[top], to, source ); + addTetrahedron( v[n1[base]], v[(n1[base]-add+3)%4+add], v[n2[base]], v[top], to, source ); + } + else + addPyramid( v[0+add], v[1+add], v[2+add], v[3+add], v[top], to, source ); + + addTetrahedron( v[dup[0]], v[(dup[0]+1)%4], v[(dup[0]+1)%4+4], v[top], to, source ); + addTetrahedron( v[dup[0]], v[(dup[0]+3)%4], v[(dup[0]+3)%4+4], v[top], to, source ); + return 1; + } + else + Msg::Error("3: In createOnePtDegenHexElems(), badly subdivided degenerate hexahedron. Mesh for region %d has errors.", + to->tag() ); + } + + } + + return 0; + +} // end of createOnePtDegenHexElems() + + +// Construct the elements that subdivide a full hexahedron extrusion. +static inline bool createFullHexElems( std::vector<MVertex*> &v, GRegion *to, ExtrudeParams *ep, int j, + int k, int dup[], MElement* source, std::vector<int> n1, std::vector<int> n2, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new, + unsigned int lat_tri_diags_size, bool bnd_elem, bool is_dbl, bool found_diags, + std::set<MVertex*, MVertexLessThanLexicographic> &pos ) +{ + + if( !ep ) + return 0 ; + + + // First: does this hexa have ANY dividing diagonals? If no, return + if( !found_diags ){ + addHexahedron( v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], to, source ); + return 1; + } + + // First test: Try to identify a corner with three diagonals converging on it + // This is second because first test gives better quality...i think. + + int pyramid_top = -1, base_face_1 = -1; + + // variables to hold pyramid base corners and diagonal node indices: + int b1[4], b2[4], b3[4], b1_diag[2], b2_diag[2], b3_diag[2]; + for( int p = 0; p < 2; p++ ){ + b1_diag[p] = -1-p; b2_diag[p] = -2-p; b3_diag[p] = -3-p; + } + + + // find a 3-diag corner + for( int s = 0; s < 2; s++ ){ + int p = !s ? 4 : 5; + if( n1[p] >= 0 ){ + int add = !s ? 0 : 4; + int p1 = n1[p]-add, p2 = (n1[p]-add+3)%4; + if( n1[p1] >=0 && n1[p2] >= 0 && + ( n1[p] == n1[p1] || n1[p] == n2[p1] ) && + ( n1[p] == n1[p2] || n1[p] == n2[p2] ) ){ + pyramid_top = n1[p]; + base_face_1 = !s ? 5 : 4; + break; + } + p1 = n2[p]-add; + p2 = (n2[p]-add+3)%4; + if( n1[p1] >=0 && n1[p2] >= 0 && + ( n2[p] == n1[p1] || n2[p] == n2[p1] ) && + ( n2[p] == n1[p2] || n2[p] == n2[p2] ) ){ + pyramid_top = n2[p]; + base_face_1 = !s ? 5 : 4; + break; + } + } + } + + // If pyramid top (3-diag corner) is found, then check for diagonal division of bases: + + if( pyramid_top >= 0 ){ + // ( base of first pyramid always the hexa's top or bottom ) + int add = pyramid_top < 4 ? 0 : 4; + int base_face_2 = (pyramid_top-add+1)%4; + int base_face_3 = (pyramid_top-add+2)%4; + + // Now construct shapes. + for( int p = 0; p < 3; p++ ){ + int b[4], bn1, bn2; + if( !p ){ + int add = base_face_1==4 ? 0 : 4; + b[0] = 0+add; b[1] = 1+add; b[2] = 2+add; b[3] = 3+add; + bn1 = n1[base_face_1]; bn2 = n2[base_face_1]; + } + else if( p==1 ){ + b[0] = base_face_2; b[1] = b[0]+4; + b[2] = (b[0]+1)%4+4; b[3] = (b[0]+1)%4; + bn1 = n1[base_face_2]; bn2 = n2[base_face_3]; + } + else{ + b[0] = base_face_3; b[1] = b[0]+4; + b[2] = (b[0]+1)%4+4; b[3] = (b[0]+1)%4; + bn1 = n1[base_face_3]; bn2 = n2[base_face_3]; + } + + if( bn1 < 0 ) + addPyramid( v[b[0]], v[b[1]], v[b[2]], v[b[3]], v[pyramid_top], to, source ); + else{ + if( bn1 == b[0] || bn2 == b[0] ){ + addTetrahedron( v[b[0]], v[b[1]], v[b[2]], v[pyramid_top], to, source ); + addTetrahedron( v[b[0]], v[b[2]], v[b[3]], v[pyramid_top], to, source ); + } + else{ + addTetrahedron( v[b[0]], v[b[1]], v[b[3]], v[pyramid_top], to, source ); + addTetrahedron( v[b[1]], v[b[2]], v[b[3]], v[pyramid_top], to, source ); + } + } + } + // return if successful + return 1; + } + + + // Second full hexa division possibility (two prisms, possibly subdivided): + + // YES, THIS IS HORRIBLE!!!! + + // Diagram of prism-centric coordinates: + /* ___________ p5 + |\ /|\ + | \ / | \ + | \ / | \ + | \/______|___\ + | / | | /|p2 + p3 |/___|___p4_| / | + \ | /\ | prism 1, + \ | / \ | external face 2 (side) + \ | / \ | + \|/_________\| + p0 p1 + prism 1, + external face 1 (bottom) + + NOTE: for Prism 2, the prism coords MIRROR the coords for + prism 1 about the internal shared face. + */ + + + // prism_v holds prism-centric indices of vertices--new coords!!! + int prism_v[2][6], prism_face[2][2]; + // t_prism arrays for tet verts...p_prism arrays for pyramid verts (if any) + int t_prism[2][3][4], p_prism[2][5]; + for( int s = 0; s < 2; s++ ){ + for( int t = 0; t < 5; t++ ) + p_prism[s][t] = -2*s-2; + for( int t = 0; t < 3; t++ ){ + for( int w = 0; w < 4; w++ ) + t_prism[s][t][w] = -2*s*t*w-2; + } + } + + int prism_slice_valid = false; // set to true when found a valid slicing + + // find valid prism slicing + for( int p_ind = 0; p_ind < 3; p_ind++ ){ + int p = p_ind; + if( p_ind == 2 ) p = 4; // move to the top-to-bottom slicing + + prism_slice_valid = false; + + // n_div1, n_div2 are indices of the vertice in the first diagonal + int n_div1 = -1, n_div2 = -2; + if( p < 4 ){ + if( ( n1[p] == p || n2[p] == p ) && + ( n1[(p+2)%4] == (p+2)%4+4 || n2[(p+2)%4] == (p+2)%4+4 ) ){ + n_div1 = p; n_div2 = (p+1)%4+4; + } + if( ( n1[p] == p+4 || n2[p] == p+4 ) && + ( n1[(p+2)%4] == (p+2)%4 || n2[(p+2)%4] == (p+2)%4 ) ){ + n_div1 = p+4; n_div2 = (p+1)%4; + } + } + else{ + if( ( n1[4] == 0 || n2[4] == 0 ) && + ( n1[5] == 4 || n2[5] == 4 ) ){ + n_div1 = 0; n_div2 = 2; + } + if( ( n1[4] == 1 || n2[4] == 1 ) && + ( n1[5] == 5 || n2[5] == 5 ) ){ + n_div1 = 1; n_div2 = 3; + } + } + + if( n_div1 < 0 ) + continue; + + // There are two prisms. Find the vertices of any external and internal prism + // face diagonals. + int ext_diag[2][2][2], intern_diag[2]; + for( int s = 0; s < 2; s++ ){ + intern_diag[s] = -5-s*s-s; + for( int t = 0; t < 2; t++ ){ + ext_diag[s][t][0] = -1-t*t-t; ext_diag[s][t][1] = -2-t*t-t; + } + } + + // Create arrays of verts of both prisms in prism-centric coords (see ascii diagram above) + // to keep sanity. + // p0 always refereces a vertex position on a slicing diagonal (see ascii diagram above again. + int p0; + if( n_div1 > 3 && n_div2 < 4 || n_div1 < 4 && n_div2 > 3 ){ + p0 = n_div1 < 4 ? p : (p+2)%4; + prism_v[0][0] = p0; prism_v[0][1] = (p0+1)%4; prism_v[0][2] = (p0+1)%4+4; + prism_v[0][3] = (p0+3)%4; prism_v[0][4] = (p0+2)%4; prism_v[0][5] = (p0+2)%4+4; + prism_v[1][0] = p0; prism_v[1][1] = p0+4; prism_v[1][2] = (p0+1)%4+4; + prism_v[1][3] = (p0+3)%4; prism_v[1][4] = (p0+3)%4+4; prism_v[1][5] = (p0+2)%4+4; + prism_face[0][0] = 4; + prism_face[0][1] = (p0+1)%4; + prism_face[1][0] = (p0+3)%4; + prism_face[1][1] = 5; + } + else{ + p0 = n_div1; + prism_v[0][0] = p0; prism_v[0][1] = (p0+1)%4; prism_v[0][2] = (p0+2)%4; + prism_v[0][3] = p0+4; prism_v[0][4] = (p0+1)%4+4; prism_v[0][5] = (p0+2)%4+4; + prism_v[1][0] = p0; prism_v[1][1] = (p0+3)%4; prism_v[1][2] = (p0+2)%4; + prism_v[1][3] = p0+4; prism_v[1][4] = (p0+3)%4+4; prism_v[1][5] = (p0+2)%4+4; + prism_face[0][0] = p0; + prism_face[0][1] = (p0+1)%4; + prism_face[1][0] = (p0+3)%4; + prism_face[1][1] = (p0+2)%4; + } + + // 3 ways this prism slice can work: + // 1. Two additional diagonals which meet at a vertex. + // 2. Two additional opposing aligned diagonals + // 3. No more diagonals, just two prisms + + // get external diagonals for first and second prism + for( int s = 0; s < 2; s++ ){ + if( n1[prism_face[s][0]] == prism_v[s][1] || + n2[prism_face[s][0]] == prism_v[s][1] ){ + ext_diag[s][0][0] = 1; ext_diag[s][0][1] = 3; + } + else if( n1[prism_face[s][0]] == prism_v[s][4] || + n2[prism_face[s][0]] == prism_v[s][4] ){ + ext_diag[s][0][0] = 4; ext_diag[s][0][1] = 0; + } + if( n1[prism_face[s][1]] == prism_v[s][1] || + n2[prism_face[s][1]] == prism_v[s][1] ){ + ext_diag[s][1][0] = 1; ext_diag[s][1][1] = 5; + } + else if( n1[prism_face[s][1]] == prism_v[s][4] || + n2[prism_face[s][1]] == prism_v[s][4] ){ + ext_diag[s][1][0] = 4; ext_diag[s][1][1] = 2; + } + } + + // if first prism needs the internal diagonal + if( ext_diag[0][0][0] >= 0 && ext_diag[0][1][0] != ext_diag[0][0][0] ){ + intern_diag[0] = ext_diag[0][0][1]; + if( ext_diag[0][0][1] == 0 ) + intern_diag[1] = 5; + else + intern_diag[1] = 2; + } + else if( ext_diag[0][1][0] >= 0 && ext_diag[0][0][0] != ext_diag[0][1][0] ){ + intern_diag[0] = ext_diag[0][1][1]; + if( ext_diag[0][1][1] == 2 ) + intern_diag[1] = 3; + else + intern_diag[1] = 0; + } + + // if 2nd prism needs the internal diagonal to work, check to see if the internal + // diagonal exists and, if so, if it is consistent. If it doesn't exist, make it + if( ( ext_diag[1][0][0] != ext_diag[1][1][0] || ext_diag[1][0][0] < 0 && + ext_diag[1][1][0] < 0 ) && + intern_diag[0] >= 0 && intern_diag[0] != ext_diag[1][0][1] && + intern_diag[0] != ext_diag[1][1][1] && intern_diag[1] != ext_diag[1][0][1] && + intern_diag[1] != ext_diag[1][1][1] ) { + continue; + } + // add internal diagonal if needed + else if( intern_diag[0] < 0 && ext_diag[1][0][0] >= 0 && + ext_diag[1][1][0] != ext_diag[1][0][0] ){ + intern_diag[0] = ext_diag[1][0][1]; + if( ext_diag[1][0][1] == 0 ) + intern_diag[1] = 5; + else + intern_diag[1] = 2; + } + else if( intern_diag[0] < 0 && ext_diag[1][1][0] >= 0 && + ext_diag[1][0][0] != ext_diag[1][1][0] ){ + intern_diag[0] = ext_diag[1][1][1]; + if( ext_diag[1][1][1] == 2 ) + intern_diag[1] = 3; + else + intern_diag[1] = 0; + } + + // this check sees if the internal shared prism face is diagonalized, but one prism has no other diags + if( intern_diag[0] >= 0 && + ( ext_diag[0][0][0] < 0 && ext_diag[0][1][0] < 0 || + ext_diag[1][0][0] < 0 && ext_diag[1][1][0] < 0 ) ){ + continue; + } + + // if make it to here, prism slice is valid + prism_slice_valid = true; + + // make arrays of vertices for making the polyhedra + if( prism_slice_valid ){ + for( int s = 0; s < 2; s++ ){ + if( ext_diag[s][0][0] < 0 && ext_diag[s][1][0] < 0 ) + continue; + else if( ext_diag[s][0][0] >= 0 && ext_diag[s][0][0] == ext_diag[s][1][0] ){ + int add = (ext_diag[s][0][0] < 3) ? 3 : -3; + t_prism[s][0][0] = ext_diag[s][0][0]; t_prism[s][0][1] = ext_diag[s][0][1]; + t_prism[s][0][2] = ext_diag[s][1][1]; t_prism[s][0][3] = ext_diag[s][0][0]+add; + if( intern_diag[0] < 0 ){ + p_prism[s][0] = 0; p_prism[s][1] = 2; + p_prism[s][2] = 5; p_prism[s][3] = 3; + p_prism[s][4] = ext_diag[s][0][0]; + } + else{ + int v_tmp1 = (intern_diag[0] == 0 || intern_diag[1] == 0) ? 2 : 0; + int v_tmp2 = (intern_diag[0] == 0 || intern_diag[1] == 0) ? 3 : 5; + + t_prism[s][1][0] = intern_diag[0]; t_prism[s][1][1] = intern_diag[1]; + t_prism[s][1][2] = v_tmp1; t_prism[s][1][3] = ext_diag[s][0][0]; + t_prism[s][2][0] = intern_diag[0]; t_prism[s][2][1] = intern_diag[1]; + t_prism[s][2][2] = v_tmp2; t_prism[s][2][3] = ext_diag[s][0][0]; + } + } + else if( intern_diag[0] >= 0 ){ + int p_tet_start = (ext_diag[s][0][0] >= 0) ? ext_diag[s][0][0] : ext_diag[s][1][0]; + int p_pyr_top = (p_tet_start == ext_diag[s][0][0]) + ? ext_diag[s][0][1] : ext_diag[s][1][1]; + int p_tet_top; + if( p_tet_start == ext_diag[s][0][0] ) + p_tet_top = (ext_diag[s][0][1] == 3) ? 0 : 3; + else + p_tet_top = (ext_diag[s][1][1] == 5) ? 2 : 5; + + t_prism[s][0][0] = p_tet_start; t_prism[s][0][1] = intern_diag[0]; + t_prism[s][0][2] = intern_diag[1]; t_prism[s][0][3] = p_tet_top; + + if( p_tet_start == ext_diag[s][0][0] ){ + if( ext_diag[s][1][0] < 0 ){ + p_prism[s][0] = 1; p_prism[s][1] = 2; + p_prism[s][2] = 5; p_prism[s][3] = 4; + p_prism[s][4] = p_pyr_top; + } + else{ + t_prism[s][1][0] = ext_diag[s][1][0]; t_prism[s][1][1] = ext_diag[s][1][1]; + t_prism[s][1][2] = (ext_diag[s][1][0]==4) ? 1 : 4; + t_prism[s][1][3] = p_pyr_top; + t_prism[s][2][0] = ext_diag[s][1][0]; t_prism[s][2][1] = ext_diag[s][1][1]; + t_prism[s][2][2] = (ext_diag[s][1][0]==4) ? 5 : 2; + t_prism[s][2][3] = p_pyr_top; + } + } + else{ + if( ext_diag[s][0][0] < 0 ){ + p_prism[s][0] = 0; p_prism[s][1] = 1; + p_prism[s][2] = 4; p_prism[s][3] = 3; + p_prism[s][4] = p_pyr_top; + } + else{ + t_prism[s][1][0] = ext_diag[s][0][0]; t_prism[s][1][1] = ext_diag[s][0][1]; + t_prism[s][1][2] = (ext_diag[s][0][0]==4) ? 3 : 4; + t_prism[s][1][3] = p_pyr_top; + t_prism[s][2][0] = ext_diag[s][0][0]; t_prism[s][2][1] = ext_diag[s][0][1]; + t_prism[s][2][2] = (ext_diag[s][0][0]==4) ? 1 : 0; + t_prism[s][2][3] = p_pyr_top; + } + } + } + // translate arrays to 'real' vertex coordinates + for( int t = 0; t < 3; t++ ){ + for( int w = 0; w < 4; w++ ) + t_prism[s][t][w] = (t_prism[s][t][w] >= 0) + ? prism_v[s][t_prism[s][t][w]] : t_prism[s][t][w]; + } + for( int t = 0; t < 5; t++ ) + p_prism[s][t] = (p_prism[s][t] >= 0) + ? prism_v[s][p_prism[s][t]] : p_prism[s][t]; + } + + // Now construct shapes for prism slice through configuration + for( int s = 0; s < 2; s++ ){ + if( t_prism[s][0][0] < 0 && p_prism[s][0] < 0 ){ + addPrism( v[prism_v[s][0]], v[prism_v[s][1]], v[prism_v[s][2]], v[prism_v[s][3]], + v[prism_v[s][4]], v[prism_v[s][5]], to, source); + } + else{ + for( int t = 0; t < 3; t++ ){ + if( t_prism[s][t][0] >= 0 ) + addTetrahedron( v[t_prism[s][t][0]], v[t_prism[s][t][1]], v[t_prism[s][t][2]], + v[t_prism[s][t][3]], to, source ); + } + if( p_prism[s][0] >= 0 ) + addPyramid( v[p_prism[s][0]], v[p_prism[s][1]], v[p_prism[s][2]], v[p_prism[s][3]], + v[p_prism[s][4]], to, source ); + } + } + // return now + return 1; + + } // end of "if prism_slice_valid" statement + } // end of p_ind loop over opposite pairs of diagonals + + return 0; // if exhaust possibilities, default to this + +} // end of createFullHexElems() + + +// Overall function that creates the elements that subdivide any whole element extruded from a quadrangle. +static inline void QuadToTriHexPri(std::vector<MVertex*> &v, GRegion *to, int j, + int k, MElement* source, + std::set<std::pair<MVertex*, MVertex*> > &quadToTri_edges, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems, + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > > &problems_new, + unsigned int lat_tri_diags_size, bool bnd_elem, bool is_dbl, bool diag_search, + std::set<MVertex*, MVertexLessThanLexicographic> &pos ) +{ + + int num_v = v.size(); + + int dup[4]; + int m = 0; + for(int i = 0; i < 4; i++) + if(v[i] == v[i + 4]) + dup[m++] = i; + + bool is_problem = false; + + // is element marked as needing internal vertex? + if( !is_dbl ){ + std::pair<unsigned int, unsigned int> jk_pair (j,k); + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > >::iterator itprob; + itprob = problems.find(source); + if( itprob != problems.end() ){ + if( (*itprob).second.find(jk_pair) != (*itprob).second.end() ) + is_problem = true; + } + } + + ExtrudeParams *ep = to->meshAttributes.extrude; + + // need these for double layer extrusion purposes + unsigned int j_second_from_top = 0, k_second_from_top = 0; + if( ep ){ + if( ep->mesh.NbElmLayer[ep->mesh.NbLayer-1] > 1 ){ + j_second_from_top = ep->mesh.NbLayer-1; + k_second_from_top = ep->mesh.NbElmLayer[j_second_from_top]-2; + } + else{ + j_second_from_top = std::max(ep->mesh.NbLayer-2, 0); + k_second_from_top = ep->mesh.NbElmLayer[j_second_from_top]-1; + } + } + + + // variables to hold of each faces's diagonal vertex nodes + bool found_diags = false; + std::vector<int> n1, n2; + n1.assign(6, -3); + n2.assign(6, -4); + if( diag_search ){ + for( int p = 0; p < 6; p++ ){ + n1[p] = -p*p-p-1; n2[p] = -p*p-p-2; //unique negative numbers + if( p < 4 ){ + if( edgeExists( v[p], v[(p+1)%4+4], quadToTri_edges ) ){ + n1[p] = p; n2[p] = (p+1)%4+4; + found_diags = true; + } + else if( edgeExists( v[(p+1)%4], v[p+4], quadToTri_edges ) ){ + n1[p] = (p+4); n2[p] = (p+1)%4; + found_diags = true; + } + } + else{ + int add = (p == 4) ? 0 : 4; + if( edgeExists( v[0+add], v[2+add], quadToTri_edges ) ){ + n1[p] = 0 + add; + n2[p] = 2 + add; + found_diags = true; + } + else if( edgeExists( v[1+add], v[3+add], quadToTri_edges ) ){ + n1[p] = 1 + add; + n2[p] = 3 + add; + found_diags = true; + } + } + } + } + + + // BAD SHAPE + if( m > 2 || m < 0 ){ + Msg::Error("In QuadToTriHexPri(), bad number of degenerate corners."); + return; + } + + + // Divide by double layer extrusion method? + if( is_dbl && ( found_diags || j > j_second_from_top || j==j_second_from_top && k >= k_second_from_top || m==1 ) ){ + if( j==0 && k==0 || j==j_second_from_top && k==k_second_from_top && ( !bnd_elem || !found_diags ) && m != 1 ) + MeshWithFaceCenteredVertex( to, source, v, n1, n2, 0, 1, pos ); + else if( j == ep->mesh.NbLayer-1 && k == ep->mesh.NbElmLayer[j]-1 ) + MeshWithFaceCenteredVertex( to, source, v, n1, n2, 1, 0, pos ); + else + MeshWithFaceCenteredVertex( to, source, v, n1, n2, 1, 1, pos ); + return; + } + + + // The of the possibilites are for a single layer extrusion + + // PRISM + else if( m == 2 && !is_problem ){ + if( createTwoPtDegenHexElems( v, to, ep, j, k, dup, source, n1, n2, quadToTri_edges, problems, + problems_new, lat_tri_diags_size, bnd_elem, is_dbl, found_diags, pos ) ) + return; + } + + // DEGENERATE HEXAHEDRON + else if( m == 1 && !is_problem ){ + if( createOnePtDegenHexElems( v, to, ep, j, k, dup, source, n1, n2, quadToTri_edges, problems, + problems_new, lat_tri_diags_size, bnd_elem, is_dbl, found_diags, pos ) ) + return; + } + + + // FULL HEXAHEDRON + else if( !is_problem ){ + if( createFullHexElems( v, to, ep, j, k, dup, source, n1, n2, quadToTri_edges, problems, + problems_new, lat_tri_diags_size, bnd_elem, is_dbl, found_diags, pos ) ) + return; + } + + // now take care of unexpected failure to divide without internal vertex + if( !is_problem ) { + Msg::Error("In QuadToTriHexPri(), Extruded hexahedron needs subdivision, but cannot " + " be divided without internal vertex, and was not previously detected as such. " + " This is a bug. Please Report."); + Msg::Error("j: %d, k: %d", j, k); + QtMakeCentroidVertex( v, &(to->mesh_vertices), to, pos ); + std::pair<unsigned int, unsigned int> jk_pair(j,k); + problems_new[source].insert(jk_pair); + is_problem = true; + } + + // Mesh with internal vertex + if( is_problem ){ + MeshWithInternalVertex( to, source, v, n1, n2, pos ); + return; + } + +} // end of QuadToTriPriPyrTet() + +// reserves approximately the right amount of memory for quadToTri extrusions +// in the element vectors in the region 'to' +// *** STILL EXPERIMENTAL -- It *kind* of works to limit memory footprint of vectors. +static void reserveQuadToTriCapacityForRegion( GRegion *to, GFace *from, bool is_dbl, unsigned int num_layers, + unsigned int lat_tri_diags_size, CategorizedSourceElements *c, + std::map<MElement*, std::set<std::pair<unsigned int, + unsigned int> > > *problems ) +{ + + ExtrudeParams *ep = to->meshAttributes.extrude; + if( !ep ) + return; + + std::map<MElement*, std::set<std::pair<unsigned int, unsigned int> > >::iterator itprob; + unsigned int num_prob_tri = 0, num_prob_quad = 0; + for( itprob = problems->begin(); itprob != problems->end(); itprob++ ){ + if( itprob->first->getType() == TYPE_TRI ) + num_prob_tri += itprob->second.size(); + else + num_prob_quad += itprob->second.size(); + } + unsigned int num_bnd_tri = c->three_bnd_pt_tri.size() + c->other_bnd_tri.size(); + unsigned int num_bnd_quad = c->four_bnd_pt_quad.size() + c->other_bnd_quad.size(); + unsigned int num_int_tri = c->internal_tri.size(); + unsigned int num_int_quad = c->internal_quad.size(); + unsigned int num_tri = from->triangles.size(); + unsigned int num_quad = from->quadrangles.size(); + // in case !ep->Recombine is ever allowed... + if( !ep->mesh.Recombine ) + to->tetrahedra.reserve( num_layers*(3*num_tri + 6*num_quad + 8*num_prob_tri + 12*num_prob_quad) ); + else if( !is_dbl ){ + //to->tetrahedra.reserve( (6*num_quad + 3*num_tri +2*lat_tri_diags_size + 8*num_prob_tri + 12*num_prob_quad) ); + to->prisms.reserve( num_tri*num_layers ); + to->hexahedra.reserve( num_quad*(num_layers-1) ); + } + else{ + unsigned int extra_verts = to->mesh_vertices.size() - from->mesh_vertices.size()*(num_layers-1); + to->hexahedra.reserve( num_quad*(num_layers-1) ); + to->prisms.reserve( num_tri*num_layers ); + to->pyramids.reserve( num_prob_quad + num_prob_tri + extra_verts*4 + num_quad ); + to->tetrahedra.reserve( num_prob_quad + num_prob_tri + extra_verts ); + } + +} + + +// displays for the user a list of the body centered vertices created for problem elements. +static void listBodyCenteredVertices( GRegion *to, bool is_dbl, + std::map<MElement *, std::set<std::pair<unsigned int,unsigned int> > > *problems, + std::map<MElement *, std::set<std::pair<unsigned int,unsigned int> > > *problems_new, + std::set<MVertex*, MVertexLessThanLexicographic> *pos ) +{ + + ExtrudeParams *ep = to->meshAttributes.extrude; + + if( !ep ) + return; + + if( problems->size() || problems_new->size() ){ + + std::map<MElement *, std::set<std::pair<unsigned int,unsigned int> > >::iterator it_begin; + std::map<MElement *, std::set<std::pair<unsigned int,unsigned int> > >::iterator it_end; + std::map<MElement *, std::set<std::pair<unsigned int,unsigned int> > >::iterator itmap; + + + //insert all of problems_new into problems + for( itmap = problems_new->begin(); itmap!= problems_new->end(); itmap++ ) + (*problems)[itmap->first].insert( itmap->second.begin(), itmap->second.end() ); + + if( is_dbl ){ + it_begin = problems_new->begin(); + it_end = problems_new->end(); + } + else{ + it_begin = problems->begin(); + it_end = problems->end(); + } + + unsigned int int_verts_count = 0; + for( itmap = it_begin; itmap != it_end; itmap++ ){ + if( itmap->second.size() ) + int_verts_count += itmap->second.size(); + } + + if( int_verts_count ){ + if( int_verts_count == 1 ) + Msg::Error("QuadToTri meshed %d element in region %d " + "with a body-centered internal vertex.", + int_verts_count, to->tag() ); + else + Msg::Error("QuadToTri meshed %d elements in region %d " + "with body-centered internal vertices.", + int_verts_count, to->tag() ); + Msg::Error("( Mesh *should* still conformal, but the user should be aware of these internal vertices. )" ); + + unsigned int int_verts_count2 = 0; + + for( itmap = it_begin; itmap != it_end; itmap++ ){ + if( itmap->second.size() ){ + std::set<std::pair<unsigned int, unsigned int> >::iterator itset; + for( itset = itmap->second.begin(); itset != itmap->second.end(); itset++ ){ + std::vector<MVertex *> verts; + int v_num = getExtrudedVertices( itmap->first, ep, (*itset).first, + (*itset).second, (*pos), verts); + // find centroid + std::vector<double> centroid = QtFindVertsCentroid(verts); + int_verts_count2++; + Msg::Error("Internal Vertex %d at (x,y,z) = (%g, %g, %g).", int_verts_count2, + centroid[0], centroid[1], centroid[2] ); + } + } + } + } + } + +} + + +// Function that makes all the elements in a QuadToTri region, both +// the divided elements and the whole elements, using already-created subdivision edges. +bool QuadToTriCreateElements(GRegion *to, CategorizedSourceElements &cat_src_elems, + std::set<std::pair<MVertex*,MVertex*> > &quadToTri_edges, + std::set<std::pair<MVertex*,MVertex*> > &lat_tri_diags, + std::map<MElement*, std::set<std::pair<unsigned int,unsigned int> > > &problems, + std::set<MVertex *, MVertexLessThanLexicographic> &pos) +{ + + ExtrudeParams *ep = to->meshAttributes.extrude; + if( !ep || !ep->mesh.ExtrudeMesh || !ep->mesh.QuadToTri ) + return false; + + GModel *model = to->model(); + GFace *from = model->getFaceByTag( std::abs(ep->geo.Source) ); + if( !from ) + return false; + + + // set lat_tri_diags_size + unsigned int lat_tri_diags_size = lat_tri_diags.size(); + + // number of element layers + unsigned int num_layers = 0; + for( int j = 0; j < ep->mesh.NbLayer; j++ ) + num_layers += ep->mesh.NbElmLayer[j]; + + // Is this a valid double layer extrusion? + bool is_dbl = false; + if( num_layers >= 2 && ( ep->mesh.QuadToTri == QUADTRI_DBL_1 || ep->mesh.QuadToTri == QUADTRI_DBL_1_RECOMB ) ) + is_dbl = true; + + // Find where top divided layer starts + int j_top_start = 0, k_top_start = 0; + if( is_dbl ){ // second from top + if( ep->mesh.NbElmLayer[ep->mesh.NbLayer-1] > 1 ){ + j_top_start = ep->mesh.NbLayer-1; + k_top_start = ep->mesh.NbElmLayer[j_top_start]-2; + } + else{ + j_top_start = std::max(ep->mesh.NbLayer-2, 0); + k_top_start = ep->mesh.NbElmLayer[j_top_start]-1; + } + } + else{ // first from top + j_top_start = ep->mesh.NbLayer-1; + k_top_start = ep->mesh.NbElmLayer[j_top_start]-1; + } + + // for one point bd quads + int j_second_from_bottom = ep->mesh.NbLayer-1, + k_second_from_bottom = ep->mesh.NbElmLayer[ep->mesh.NbLayer-1]-1; + if( ep->mesh.NbElmLayer[0] > 1 ){ + j_second_from_bottom = 0; + k_second_from_bottom = 1; + } + else if( ep->mesh.NbLayer > 1 ){ + j_second_from_bottom = 1; + k_second_from_bottom = 0; + } + + + // a container for new problem elements (if such new problems are found, there's a bug) + std::map<MElement*, std::set<std::pair<unsigned int,unsigned int> > > problems_new; + + + // Make the extra vertices needed for Some QuadToTri elements + if( !addFaceOrBodyCenteredVertices( to, cat_src_elems, quadToTri_edges, problems, is_dbl, + lat_tri_diags_size, pos ) ){ + Msg::Error("QuadToTriCreateElements() could not add face or body vertices for QuadToTri region %d.", to->tag() ); + return false; + } + + // reserve enough capacity for all possible elements, try to find combination of simplicity and memory efficiency. + // *** EXPERIMENTAL *** + //reserveQuadToTriCapacityForRegion( to, from, is_dbl, num_layers, lat_tri_diags_size, &cat_src_elems, &problems ); + + // create elements: + + /* std::vector<MElement*> elem_vec; + elem_vec.reserve(num_layers); + */ + // triangles + for( int s = 0; s < 3; s++ ){ + std::vector<MVertex*> verts; + verts.reserve(3); + bool bnd_elem = s < 2 ? true : false; + std::set<unsigned int> *set_elems; + std::set<unsigned int>::iterator itset; + if( !s ) set_elems = &cat_src_elems.three_bnd_pt_tri; + else if( s==1 ) set_elems = &cat_src_elems.other_bnd_tri; + else set_elems = &cat_src_elems.internal_tri; + for( itset = set_elems->begin(); itset != set_elems->end(); itset++ ){ + /* // *** SPEED IMPROVEMENT *** + unsigned int hex, pyr, pri, tet; + hex = to->hexahedra.size(); + pyr = to->pyramids.size(); + pri = to->prisms.size(); + tet = to->tetrahedra.size(); + // keeps old allocation + elem_vec.resize(0); + */ + MElement *elem = from->triangles[(*itset)]; + for(int j = 0; j < ep->mesh.NbLayer; j++) { + for(int k = 0; k < ep->mesh.NbElmLayer[j]; k++) { + // keeps old allocation + verts.resize(0); + if( getExtrudedVertices(elem, ep, j, k, pos, verts) == 6 ){ + QuadToTriPriPyrTet( verts, to, j, k, elem, quadToTri_edges, + problems, problems_new, lat_tri_diags_size, + bnd_elem, is_dbl, 1, pos ); + } + } + } + /*// *** SPEED IMPROVEMENT *** + elem_vec.insert(elem_vec.end(), to->hexahedra.begin()+hex, to->hexahedra.end() ); + elem_vec.insert(elem_vec.end(), to->tetrahedra.begin()+tet, to->tetrahedra.end() ); + elem_vec.insert(elem_vec.end(), to->prisms.begin()+pri, to->prisms.end() ); + elem_vec.insert(elem_vec.end(), to->pyramids.begin()+pyr, to->pyramids.end() ); + */ + } + } + + if(from->quadrangles.size() && !ep->mesh.Recombine){ + Msg::Error("In QuadToTriCreateElements(), cannot extrude quadrangles without Recombine"); + return false; + } + else{ + std::vector<MVertex*> verts; + verts.reserve(4); + for( int s = 0; s < 3; s++ ){ + bool bnd_elem = s < 2 ? true : false; + std::set<unsigned int> *set_elems; + std::set<unsigned int>::iterator itset; + if( !s ) set_elems = &cat_src_elems.four_bnd_pt_quad; + else if( s==1 ) set_elems = &cat_src_elems.other_bnd_quad; + else set_elems = &cat_src_elems.internal_quad; + + for( itset = set_elems->begin(); itset != set_elems->end(); itset++ ){ + /*// *** SPEED IMPROVEMENT *** + unsigned int hex, pyr, pri, tet; + hex = to->hexahedra.size(); + pyr = to->pyramids.size(); + pri = to->prisms.size(); + tet = to->tetrahedra.size(); + + // keeps old allocation + elem_vec.resize(0); + */ + MElement *elem = from->quadrangles[(*itset)]; + for(int j = 0; j < ep->mesh.NbLayer; j++) { + for(int k = 0; k < ep->mesh.NbElmLayer[j]; k++) { + // keeps old allocation + verts.resize(0); + if(getExtrudedVertices(elem, ep, j, k, pos, verts) == 8 ){ + QuadToTriHexPri(verts, to, j, k, elem, quadToTri_edges, + problems, problems_new, lat_tri_diags_size, + bnd_elem, is_dbl, 1, pos); + } + } + } + /*// *** SPEED IMPROVEMENT *** + elem_vec.insert(elem_vec.end(), to->hexahedra.begin()+hex, to->hexahedra.end() ); + elem_vec.insert(elem_vec.end(), to->tetrahedra.begin()+tet, to->tetrahedra.end() ); + elem_vec.insert(elem_vec.end(), to->prisms.begin()+pri, to->prisms.end() ); + elem_vec.insert(elem_vec.end(), to->pyramids.begin()+pyr, to->pyramids.end() ); + */ + } + } + } + + // List for the user any elements with internal vertices: + listBodyCenteredVertices( to, is_dbl, &problems, &problems_new, &pos ); + + + // Now revert any elements that have positive volume. + // Does this even need to be done? + // *** KEEP THIS COMMENTED OUT UNLESS IT IS NEEDED *** + /*for( int i = 0; i < to->tetrahedra.size(); i++ ){ + if( to->tetrahedra[i]->getVolumeSign() > 0 ) + to->tetrahedra[i]->revert(); + + } + for( int i = 0; i < to->prisms.size(); i++ ){ + if( to->prisms[i]->getVolumeSign() > 0 ) + to->prisms[i]->revert(); + } + for( int i = 0; i < to->pyramids.size(); i++ ){ + if( to->pyramids[i]->getVolumeSign() > 0 ) + to->pyramids[i]->revert(); + } + */ + + // ***THE FOLLOWING COMMENTED OUT LINES ARE FOR DEBUGGING PURPOSES ONLY AND WON'T WORK WITHOUT + // A SPECIAL INCLUDE FILE. THESE ARE USELESS WITHOUT THE DEBUG INCLUDE. *** + /*GModel::riter rit; + if( std::abs(to->tag() ) == 4 ){ + for( rit = model->firstRegion(); rit != model->lastRegion(); rit++ ){ + double total_volume = RegionVolByElems( (*rit) ); + Msg::Error( "Region %3d Volume = %14.7f.", (*rit)->tag(), total_volume ); + } + for( rit = model->firstRegion(); rit != model->lastRegion(); rit++ ){ + unsigned int num_nonconformal = TestRegionConformality( (*rit) ); + // if( num_nonconformal ) + Msg::Error( "Region %3d Noncomformal faces = %d.", (*rit)->tag(), num_nonconformal ); + } + + }*/ + + return true; + +} + + +// Mesh QuadToTri region from extrudeMesh() in meshGRegionExtruded.cpp +// Added 04/08/2011: +int meshQuadToTriRegion( GRegion *gr, std::set<MVertex*, MVertexLessThanLexicographic> &pos ) +{ + // Perform some checks to see if this is a valid QuadToTri region. + // If so, a decision has to be made: if this surface is NOT laterally adjacent to + // any subdivided extrusion, then it may be meshed here without worrying + // about a global subdivide operation. + // If the region has a lateral shared with a subdivide region, then it should be part + // of the subdivide operation later...so just let the default + // methods here create the vertices and quit. + // Otherwise, engage in the meshing here. + + ExtrudeParams *ep = gr->meshAttributes.extrude; + + if( !ep || !ep->mesh.ExtrudeMesh || !ep->mesh.QuadToTri || !ep->mesh.Recombine ) + return 0; + + // QuadToTri validity check: + bool validQuadToTriReg = false; + // if any laterals are shared with a subdivided region or an region that otherwise + // should not have it's lateral diags changed, IsValidQuadToTriRegion will set following to 'false.' + bool allNonGlobalSharedLaterals = true; // IsValidQuadToTriRegion will set this properly regardless of initial value + validQuadToTriReg = IsValidQuadToTriRegion(gr, &allNonGlobalSharedLaterals); + + if( !validQuadToTriReg && ep->mesh.QuadToTri ) + Msg::Error("Mesh of QuadToTri region %d likely has errors.", gr->tag() ); + + + if( !allNonGlobalSharedLaterals ){ + Msg::Info("Delaying mesh of QuadToTri Region %d until after global subdivide operation....", gr->tag() ); + return 0; + } + + // mesh quadToTri even if validQuadToTri is false. Try it anyway! + if( allNonGlobalSharedLaterals ){ + std::set<std::pair<MVertex*, MVertex*> > quadToTri_edges; + std::set<std::pair<MVertex*, MVertex*> > lat_tri_diags; + std::map<MElement*, std::set<std::pair<unsigned int,unsigned int> > > problems; + + // data structure for boundary status-categorized source elements, + // (member data containers defined in .h file) + CategorizedSourceElements cat_src_elems( gr ); + if( !cat_src_elems.valid ){ + Msg::Error("In meshQuadToTriRegion(), failed to classify QuadToTri region %d's source face elements " + "according to boundary status.", gr->tag() ); + return 0; + } + + bool fail = false; + if( !QuadToTriEdgeGenerator( gr, cat_src_elems, quadToTri_edges, + lat_tri_diags, problems, pos) ){ + Msg::Error("In meshQuadToTriRegion(), failed to create edges for QuadToTri " + "region %d.", gr->tag() ); + return 0; + } + if( !QuadToTriCreateElements( gr, cat_src_elems, quadToTri_edges, + lat_tri_diags, problems, pos) ){ + Msg::Error("In meshQuadToTriRegion, failed to create elements for QuadToTri " + "region %d.", gr->tag() ); + return 0; + } + + QuadToTriLateralRemesh(gr, quadToTri_edges); + + return 1; + } + + return 0; + +} + + +// The function that is called from meshGRegionExtruded.cpp to mesh QuadToTri regions +// that are adjacent to subdivided regions, after the global Subdivide command is called. +// Added 04/08/11. +int meshQuadToTriRegionAfterGlobalSubdivide( GRegion *gr, std::set<std::pair<MVertex*, MVertex*> > *edges, + std::set<MVertex*, MVertexLessThanLexicographic> &pos ) +{ + + ExtrudeParams *ep = gr->meshAttributes.extrude; + + if( !ep || !ep->mesh.ExtrudeMesh || !ep->mesh.QuadToTri || !ep->mesh.Recombine ) + return 0; + + // QuadToTri validity check: + bool validQuadToTriReg = false; + // if any laterals are shared with a subdivided region or any region that + // should not have its lateral diags swapped, IsValidQuadToTriRegion() will set following to 'false.' + bool allNonGlobalSharedLaterals = true; // IsValidQuadToTriRegion will set this properly regardless of initial value + validQuadToTriReg = IsValidQuadToTriRegion(gr, &allNonGlobalSharedLaterals); + + if( !validQuadToTriReg && ep->mesh.QuadToTri ) + Msg::Error("Mesh of QuadToTri region %d likely has errors.", gr->tag() ); + + // If all lateral edges were non-global, skip. (Region should already be meshed properly). + if( allNonGlobalSharedLaterals ) + return 0; + + Msg::Info("Meshing Region %d (extruded).", gr->tag() ); + + GFace *gr_src_face = gr->model()->getFaceByTag( std::abs(ep->geo.Source) ); + if( !gr_src_face ){ + Msg::Error("In meshQuadToTriRegionAfterGlobalSubdivide(), no source face for QuadToTri region %d.", gr->tag()); + return 0; + } + + for(unsigned int i = 0; i < gr->hexahedra.size(); i++) + delete gr->hexahedra[i]; + gr->hexahedra.clear(); + for(unsigned int i = 0; i < gr->prisms.size(); i++) + delete gr->prisms[i]; + gr->prisms.clear(); + for(unsigned int i = 0; i < gr->pyramids.size(); i++) + delete gr->pyramids[i]; + gr->pyramids.clear(); + for(unsigned int i = 0; i < gr->tetrahedra.size(); i++) + delete gr->tetrahedra[i]; + gr->tetrahedra.clear(); + + std::set<std::pair<MVertex*, MVertex*> > quadToTri_edges; + std::set<std::pair<MVertex*, MVertex*> > lat_tri_diags; + std::map<MElement*, std::set<std::pair<unsigned int,unsigned int> > > problems; + + // add edges to quadToTri_edges + quadToTri_edges.insert( edges->begin(), edges->end() ); + + // categorize source face elements + CategorizedSourceElements cat_src_elems( gr ); + + if( !cat_src_elems.valid ){ + Msg::Error("In meshQuadToTriRegionAfterGlobalSubdivide(), " + "Failed to classify QuadToTri region %d's source face elements " + "according to boundary status.", gr->tag() ); + return 0; + } + + // Mesh quadToTri + if( !QuadToTriEdgeGenerator( gr, cat_src_elems, quadToTri_edges, + lat_tri_diags, problems, pos ) ){ + Msg::Error("In meshQuadToTriRegionAfterGlobalSubdivide(), edge generation failed for QuadToTri " + "region %d.", gr->tag() ); + return 0; + } + if( !QuadToTriCreateElements( gr, cat_src_elems, quadToTri_edges, + lat_tri_diags, problems, pos ) ){ + Msg::Error("In meshQuadToTriRegionAfterGlobalSubdivide(), element creation failed for QuadToTri " + "region %d.", gr->tag() ); + return 0; + } + + QuadToTriLateralRemesh(gr, quadToTri_edges); + + return 1; + + +} // end of meshQuadToTriRegionAfterGlobalSubdivide() diff --git a/Mesh/QuadTriExtruded3D.h b/Mesh/QuadTriExtruded3D.h new file mode 100644 index 0000000000000000000000000000000000000000..f543452413e19d63fd7a82b82d3285435e2034a7 --- /dev/null +++ b/Mesh/QuadTriExtruded3D.h @@ -0,0 +1,79 @@ +/************************************************************************************************** +QuadTriExtruded3D.h + +The code in this file was written by Dr. Trevor S. Strickler. +email: <trevor.strickler@gmail.com> + +This file is part of the QuadTri contribution to Gmsh. QuadTri allows the conformal interface +of quadrangle faces to triangle faces using pyramids and other mesh elements. + +See READMEQUADTRI.txt for more information. The license information is in LICENSE.txt. + +Trevor S. Strickler hereby transfers copyright of QuadTri files to +Christophe Geuzaine and J.-F. Remacle with the understanding that +his contribution shall be cited appropriately. + +All reused or original Gmsh code is Copyright (C) 1997-2011 C. Geuzaine, J.-F. Remacle +Gmsh is available at: www.geuz.org/gmsh + +For Gmsh license information, see the LICENSE.txt file for license information. Please report all +Gmsh bugs and problems to <gmsh@geuz.org>. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License, Version 2, +as published by the Free Software Foundation, or (at your option) +any later version, with or without the exception given in the +LICENSE.txt file supplied with this code and with Gmsh. + +This program 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 General Public License for more details. + +****************************************************************************************************/ + +#if !defined( _QTEXTR3D_H_ ) +#define _QTEXTR3D_H_ + +#include "Geo.h" +#include "GEntity.h" +#include "GFace.h" +#include "GRegion.h" +#include "GEdge.h" +#include "GModel.h" +#include "ExtrudeParams.h" +#include "GmshDefines.h" +#include "MVertex.h" +#include "Context.h" +#include "GModel.h" +#include "meshGFace.h" +#include "MLine.h" +#include "MTriangle.h" +#include "MQuadrangle.h" +#include "MTetrahedron.h" +#include "MPyramid.h" +#include "MPrism.h" +#include "MHexahedron.h" +#include "Numeric.h" +#include <map> +#include <math.h> +#include "QuadTriUtils.h" + +// Determines whether the region is a valid QuadToTri region. Performs some +// basic checks, including whether there is a valid top, valid source, +// and that the surfaces serving as laterals are structured +// Added 2010-12-30 +bool IsValidQuadToTriRegion(GRegion *region, bool *allNonGlobalSharedLaterals); + +// Mesh QuadToTri region from extrudeMesh() from meshGRegionExtruded.cpp. +// Added 04/08/2011: +int meshQuadToTriRegion( GRegion *gr, std::set<MVertex*, MVertexLessThanLexicographic> &pos ); + +// The function that is called from meshGRegionExtruded.cpp to mesh QuadToTri regions +// that are adjacent to subdivided regions, after the global Subdivide command is called. +// Added 04/08/11. +int meshQuadToTriRegionAfterGlobalSubdivide( GRegion *gr, std::set<std::pair<MVertex*, MVertex*> > *edges, + std::set<MVertex*, MVertexLessThanLexicographic> &pos ); + + +#endif diff --git a/Mesh/QuadTriTransfinite3D.cpp b/Mesh/QuadTriTransfinite3D.cpp new file mode 100644 index 0000000000000000000000000000000000000000..80c168258d114fe7d796a981c08576776cb066fb --- /dev/null +++ b/Mesh/QuadTriTransfinite3D.cpp @@ -0,0 +1,285 @@ +/************************************************************************************************** +QuadTriTransfinite3D.cpp + +The code in this file was written by Dr. Trevor S. Strickler. +email: <trevor.strickler@gmail.com> + +This file is part of the QuadTri contribution to Gmsh. QuadTri allows the conformal interface +of quadrangle faces to triangle faces using pyramids and other mesh elements. + +See READMEQUADTRI.txt for more information. The license information is in LICENSE.txt. + +Trevor S. Strickler hereby transfers copyright of QuadTri files to +Christophe Geuzaine and J.-F. Remacle with the understanding that +his contribution shall be cited appropriately. + +All reused or original Gmsh code is Copyright (C) 1997-2011 C. Geuzaine, J.-F. Remacle +Gmsh is available at: www.geuz.org/gmsh + +For Gmsh license information, see the LICENSE.txt file for license information. Please report all +Gmsh bugs and problems to <gmsh@geuz.org>. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License, Version 2, +as published by the Free Software Foundation, or (at your option) +any later version, with or without the exception given in the +LICENSE.txt file supplied with this code and with Gmsh. + +This program 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 General Public License for more details. + +****************************************************************************************************/ + +#include "QuadTriTransfinite3D.h" + +// Does the pair of MVertex pointers v1 and v2 exist in the set 'edges'? +static int edgeExists(MVertex *v1, MVertex *v2, + std::set<std::pair<MVertex*, MVertex*> > &edges) +{ + std::pair<MVertex*, MVertex*> p(std::min(v1, v2), std::max(v1, v2)); + return edges.count(p); +} + + +// Create the pair of MVertex pointers v1 and v2 exist in the set 'edges.' +static void createEdge(MVertex *v1, MVertex *v2, + std::set<std::pair<MVertex*, MVertex*> > &edges) +{ + std::pair<MVertex*, MVertex*> p(std::min(v1, v2), std::max(v1, v2)); + edges.insert(p); +} + + +static void addTetrahedron(MVertex* v1, MVertex* v2, MVertex* v3, MVertex* v4, + GRegion *to) +{ + MTetrahedron* newElem = new MTetrahedron(v1, v2, v3, v4); + to->tetrahedra.push_back(newElem); +} + +static void addPyramid(MVertex* v1, MVertex* v2, MVertex* v3, MVertex* v4, + MVertex* v5, GRegion *to) +{ + MPyramid* newElem = new MPyramid(v1, v2, v3, v4, v5); + to->pyramids.push_back(newElem); +} + +static void addPrism(MVertex* v1, MVertex* v2, MVertex* v3, MVertex* v4, + MVertex* v5, MVertex* v6, GRegion *to) +{ + MPrism* newElem = new MPrism(v1, v2, v3, v4, v5, v6); + to->prisms.push_back(newElem); +} + +static void addHexahedron(MVertex* v1, MVertex* v2, MVertex* v3, MVertex* v4, + MVertex* v5, MVertex* v6, MVertex* v7, MVertex* v8, + GRegion *to) +{ + MHexahedron* newElem = new MHexahedron(v1, v2, v3, v4, v5, v6, v7, v8); + to->hexahedra.push_back(newElem); +} + + +// Function to get all the diagonals from external surfaces of a given Transfinite region tr +// and place them in boundary_diags. +int getTransfiniteBoundaryDiags( GRegion *gr, std::set< std::pair<MVertex*, + MVertex*> > *boundary_diags ) +{ + // Get list of faces + std::list<GFace*> faces = gr->faces(); + + // Perform some tests of the Transfinite volume + + // Is the region Transfinite? + if( gr->meshAttributes.Method != MESH_TRANSFINITE ){ + Msg::Error( "In getTransfiniteBoundaryDiags(), region %d was not detected " + "to be a transfinite volume", gr->tag() ); + return 0; + } + + // Found right number of faces? + if( faces.size() != 5 && faces.size() != 6 ){ + Msg::Error( "In getTransfiniteBoundaryDiags(), number of faces does not equal " + "5 or 6 for region %d.", gr->tag() ); + return 0; + } + + // Are all the faces Transfinite? + std::list<GFace*>::iterator itf; + for( itf = faces.begin(); itf != faces.end(); itf++ ){ + if( (*itf)->meshAttributes.Method != MESH_TRANSFINITE ){ + Msg::Error( "In getTransfiniteBoundaryDiags(), surface %d was not detected " + "to be transfinite", (*itf)->tag() ); + return 0; + } + if( !(*itf)->transfinite_vertices.size() ){ + Msg::Error( "In getTransfiniteBoundaryDiags(), no transfinite vertices found for " + "surface %d.", (*itf)->tag() ); + return 0; + } + } + + + // Now loop through all surfaces checking for unrecombined faces. On 3-sided surfaces, skip the + // first layer of triangles because they ALWAYS exist even for recombined faces. + for( itf = faces.begin(); itf != faces.end(); itf++ ){ + if( (*itf)->quadrangles.size() ) + continue; + // For this face, loop through all sets of 4 vertices that could form a quadrangle + // if not subdivided. Find which of the 4 vertices are on the diagonal that subdivides + // the four vertices. + std::list<GEdge*> edges = (*itf)->edges(); + int index_guess = 0; + int i_low = 0; + if( edges.size() == 3 ){ + if( (*itf)->transfinite_vertices.size() <= 2 ) + continue; + index_guess += (*itf)->transfinite_vertices[1].size()-1; + i_low = 1; + } + + for( int i = i_low; i < (*itf)->transfinite_vertices.size()-1; i++ ){ + for( int j = 0; j < (*itf)->transfinite_vertices[i].size()-1; j++ ){ + std::vector<MVertex*> verts; + verts.resize(4); + verts[0] = (*itf)->transfinite_vertices[i][j]; + verts[1] = (*itf)->transfinite_vertices[i+1][j]; + verts[2] = (*itf)->transfinite_vertices[i+1][j+1]; + verts[3] = (*itf)->transfinite_vertices[i][j+1]; + std::pair<int,int> ind_pair = FindDiagonalEdgeIndices( verts, (*itf), + 0, index_guess ); + createEdge( verts[ind_pair.first], verts[ind_pair.second], (*boundary_diags) ); + index_guess += 2; + } + } + } + + return 1; + +} // End of getTransfiniteBoundaryDiags() + + +// Meshes either a prism or a hexahedral set of mesh vertices in a Transfinite Region with an internal vertex +// that is created here in the function. +void meshTransfElemWithInternalVertex( GRegion *gr, std::vector<MVertex *> v, + std::set< std::pair<MVertex*, MVertex*> > *boundary_diags ) +{ + + int v_size = v.size(); + int n_lat_tmp; + if( v_size == 6 ) + n_lat_tmp = 3; + else if( v_size == 8 ) + n_lat_tmp = 4; + else{ + Msg::Error("In meshTransfElemWithInternalVertex(), number of element vertices does not equal 6 or 8."); + return; + } + + const int n_lat = n_lat_tmp; + + + // find vertex node indices for diagonalized faces + std::vector<int> n1, n2; + bool found_diags = false; + int n_size = 0; + if( n_lat == 3 ){ + n1.assign(n_lat, -1); + n2.assign(n_lat, -2); + n_size = 3; + } + else if( n_lat == 4 ){ + n1.assign(n_lat+2, -1); + n2.assign(n_lat+2, -1); + n_size = 6; + } + + for( int p = 0; p < n_size; p++ ){ + n1[p] = -p*p-p-1; n2[p] = -p*p-p-2; + if( p < n_lat || n_lat == 3 ){ + if( v[p] == v[p+n_lat] || v[(p+1)%n_lat] == v[(p+1)%n_lat+n_lat] ) + continue; + else if( edgeExists( v[p], v[(p+1)%n_lat+n_lat], (*boundary_diags) ) ){ + n1[p] = p; n2[p] = (p+1)%n_lat+n_lat; + found_diags = true; + } + else if( edgeExists( v[p+n_lat], v[(p+1)%n_lat], (*boundary_diags) ) ){ + n1[p] = p+n_lat; n2[p] = (p+1)%n_lat; + found_diags = true; + } + } + else{ + int add = ( p == n_lat ) ? 0 : n_lat; + if( edgeExists( v[add], v[add+2], (*boundary_diags) ) ){ + n1[p] = add; n2[p] = add+2; + found_diags = true; + } + else if( edgeExists( v[add+1], v[add+3], (*boundary_diags) ) ){ + n1[p] = add+1; n2[p] = add+3; + found_diags = true; + } + } + } + + + + if( !found_diags ){ + if( n_lat == 3 ) + addPrism( v[0], v[1], v[2], v[3], v[4], v[5], gr ); + else if( n_lat ==4 ) + addHexahedron( v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], gr ); + return; + } + + // make the internal vertex + std::vector<double> centroid = QtFindVertsCentroid(v); + MVertex *v_int = new MVertex(centroid[0], centroid[1], centroid[2], gr); + gr->mesh_vertices.push_back( v_int ); + + // build all pyramids/tetra + for( int p = 0; p < n_lat; p++ ){ + int p2 = (p+1)%n_lat; + if( v[p] == v[p+n_lat] && v[p2] == v[p2+n_lat] ) + continue; + else if( v[p] == v[p+n_lat] || v[p2] == v[p2+n_lat] ){ + MVertex *v_dup = (v[p] == v[p+n_lat]) ? v[p] : v[p2]; + MVertex *v_non_dup = (v_dup == v[p]) ? v[p2] : v[p]; + MVertex *v_non_dup2 = (v_non_dup == v[p]) ? v[p+n_lat] : v[p2+n_lat]; + addTetrahedron( v_dup, v_non_dup, v_non_dup2, v_int, gr); + } + else if( n1[p] == p || n2[p] == p ){ + addTetrahedron( v[p], v[p2], v[p2+n_lat], v_int, gr ); + addTetrahedron( v[p], v[p2+n_lat], v[p+n_lat], v_int, gr ); + } + else if( n1[p] == p+n_lat || n2[p] == p+n_lat ){ + addTetrahedron( v[p], v[p2], v[p+n_lat], v_int, gr ); + addTetrahedron( v[p2], v[p2+n_lat], v[p+n_lat], v_int, gr ); + } + else + addPyramid( v[p], v[p2], v[p2+n_lat], v[p+n_lat], v_int, gr ); + } + + if( n_lat == 3){ + // bottom and top + addTetrahedron( v[0], v[1], v[2], v_int, gr ); + addTetrahedron( v[3], v[5], v[4], v_int, gr ); + } + else if( n_lat == 4 ){ + for( int p = 4; p < 6; p++ ){ + int add = (p == 4) ? 0 : 4; + if( n1[p] == 0+add || n2[p] == 0+add ){ + addTetrahedron( v[add], v[1+add], v[2+add], v_int, gr ); + addTetrahedron( v[add], v[2+add], v[3+add], v_int, gr ); + } + else if( n1[p] == 1+add || n2[p] == 1+add ){ + addTetrahedron( v[1+add], v[2+add], v[3+add], v_int, gr ); + addTetrahedron( v[1+add], v[3+add], v[add], v_int, gr ); + } + else + addPyramid( v[add], v[1+add], v[2+add], v[3+add], v_int, gr ); + } + } + +} // End of meshTransfiniteWithInternalVertex() diff --git a/Mesh/QuadTriTransfinite3D.h b/Mesh/QuadTriTransfinite3D.h new file mode 100644 index 0000000000000000000000000000000000000000..ba44d43a2e738e1dc7cf491c5af73c8f42309657 --- /dev/null +++ b/Mesh/QuadTriTransfinite3D.h @@ -0,0 +1,50 @@ +/************************************************************************************************** +QuadTriTransfinite3D.h + +The code in this file was written by Dr. Trevor S. Strickler. +email: <trevor.strickler@gmail.com> + +This file is part of the QuadTri contribution to Gmsh. QuadTri allows the conformal interface +of quadrangle faces to triangle faces using pyramids and other mesh elements. + +See READMEQUADTRI.txt for more information. The license information is in LICENSE.txt. + +Trevor S. Strickler hereby transfers copyright of QuadTri files to +Christophe Geuzaine and J.-F. Remacle with the understanding that +his contribution shall be cited appropriately. + +All reused or original Gmsh code is Copyright (C) 1997-2011 C. Geuzaine, J.-F. Remacle +Gmsh is available at: www.geuz.org/gmsh + +For Gmsh license information, see the LICENSE.txt file for license information. Please report all +Gmsh bugs and problems to <gmsh@geuz.org>. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License, Version 2, +as published by the Free Software Foundation, or (at your option) +any later version, with or without the exception given in the +LICENSE.txt file supplied with this code and with Gmsh. + +This program 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 General Public License for more details. + +****************************************************************************************************/ + +#if !defined( _QTTRANS3D_H_ ) +#define _QTTRANS3D_H_ + +#include "QuadTriUtils.h" + +// Function to get all the diagonals from external surfaces of a given Transfinite region tr +// and place them in boundary_diags. +int getTransfiniteBoundaryDiags( GRegion *tr, std::set< std::pair<MVertex*, + MVertex*> > *boundary_diags ); + +// Meshes either a prism or a hexahedral set of mesh vertices in a Transfinite Region with an internal vertex +// that is created here in the function. +void meshTransfElemWithInternalVertex( GRegion *to, std::vector<MVertex *> v, + std::set< std::pair<MVertex*, MVertex*> > *boundary_diags ); + +#endif diff --git a/Mesh/QuadTriUtils.cpp b/Mesh/QuadTriUtils.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cd88a7228e6914ed0fb170ea03d476bced7dace4 --- /dev/null +++ b/Mesh/QuadTriUtils.cpp @@ -0,0 +1,695 @@ +/************************************************************************************************** +QuadTriUtils.cpp + +The code in this file was written by Dr. Trevor S. Strickler. +email: <trevor.strickler@gmail.com> + +This file is part of the QuadTri contribution to Gmsh. QuadTri allows the conformal interface +of quadrangle faces to triangle faces using pyramids and other mesh elements. + +See READMEQUADTRI.txt for more information. The license information is in LICENSE.txt. + +Trevor S. Strickler hereby transfers copyright of QuadTri files to +Christophe Geuzaine and J.-F. Remacle with the understanding that +his contribution shall be cited appropriately. + +All reused or original Gmsh code is Copyright (C) 1997-2011 C. Geuzaine, J.-F. Remacle +Gmsh is available at: www.geuz.org/gmsh + +For Gmsh license information, see the LICENSE.txt file for license information. Please report all +Gmsh bugs and problems to <gmsh@geuz.org>. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License, Version 2, +as published by the Free Software Foundation, or (at your option) +any later version, with or without the exception given in the +LICENSE.txt file supplied with this code and with Gmsh. + +This program 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 General Public License for more details. + +****************************************************************************************************/ + +#include "QuadTriUtils.h" + + +// This is a member function for the element map in ExtrudeParams. +// This allows insertion of a whole vector at once. +/*void ExtrudeParams:: +ExtrusionElementMap::addExtrudedElemVector(MElement* source, std::vector<MElement*> *extrudedVector ) +{ + std::map<MElement*,std::vector<MElement*> >::iterator it = _extrudedElements.find(source); + + if(it != _extrudedElements.end()){ + it->second.reserve(it->second.size()+extrudedVector->size()); + it->second.insert(it->second.end(), extrudedVector->begin(), extrudedVector->end()); + } + else { + int totalNbElems = 0; + for (int i = 0; i <_parent->mesh.NbLayer;i++) + totalNbElems += _parent->mesh.NbElmLayer[i]; + unsigned int new_cap = totalNbElems > extrudedVector->size() ? totalNbElems : extrudedVector->size(); + // automatically creates source key in map (single argument 'insert' is also logarithmic too, just like this). + std::vector<MElement*> *vec = &(_extrudedElements[source]); + vec->reserve( new_cap ); + vec->insert( vec->end(), extrudedVector->begin(), extrudedVector->end()); + } + +}*/ + +// Insert all vertices on a region's source edge, including corners, +// into pos_src_edge set. +// Added 2010-01-09 +void QuadToTriInsertSourceEdgeVertices(GRegion *gr, + std::set<MVertex*, MVertexLessThanLexicographic> &pos_src_edge) +{ + ExtrudeParams *ep = gr->meshAttributes.extrude; + if(!ep || !ep->mesh.ExtrudeMesh || ep->geo.Mode != EXTRUDED_ENTITY){ + Msg::Error("In QuadToTriInsertSourceEdgeVertices(), incomplete or no " + "extrude info for region %d.", gr->tag() ); + return; + } + + + GFace *source_face = gr->model()->getFaceByTag( std::abs(ep->geo.Source) ); + + std::list<GEdge*> edges = source_face->edges(); + std::list<GEdge*>::iterator ite = edges.begin(); + for(ite = edges.begin(); ite != edges.end(); ite++ ){ + pos_src_edge.insert( (*ite)->mesh_vertices.begin(), (*ite)->mesh_vertices.end() ); + pos_src_edge.insert( (*ite)->getBeginVertex()->mesh_vertices.begin(), + (*ite)->getBeginVertex()->mesh_vertices.end() ); + pos_src_edge.insert( (*ite)->getEndVertex()->mesh_vertices.begin(), + (*ite)->getEndVertex()->mesh_vertices.end() ); + } +} + +// Insert all vertices on a faces edges, including corners, +// into pos_edges set. +// Added 2010-01-18 +void QuadToTriInsertFaceEdgeVertices(GFace *face, + std::set<MVertex*, MVertexLessThanLexicographic> &pos_edges) +{ + + + std::list<GEdge*> edges = face->edges(); + std::list<GEdge*>::iterator ite = edges.begin(); + while(ite != edges.end()){ + pos_edges.insert((*ite)->mesh_vertices.begin(), (*ite)->mesh_vertices.end()); + pos_edges.insert((*ite)->getBeginVertex()->mesh_vertices.begin(), + (*ite)->getBeginVertex()->mesh_vertices.end()); + pos_edges.insert((*ite)->getEndVertex()->mesh_vertices.begin(), + (*ite)->getEndVertex()->mesh_vertices.end()); + ++ite; + } +} + + +// Constructor for the CategorizedSourceElements structure. +// See definition of CategorizedSourceElements in QuadTriUtils.h +// file for details. +CategorizedSourceElements::CategorizedSourceElements( GRegion *gr ) +{ + region = (GRegion*)(NULL); + source_face = (GFace*)(NULL); + valid = false; + + ExtrudeParams *ep = gr->meshAttributes.extrude; + + if( !ep || !ep->mesh.QuadToTri || !ep->mesh.ExtrudeMesh ){ + Msg::Error("In CategorizedSourceElements constructor, invalid extrusion " + "in region %d for performing QuadToTri mesh generation.", + gr->tag() ); + return; + } + + GModel *model = gr->model(); + if( !model ){ + Msg::Error("In CategorizedSourceElements constructor, invalid model for region " + "%d.", gr->tag() ); + return; + } + + // now find and verify the source face + + GFace *source_tmp = model->getFaceByTag( std::abs( ep->geo.Source ) ); + if( !source_tmp ){ + Msg::Error("In CategorizedSourceElements constructor, invalid source face for region " + "%d.", gr->tag() ); + return; + } + + // fill the data structure region and source face pointers + valid = true; + region = gr; + source_face = source_tmp; + + // get source face boundary verts + std::set<MVertex*, MVertexLessThanLexicographic> bnd_verts; + QuadToTriInsertSourceEdgeVertices(gr, bnd_verts); + + + unsigned int num_tri = source_face->triangles.size(); + unsigned int num_quad = source_face->quadrangles.size(); + + // assign size to bool vectors + tri_bool.assign(num_tri*4, false); + quad_bool.assign(num_quad*5, false); + + + // keep temporary set of one boundary point quad pivot indices + std::set<MVertex*> one_pt_quad_pivots; + + // now classify the source elements in the vectors + for( int t = 0; t < 2; t++ ){ // t = 0 loop over triangles, t=1 loop over quads + + int size = !t ? source_face->triangles.size() : source_face->quadrangles.size(); + for( int i = 0; i < size; i++ ){ // loop over total elements in current vector + std::vector<MVertex*> elem_verts; + MElement *elem; + if( !t ){ + elem = source_face->triangles[i]; + elem->getVertices(elem_verts); + } + else{ + elem = source_face->quadrangles[i]; + elem->getVertices(elem_verts); + } + int elem_size = elem_verts.size(); + int bnd_count = 0; + int bnd_vert = 0; + // get the boundary vert bool values + for( int k = 0; k < elem_size; k++ ){ + if( bnd_verts.find(elem_verts[k]) != bnd_verts.end() ){ + if( !t ) tri_bool[4*i+k+1] = true; + else quad_bool[5*i+k+1] = true; + bnd_vert = k; + bnd_count++; + } + } + if( bnd_count ){ + if( !t ) tri_bool[4*i] = true; + else quad_bool[5*i] = true; + } + + // Place element vector indices into appropriate set + if( !bnd_count ) + (!t) ? internal_tri.insert(i) : internal_quad.insert(i); + else if( bnd_count == 1 || bnd_count == 2 || + (bnd_count == 3 && t) ) + (!t) ? other_bnd_tri.insert(i) : other_bnd_quad.insert(i); + else if( bnd_count == 3 && !t || bnd_count == 4 ){ + (!t) ? three_bnd_pt_tri.insert(i) : four_bnd_pt_quad.insert(i); + } + + // if a one boundary point quad, record it in one_pt_quads set + if( t && bnd_count == 1 ){ + one_pt_quad_pivots.insert(elem_verts[(bnd_vert+2)%4]); + } + } + } + + // If there were one_bnd_pt_quads, go through the search for all elements + // touching at pivot index that are either internal or two bnd point quads. + // This would take awhile if had to do this for every element (n^2). Fortunately, + // such elements are NOT typical at all. + if( !one_pt_quad_pivots.size() ) + return; + + std::set<std::pair<unsigned int, unsigned int> >::iterator it_quad; + std::set<unsigned int>::iterator it_int; + for( int s = 0; s < 2; s++ ){ + for( int q = 0; q < 2; q++ ){ + std::set<unsigned int> *int_elems; + if( !s ){ + if( !q ) int_elems = &internal_tri; + else continue; + } + else + int_elems = !q ? &internal_quad : &other_bnd_quad; + + for( it_int = (*int_elems).begin(); it_int != (*int_elems).end(); it_int++ ){ + std::vector<MVertex*> verts; + if( !s ) + source_face->triangles[(*it_int)]->getVertices(verts); + else + source_face->quadrangles[(*it_int)]->getVertices(verts); + + // for t == s == 1 (other_bnd_quads), only retain those with two boundary verts + if( s && q ){ + int bnd_count = 0; + for( int k = 0; k < verts.size(); k++ ){ + if( quad_bool[5*(*it_int)+k+1] ) + bnd_count++; + } + if( bnd_count != 2 ) + continue; + } + + // Don't eliminate the inner for loop with std::find because + // or reverse the order of the two loops. If an element touches multiple pivots, + // always want to find the FIRST one in the pivots set so that there is precedence + // and no conflicts at mesh time. Looping through the element vertices as the outer loop + // will sometimes choose the wrong pivot. + std::set<MVertex*>::iterator it_piv; + bool found = false; + for( it_piv = one_pt_quad_pivots.begin(); it_piv != one_pt_quad_pivots.end(); it_piv++ ){ + for( int t = 0; t < verts.size(); t++ ){ + if( (*it_piv) == verts[t] ) { + found = true; + if( !s ){ + internal_tri_touch_one_bnd_pt_quad.insert(*it_int); + tri_bool[4*(*it_int)] = true; + tri_bool[4*(*it_int)+t+1] = true; + } + else{ + if( !q ){ + internal_quad_touch_one_bnd_pt_quad.insert(*it_int); + quad_bool[5*(*it_int)] = true; + quad_bool[5*(*it_int)+t+1] = true; + } + else + two_bnd_pt_quad_touch_one_bnd_pt_quad.insert(*it_int); + } + break; + } + } + if( found ) break; + } + } + } + } + +} // end of CategorizedSourceElements::CategorizedSourceElements( GRegion *gr ) + + +// Find centroid of vertices in vector v, return in vector +std::vector<double> QtFindVertsCentroid( std::vector<MVertex*> v ) +{ + + std::vector<double> v_return; + const int v_size = v.size(); + + if( v_size != 6 && v_size != 8 && v_size != 3 && v_size != 4 ){ + Msg::Error("In QtFindVertsCentroid(), number of vertices is not 3, 4, 6, or 8."); + return v_return; + } + + // for 3D + int n_lat_tmp = 10; + if( v_size==6 ) + n_lat_tmp = 3; + else if( v_size==8 ) + n_lat_tmp = 4; + + const int n_lat = n_lat_tmp; + + double x = 0.0, y = 0.0, z = 0.0; + int v_count = 0; + for( int p = 0; p < v_size; p++){ + // skip degenerate vertices - 3D + if( ( v_size == 6 || v_size == 8 ) && p > n_lat-1 && v[p] == v[p-n_lat] ) + continue; + // skip degenerate vertices - 2D + if( ( v_size == 3 || v_size == 4 ) && v[p] == v[(p+v_size-1)%v_size] ) + continue; + v_count++; + x += v[p]->x(); y += v[p]->y(); z += v[p]->z(); + } + x /= v_count; y /= v_count; z /= v_count; + + + v_return.push_back(x); + v_return.push_back(y); + v_return.push_back(z); + + return v_return; + +} + +// Add a new vertex at the centroid of a vector of vertices (this goes into a region +// Added 2010-02-06 +MVertex* QtMakeCentroidVertex( std::vector<MVertex*> v, std::vector<MVertex*> *target, + GEntity *entity, std::set<MVertex*, MVertexLessThanLexicographic> &pos ) +{ + + int v_size = v.size(); + if( v_size != 6 && v_size != 8 && v_size != 3 && v_size != 4){ + Msg::Error("In makeCentroidVertex(), number of vertices does not equal 3, 4, 6, or 8."); + return (MVertex*)(NULL); + } + + // find the centroid of vertices + std::vector<double> centroid = QtFindVertsCentroid(v); + double x, y, z; + if( centroid.size() ){ + x = centroid[0]; + y = centroid[1]; + z = centroid[2]; + } + + // make new vertex + MVertex tmp(x, y, z, 0, -1); + std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp = pos.find(&tmp); + MVertex *v_int; + // simple check if it exists + if(itp == pos.end()){ + v_int = new MVertex(x, y, z, entity); + target->push_back(v_int); + pos.insert(v_int); + } + else + v_int = (*itp); + + return (v_int); + +} + + +// Finds the index of the lowest valued pointer in a vector of MVertex pointers +// Added 2011-03-10 +int getIndexForLowestVertexPointer( std::vector<MVertex*> v ) +{ + + int ind_low = 0; + int v_size = v.size(); + for( int i = 1; i < v_size; i++ ){ + if( v[i] < v[ind_low] ) + ind_low = i; + } + return ind_low; +} + + +// Given 4 verts on a face, find an existent diagonal, if any. +// Two possible methods: If the 'index_guess' argument is the index of the correct triangle, +// finding it is simple. If not, have to do a complete pedantic search. +// Added 2010-01-26 +std::pair<int, int> FindDiagonalEdgeIndices( std::vector<MVertex*> verts, + GFace *face, bool lateral, + unsigned int index_guess) +{ + if( verts.size() != 4 ){ + Msg::Error("FindDiagonalEdgeIndices(), size of verts array not equal 4."); + return std::pair<int,int>(0,0); + } + if( !lateral ){ + MVertex *tmp = verts[2]; verts[2] = verts[3]; verts[3] = tmp; + } + GModel *model = face->model(); + ExtrudeParams *face_ep = face->meshAttributes.extrude; + GEdge *face_source = NULL; + + int s_max = face->triangles.size(); + MElement *elem_tmp = NULL; + bool wrong_guess = false; + for( int s = 0; s < s_max; s++ ){ + if( s != 0 && !wrong_guess ){ + wrong_guess = true; + Msg::Error("FindDiagonalEdgeIndices() encountered unexpected surface configuration."); + } + int v_count0 = 0, v_count1 = 0; + elem_tmp = (MElement*)(face->triangles[(s+index_guess)%s_max]); + int num_verts = elem_tmp->getNumVertices(); + for( int g = 0; g < num_verts; g++ ){ + if( elem_tmp->getVertex(g) == verts[0] || + elem_tmp->getVertex(g) == verts[3] ) + v_count0++; + else if( elem_tmp->getVertex(g) == verts[1] || + elem_tmp->getVertex(g) == verts[2] ) + v_count1++; + if( lateral ){ + if( v_count0 > 1 ) + return std::pair<int,int> ( std::min(0,3), std::max(0,3) ); + else if( v_count1 > 1 ) + return std::pair<int,int> ( std::min(1,2), std::max(1,2) ); + } + else{ + if( v_count0 > 1 ) + return std::pair<int,int> ( std::min(0,2), std::max(0,2) ); + else if( v_count1 > 1 ) + return std::pair<int,int> ( std::min(1,3), std::max(1,3) ); + } + } + } + + Msg::Error("In FindDiagonalEdge(), could not " + "find a diagonal on surface %d.", + face->tag() ); + return std::pair<int,int>(0,0); + +} + + +// Get number of regions neighboring a face +int GetNeighborRegionsOfFace(GFace *face, std::vector<GRegion *> &neighbors) +{ + GModel *model = face->model(); + + if(!model){ + Msg::Error("GetNeighborRegionsOfFace(), face %d has no parent model.", + face->tag() ); + return 0; + } + + // first see if the face has the list of regions + int regions_count = face->numRegions(); + if( regions_count > 0 ){ + neighbors.push_back(face->getRegion(0)); + if( regions_count > 1 ) + neighbors.push_back(face->getRegion(1)); + return regions_count; + } + else + regions_count = 0; + + // pedantic search + std::vector<GRegion *> all_regions; + std::set<GRegion *, GEntityLessThan>::iterator itreg; + for( itreg = model->firstRegion(); itreg != model->lastRegion(); itreg++ ){ + std::list<GFace *> reg_faces = (*itreg)->faces(); + if( std::find( reg_faces.begin(), reg_faces.end(), face ) != + reg_faces.end() ){ + regions_count++; + face->addRegion( (*itreg) ); + neighbors.push_back( (*itreg) ); + if( regions_count >= 2 ) return regions_count; + } + } + + return regions_count; + +} + + +// Tests whether a surface is a lateral of a region +// Trevor Strickler 12/09/10 +int IsSurfaceALateralForRegion(GRegion *region, GFace *face) +{ + + // NOTE: don't necessarily require the face to be extruded! just in the position + // of lateral is all we care about here. + ExtrudeParams *ep = face->meshAttributes.extrude; + ExtrudeParams *reg_ep = region->meshAttributes.extrude; + + // if there is no REGION extrude information, skip the rest + if( !reg_ep ) + return 0; + + GModel *model = face->model(); + GEdge *face_source = NULL; + if( ep && ep->geo.Mode == EXTRUDED_ENTITY) + face_source = model->getEdgeByTag(std::abs(ep->geo.Source)); + + GFace *reg_source = model->getFaceByTag( std::abs(reg_ep->geo.Source) ); + + if(!reg_source){ + Msg::Error("In IsSurfaceALateralForRegion(), unknown source surface number %d.", + region->meshAttributes.extrude->geo.Source); + return 0; + } + + // if face is the region's source, return 0 + if( reg_source == face ) + return 0; + + // of course, the face has to belong to the region! + std::list<GFace *> region_faces = std::list<GFace *>( region->faces() ); + if( std::find( region_faces.begin(), region_faces.end(), face) == + region_faces.end() ) + return 0; + + + // if this face is a COPIED_ENTITY with source = region source face, this is the top. Exit. + if( ep && ep->geo.Mode == COPIED_ENTITY && + reg_source == model->getFaceByTag(std::abs(ep->geo.Source))) + return 0; + + // + // Now to prove the face is lateral, it must not be the "top" face. If + // this face has replaced the region's original lateral through + // ReplaceDuplicateSurfaces(), then the previous test for "topness" won't + // have signaled an error. However, this face COULD still be in the top position. + // So, check that the lateral shares AN edge (not the source edge, necessarily) with the + // region's source face. + // THEN, IF they share an edge, extrude all of the source GVertex positions and + // see if they are found in this face. IF so, then it is a top and not a lateral. + + std::list<GEdge*> region_source_edges = reg_source->edges(); + std::list<GEdge*> face_edges = face->edges(); + std::list<GEdge*>::iterator ite = face_edges.begin(); + + bool edge_found = false; + int common_count = 0; + GEdge *common_edge = NULL; + for( ite = region_source_edges.begin(); ite != region_source_edges.end(); ite++){ + if( std::find( face_edges.begin(), face_edges.end(), (*ite) ) + != face_edges.end() ){ + edge_found = true; + common_edge = (*ite); + common_count++; + if( common_count > 1 ) + return 0; + } + } + + if( !edge_found ) + return 0; + else if( reg_ep->geo.Type == ROTATE || + reg_ep->geo.Type == TRANSLATE_ROTATE ){ + // create lists of GVertex object for source face and present face + std::list<GVertex*> face_v, source_v; + face_v = face->vertices(); + source_v = reg_source->vertices(); + std::list<GVertex*>::iterator itvs; + double tol = 1.00e-12; + double eps = std::fabs( tol * CTX::instance()->lc ); + unsigned int j_top, k_top; + j_top = reg_ep->mesh.NbLayer-1; + k_top = reg_ep->mesh.NbElmLayer[j_top]; + bool found_all = true; + for( itvs = source_v.begin(); itvs != source_v.end(); itvs++ ){ + double x1 = (*itvs)->x(), y1 = (*itvs)->y(), z1 = (*itvs)->z(); + reg_ep->Extrude( j_top, k_top, x1, y1, z1 ); + std::list<GVertex*>::iterator itvf; + bool found_one = false; + for( itvf = face_v.begin(); itvf != face_v.end(); itvf++ ){ + double x2 = (*itvf)->x(), y2 = (*itvf)->y(), z2 = (*itvf)->z(); + if( std::fabs(x2-x1) <= eps && std::fabs(y2-y1) <= eps && std::fabs(z2-z1) <= eps ){ + found_one = true; + break; + } + } + if( !found_one ){ + found_all = false; + break; + } + } + // if surface is certainly the top + if( found_all ){ + return 0; + } + } + + return 1; // if code executes here, passed all tests +} + + +// Function to determine if a face is a top surface for a region. It returns 1 +// if the face is COPIED_ENTITY with source = region's source and if face belongs to region. +// Otherwise, return 0 (NOTE: ReplaceDuplicateSurfaces() can remove a top surface +// and replace it. If that happens, this will return 0. That is INTENDED for THIS function. +// Added 2010-12-13 +int IsSurfaceATopForRegion(GRegion *region, GFace *face) +{ + // first make sure there is extrude info + if( !region->meshAttributes.extrude || !face->meshAttributes.extrude ) + return 0; + + ExtrudeParams *reg_ep = region->meshAttributes.extrude; + ExtrudeParams *face_ep = face->meshAttributes.extrude; + GModel *model = face->model(); + GFace *reg_source = model->getFaceByTag( + std::abs(reg_ep->geo.Source)); + + if( reg_ep->geo.Mode != EXTRUDED_ENTITY || !reg_source) + return 0; + + if( face_ep->geo.Mode != COPIED_ENTITY || face == reg_source ) + return 0; + + GFace *face_source = model->getFaceByTag( + std::abs(face_ep->geo.Source)); + + // whether face is a copy of region's source + if( !reg_source || !face_source || reg_source != face_source ) + return 0; + + // of course, the face has to belong to the region! + std::list<GFace *> region_faces = std::list<GFace *>( region->faces() ); + if( std::find( region_faces.begin(), region_faces.end(), face) == + region_faces.end() ) + return 0; + + // if make it this far, return 1 + return 1; +} + + +// Find the bottom root source surface of an extruded surface (source of source of source, etc.) +GFace* findRootSourceFaceForFace(GFace *face) +{ + + ExtrudeParams *ep = face->meshAttributes.extrude; + if( !(ep && ep->mesh.ExtrudeMesh && ep->geo.Mode == COPIED_ENTITY ) ) + return face; + + GFace *source_face; + GModel *model = face->model(); + int max_iter = model->getNumFaces(); + int iter_counter = 0; + ExtrudeParams *ep_iter = ep; + while( iter_counter <= max_iter ){ + iter_counter++; + source_face = model->getFaceByTag( std::abs(ep_iter->geo.Source) ); + if( !source_face ){ + Msg::Error("findRootSourceFaceForFace() could not find valid surface for tag %d.", ep->geo.Source ); + return (GFace*)(NULL); + } + ep_iter = source_face->meshAttributes.extrude; + if( !( ep_iter && ep_iter->mesh.ExtrudeMesh && ep_iter->geo.Mode == COPIED_ENTITY ) ) + return source_face; + } + + Msg::Error("findRootSourceFaceForFace() failed to find root source."); + return (GFace*)(NULL); + +} + + +// Input is vert_bnd[], which describes some 2D element: vert_bnd[i] is true if +// the ith vertex the element touches a lateral edge boundary of the surface the +// element is in. +// Output is touch_bnd[]: Each element of touch_bnd[] corresponds to an edge of +// the element described by vert_bnd[]. Edge i of touch_bnd[] is formed by +// vertices i and (i+1)%element_size of the element. The value of touch_bnd[i] is non-zero +// if that edge touches a boundary edge of the surface that the element is in. +// Added 2011-03-10 +void fill_touch_bnd( int touch_bnd[], std::vector<bool> vert_bnd, int n_lat ) +{ + for(int i = 0; i < n_lat; i++ ) + touch_bnd[i] = 0; + + for(int i = 0; i < n_lat; i++ ){ + if( vert_bnd[i] ){ + touch_bnd[i] = 1; + touch_bnd[(i+n_lat-1)%n_lat] = 1; + } + } +} + + + + diff --git a/Mesh/QuadTriUtils.h b/Mesh/QuadTriUtils.h new file mode 100644 index 0000000000000000000000000000000000000000..f44a59de0111daa7df5b83ae47d9863f59a474de --- /dev/null +++ b/Mesh/QuadTriUtils.h @@ -0,0 +1,179 @@ +/************************************************************************************************** +QuadTriUtils.h + +The code in this file was written by Dr. Trevor S. Strickler. +email: <trevor.strickler@gmail.com> + +This file is part of the QuadTri contribution to Gmsh. QuadTri allows the conformal interface +of quadrangle faces to triangle faces using pyramids and other mesh elements. + +See READMEQUADTRI.txt for more information. The license information is in LICENSE.txt. + +Trevor S. Strickler hereby transfers copyright of QuadTri files to +Christophe Geuzaine and J.-F. Remacle with the understanding that +his contribution shall be cited appropriately. + +All reused or original Gmsh code is Copyright (C) 1997-2011 C. Geuzaine, J.-F. Remacle +Gmsh is available at: www.geuz.org/gmsh + +For Gmsh license information, see the LICENSE.txt file for license information. Please report all +Gmsh bugs and problems to <gmsh@geuz.org>. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License, Version 2, +as published by the Free Software Foundation, or (at your option) +any later version, with or without the exception given in the +LICENSE.txt file supplied with this code and with Gmsh. + +This program 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 General Public License for more details. + +****************************************************************************************************/ + +#if !defined(_QUADTRIUTILS_H_) +#define _QUADTRIUTILS_H_ + +#include "ExtrudeParams.h" +#include "Geo.h" +#include "GEntity.h" +#include "GFace.h" +#include "GRegion.h" +#include "GEdge.h" +#include "GModel.h" +#include "GmshDefines.h" +#include "MVertex.h" +#include "Context.h" +#include "GModel.h" +#include "meshGFace.h" +#include "MLine.h" +#include "MTriangle.h" +#include "MQuadrangle.h" +#include "MTetrahedron.h" +#include "MPyramid.h" +#include "MPrism.h" +#include "MHexahedron.h" +#include "Numeric.h" +#include <map> +#include <math.h> + + +// CategorizedSourceElements: This is a data structure to hold categorized source element info for extruded regions. +// In addition to the region and source face pointers, there are sets and a vector that are set by the constructor. +// All containers except for the bool vectors contain indices to the source face's vectors of mesh elements: +// +// three_bnd_pt_tri : triangle vector indices for triangles with three vertices on a surface boundary edge +// four_bnd_pt_quad : quadrangle vector indices for quads with four vertices on a surface boundary edge +// other_bnd_pt_tri, other_bnd_pt_quad : vector indices of the respective elements that have some +// but not all vertices on a boundary edge. +// internal_quad_touch_one_bnd_pt_quad : quad vector indices of quads that share a vertex with a +// one boundary point quad. +// internal_tri_touch_one_bnd_pt_quad : triangle vector indices of triangles that share a vertex with a +// one boundary point quad. +// two_pt_bnd_quad_touch_one_bnd_pt_quad : set of indices to quads with two points on a boundary that also touch quads +// with one point on a boundary. +// internal_tri, internal_quad : The indices for the internal elements that don't touch a boundary... +// NOTE: These DO include the internal_[tri,quad]_touch_one_bnd_pt_quad elements. +// +// The vectors: +// +// tri_bool, quad_bool : These vectors hold bits to tell which vertices in which elements are on the boundary, OR +// in the case of the [*]_touch_one_bnd_pt_quad elements, what vertex is the non-boundary 'pivot' vertex shared +// with a quad having one point on a boundary (diagonals are drawn to the pivot vertex in the single layer quadToTri +// method). +// Format: In tri_bool, there are 4*(number of triangles) elements. Each source triangle of index i has +// four consecutive bool in tri_bool, beginning at i*4. The first bool is true if the triangle touches an edge +// boundary (or touches a one boundary point quad). The other bools correspond to triangle vertices, in order +// of appearance in the triangle's own vertex vector, and are true if the corresponding vertex is on the boundary. +// Everything about tri_bool applies to quad_bool, but there are 5 bool per quad, accessed starting at i*5. +// + +struct CategorizedSourceElements{ + public: + GRegion *region; + GFace *source_face; + bool valid; + std::set<unsigned int> three_bnd_pt_tri, four_bnd_pt_quad, + other_bnd_tri, other_bnd_quad; + std::set<unsigned int> internal_tri_touch_one_bnd_pt_quad, + internal_quad_touch_one_bnd_pt_quad, + two_bnd_pt_quad_touch_one_bnd_pt_quad; + + std::set<unsigned int> internal_tri, internal_quad; + std::vector<bool> tri_bool, quad_bool; + // constructor + CategorizedSourceElements( GRegion *gr ); +}; + + +// This is a member function for the element map in ExtrudeParams. +// This allows insertion of a whole vector at once. +/*void ExtrudeParams:: +ExtrusionElementMap::addExtrudedElemVector(MElement* source, std::vector<MElement*> *extrudedVector ); +*/ + +// Insert all vertices on a region's source edge, including corners, +// into pos_src_edge set. +// Added 2010-01-09 +void QuadToTriInsertSourceEdgeVertices(GRegion *gr, + std::set<MVertex*, MVertexLessThanLexicographic> &pos_src_edge); + +// Insert all vertices on a faces edges, including corners, +// into pos_edges set. +// Added 2010-01-18 +void QuadToTriInsertFaceEdgeVertices(GFace *face, + std::set<MVertex*, MVertexLessThanLexicographic> &pos_edges); + +// Find centroid of vertices in vector v, return in vector +std::vector<double> QtFindVertsCentroid( std::vector<MVertex*> v ); + +// Add a new vertex at the centroid of a vector of vertices (this goes into a region +// Added 2010-02-06 +MVertex* QtMakeCentroidVertex( std::vector<MVertex*> v, std::vector<MVertex*> *target, + GEntity *entity, std::set<MVertex*, MVertexLessThanLexicographic> &pos ); + +// Finds the index of the lowest valued pointer in a vector of MVertex pointers +// Added 2011-03-10 +int getIndexForLowestVertexPointer( std::vector<MVertex*> v ); + + +// Given 4 verts on a face, find an existent diagonal, if any. +// Two possible methods: If the 'index_guess' argument is the index of the correct triangle, +// finding it is simple. If not, have to do a complete pedantic search. +// Added 2010-01-26 +std::pair<int, int> FindDiagonalEdgeIndices( std::vector<MVertex*> verts, GFace *face, bool lateral, + unsigned int index_guess = 0 ); + +// Get number of regions neighboring a face +int GetNeighborRegionsOfFace(GFace *face, std::vector<GRegion *> &neighbors); + +// Tests whether a surface is a lateral of a region +// Added 12/09/10 +int IsSurfaceALateralForRegion(GRegion *region, GFace *face); + + +// Function to determine if a face is a top surface for a region. It returns 1 +// if the face is COPIED_ENTITY with source = region's source and if face belongs to region. +// Otherwise, return 0 (NOTE: ReplaceDuplicateSurfaces() can remove a top surface +// and replace it. If that happens, this will return 0. That is INTENDED for THIS function. +// Added 2010-12-13 +int IsSurfaceATopForRegion(GRegion *region, GFace *face); + + +// Find the bottom root source surface of an extruded surface (source of source of source, etc.) +GFace* findRootSourceFaceForFace(GFace *face); + + +// Input is vert_bnd[], which describes some 2D element: vert_bnd[i] is true if +// the ith vertex the element touches a lateral edge boundary of the surface the +// element is in. +// Output is touch_bnd[]: Each element of touch_bnd[] corresponds to an edge of +// the element described by vert_bnd[]. Edge i of touch_bnd[] is formed by +// vertices i and (i+1)%element_size of the element. The value of touch_bnd[i] is non-zero +// if that edge touches a boundary edge of the surface that the element is in. +// Added 2011-03-10 +void fill_touch_bnd( int touch_bnd[], std::vector<bool> vert_bnd, int n_lat ); + + +#endif diff --git a/Mesh/meshGFaceExtruded.cpp b/Mesh/meshGFaceExtruded.cpp index 461f4827c97b934c8479c1af6173fc35ee0de77b..65b22794cc9a294b870e3f5f22f7a2de9aadfffd 100644 --- a/Mesh/meshGFaceExtruded.cpp +++ b/Mesh/meshGFaceExtruded.cpp @@ -11,6 +11,7 @@ #include "ExtrudeParams.h" #include "Context.h" #include "GmshMessage.h" +#include "QuadTriExtruded2D.h" static void addTriangle(MVertex* v1, MVertex* v2, MVertex* v3, GFace *to) @@ -26,7 +27,7 @@ static void addQuadrangle(MVertex* v1, MVertex* v2, MVertex* v3, MVertex* v4, static void createQuaTri(std::vector<MVertex*> &v, GFace *to, std::set<std::pair<MVertex*, MVertex*> > *constrainedEdges, - MLine* source) + MLine* source, int tri_quad_flag) { ExtrudeParams *ep = to->meshAttributes.extrude; if(v[0] == v[1] || v[1] == v[3]) @@ -36,7 +37,8 @@ static void createQuaTri(std::vector<MVertex*> &v, GFace *to, else if(v[0] == v[3] || v[1] == v[2]) Msg::Error("Uncoherent extruded quadrangle in surface %d", to->tag()); else{ - if(ep->mesh.Recombine){ + // Trevor Strickler added the tri_quad_flag stuff here. + if(ep->mesh.Recombine && tri_quad_flag != 2 || tri_quad_flag == 1){ addQuadrangle(v[0], v[1], v[3], v[2], to); } else if(!constrainedEdges){ @@ -86,6 +88,18 @@ static void extrudeMesh(GEdge *from, GFace *to, } } + // figure out whether to recombine this surface or not in the event + // of quadToTri region neighbors (if QuadToTri, tri_quad_flag is an + // int flag that lets createQuadTri() override the surface's + // intrinsic ep->mesh.Recombine flag. tri_quad_flag values: 0 = no + // override, 1 = mesh with quads, 2 = mesh with triangles.) + bool detectQuadToTriLateral = false; + int tri_quad_flag = 0; + bool quadToTri_valid = IsValidQuadToTriLateral(to, &tri_quad_flag, &detectQuadToTriLateral); + if(detectQuadToTriLateral && !quadToTri_valid) + Msg::Error("In MeshGFaceExtrudedSurface::extrudeMesh(), Mesh of QuadToTri Lateral surface %d " + "likely has errors.", to->tag()); + // create elements (note that it would be faster to access the // *interior* nodes by direct indexing, but it's just simpler to // query everything by position) @@ -117,7 +131,7 @@ static void extrudeMesh(GEdge *from, GFace *to, } verts.push_back(*itp); } - createQuaTri(verts, to, constrainedEdges,from->lines[i]); + createQuaTri(verts, to, constrainedEdges,from->lines[i], tri_quad_flag); } } } @@ -162,6 +176,24 @@ static void copyMesh(GFace *from, GFace *to, } addTriangle(verts[0], verts[1], verts[2], to); } + + // if performing QuadToTri mesh, cannot simply copy the mesh from + // the source. The vertices and triangles can be copied directly + // though. First, of course, do some checks and make sure this is a + // valid QuadToTri top surface before engaging in QuadToTri meshing. + int quadToTri= NO_QUADTRI; + bool detectQuadToTriTop = false; + bool quadToTri_valid = IsValidQuadToTriTop(to, &quadToTri, &detectQuadToTriTop); + if(detectQuadToTriTop){ + if(!quadToTri_valid) + Msg::Error("In MeshGFaceExtrudedSurface::copyMesh(), Mesh of QuadToTri top surface %d " + "likely has errors.", to->tag()); + if(!MeshQuadToTriTopSurface(from, to, pos)) + Msg::Error("In MeshExtrudedSurface()::copyMesh(), mesh of QuadToTri top surface %d failed.", + to->tag() ); + return; + } + for(unsigned int i = 0; i < from->quadrangles.size(); i++){ std::vector<MVertex*> verts; for(int j = 0; j < 4; j++){ diff --git a/Mesh/meshGRegionExtruded.cpp b/Mesh/meshGRegionExtruded.cpp index 664f435b3d302d42556562bfab1e8ed957b7083f..7c61b7514bfce859ae57f80d594cf3d05cd08ef0 100644 --- a/Mesh/meshGRegionExtruded.cpp +++ b/Mesh/meshGRegionExtruded.cpp @@ -16,6 +16,7 @@ #include "meshGRegion.h" #include "Context.h" #include "GmshMessage.h" +#include "QuadTriExtruded3D.h" static void addTetrahedron(MVertex* v1, MVertex* v2, MVertex* v3, MVertex* v4, GRegion *to) @@ -159,6 +160,11 @@ static void extrudeMesh(GFace *from, GRegion *to, } } + if(ep && ep->mesh.ExtrudeMesh && ep->mesh.QuadToTri && ep->mesh.Recombine){ + meshQuadToTriRegion(to, pos); + return; + } + // create elements (note that it would be faster to access the // *interior* nodes by direct indexing, but it's just simpler to // query everything by position) @@ -442,8 +448,10 @@ static void phase3(GRegion *gr, int SubdivideExtrudedMesh(GModel *m) { - // get all non-recombined extruded regions and vertices - std::vector<GRegion*> regions; + // get all non-recombined extruded regions and vertices; also, + // create a vector of quadToTri regions that have NOT been meshed + // yet + std::vector<GRegion*> regions, regions_quadToTri; double old_tol = MVertexLessThanLexicographic::tolerance; MVertexLessThanLexicographic::tolerance = 1.e-12 * CTX::instance()->lc; std::set<MVertex*, MVertexLessThanLexicographic> pos; @@ -454,6 +462,11 @@ int SubdivideExtrudedMesh(GModel *m) regions.push_back(*it); insertAllVertices(*it, pos); } + // create vector of valid quadToTri regions...not all will necessarily be meshed here. + if(ep && ep->mesh.ExtrudeMesh && ep->geo.Mode == EXTRUDED_ENTITY && + ep->mesh.Recombine && ep->mesh.QuadToTri){ + regions_quadToTri.push_back(*it); + } } if(regions.empty()) return 0; @@ -517,6 +530,20 @@ int SubdivideExtrudedMesh(GModel *m) } } + // now mesh the QuadToTri regions. Everything can be done locally + // for each quadToTri region, but still use edge set from above just + // to make sure laterals get remeshed properly ( + // QuadToTriEdgeGenerator detects if the neighbor has been meshed or + // if a lateral surface should remain static for any other reason). + // If this function detects allNonGlobalSharedLaterals, it won't + // mesh the region (should already be done in ExtrudeMesh). + for(unsigned int i = 0; i < regions_quadToTri.size(); i++){ + GRegion *gr = regions_quadToTri[i]; + std::set<MVertex*, MVertexLessThanLexicographic> pos_local; + insertAllVertices(gr, pos_local); + meshQuadToTriRegionAfterGlobalSubdivide(gr, &edges, pos_local); + } + // carve holes if any // TODO: update extrusion information for(unsigned int i = 0; i < regions.size(); i++){ @@ -528,6 +555,15 @@ int SubdivideExtrudedMesh(GModel *m) carveHole(gr, it->first, it->second.first, it->second.second); } } + for(unsigned int i = 0; i < regions_quadToTri.size(); i++){ + GRegion *gr = regions_quadToTri[i]; + ExtrudeParams *ep = gr->meshAttributes.extrude; + if(ep->mesh.Holes.size()){ + std::map<int, std::pair<double, std::vector<int> > >::iterator it; + for(it = ep->mesh.Holes.begin(); it != ep->mesh.Holes.end(); it++) + carveHole(gr, it->first, it->second.first, it->second.second); + } + } MVertexLessThanLexicographic::tolerance = old_tol; return 1; diff --git a/Mesh/meshGRegionTransfinite.cpp b/Mesh/meshGRegionTransfinite.cpp index 8152dc031cd8d87a7895193973aaa67f02250db1..848cd32862004daa3f922d5e8314daed01f4bd54 100644 --- a/Mesh/meshGRegionTransfinite.cpp +++ b/Mesh/meshGRegionTransfinite.cpp @@ -2,6 +2,10 @@ // // See the LICENSE.txt file for license information. Please report all // bugs and problems to <gmsh@geuz.org>. +// +// Contributor(s): +// Trevor S. Strickler +// #include <map> #include "meshGFace.h" @@ -13,6 +17,7 @@ #include "MPrism.h" #include "Context.h" #include "GmshMessage.h" +#include "QuadTriTransfinite3D.h" /* Transfinite volume meshes @@ -450,10 +455,45 @@ int MeshTransfiniteVolume(GRegion *gr) // create elements + // for QuadTri, get external boundary diagonals for element + // subdivision purposes + std::set< std::pair<MVertex*, MVertex*> > boundary_diags; + if(gr->meshAttributes.QuadTri){ + if(!getTransfiniteBoundaryDiags( gr, &boundary_diags)){ + Msg::Error("In MeshTransfiniteVolume(), getTransfiniteBoundaryDiags() failed. " + "Aborting mesh of region %d.", gr->tag()); + return 0; + } + } + if(faces.size() == 6) { for(int i = 0; i < N_i - 1; i++) { for(int j = 0; j < N_j - 1; j++) { for(int k = 0; k < N_k - 1; k++) { + if(gr->meshAttributes.QuadTri){ + // create vertex array + std::vector<MVertex*> verts; + verts.resize(8); + verts[0] = tab[i][j][k]; verts[1] = tab[i+1][j][k]; + verts[2] = tab[i+1][j+1][k]; verts[3] = tab[i][j+1][k]; + verts[4] = tab[i][j][k+1]; verts[5] = tab[i+1][j][k+1]; + verts[6] = tab[i+1][j+1][k+1]; verts[7] = tab[i][j+1][k+1]; + if(!orientedFaces[3].recombined() && i == 0 || + !orientedFaces[1].recombined() && i == N_i-2 || + !orientedFaces[0].recombined() && j == 0 || + !orientedFaces[2].recombined() && j == N_j-2 || + !orientedFaces[4].recombined() && k == 0 || + !orientedFaces[5].recombined() && k == N_k-2 ){ + // make subdivided element + meshTransfElemWithInternalVertex(gr, verts, &boundary_diags); + } + // if not adjacent to unrecombined edge + else + gr->hexahedra.push_back(new MHexahedron(verts[0], verts[1], verts[2], verts[3], + verts[4], verts[5], verts[6], verts[7])); + // continue, skipping the rest which is for non-divided elements + continue; + } if(orientedFaces[0].recombined() && orientedFaces[1].recombined() && orientedFaces[2].recombined() && orientedFaces[3].recombined() && orientedFaces[4].recombined() && orientedFaces[5].recombined()) { @@ -518,6 +558,25 @@ int MeshTransfiniteVolume(GRegion *gr) else if(faces.size() == 5) { for(int j = 0; j < N_j - 1; j++) { for(int k = 0; k < N_k - 1; k++) { + if(gr->meshAttributes.QuadTri){ + // create vertex array + std::vector<MVertex*> verts; + verts.resize(6); + verts[0] = tab[0][j][k]; verts[1] = tab[1][j][k]; + verts[2] = tab[1][j+1][k]; verts[3] = tab[0][j][k+1]; + verts[4] = tab[1][j][k+1]; verts[5] = tab[1][j+1][k+1]; + if(!orientedFaces[0].recombined() && j == 0 || + !orientedFaces[2].recombined() && j == N_j-2 || + !orientedFaces[4].recombined() && k == 0 || + !orientedFaces[5].recombined() && k == N_k-2 ){ + // make subdivided element + meshTransfElemWithInternalVertex(gr, verts, &boundary_diags); + } + else + gr->prisms.push_back(new MPrism( verts[0], verts[1], verts[2], verts[3], verts[4], verts[5])); + // continue, skipping the rest which is for non-divided elements + continue; + } if((orientedFaces[0].recombined() && orientedFaces[1].recombined() && orientedFaces[2].recombined() && orientedFaces[4].recombined() && orientedFaces[5].recombined()) || @@ -556,6 +615,28 @@ int MeshTransfiniteVolume(GRegion *gr) for(int i = 1; i < N_i - 1; i++) { for(int j = 0; j < N_j - 1; j++) { for(int k = 0; k < N_k - 1; k++) { + if(gr->meshAttributes.QuadTri){ + // create vertex array + std::vector<MVertex*> verts; + verts.resize(8); + verts[0] = tab[i][j][k]; verts[1] = tab[i+1][j][k]; + verts[2] = tab[i+1][j+1][k]; verts[3] = tab[i][j+1][k]; + verts[4] = tab[i][j][k+1]; verts[5] = tab[i+1][j][k+1]; + verts[6] = tab[i+1][j+1][k+1]; verts[7] = tab[i][j+1][k+1]; + if(!orientedFaces[1].recombined() && i == N_i-2 || + !orientedFaces[0].recombined() && j == 0 || + !orientedFaces[2].recombined() && j == N_j-2 || + !orientedFaces[4].recombined() && k == 0 || + !orientedFaces[5].recombined() && k == N_k-2 ){ + // make subdivided element + meshTransfElemWithInternalVertex(gr, verts, &boundary_diags); + } + else + gr->hexahedra.push_back(new MHexahedron(verts[0], verts[1], verts[2], verts[3], + verts[4], verts[5], verts[6], verts[7])); + // continue, skipping the rest which is for non-divided elements + continue; + } if(orientedFaces[0].recombined() && orientedFaces[1].recombined() && orientedFaces[2].recombined() && orientedFaces[4].recombined() && orientedFaces[5].recombined()) { diff --git a/Parser/Gmsh.l b/Parser/Gmsh.l index 6da4bb9c9d71ba568603d0643342f5a5e6c9c566..984cf7be5370fd805c77d67b3609f3d1d1172e53 100644 --- a/Parser/Gmsh.l +++ b/Parser/Gmsh.l @@ -181,7 +181,11 @@ PolarSphere return tPolarSphere; Printf return tPrintf; Plugin return tPlugin; +Quad[tT]ri[dD]bl return tQuadTriDbl; +Quad[tT]ri[sS]ngl return tQuadTriSngl; + Recombine return tRecombine; +Recomb[lL]aterals return tRecombLaterals; Rotate return tRotate; Ruled return tRuled; Rand return tRand; @@ -208,6 +212,7 @@ T2 return tText2D; T3 return tText3D; TIME return tTime; Transfinite return tTransfinite; +Transf[qQ]uad[tT]ri return tTransfQuadTri; Translate return tTranslate; Tanh return tTanh; Tan return tTan; diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 0ef63ce07b661d84c57544358e760d951c611728..bc5475d01782ded7905e86de7694edb9419e7f30 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -276,53 +276,57 @@ fullMatrix<double> ListOfListOfDouble2Matrix(List_T *list); tHole = 340, tAlias = 341, tAliasWithOptions = 342, - tText2D = 343, - tText3D = 344, - tInterpolationScheme = 345, - tTime = 346, - tCombine = 347, - tBSpline = 348, - tBezier = 349, - tNurbs = 350, - tNurbsOrder = 351, - tNurbsKnots = 352, - tColor = 353, - tColorTable = 354, - tFor = 355, - tIn = 356, - tEndFor = 357, - tIf = 358, - tEndIf = 359, - tExit = 360, - tField = 361, - tReturn = 362, - tCall = 363, - tFunction = 364, - tShow = 365, - tHide = 366, - tGetValue = 367, - tGetEnv = 368, - tGetString = 369, - tGMSH_MAJOR_VERSION = 370, - tGMSH_MINOR_VERSION = 371, - tGMSH_PATCH_VERSION = 372, - tHomRank = 373, - tHomGen = 374, - tHomCut = 375, - tHomSeq = 376, - tAFFECTDIVIDE = 377, - tAFFECTTIMES = 378, - tAFFECTMINUS = 379, - tAFFECTPLUS = 380, - tOR = 381, - tAND = 382, - tNOTEQUAL = 383, - tEQUAL = 384, - tGREATEROREQUAL = 385, - tLESSOREQUAL = 386, - UNARYPREC = 387, - tMINUSMINUS = 388, - tPLUSPLUS = 389 + tQuadTriDbl = 343, + tQuadTriSngl = 344, + tRecombLaterals = 345, + tTransfQuadTri = 346, + tText2D = 347, + tText3D = 348, + tInterpolationScheme = 349, + tTime = 350, + tCombine = 351, + tBSpline = 352, + tBezier = 353, + tNurbs = 354, + tNurbsOrder = 355, + tNurbsKnots = 356, + tColor = 357, + tColorTable = 358, + tFor = 359, + tIn = 360, + tEndFor = 361, + tIf = 362, + tEndIf = 363, + tExit = 364, + tField = 365, + tReturn = 366, + tCall = 367, + tFunction = 368, + tShow = 369, + tHide = 370, + tGetValue = 371, + tGetEnv = 372, + tGetString = 373, + tGMSH_MAJOR_VERSION = 374, + tGMSH_MINOR_VERSION = 375, + tGMSH_PATCH_VERSION = 376, + tHomRank = 377, + tHomGen = 378, + tHomCut = 379, + tHomSeq = 380, + tAFFECTDIVIDE = 381, + tAFFECTTIMES = 382, + tAFFECTMINUS = 383, + tAFFECTPLUS = 384, + tOR = 385, + tAND = 386, + tNOTEQUAL = 387, + tEQUAL = 388, + tGREATEROREQUAL = 389, + tLESSOREQUAL = 390, + UNARYPREC = 391, + tMINUSMINUS = 392, + tPLUSPLUS = 393 }; #endif @@ -346,7 +350,7 @@ typedef union YYSTYPE /* Line 214 of yacc.c */ -#line 350 "Gmsh.tab.cpp" +#line 354 "Gmsh.tab.cpp" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -358,7 +362,7 @@ typedef union YYSTYPE /* Line 264 of yacc.c */ -#line 362 "Gmsh.tab.cpp" +#line 366 "Gmsh.tab.cpp" #ifdef short # undef short @@ -573,20 +577,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 7125 +#define YYLAST 7169 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 155 +#define YYNTOKENS 159 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 81 /* YYNRULES -- Number of rules. */ -#define YYNRULES 394 +#define YYNRULES 399 /* YYNRULES -- Number of states. */ -#define YYNSTATES 1411 +#define YYNSTATES 1422 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 389 +#define YYMAXUTOK 393 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -597,16 +601,16 @@ static const yytype_uint8 yytranslate[] = 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 140, 2, 150, 2, 139, 2, 2, - 145, 146, 137, 135, 151, 136, 149, 138, 2, 2, + 2, 2, 2, 144, 2, 154, 2, 143, 2, 2, + 149, 150, 141, 139, 155, 140, 153, 142, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 131, 2, 132, 126, 2, 2, 2, 2, 2, 2, + 135, 2, 136, 130, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 147, 2, 148, 144, 2, 2, 2, 2, 2, + 2, 151, 2, 152, 148, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 152, 2, 153, 154, 2, 2, 2, + 2, 2, 2, 156, 2, 157, 158, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -632,7 +636,8 @@ static const yytype_uint8 yytranslate[] = 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 127, 128, 129, 130, 133, 134, 141, 142, 143 + 125, 126, 127, 128, 129, 131, 132, 133, 134, 137, + 138, 145, 146, 147 }; #if YYDEBUG @@ -663,302 +668,304 @@ static const yytype_uint16 yyprhs[] = 1201, 1214, 1227, 1242, 1257, 1272, 1273, 1286, 1287, 1300, 1301, 1314, 1315, 1332, 1333, 1350, 1351, 1368, 1369, 1388, 1389, 1408, 1409, 1428, 1430, 1433, 1439, 1447, 1457, 1460, - 1470, 1477, 1478, 1482, 1483, 1485, 1486, 1489, 1490, 1493, - 1501, 1508, 1517, 1523, 1529, 1536, 1543, 1556, 1567, 1578, - 1589, 1600, 1603, 1607, 1614, 1626, 1638, 1650, 1662, 1664, - 1668, 1671, 1674, 1677, 1681, 1685, 1689, 1693, 1697, 1701, - 1705, 1709, 1713, 1717, 1721, 1725, 1729, 1733, 1739, 1744, - 1749, 1754, 1759, 1764, 1769, 1774, 1779, 1784, 1789, 1796, - 1801, 1806, 1811, 1816, 1821, 1826, 1833, 1840, 1847, 1852, - 1857, 1862, 1867, 1872, 1877, 1882, 1887, 1892, 1897, 1902, - 1909, 1914, 1919, 1924, 1929, 1934, 1939, 1946, 1953, 1960, - 1965, 1967, 1969, 1971, 1973, 1975, 1977, 1979, 1981, 1987, - 1992, 1997, 2000, 2006, 2010, 2017, 2022, 2030, 2037, 2039, - 2042, 2045, 2049, 2053, 2065, 2075, 2083, 2091, 2093, 2097, - 2099, 2101, 2104, 2108, 2113, 2119, 2121, 2123, 2126, 2130, - 2134, 2140, 2145, 2148, 2151, 2154, 2157, 2159, 2161, 2165, - 2172, 2174, 2176, 2180, 2184, 2194, 2202, 2204, 2210, 2214, - 2221, 2223, 2227, 2229, 2231, 2235, 2242, 2244, 2246, 2251, - 2258, 2265, 2270, 2275, 2280 + 1463, 1467, 1470, 1474, 1484, 1491, 1492, 1496, 1497, 1499, + 1500, 1503, 1504, 1507, 1515, 1522, 1531, 1537, 1541, 1547, + 1554, 1561, 1574, 1585, 1596, 1607, 1618, 1621, 1625, 1632, + 1644, 1656, 1668, 1680, 1682, 1686, 1689, 1692, 1695, 1699, + 1703, 1707, 1711, 1715, 1719, 1723, 1727, 1731, 1735, 1739, + 1743, 1747, 1751, 1757, 1762, 1767, 1772, 1777, 1782, 1787, + 1792, 1797, 1802, 1807, 1814, 1819, 1824, 1829, 1834, 1839, + 1844, 1851, 1858, 1865, 1870, 1875, 1880, 1885, 1890, 1895, + 1900, 1905, 1910, 1915, 1920, 1927, 1932, 1937, 1942, 1947, + 1952, 1957, 1964, 1971, 1978, 1983, 1985, 1987, 1989, 1991, + 1993, 1995, 1997, 1999, 2005, 2010, 2015, 2018, 2024, 2028, + 2035, 2040, 2048, 2055, 2057, 2060, 2063, 2067, 2071, 2083, + 2093, 2101, 2109, 2111, 2115, 2117, 2119, 2122, 2126, 2131, + 2137, 2139, 2141, 2144, 2148, 2152, 2158, 2163, 2166, 2169, + 2172, 2175, 2177, 2179, 2183, 2190, 2192, 2194, 2198, 2202, + 2212, 2220, 2222, 2228, 2232, 2239, 2241, 2245, 2247, 2249, + 2253, 2260, 2262, 2264, 2269, 2276, 2283, 2288, 2293, 2298 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 156, 0, -1, 157, -1, 1, 6, -1, -1, 157, - 158, -1, 161, -1, 160, -1, 179, -1, 183, -1, - 188, -1, 192, -1, 193, -1, 194, -1, 197, -1, - 217, -1, 218, -1, 219, -1, 220, -1, 196, -1, - 195, -1, 191, -1, 221, -1, 132, -1, 132, 132, - -1, 35, 145, 5, 146, 6, -1, 35, 145, 5, - 146, 159, 234, 6, -1, 35, 145, 5, 151, 230, - 146, 6, -1, 35, 145, 5, 151, 230, 146, 159, - 234, 6, -1, 4, 5, 152, 162, 153, 6, -1, - 86, 4, 147, 222, 148, 6, -1, 87, 4, 147, - 222, 148, 6, -1, -1, 162, 165, -1, 162, 169, - -1, 162, 172, -1, 162, 174, -1, 162, 175, -1, - 222, -1, 163, 151, 222, -1, 222, -1, 164, 151, - 222, -1, -1, -1, 4, 166, 145, 163, 146, 167, - 152, 164, 153, 6, -1, 234, -1, 168, 151, 234, - -1, -1, 88, 145, 222, 151, 222, 151, 222, 146, - 170, 152, 168, 153, 6, -1, 234, -1, 171, 151, - 234, -1, -1, 89, 145, 222, 151, 222, 151, 222, - 151, 222, 146, 173, 152, 171, 153, 6, -1, 90, - 152, 226, 153, 152, 226, 153, 6, -1, 90, 152, - 226, 153, 152, 226, 153, 152, 226, 153, 152, 226, - 153, 6, -1, -1, 91, 176, 152, 164, 153, 6, - -1, 7, -1, 125, -1, 124, -1, 123, -1, 122, - -1, 143, -1, 142, -1, 4, 177, 222, 6, -1, - 4, 147, 222, 148, 177, 222, 6, -1, 4, 147, - 152, 230, 153, 148, 177, 227, 6, -1, 4, 147, - 148, 7, 227, 6, -1, 4, 147, 148, 125, 227, - 6, -1, 4, 178, 6, -1, 4, 147, 222, 148, - 178, 6, -1, 4, 7, 235, 6, -1, 4, 149, - 4, 7, 235, 6, -1, 4, 147, 222, 148, 149, - 4, 7, 235, 6, -1, 4, 149, 4, 177, 222, - 6, -1, 4, 147, 222, 148, 149, 4, 177, 222, - 6, -1, 4, 149, 4, 178, 6, -1, 4, 147, - 222, 148, 149, 4, 178, 6, -1, 4, 149, 98, - 149, 4, 7, 231, 6, -1, 4, 147, 222, 148, - 149, 98, 149, 4, 7, 231, 6, -1, 4, 149, - 99, 7, 232, 6, -1, 4, 147, 222, 148, 149, - 99, 7, 232, 6, -1, 4, 106, 7, 222, 6, - -1, 106, 147, 222, 148, 7, 4, 6, -1, 106, - 147, 222, 148, 149, 4, 7, 222, 6, -1, 106, - 147, 222, 148, 149, 4, 7, 235, 6, -1, 106, - 147, 222, 148, 149, 4, 7, 152, 230, 153, 6, - -1, 69, 145, 4, 146, 149, 4, 7, 222, 6, - -1, 69, 145, 4, 146, 149, 4, 7, 235, 6, - -1, 222, -1, 235, -1, -1, 101, 51, 152, 222, - 153, -1, -1, 61, 224, -1, 47, 145, 222, 146, - 7, 224, 6, -1, -1, 65, 47, 184, 145, 180, - 146, 7, 227, 6, -1, 56, 57, 227, 7, 222, - 6, -1, 50, 145, 222, 146, 7, 227, 6, -1, - 70, 50, 227, 6, -1, 54, 145, 222, 146, 7, - 227, 6, -1, 48, 145, 222, 146, 7, 227, 182, - 6, -1, 49, 145, 222, 146, 7, 227, 182, 6, - -1, 93, 145, 222, 146, 7, 227, 6, -1, 94, - 145, 222, 146, 7, 227, 6, -1, 95, 145, 222, - 146, 7, 227, 97, 227, 96, 222, 6, -1, 50, - 77, 145, 222, 146, 7, 227, 6, -1, 66, 50, - 145, 222, 146, 7, 227, 6, -1, -1, 65, 50, - 185, 145, 180, 146, 7, 227, 6, -1, 61, 53, - 145, 222, 146, 7, 227, 6, -1, 62, 53, 145, - 222, 146, 7, 227, 181, 6, -1, 12, 13, 6, - -1, 13, 53, 222, 6, -1, 58, 53, 145, 222, - 146, 7, 5, 5, 5, 6, -1, 51, 145, 222, - 146, 7, 227, 6, -1, 52, 145, 222, 146, 7, - 227, 6, -1, 53, 77, 145, 222, 146, 7, 227, - 6, -1, 66, 53, 145, 222, 146, 7, 227, 6, - -1, 66, 53, 145, 222, 146, 7, 227, 4, 152, - 226, 153, 6, -1, -1, 65, 53, 186, 145, 180, - 146, 7, 227, 6, -1, 64, 55, 145, 222, 146, - 7, 227, 6, -1, 55, 145, 222, 146, 7, 227, - 6, -1, 66, 55, 145, 222, 146, 7, 227, 6, - -1, -1, 65, 55, 187, 145, 180, 146, 7, 227, - 6, -1, 72, 224, 152, 189, 153, -1, 71, 152, - 224, 151, 224, 151, 222, 153, 152, 189, 153, -1, - 73, 224, 152, 189, 153, -1, 74, 152, 224, 151, - 222, 153, 152, 189, 153, -1, 4, 152, 189, 153, - -1, 83, 50, 152, 230, 153, 53, 152, 222, 153, - -1, 80, 50, 145, 222, 146, 152, 230, 153, 6, - -1, 190, -1, 188, -1, -1, 190, 183, -1, 190, - 47, 152, 230, 153, 6, -1, 190, 50, 152, 230, - 153, 6, -1, 190, 53, 152, 230, 153, 6, -1, - 190, 55, 152, 230, 153, 6, -1, 76, 61, 145, - 222, 146, 7, 227, 6, -1, 76, 61, 145, 222, - 146, 7, 152, 224, 151, 224, 151, 230, 153, 6, - -1, 76, 61, 145, 222, 146, 7, 152, 224, 151, - 224, 151, 224, 151, 230, 153, 6, -1, 76, 51, - 145, 222, 146, 7, 152, 224, 151, 230, 153, 6, - -1, 76, 4, 145, 222, 146, 7, 227, 6, -1, - 76, 4, 145, 222, 146, 7, 5, 6, -1, 76, - 4, 152, 222, 153, 6, -1, 76, 4, 145, 222, - 146, 7, 152, 224, 151, 224, 151, 230, 153, 6, - -1, 81, 152, 190, 153, -1, 81, 106, 147, 222, - 148, 6, -1, 81, 4, 147, 222, 148, 6, -1, - 81, 4, 6, -1, 81, 4, 4, 6, -1, 98, - 231, 152, 190, 153, -1, 110, 5, 6, -1, 111, - 5, 6, -1, 110, 152, 190, 153, -1, 111, 152, - 190, 153, -1, 4, 235, 6, -1, 4, 4, 147, - 222, 148, 234, 6, -1, 4, 4, 4, 147, 222, - 148, 6, -1, 4, 222, 6, -1, 69, 145, 4, - 146, 149, 4, 6, -1, 92, 4, 6, -1, 105, - 6, -1, 43, 6, -1, 40, 6, -1, 40, 152, - 222, 151, 222, 151, 222, 151, 222, 151, 222, 151, - 222, 153, 6, -1, 41, 6, -1, 44, 6, -1, - 45, 6, -1, 60, 6, -1, 100, 145, 222, 8, - 222, 146, -1, 100, 145, 222, 8, 222, 8, 222, - 146, -1, 100, 4, 101, 152, 222, 8, 222, 153, - -1, 100, 4, 101, 152, 222, 8, 222, 8, 222, - 153, -1, 102, -1, 109, 4, -1, 107, -1, 108, - 4, 6, -1, 103, 145, 222, 146, -1, 104, -1, - 75, 224, 152, 190, 153, -1, 75, 152, 224, 151, - 224, 151, 222, 153, 152, 190, 153, -1, 75, 152, - 224, 151, 224, 151, 224, 151, 222, 153, 152, 190, - 153, -1, -1, 75, 224, 152, 190, 198, 211, 153, - -1, -1, 75, 152, 224, 151, 224, 151, 222, 153, - 152, 190, 199, 211, 153, -1, -1, 75, 152, 224, - 151, 224, 151, 224, 151, 222, 153, 152, 190, 200, - 211, 153, -1, -1, 75, 152, 190, 201, 211, 153, - -1, 75, 47, 152, 222, 151, 224, 153, 6, -1, - 75, 50, 152, 222, 151, 224, 153, 6, -1, 75, - 53, 152, 222, 151, 224, 153, 6, -1, 75, 47, - 152, 222, 151, 224, 151, 224, 151, 222, 153, 6, - -1, 75, 50, 152, 222, 151, 224, 151, 224, 151, - 222, 153, 6, -1, 75, 53, 152, 222, 151, 224, - 151, 224, 151, 222, 153, 6, -1, 75, 47, 152, - 222, 151, 224, 151, 224, 151, 224, 151, 222, 153, - 6, -1, 75, 50, 152, 222, 151, 224, 151, 224, - 151, 224, 151, 222, 153, 6, -1, 75, 53, 152, - 222, 151, 224, 151, 224, 151, 224, 151, 222, 153, - 6, -1, -1, 75, 47, 152, 222, 151, 224, 153, - 202, 152, 211, 153, 6, -1, -1, 75, 50, 152, - 222, 151, 224, 153, 203, 152, 211, 153, 6, -1, - -1, 75, 53, 152, 222, 151, 224, 153, 204, 152, - 211, 153, 6, -1, -1, 75, 47, 152, 222, 151, - 224, 151, 224, 151, 222, 153, 205, 152, 211, 153, - 6, -1, -1, 75, 50, 152, 222, 151, 224, 151, - 224, 151, 222, 153, 206, 152, 211, 153, 6, -1, - -1, 75, 53, 152, 222, 151, 224, 151, 224, 151, - 222, 153, 207, 152, 211, 153, 6, -1, -1, 75, - 47, 152, 222, 151, 224, 151, 224, 151, 224, 151, - 222, 153, 208, 152, 211, 153, 6, -1, -1, 75, - 50, 152, 222, 151, 224, 151, 224, 151, 224, 151, - 222, 153, 209, 152, 211, 153, 6, -1, -1, 75, - 53, 152, 222, 151, 224, 151, 224, 151, 224, 151, - 222, 153, 210, 152, 211, 153, 6, -1, 212, -1, - 211, 212, -1, 84, 152, 222, 153, 6, -1, 84, - 152, 227, 151, 227, 153, 6, -1, 84, 152, 227, - 151, 227, 151, 227, 153, 6, -1, 78, 6, -1, - 85, 145, 222, 146, 7, 227, 68, 222, 6, -1, - 68, 4, 147, 222, 148, 6, -1, -1, 68, 4, - 222, -1, -1, 4, -1, -1, 7, 227, -1, -1, - 7, 222, -1, 63, 50, 228, 7, 222, 213, 6, - -1, 63, 53, 228, 215, 214, 6, -1, 59, 53, - 152, 222, 153, 7, 227, 6, -1, 63, 55, 228, - 215, 6, -1, 78, 53, 228, 216, 6, -1, 79, - 53, 227, 7, 222, 6, -1, 67, 50, 227, 7, - 227, 6, -1, 67, 53, 222, 152, 230, 153, 7, - 222, 152, 230, 153, 6, -1, 47, 152, 230, 153, - 101, 53, 152, 222, 153, 6, -1, 50, 152, 230, - 153, 101, 53, 152, 222, 153, 6, -1, 50, 152, - 230, 153, 101, 55, 152, 222, 153, 6, -1, 53, - 152, 230, 153, 101, 55, 152, 222, 153, 6, -1, - 82, 6, -1, 82, 4, 6, -1, 82, 47, 152, - 230, 153, 6, -1, 118, 145, 234, 146, 7, 152, - 227, 151, 227, 153, 6, -1, 119, 145, 234, 146, - 7, 152, 227, 151, 227, 153, 6, -1, 120, 145, - 234, 146, 7, 152, 227, 151, 227, 153, 6, -1, - 121, 145, 234, 146, 7, 152, 227, 151, 227, 153, - 6, -1, 223, -1, 145, 222, 146, -1, 136, 222, - -1, 135, 222, -1, 140, 222, -1, 222, 136, 222, - -1, 222, 135, 222, -1, 222, 137, 222, -1, 222, - 138, 222, -1, 222, 139, 222, -1, 222, 144, 222, - -1, 222, 131, 222, -1, 222, 132, 222, -1, 222, - 134, 222, -1, 222, 133, 222, -1, 222, 130, 222, - -1, 222, 129, 222, -1, 222, 128, 222, -1, 222, - 127, 222, -1, 222, 126, 222, 8, 222, -1, 14, - 145, 222, 146, -1, 15, 145, 222, 146, -1, 16, - 145, 222, 146, -1, 17, 145, 222, 146, -1, 18, - 145, 222, 146, -1, 19, 145, 222, 146, -1, 20, - 145, 222, 146, -1, 21, 145, 222, 146, -1, 22, - 145, 222, 146, -1, 24, 145, 222, 146, -1, 25, - 145, 222, 151, 222, 146, -1, 26, 145, 222, 146, - -1, 27, 145, 222, 146, -1, 28, 145, 222, 146, - -1, 29, 145, 222, 146, -1, 30, 145, 222, 146, - -1, 31, 145, 222, 146, -1, 32, 145, 222, 151, - 222, 146, -1, 33, 145, 222, 151, 222, 146, -1, - 34, 145, 222, 151, 222, 146, -1, 23, 145, 222, - 146, -1, 14, 147, 222, 148, -1, 15, 147, 222, - 148, -1, 16, 147, 222, 148, -1, 17, 147, 222, - 148, -1, 18, 147, 222, 148, -1, 19, 147, 222, - 148, -1, 20, 147, 222, 148, -1, 21, 147, 222, - 148, -1, 22, 147, 222, 148, -1, 24, 147, 222, - 148, -1, 25, 147, 222, 151, 222, 148, -1, 26, - 147, 222, 148, -1, 27, 147, 222, 148, -1, 28, - 147, 222, 148, -1, 29, 147, 222, 148, -1, 30, - 147, 222, 148, -1, 31, 147, 222, 148, -1, 32, - 147, 222, 151, 222, 148, -1, 33, 147, 222, 151, - 222, 148, -1, 34, 147, 222, 151, 222, 148, -1, - 23, 147, 222, 148, -1, 3, -1, 9, -1, 10, - -1, 11, -1, 115, -1, 116, -1, 117, -1, 4, - -1, 4, 154, 152, 222, 153, -1, 4, 147, 222, - 148, -1, 150, 4, 147, 148, -1, 4, 178, -1, - 4, 147, 222, 148, 178, -1, 4, 149, 4, -1, - 4, 147, 222, 148, 149, 4, -1, 4, 149, 4, - 178, -1, 4, 147, 222, 148, 149, 4, 178, -1, - 112, 145, 234, 151, 222, 146, -1, 225, -1, 136, - 224, -1, 135, 224, -1, 224, 136, 224, -1, 224, - 135, 224, -1, 152, 222, 151, 222, 151, 222, 151, - 222, 151, 222, 153, -1, 152, 222, 151, 222, 151, - 222, 151, 222, 153, -1, 152, 222, 151, 222, 151, - 222, 153, -1, 145, 222, 151, 222, 151, 222, 146, - -1, 227, -1, 226, 151, 227, -1, 222, -1, 229, - -1, 152, 153, -1, 152, 230, 153, -1, 136, 152, - 230, 153, -1, 222, 137, 152, 230, 153, -1, 227, - -1, 5, -1, 136, 229, -1, 222, 137, 229, -1, - 222, 8, 222, -1, 222, 8, 222, 8, 222, -1, - 47, 152, 222, 153, -1, 47, 5, -1, 50, 5, - -1, 53, 5, -1, 55, 5, -1, 188, -1, 197, - -1, 4, 147, 148, -1, 4, 147, 152, 230, 153, - 148, -1, 222, -1, 229, -1, 230, 151, 222, -1, - 230, 151, 229, -1, 152, 222, 151, 222, 151, 222, - 151, 222, 153, -1, 152, 222, 151, 222, 151, 222, - 153, -1, 4, -1, 4, 149, 98, 149, 4, -1, - 152, 233, 153, -1, 4, 147, 222, 148, 149, 99, - -1, 231, -1, 233, 151, 231, -1, 235, -1, 4, - -1, 4, 149, 4, -1, 4, 147, 222, 148, 149, - 4, -1, 5, -1, 42, -1, 113, 145, 234, 146, - -1, 114, 145, 234, 151, 234, 146, -1, 37, 145, - 234, 151, 234, 146, -1, 38, 145, 234, 146, -1, - 39, 145, 234, 146, -1, 36, 145, 234, 146, -1, - 36, 145, 234, 151, 230, 146, -1 + 160, 0, -1, 161, -1, 1, 6, -1, -1, 161, + 162, -1, 165, -1, 164, -1, 183, -1, 187, -1, + 192, -1, 196, -1, 197, -1, 198, -1, 201, -1, + 221, -1, 222, -1, 223, -1, 224, -1, 200, -1, + 199, -1, 195, -1, 225, -1, 136, -1, 136, 136, + -1, 35, 149, 5, 150, 6, -1, 35, 149, 5, + 150, 163, 238, 6, -1, 35, 149, 5, 155, 234, + 150, 6, -1, 35, 149, 5, 155, 234, 150, 163, + 238, 6, -1, 4, 5, 156, 166, 157, 6, -1, + 86, 4, 151, 226, 152, 6, -1, 87, 4, 151, + 226, 152, 6, -1, -1, 166, 169, -1, 166, 173, + -1, 166, 176, -1, 166, 178, -1, 166, 179, -1, + 226, -1, 167, 155, 226, -1, 226, -1, 168, 155, + 226, -1, -1, -1, 4, 170, 149, 167, 150, 171, + 156, 168, 157, 6, -1, 238, -1, 172, 155, 238, + -1, -1, 92, 149, 226, 155, 226, 155, 226, 150, + 174, 156, 172, 157, 6, -1, 238, -1, 175, 155, + 238, -1, -1, 93, 149, 226, 155, 226, 155, 226, + 155, 226, 150, 177, 156, 175, 157, 6, -1, 94, + 156, 230, 157, 156, 230, 157, 6, -1, 94, 156, + 230, 157, 156, 230, 157, 156, 230, 157, 156, 230, + 157, 6, -1, -1, 95, 180, 156, 168, 157, 6, + -1, 7, -1, 129, -1, 128, -1, 127, -1, 126, + -1, 147, -1, 146, -1, 4, 181, 226, 6, -1, + 4, 151, 226, 152, 181, 226, 6, -1, 4, 151, + 156, 234, 157, 152, 181, 231, 6, -1, 4, 151, + 152, 7, 231, 6, -1, 4, 151, 152, 129, 231, + 6, -1, 4, 182, 6, -1, 4, 151, 226, 152, + 182, 6, -1, 4, 7, 239, 6, -1, 4, 153, + 4, 7, 239, 6, -1, 4, 151, 226, 152, 153, + 4, 7, 239, 6, -1, 4, 153, 4, 181, 226, + 6, -1, 4, 151, 226, 152, 153, 4, 181, 226, + 6, -1, 4, 153, 4, 182, 6, -1, 4, 151, + 226, 152, 153, 4, 182, 6, -1, 4, 153, 102, + 153, 4, 7, 235, 6, -1, 4, 151, 226, 152, + 153, 102, 153, 4, 7, 235, 6, -1, 4, 153, + 103, 7, 236, 6, -1, 4, 151, 226, 152, 153, + 103, 7, 236, 6, -1, 4, 110, 7, 226, 6, + -1, 110, 151, 226, 152, 7, 4, 6, -1, 110, + 151, 226, 152, 153, 4, 7, 226, 6, -1, 110, + 151, 226, 152, 153, 4, 7, 239, 6, -1, 110, + 151, 226, 152, 153, 4, 7, 156, 234, 157, 6, + -1, 69, 149, 4, 150, 153, 4, 7, 226, 6, + -1, 69, 149, 4, 150, 153, 4, 7, 239, 6, + -1, 226, -1, 239, -1, -1, 105, 51, 156, 226, + 157, -1, -1, 61, 228, -1, 47, 149, 226, 150, + 7, 228, 6, -1, -1, 65, 47, 188, 149, 184, + 150, 7, 231, 6, -1, 56, 57, 231, 7, 226, + 6, -1, 50, 149, 226, 150, 7, 231, 6, -1, + 70, 50, 231, 6, -1, 54, 149, 226, 150, 7, + 231, 6, -1, 48, 149, 226, 150, 7, 231, 186, + 6, -1, 49, 149, 226, 150, 7, 231, 186, 6, + -1, 97, 149, 226, 150, 7, 231, 6, -1, 98, + 149, 226, 150, 7, 231, 6, -1, 99, 149, 226, + 150, 7, 231, 101, 231, 100, 226, 6, -1, 50, + 77, 149, 226, 150, 7, 231, 6, -1, 66, 50, + 149, 226, 150, 7, 231, 6, -1, -1, 65, 50, + 189, 149, 184, 150, 7, 231, 6, -1, 61, 53, + 149, 226, 150, 7, 231, 6, -1, 62, 53, 149, + 226, 150, 7, 231, 185, 6, -1, 12, 13, 6, + -1, 13, 53, 226, 6, -1, 58, 53, 149, 226, + 150, 7, 5, 5, 5, 6, -1, 51, 149, 226, + 150, 7, 231, 6, -1, 52, 149, 226, 150, 7, + 231, 6, -1, 53, 77, 149, 226, 150, 7, 231, + 6, -1, 66, 53, 149, 226, 150, 7, 231, 6, + -1, 66, 53, 149, 226, 150, 7, 231, 4, 156, + 230, 157, 6, -1, -1, 65, 53, 190, 149, 184, + 150, 7, 231, 6, -1, 64, 55, 149, 226, 150, + 7, 231, 6, -1, 55, 149, 226, 150, 7, 231, + 6, -1, 66, 55, 149, 226, 150, 7, 231, 6, + -1, -1, 65, 55, 191, 149, 184, 150, 7, 231, + 6, -1, 72, 228, 156, 193, 157, -1, 71, 156, + 228, 155, 228, 155, 226, 157, 156, 193, 157, -1, + 73, 228, 156, 193, 157, -1, 74, 156, 228, 155, + 226, 157, 156, 193, 157, -1, 4, 156, 193, 157, + -1, 83, 50, 156, 234, 157, 53, 156, 226, 157, + -1, 80, 50, 149, 226, 150, 156, 234, 157, 6, + -1, 194, -1, 192, -1, -1, 194, 187, -1, 194, + 47, 156, 234, 157, 6, -1, 194, 50, 156, 234, + 157, 6, -1, 194, 53, 156, 234, 157, 6, -1, + 194, 55, 156, 234, 157, 6, -1, 76, 61, 149, + 226, 150, 7, 231, 6, -1, 76, 61, 149, 226, + 150, 7, 156, 228, 155, 228, 155, 234, 157, 6, + -1, 76, 61, 149, 226, 150, 7, 156, 228, 155, + 228, 155, 228, 155, 234, 157, 6, -1, 76, 51, + 149, 226, 150, 7, 156, 228, 155, 234, 157, 6, + -1, 76, 4, 149, 226, 150, 7, 231, 6, -1, + 76, 4, 149, 226, 150, 7, 5, 6, -1, 76, + 4, 156, 226, 157, 6, -1, 76, 4, 149, 226, + 150, 7, 156, 228, 155, 228, 155, 234, 157, 6, + -1, 81, 156, 194, 157, -1, 81, 110, 151, 226, + 152, 6, -1, 81, 4, 151, 226, 152, 6, -1, + 81, 4, 6, -1, 81, 4, 4, 6, -1, 102, + 235, 156, 194, 157, -1, 114, 5, 6, -1, 115, + 5, 6, -1, 114, 156, 194, 157, -1, 115, 156, + 194, 157, -1, 4, 239, 6, -1, 4, 4, 151, + 226, 152, 238, 6, -1, 4, 4, 4, 151, 226, + 152, 6, -1, 4, 226, 6, -1, 69, 149, 4, + 150, 153, 4, 6, -1, 96, 4, 6, -1, 109, + 6, -1, 43, 6, -1, 40, 6, -1, 40, 156, + 226, 155, 226, 155, 226, 155, 226, 155, 226, 155, + 226, 157, 6, -1, 41, 6, -1, 44, 6, -1, + 45, 6, -1, 60, 6, -1, 104, 149, 226, 8, + 226, 150, -1, 104, 149, 226, 8, 226, 8, 226, + 150, -1, 104, 4, 105, 156, 226, 8, 226, 157, + -1, 104, 4, 105, 156, 226, 8, 226, 8, 226, + 157, -1, 106, -1, 113, 4, -1, 111, -1, 112, + 4, 6, -1, 107, 149, 226, 150, -1, 108, -1, + 75, 228, 156, 194, 157, -1, 75, 156, 228, 155, + 228, 155, 226, 157, 156, 194, 157, -1, 75, 156, + 228, 155, 228, 155, 228, 155, 226, 157, 156, 194, + 157, -1, -1, 75, 228, 156, 194, 202, 215, 157, + -1, -1, 75, 156, 228, 155, 228, 155, 226, 157, + 156, 194, 203, 215, 157, -1, -1, 75, 156, 228, + 155, 228, 155, 228, 155, 226, 157, 156, 194, 204, + 215, 157, -1, -1, 75, 156, 194, 205, 215, 157, + -1, 75, 47, 156, 226, 155, 228, 157, 6, -1, + 75, 50, 156, 226, 155, 228, 157, 6, -1, 75, + 53, 156, 226, 155, 228, 157, 6, -1, 75, 47, + 156, 226, 155, 228, 155, 228, 155, 226, 157, 6, + -1, 75, 50, 156, 226, 155, 228, 155, 228, 155, + 226, 157, 6, -1, 75, 53, 156, 226, 155, 228, + 155, 228, 155, 226, 157, 6, -1, 75, 47, 156, + 226, 155, 228, 155, 228, 155, 228, 155, 226, 157, + 6, -1, 75, 50, 156, 226, 155, 228, 155, 228, + 155, 228, 155, 226, 157, 6, -1, 75, 53, 156, + 226, 155, 228, 155, 228, 155, 228, 155, 226, 157, + 6, -1, -1, 75, 47, 156, 226, 155, 228, 157, + 206, 156, 215, 157, 6, -1, -1, 75, 50, 156, + 226, 155, 228, 157, 207, 156, 215, 157, 6, -1, + -1, 75, 53, 156, 226, 155, 228, 157, 208, 156, + 215, 157, 6, -1, -1, 75, 47, 156, 226, 155, + 228, 155, 228, 155, 226, 157, 209, 156, 215, 157, + 6, -1, -1, 75, 50, 156, 226, 155, 228, 155, + 228, 155, 226, 157, 210, 156, 215, 157, 6, -1, + -1, 75, 53, 156, 226, 155, 228, 155, 228, 155, + 226, 157, 211, 156, 215, 157, 6, -1, -1, 75, + 47, 156, 226, 155, 228, 155, 228, 155, 228, 155, + 226, 157, 212, 156, 215, 157, 6, -1, -1, 75, + 50, 156, 226, 155, 228, 155, 228, 155, 228, 155, + 226, 157, 213, 156, 215, 157, 6, -1, -1, 75, + 53, 156, 226, 155, 228, 155, 228, 155, 228, 155, + 226, 157, 214, 156, 215, 157, 6, -1, 216, -1, + 215, 216, -1, 84, 156, 226, 157, 6, -1, 84, + 156, 231, 155, 231, 157, 6, -1, 84, 156, 231, + 155, 231, 155, 231, 157, 6, -1, 78, 6, -1, + 88, 6, -1, 88, 90, 6, -1, 89, 6, -1, + 89, 90, 6, -1, 85, 149, 226, 150, 7, 231, + 68, 226, 6, -1, 68, 4, 151, 226, 152, 6, + -1, -1, 68, 4, 226, -1, -1, 4, -1, -1, + 7, 231, -1, -1, 7, 226, -1, 63, 50, 232, + 7, 226, 217, 6, -1, 63, 53, 232, 219, 218, + 6, -1, 59, 53, 156, 226, 157, 7, 231, 6, + -1, 63, 55, 232, 219, 6, -1, 91, 232, 6, + -1, 78, 53, 232, 220, 6, -1, 79, 53, 231, + 7, 226, 6, -1, 67, 50, 231, 7, 231, 6, + -1, 67, 53, 226, 156, 234, 157, 7, 226, 156, + 234, 157, 6, -1, 47, 156, 234, 157, 105, 53, + 156, 226, 157, 6, -1, 50, 156, 234, 157, 105, + 53, 156, 226, 157, 6, -1, 50, 156, 234, 157, + 105, 55, 156, 226, 157, 6, -1, 53, 156, 234, + 157, 105, 55, 156, 226, 157, 6, -1, 82, 6, + -1, 82, 4, 6, -1, 82, 47, 156, 234, 157, + 6, -1, 122, 149, 238, 150, 7, 156, 231, 155, + 231, 157, 6, -1, 123, 149, 238, 150, 7, 156, + 231, 155, 231, 157, 6, -1, 124, 149, 238, 150, + 7, 156, 231, 155, 231, 157, 6, -1, 125, 149, + 238, 150, 7, 156, 231, 155, 231, 157, 6, -1, + 227, -1, 149, 226, 150, -1, 140, 226, -1, 139, + 226, -1, 144, 226, -1, 226, 140, 226, -1, 226, + 139, 226, -1, 226, 141, 226, -1, 226, 142, 226, + -1, 226, 143, 226, -1, 226, 148, 226, -1, 226, + 135, 226, -1, 226, 136, 226, -1, 226, 138, 226, + -1, 226, 137, 226, -1, 226, 134, 226, -1, 226, + 133, 226, -1, 226, 132, 226, -1, 226, 131, 226, + -1, 226, 130, 226, 8, 226, -1, 14, 149, 226, + 150, -1, 15, 149, 226, 150, -1, 16, 149, 226, + 150, -1, 17, 149, 226, 150, -1, 18, 149, 226, + 150, -1, 19, 149, 226, 150, -1, 20, 149, 226, + 150, -1, 21, 149, 226, 150, -1, 22, 149, 226, + 150, -1, 24, 149, 226, 150, -1, 25, 149, 226, + 155, 226, 150, -1, 26, 149, 226, 150, -1, 27, + 149, 226, 150, -1, 28, 149, 226, 150, -1, 29, + 149, 226, 150, -1, 30, 149, 226, 150, -1, 31, + 149, 226, 150, -1, 32, 149, 226, 155, 226, 150, + -1, 33, 149, 226, 155, 226, 150, -1, 34, 149, + 226, 155, 226, 150, -1, 23, 149, 226, 150, -1, + 14, 151, 226, 152, -1, 15, 151, 226, 152, -1, + 16, 151, 226, 152, -1, 17, 151, 226, 152, -1, + 18, 151, 226, 152, -1, 19, 151, 226, 152, -1, + 20, 151, 226, 152, -1, 21, 151, 226, 152, -1, + 22, 151, 226, 152, -1, 24, 151, 226, 152, -1, + 25, 151, 226, 155, 226, 152, -1, 26, 151, 226, + 152, -1, 27, 151, 226, 152, -1, 28, 151, 226, + 152, -1, 29, 151, 226, 152, -1, 30, 151, 226, + 152, -1, 31, 151, 226, 152, -1, 32, 151, 226, + 155, 226, 152, -1, 33, 151, 226, 155, 226, 152, + -1, 34, 151, 226, 155, 226, 152, -1, 23, 151, + 226, 152, -1, 3, -1, 9, -1, 10, -1, 11, + -1, 119, -1, 120, -1, 121, -1, 4, -1, 4, + 158, 156, 226, 157, -1, 4, 151, 226, 152, -1, + 154, 4, 151, 152, -1, 4, 182, -1, 4, 151, + 226, 152, 182, -1, 4, 153, 4, -1, 4, 151, + 226, 152, 153, 4, -1, 4, 153, 4, 182, -1, + 4, 151, 226, 152, 153, 4, 182, -1, 116, 149, + 238, 155, 226, 150, -1, 229, -1, 140, 228, -1, + 139, 228, -1, 228, 140, 228, -1, 228, 139, 228, + -1, 156, 226, 155, 226, 155, 226, 155, 226, 155, + 226, 157, -1, 156, 226, 155, 226, 155, 226, 155, + 226, 157, -1, 156, 226, 155, 226, 155, 226, 157, + -1, 149, 226, 155, 226, 155, 226, 150, -1, 231, + -1, 230, 155, 231, -1, 226, -1, 233, -1, 156, + 157, -1, 156, 234, 157, -1, 140, 156, 234, 157, + -1, 226, 141, 156, 234, 157, -1, 231, -1, 5, + -1, 140, 233, -1, 226, 141, 233, -1, 226, 8, + 226, -1, 226, 8, 226, 8, 226, -1, 47, 156, + 226, 157, -1, 47, 5, -1, 50, 5, -1, 53, + 5, -1, 55, 5, -1, 192, -1, 201, -1, 4, + 151, 152, -1, 4, 151, 156, 234, 157, 152, -1, + 226, -1, 233, -1, 234, 155, 226, -1, 234, 155, + 233, -1, 156, 226, 155, 226, 155, 226, 155, 226, + 157, -1, 156, 226, 155, 226, 155, 226, 157, -1, + 4, -1, 4, 153, 102, 153, 4, -1, 156, 237, + 157, -1, 4, 151, 226, 152, 153, 103, -1, 235, + -1, 237, 155, 235, -1, 239, -1, 4, -1, 4, + 153, 4, -1, 4, 151, 226, 152, 153, 4, -1, + 5, -1, 42, -1, 117, 149, 238, 150, -1, 118, + 149, 238, 155, 238, 150, -1, 37, 149, 238, 155, + 238, 150, -1, 38, 149, 238, 150, -1, 39, 149, + 238, 150, -1, 36, 149, 238, 150, -1, 36, 149, + 238, 155, 234, 150, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 158, 158, 159, 164, 166, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 190, 194, 201, 206, 220, 233, 261, - 275, 286, 301, 306, 307, 308, 309, 310, 314, 316, - 321, 323, 329, 433, 328, 451, 458, 469, 468, 486, - 493, 504, 503, 520, 537, 560, 559, 573, 574, 575, - 576, 577, 581, 582, 589, 615, 642, 682, 692, 700, - 712, 724, 733, 739, 748, 766, 784, 793, 805, 810, - 818, 838, 861, 870, 878, 900, 923, 951, 963, 980, - 984, 995, 998, 1011, 1014, 1024, 1048, 1047, 1067, 1089, - 1107, 1128, 1146, 1176, 1206, 1224, 1242, 1268, 1285, 1304, - 1303, 1326, 1344, 1383, 1389, 1395, 1402, 1427, 1452, 1468, - 1485, 1517, 1516, 1540, 1558, 1575, 1592, 1591, 1617, 1622, - 1627, 1632, 1637, 1660, 1666, 1677, 1678, 1683, 1686, 1690, - 1713, 1736, 1759, 1787, 1808, 1829, 1851, 1871, 1983, 2002, - 2022, 2131, 2140, 2146, 2161, 2189, 2206, 2220, 2226, 2232, - 2241, 2255, 2297, 2314, 2329, 2348, 2360, 2384, 2388, 2395, - 2401, 2406, 2412, 2416, 2420, 2430, 2447, 2464, 2483, 2502, - 2532, 2540, 2546, 2553, 2557, 2566, 2574, 2582, 2591, 2590, - 2603, 2602, 2615, 2614, 2627, 2626, 2638, 2645, 2652, 2659, - 2666, 2673, 2680, 2687, 2694, 2702, 2701, 2713, 2712, 2724, - 2723, 2735, 2734, 2746, 2745, 2757, 2756, 2768, 2767, 2779, - 2778, 2790, 2789, 2804, 2807, 2813, 2822, 2842, 2865, 2869, - 2888, 2901, 2904, 2920, 2923, 2936, 2939, 2945, 2948, 2955, - 3011, 3081, 3086, 3153, 3196, 3221, 3248, 3292, 3315, 3338, - 3341, 3350, 3354, 3364, 3401, 3438, 3474, 3509, 3549, 3550, - 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3564, 3565, 3566, - 3567, 3568, 3569, 3570, 3571, 3572, 3573, 3574, 3575, 3576, - 3577, 3578, 3579, 3580, 3581, 3582, 3583, 3584, 3585, 3586, - 3587, 3588, 3589, 3590, 3591, 3592, 3593, 3594, 3595, 3597, - 3598, 3599, 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, - 3608, 3609, 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, - 3626, 3627, 3628, 3629, 3630, 3631, 3632, 3636, 3655, 3673, - 3688, 3698, 3714, 3732, 3737, 3742, 3752, 3762, 3770, 3774, - 3778, 3782, 3786, 3793, 3797, 3801, 3805, 3812, 3817, 3824, - 3829, 3833, 3838, 3842, 3850, 3861, 3865, 3877, 3885, 3893, - 3900, 3911, 3931, 3935, 3939, 3943, 3947, 3957, 3967, 3977, - 3997, 4002, 4006, 4010, 4022, 4026, 4038, 4045, 4055, 4059, - 4074, 4079, 4086, 4090, 4103, 4111, 4122, 4126, 4134, 4142, - 4150, 4158, 4172, 4186, 4190 + 0, 159, 159, 160, 165, 167, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 191, 195, 202, 207, 221, 234, 262, + 276, 287, 302, 307, 308, 309, 310, 311, 315, 317, + 322, 324, 330, 434, 329, 452, 459, 470, 469, 487, + 494, 505, 504, 521, 538, 561, 560, 574, 575, 576, + 577, 578, 582, 583, 590, 616, 643, 683, 693, 701, + 713, 725, 734, 740, 749, 767, 785, 794, 806, 811, + 819, 839, 862, 871, 879, 901, 924, 952, 964, 981, + 985, 996, 999, 1012, 1015, 1025, 1049, 1048, 1068, 1090, + 1108, 1129, 1147, 1177, 1207, 1225, 1243, 1269, 1286, 1305, + 1304, 1327, 1345, 1384, 1390, 1396, 1403, 1428, 1453, 1469, + 1486, 1518, 1517, 1541, 1559, 1576, 1593, 1592, 1618, 1623, + 1628, 1633, 1638, 1661, 1667, 1678, 1679, 1684, 1687, 1691, + 1714, 1737, 1760, 1788, 1809, 1830, 1852, 1872, 1984, 2003, + 2023, 2132, 2141, 2147, 2162, 2190, 2207, 2221, 2227, 2233, + 2242, 2256, 2298, 2315, 2330, 2349, 2361, 2385, 2389, 2396, + 2402, 2407, 2413, 2417, 2421, 2431, 2448, 2465, 2484, 2503, + 2533, 2541, 2547, 2554, 2558, 2567, 2575, 2583, 2592, 2591, + 2605, 2604, 2618, 2617, 2631, 2630, 2643, 2650, 2657, 2664, + 2671, 2678, 2685, 2692, 2699, 2707, 2706, 2719, 2718, 2731, + 2730, 2743, 2742, 2755, 2754, 2767, 2766, 2779, 2778, 2791, + 2790, 2803, 2802, 2818, 2821, 2827, 2836, 2856, 2879, 2883, + 2887, 2891, 2895, 2899, 2918, 2931, 2934, 2950, 2953, 2966, + 2969, 2975, 2978, 2985, 3041, 3111, 3116, 3183, 3219, 3262, + 3287, 3314, 3358, 3381, 3404, 3407, 3416, 3420, 3430, 3467, + 3504, 3540, 3575, 3615, 3616, 3617, 3618, 3619, 3620, 3621, + 3622, 3623, 3630, 3631, 3632, 3633, 3634, 3635, 3636, 3637, + 3638, 3639, 3640, 3641, 3642, 3643, 3644, 3645, 3646, 3647, + 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657, + 3658, 3659, 3660, 3661, 3663, 3664, 3665, 3666, 3667, 3668, + 3669, 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3677, 3678, + 3679, 3680, 3681, 3682, 3683, 3692, 3693, 3694, 3695, 3696, + 3697, 3698, 3702, 3721, 3739, 3754, 3764, 3780, 3798, 3803, + 3808, 3818, 3828, 3836, 3840, 3844, 3848, 3852, 3859, 3863, + 3867, 3871, 3878, 3883, 3890, 3895, 3899, 3904, 3908, 3916, + 3927, 3931, 3943, 3951, 3959, 3966, 3977, 3997, 4001, 4005, + 4009, 4013, 4023, 4033, 4043, 4063, 4068, 4072, 4076, 4088, + 4092, 4104, 4111, 4121, 4125, 4140, 4145, 4152, 4156, 4169, + 4177, 4188, 4192, 4200, 4208, 4216, 4224, 4238, 4252, 4256 }; #endif @@ -982,8 +989,9 @@ static const char *const yytname[] = "tDegenerated", "tRotate", "tTranslate", "tSymmetry", "tDilate", "tExtrude", "tLevelset", "tLoop", "tRecombine", "tSmoother", "tSplit", "tDelete", "tCoherence", "tIntersect", "tLayers", "tHole", "tAlias", - "tAliasWithOptions", "tText2D", "tText3D", "tInterpolationScheme", - "tTime", "tCombine", "tBSpline", "tBezier", "tNurbs", "tNurbsOrder", + "tAliasWithOptions", "tQuadTriDbl", "tQuadTriSngl", "tRecombLaterals", + "tTransfQuadTri", "tText2D", "tText3D", "tInterpolationScheme", "tTime", + "tCombine", "tBSpline", "tBezier", "tNurbs", "tNurbsOrder", "tNurbsKnots", "tColor", "tColorTable", "tFor", "tIn", "tEndFor", "tIf", "tEndIf", "tExit", "tField", "tReturn", "tCall", "tFunction", "tShow", "tHide", "tGetValue", "tGetEnv", "tGetString", "tGMSH_MAJOR_VERSION", @@ -1029,56 +1037,56 @@ static const yytype_uint16 yytoknum[] = 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 63, 381, 382, 383, - 384, 60, 62, 385, 386, 43, 45, 42, 47, 37, - 33, 387, 388, 389, 94, 40, 41, 91, 93, 46, - 35, 44, 123, 125, 126 + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, + 63, 385, 386, 387, 388, 60, 62, 389, 390, 43, + 45, 42, 47, 37, 33, 391, 392, 393, 94, 40, + 41, 91, 93, 46, 35, 44, 123, 125, 126 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 155, 156, 156, 157, 157, 158, 158, 158, 158, - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 158, 158, 159, 159, 160, 160, 160, 160, 161, - 161, 161, 162, 162, 162, 162, 162, 162, 163, 163, - 164, 164, 166, 167, 165, 168, 168, 170, 169, 171, - 171, 173, 172, 174, 174, 176, 175, 177, 177, 177, - 177, 177, 178, 178, 179, 179, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 180, - 180, 181, 181, 182, 182, 183, 184, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 185, + 0, 159, 160, 160, 161, 161, 162, 162, 162, 162, + 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, + 162, 162, 162, 163, 163, 164, 164, 164, 164, 165, + 165, 165, 166, 166, 166, 166, 166, 166, 167, 167, + 168, 168, 170, 171, 169, 172, 172, 174, 173, 175, + 175, 177, 176, 178, 178, 180, 179, 181, 181, 181, + 181, 181, 182, 182, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 186, 183, 183, 183, 183, 187, 183, 188, 188, - 188, 188, 188, 188, 188, 189, 189, 190, 190, 190, - 190, 190, 190, 191, 191, 191, 191, 191, 191, 191, - 191, 192, 192, 192, 192, 192, 193, 194, 194, 194, - 194, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 197, 197, 197, 198, 197, - 199, 197, 200, 197, 201, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 202, 197, 203, 197, 204, - 197, 205, 197, 206, 197, 207, 197, 208, 197, 209, - 197, 210, 197, 211, 211, 212, 212, 212, 212, 212, - 212, 213, 213, 214, 214, 215, 215, 216, 216, 217, - 217, 217, 217, 217, 217, 218, 218, 219, 219, 219, - 219, 220, 220, 220, 221, 221, 221, 221, 222, 222, - 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, - 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, - 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, - 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, - 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, - 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, - 223, 223, 223, 223, 223, 223, 223, 223, 224, 224, - 224, 224, 224, 225, 225, 225, 225, 226, 226, 227, - 227, 227, 227, 227, 227, 228, 228, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 230, 230, 230, 230, 231, 231, 231, 231, 232, 232, - 233, 233, 234, 234, 234, 234, 235, 235, 235, 235, - 235, 235, 235, 235, 235 + 183, 183, 183, 183, 183, 183, 183, 183, 183, 184, + 184, 185, 185, 186, 186, 187, 188, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 189, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 190, 187, 187, 187, 187, 191, 187, 192, 192, + 192, 192, 192, 192, 192, 193, 193, 194, 194, 194, + 194, 194, 194, 195, 195, 195, 195, 195, 195, 195, + 195, 196, 196, 196, 196, 196, 197, 198, 198, 198, + 198, 199, 199, 199, 199, 199, 199, 199, 199, 199, + 199, 199, 199, 199, 199, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 201, 201, 201, 202, 201, + 203, 201, 204, 201, 205, 201, 201, 201, 201, 201, + 201, 201, 201, 201, 201, 206, 201, 207, 201, 208, + 201, 209, 201, 210, 201, 211, 201, 212, 201, 213, + 201, 214, 201, 215, 215, 216, 216, 216, 216, 216, + 216, 216, 216, 216, 216, 217, 217, 218, 218, 219, + 219, 220, 220, 221, 221, 221, 221, 221, 221, 221, + 222, 222, 223, 223, 223, 223, 224, 224, 224, 225, + 225, 225, 225, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 228, 228, 228, 228, 228, 229, 229, + 229, 229, 230, 230, 231, 231, 231, 231, 231, 231, + 232, 232, 233, 233, 233, 233, 233, 233, 233, 233, + 233, 233, 233, 233, 233, 234, 234, 234, 234, 235, + 235, 235, 235, 236, 236, 237, 237, 238, 238, 238, + 238, 239, 239, 239, 239, 239, 239, 239, 239, 239 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1106,24 +1114,24 @@ static const yytype_uint8 yyr2[] = 0, 13, 0, 15, 0, 6, 8, 8, 8, 12, 12, 12, 14, 14, 14, 0, 12, 0, 12, 0, 12, 0, 16, 0, 16, 0, 16, 0, 18, 0, - 18, 0, 18, 1, 2, 5, 7, 9, 2, 9, - 6, 0, 3, 0, 1, 0, 2, 0, 2, 7, - 6, 8, 5, 5, 6, 6, 12, 10, 10, 10, - 10, 2, 3, 6, 11, 11, 11, 11, 1, 3, - 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 5, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, - 4, 4, 4, 4, 4, 6, 6, 6, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, - 4, 4, 4, 4, 4, 4, 6, 6, 6, 4, - 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, 1, 1, 2, 3, 3, - 5, 4, 2, 2, 2, 2, 1, 1, 3, 6, - 1, 1, 3, 3, 9, 7, 1, 5, 3, 6, - 1, 3, 1, 1, 3, 6, 1, 1, 4, 6, - 6, 4, 4, 4, 6 + 18, 0, 18, 1, 2, 5, 7, 9, 2, 2, + 3, 2, 3, 9, 6, 0, 3, 0, 1, 0, + 2, 0, 2, 7, 6, 8, 5, 3, 5, 6, + 6, 12, 10, 10, 10, 10, 2, 3, 6, 11, + 11, 11, 11, 1, 3, 2, 2, 2, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 5, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, + 6, 6, 6, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, + 4, 6, 6, 6, 4, 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, + 1, 1, 2, 3, 3, 5, 4, 2, 2, 2, + 2, 1, 1, 3, 6, 1, 1, 3, 3, 9, + 7, 1, 5, 3, 6, 1, 3, 1, 1, 3, + 6, 1, 1, 4, 6, 6, 4, 4, 4, 6 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -1136,320 +1144,322 @@ static const yytype_uint16 yydefact[] = 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, 179, 0, 184, - 0, 0, 181, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 7, 6, 8, 9, 10, 21, 11, 12, - 13, 20, 19, 14, 15, 16, 17, 18, 22, 320, - 327, 386, 57, 321, 322, 323, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 179, 0, + 184, 0, 0, 181, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 7, 6, 8, 9, 10, 21, 11, + 12, 13, 20, 19, 14, 15, 16, 17, 18, 22, + 325, 332, 391, 57, 326, 327, 328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 387, 0, 0, 0, 0, 324, 325, 326, 61, - 60, 59, 58, 0, 0, 0, 63, 62, 0, 0, - 0, 0, 137, 0, 0, 0, 258, 0, 0, 0, - 0, 169, 0, 171, 168, 172, 173, 0, 0, 0, + 0, 0, 392, 0, 0, 0, 0, 329, 330, 331, + 61, 60, 59, 58, 0, 0, 0, 63, 62, 0, + 0, 0, 0, 137, 0, 0, 0, 263, 0, 0, + 0, 0, 169, 0, 171, 168, 172, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 174, 0, 0, 0, 0, 0, 0, - 96, 109, 121, 126, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 338, 0, 0, - 0, 0, 0, 137, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 137, 0, 251, 0, 0, 0, 0, - 0, 0, 0, 0, 376, 0, 0, 0, 0, 0, - 167, 0, 0, 180, 0, 137, 0, 137, 0, 0, - 0, 0, 0, 0, 0, 0, 331, 32, 386, 0, + 0, 0, 0, 0, 174, 0, 0, 0, 0, 0, + 0, 96, 109, 121, 126, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 343, 0, + 0, 0, 0, 0, 137, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 137, 0, 256, 0, 0, 0, + 0, 332, 361, 0, 0, 0, 0, 0, 0, 371, + 372, 354, 360, 0, 355, 0, 0, 0, 0, 381, + 0, 0, 0, 0, 0, 167, 0, 0, 180, 0, + 137, 0, 137, 0, 0, 0, 0, 0, 0, 0, + 0, 336, 32, 391, 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, 332, 266, 265, 267, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, + 135, 0, 69, 164, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 161, + 113, 0, 0, 0, 0, 0, 375, 376, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 327, 261, 260, 262, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 136, 0, 135, 0, 69, 164, 0, + 0, 0, 0, 0, 0, 0, 239, 239, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 161, 113, 0, 0, 0, 0, - 327, 0, 0, 0, 0, 0, 366, 367, 370, 371, + 0, 345, 344, 0, 0, 0, 0, 137, 137, 0, + 0, 0, 0, 0, 0, 0, 194, 0, 137, 0, + 0, 0, 0, 241, 0, 0, 0, 154, 0, 0, + 0, 257, 0, 0, 0, 0, 0, 367, 0, 368, + 369, 370, 0, 265, 362, 356, 0, 0, 0, 247, + 166, 0, 0, 0, 0, 0, 137, 0, 0, 0, + 0, 182, 157, 0, 158, 0, 388, 0, 387, 0, + 0, 0, 0, 0, 338, 0, 0, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 349, 0, 350, 0, 0, 0, - 0, 356, 355, 0, 235, 235, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 340, - 339, 0, 0, 0, 0, 137, 137, 0, 0, 0, - 0, 0, 0, 0, 194, 0, 137, 0, 0, 0, - 0, 237, 0, 0, 0, 154, 0, 0, 0, 252, - 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, - 137, 0, 0, 0, 0, 182, 157, 0, 158, 0, - 383, 0, 382, 0, 0, 0, 0, 0, 333, 0, - 0, 71, 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, 264, + 0, 0, 0, 0, 57, 0, 0, 0, 0, 0, + 132, 0, 0, 0, 0, 138, 64, 0, 281, 280, + 279, 278, 274, 275, 277, 276, 269, 268, 270, 271, + 272, 273, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 259, 0, 0, 0, 0, 57, 0, - 0, 0, 0, 0, 132, 0, 0, 0, 0, 138, - 64, 0, 276, 275, 274, 273, 269, 270, 272, 271, - 264, 263, 265, 266, 267, 268, 114, 0, 0, 0, - 0, 0, 362, 0, 363, 364, 365, 260, 357, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 237, 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, 233, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, - 0, 0, 342, 341, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 188, 0, 0, 0, 0, 0, 0, - 0, 0, 155, 0, 0, 151, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 183, 0, - 159, 160, 0, 0, 0, 0, 0, 0, 0, 329, - 335, 0, 42, 0, 0, 0, 55, 0, 33, 34, - 35, 36, 37, 278, 299, 279, 300, 280, 301, 281, - 302, 282, 303, 283, 304, 284, 305, 285, 306, 286, - 307, 298, 319, 287, 308, 0, 0, 289, 310, 290, - 311, 291, 312, 292, 313, 293, 314, 294, 315, 0, - 0, 0, 0, 0, 0, 393, 0, 0, 391, 392, - 82, 0, 388, 0, 0, 0, 0, 0, 57, 0, - 0, 0, 0, 0, 76, 0, 0, 0, 0, 330, - 0, 0, 0, 0, 0, 25, 23, 0, 0, 0, - 0, 368, 0, 0, 359, 265, 358, 372, 373, 0, + 0, 100, 0, 0, 0, 347, 346, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 188, 0, 0, 0, + 0, 0, 0, 0, 0, 155, 0, 0, 151, 0, + 0, 0, 0, 373, 0, 0, 0, 0, 357, 364, + 0, 270, 363, 0, 0, 0, 0, 0, 0, 0, + 0, 183, 0, 159, 160, 0, 0, 0, 0, 0, + 0, 0, 334, 340, 0, 42, 0, 0, 0, 55, + 0, 33, 34, 35, 36, 37, 283, 304, 284, 305, + 285, 306, 286, 307, 287, 308, 288, 309, 289, 310, + 290, 311, 291, 312, 303, 324, 292, 313, 0, 0, + 294, 315, 295, 316, 296, 317, 297, 318, 298, 319, + 299, 320, 0, 0, 0, 0, 0, 0, 398, 0, + 0, 396, 397, 82, 0, 393, 0, 0, 0, 0, + 57, 0, 0, 0, 0, 0, 76, 0, 0, 0, + 0, 335, 0, 0, 0, 0, 0, 25, 23, 0, + 0, 0, 0, 377, 378, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 352, 0, 0, 0, 0, 0, 0, 231, - 236, 234, 0, 242, 0, 0, 89, 90, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 128, 130, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 223, 0, 185, 0, 0, 0, 0, 0, 238, - 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 156, 0, 0, 0, 0, 0, - 384, 0, 0, 0, 0, 0, 0, 332, 0, 328, - 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 329, 67, + 0, 0, 235, 240, 238, 0, 246, 0, 0, 89, + 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 128, 130, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 223, 0, 185, 0, + 0, 0, 0, 0, 242, 248, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 334, 366, 358, 0, 0, + 0, 0, 0, 0, 0, 156, 0, 0, 0, 0, + 0, 389, 0, 0, 0, 0, 0, 0, 337, 0, + 333, 0, 0, 0, 0, 0, 29, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 68, 0, 0, 0, 0, 0, 70, 72, 74, 0, - 0, 380, 0, 80, 0, 0, 0, 0, 277, 24, - 0, 0, 0, 0, 0, 361, 0, 0, 93, 93, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 353, 0, 98, 0, 0, 0, 0, 0, 0, 240, - 0, 0, 0, 0, 0, 0, 0, 0, 245, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 228, - 0, 0, 195, 224, 0, 0, 0, 149, 0, 0, - 244, 0, 153, 152, 253, 0, 30, 31, 0, 0, - 0, 377, 0, 0, 0, 175, 0, 0, 0, 0, - 0, 0, 0, 163, 334, 162, 0, 0, 0, 0, - 347, 0, 288, 309, 295, 316, 296, 317, 297, 318, - 394, 390, 337, 389, 0, 57, 0, 0, 0, 0, - 65, 0, 0, 0, 378, 0, 0, 0, 0, 26, - 27, 0, 0, 95, 0, 360, 0, 0, 0, 0, + 0, 385, 0, 80, 0, 0, 0, 0, 282, 24, + 0, 0, 0, 0, 0, 93, 93, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 98, 0, 0, + 0, 0, 0, 0, 244, 0, 0, 0, 0, 0, + 0, 0, 0, 250, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 228, 0, 0, 229, 0, 231, + 0, 195, 224, 0, 0, 0, 149, 0, 0, 249, + 0, 153, 152, 258, 0, 30, 31, 0, 365, 359, + 0, 0, 0, 382, 0, 0, 0, 175, 0, 0, + 0, 0, 0, 0, 0, 163, 339, 162, 0, 0, + 0, 0, 352, 0, 293, 314, 300, 321, 301, 322, + 302, 323, 399, 395, 342, 394, 0, 57, 0, 0, + 0, 0, 65, 0, 0, 0, 383, 0, 0, 0, + 0, 26, 27, 0, 0, 95, 0, 0, 0, 0, 0, 99, 0, 0, 116, 117, 0, 0, 101, 124, - 354, 0, 0, 0, 91, 0, 239, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 165, 0, 0, 0, - 0, 137, 0, 205, 0, 207, 0, 209, 0, 349, - 0, 0, 0, 0, 189, 0, 0, 0, 0, 0, - 0, 0, 0, 104, 105, 0, 0, 0, 0, 83, - 0, 0, 0, 0, 0, 0, 336, 0, 38, 0, - 0, 0, 0, 0, 40, 0, 0, 0, 77, 0, - 0, 78, 0, 381, 139, 140, 141, 142, 0, 0, - 369, 0, 94, 102, 103, 107, 0, 0, 118, 0, - 0, 241, 111, 0, 0, 232, 123, 0, 0, 0, - 0, 108, 0, 119, 125, 0, 0, 0, 0, 346, - 0, 345, 0, 0, 196, 0, 0, 197, 0, 0, - 198, 0, 0, 0, 0, 0, 0, 0, 148, 0, - 0, 147, 0, 0, 143, 0, 0, 0, 0, 375, - 0, 177, 176, 0, 0, 0, 385, 0, 0, 0, - 0, 43, 0, 0, 0, 348, 0, 0, 0, 66, - 73, 75, 0, 81, 0, 28, 0, 0, 0, 0, - 0, 0, 0, 112, 97, 110, 122, 127, 0, 0, - 87, 88, 137, 0, 131, 0, 0, 0, 0, 0, - 0, 0, 225, 0, 0, 137, 0, 0, 0, 0, - 134, 133, 0, 0, 0, 0, 84, 85, 0, 0, - 0, 0, 0, 39, 0, 0, 0, 41, 56, 0, - 379, 0, 247, 248, 249, 250, 115, 0, 0, 0, - 0, 0, 344, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 230, 0, 0, 0, 190, 0, 0, 0, - 0, 0, 374, 178, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 79, 0, 0, 0, 0, 129, 0, - 211, 0, 0, 213, 0, 0, 215, 0, 0, 0, - 226, 0, 186, 0, 137, 0, 0, 0, 106, 86, - 254, 255, 256, 257, 0, 47, 0, 53, 0, 0, - 92, 120, 246, 343, 199, 0, 0, 206, 200, 0, - 0, 208, 201, 0, 0, 210, 0, 0, 0, 192, - 0, 146, 0, 0, 0, 0, 0, 0, 0, 0, - 217, 0, 219, 0, 221, 227, 229, 191, 187, 0, - 0, 0, 0, 44, 0, 51, 0, 0, 0, 202, - 0, 0, 203, 0, 0, 204, 0, 0, 150, 0, - 144, 0, 45, 0, 0, 170, 0, 0, 0, 0, - 0, 0, 193, 0, 0, 0, 0, 0, 212, 0, - 214, 0, 216, 0, 145, 46, 48, 0, 49, 0, - 0, 0, 0, 0, 0, 54, 218, 220, 222, 50, - 52 + 0, 0, 0, 91, 0, 243, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 165, 0, 0, 0, 0, + 137, 0, 205, 0, 207, 0, 209, 0, 354, 0, + 0, 230, 232, 0, 0, 189, 0, 0, 0, 0, + 0, 0, 0, 0, 374, 104, 105, 0, 0, 0, + 0, 83, 0, 0, 0, 0, 0, 0, 341, 0, + 38, 0, 0, 0, 0, 0, 40, 0, 0, 0, + 77, 0, 0, 78, 0, 386, 139, 140, 141, 142, + 0, 0, 0, 94, 102, 103, 107, 0, 0, 118, + 0, 0, 245, 111, 0, 0, 236, 123, 0, 0, + 0, 0, 108, 0, 119, 125, 0, 0, 0, 0, + 351, 0, 350, 0, 0, 196, 0, 0, 197, 0, + 0, 198, 0, 0, 0, 0, 0, 0, 0, 148, + 0, 0, 147, 0, 0, 143, 0, 0, 0, 0, + 380, 0, 177, 176, 0, 0, 0, 390, 0, 0, + 0, 0, 43, 0, 0, 0, 353, 0, 0, 0, + 66, 73, 75, 0, 81, 0, 28, 0, 0, 0, + 0, 0, 0, 0, 112, 97, 110, 122, 127, 0, + 0, 87, 88, 137, 0, 131, 0, 0, 0, 0, + 0, 0, 0, 225, 0, 0, 137, 0, 0, 0, + 0, 134, 133, 0, 0, 0, 0, 84, 85, 0, + 0, 0, 0, 0, 39, 0, 0, 0, 41, 56, + 0, 384, 0, 252, 253, 254, 255, 115, 0, 0, + 0, 0, 0, 349, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 234, 0, 0, 0, 190, 0, 0, + 0, 0, 0, 379, 178, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 79, 0, 0, 0, 0, 129, + 0, 211, 0, 0, 213, 0, 0, 215, 0, 0, + 0, 226, 0, 186, 0, 137, 0, 0, 0, 106, + 86, 259, 260, 261, 262, 0, 47, 0, 53, 0, + 0, 92, 120, 251, 348, 199, 0, 0, 206, 200, + 0, 0, 208, 201, 0, 0, 210, 0, 0, 0, + 192, 0, 146, 0, 0, 0, 0, 0, 0, 0, + 0, 217, 0, 219, 0, 221, 227, 233, 191, 187, + 0, 0, 0, 0, 44, 0, 51, 0, 0, 0, + 202, 0, 0, 203, 0, 0, 204, 0, 0, 150, + 0, 144, 0, 45, 0, 0, 170, 0, 0, 0, + 0, 0, 0, 193, 0, 0, 0, 0, 0, 212, + 0, 214, 0, 216, 0, 145, 46, 48, 0, 49, + 0, 0, 0, 0, 0, 0, 54, 218, 220, 222, + 50, 52 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 2, 3, 71, 727, 72, 73, 450, 1067, 1073, - 648, 830, 1222, 1371, 649, 1335, 1397, 650, 1373, 651, - 652, 834, 143, 246, 74, 765, 1104, 998, 519, 377, - 378, 379, 380, 346, 314, 315, 77, 78, 79, 80, - 81, 82, 347, 794, 1293, 1349, 601, 1125, 1128, 1131, - 1315, 1319, 1323, 1360, 1363, 1366, 790, 791, 898, 762, - 575, 609, 84, 85, 86, 87, 88, 364, 146, 390, - 197, 959, 960, 373, 366, 566, 226, 718, 862, 441, - 442 + -1, 2, 3, 72, 739, 73, 74, 466, 1079, 1085, + 661, 841, 1233, 1382, 662, 1346, 1408, 663, 1384, 664, + 665, 845, 144, 261, 75, 768, 1115, 1008, 535, 379, + 380, 381, 382, 229, 329, 330, 78, 79, 80, 81, + 82, 83, 230, 799, 1304, 1360, 604, 1136, 1139, 1142, + 1326, 1330, 1334, 1371, 1374, 1377, 795, 796, 903, 765, + 578, 612, 85, 86, 87, 88, 89, 231, 147, 392, + 198, 971, 232, 233, 234, 436, 241, 730, 872, 457, + 458 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -1149 +#define YYPACT_NINF -1171 static const yytype_int16 yypact[] = { - 3496, 7, 9, 3606, -1149, -1149, 1794, 35, 12, -115, - 22, 65, 75, 115, 134, -93, -1, 51, -30, 64, - 90, -36, 94, 162, 98, 114, 120, 184, 168, 280, - 183, 317, 894, 243, 81, 210, 310, 248, 196, 196, - 256, 335, 11, 356, 359, 369, 17, 39, 372, 447, - 451, 465, 346, 350, 360, -2, 30, -1149, 361, -1149, - 475, 378, -1149, 515, 532, 24, 26, 397, 401, 402, - 408, -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, - -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, - 23, 387, 596, -1149, -1149, -1149, -109, -50, 150, 239, - 242, 273, 278, 305, 309, 328, 353, 370, 373, 412, - 423, 477, 526, 530, 535, 547, 556, 415, 418, 419, - 426, -1149, 569, 438, 446, 449, -1149, -1149, -1149, -1149, - -1149, -1149, -1149, 3354, 3354, 3354, -1149, -1149, 3354, 2883, - 13, 593, 16, 3354, 594, 764, -1149, 599, 602, 3354, - 611, -1149, 3354, -1149, -1149, -1149, -1149, 3354, 3279, 3354, - 3354, 500, 3354, 3279, 3354, 3354, 503, 3279, 3354, 3354, - 2232, 504, 478, -1149, 509, 520, 1944, 1944, 1944, 534, - -1149, -1149, -1149, -1149, 551, 555, 562, 2232, 3354, 627, - 2232, 196, 196, 196, 3354, 3354, -78, -1149, -67, 196, - 508, 514, 567, 3135, -34, -91, 575, 588, 1944, 2232, - 592, 40, 598, -1149, 734, -1149, 603, 606, 607, 615, - 740, 3354, 3354, 3354, 624, 3354, 622, 678, 3354, 3354, - -1149, 3354, 774, -1149, 791, -1149, 862, -1149, 485, 485, - 485, 485, 660, 3354, 828, 719, -1149, -1149, -1149, 866, - 3354, 3354, 3354, 3354, 3354, 3354, 3354, 3354, 3354, 3354, - 3354, 3354, 3354, 3354, 3354, 3354, 3354, 3354, 3354, 3354, - 3354, 3354, 3354, 3354, 3354, 3354, 3354, 3354, 3354, 3354, - 3354, 3354, 3354, 3354, 3354, 3354, 3354, 3354, 3354, 3354, - 3354, 3354, 485, 485, 485, 485, 3354, 485, 485, 485, - 770, 716, 716, 716, 5868, 5, 3279, 5109, 336, 729, - 897, 763, 790, -1149, 773, 3682, 1111, -1149, -1149, 3354, - 3354, 3354, 3354, 3354, 3354, 3354, 3354, 3354, 3354, 3354, - 3354, 3354, 3354, 3354, -1149, -1149, 1451, 143, 4407, 5889, - 715, 27, 911, 948, 952, 3279, -1149, -1149, 3044, -1149, - 486, 5910, 5931, 3354, 5952, 581, 5973, 5994, 3354, 616, - 6015, 6036, 2376, 1643, 3090, 961, -1149, 3354, 3354, 3354, - 3354, -1149, -1149, 965, 974, 974, 3354, 843, 865, 867, - 868, 3354, 3354, 3354, 992, 4327, 869, 1005, 67, -1149, - -1149, 4433, 4459, 196, 196, 16, 16, 76, 3354, 3354, - 3354, 3135, 3135, 3354, 3682, 223, -1149, 3354, 3354, 3354, - 3354, 1007, 1009, 3354, 1011, -1149, 3354, 3354, 786, -1149, - 3279, 3279, 3354, 3354, -1149, 6057, 6078, 6099, 920, 4485, - -1149, 870, 3128, 6120, 5132, -1149, -1149, 1682, -1149, 1827, - 655, 874, -1149, 877, 881, 882, 3354, 5155, 225, 3354, - 15, -1149, 6141, 5178, 6162, 5201, 6183, 5224, 6204, 5247, - 6225, 5270, 6246, 5293, 6267, 5316, 6288, 5339, 6309, 5362, - 6330, 5385, 6351, 5408, 4511, 4537, 6372, 5431, 6393, 5454, - 6414, 5477, 6435, 5500, 6456, 5523, 6477, 5546, 4563, 4589, - 4615, 4641, 4667, 4693, 155, 878, 884, 885, 1475, 886, - 887, 888, 3354, -1149, 2232, 2232, 652, 187, 596, 3354, - 1030, 1034, 19, 893, -1149, 47, 48, -35, 53, -1149, - -1149, 3273, 991, 1182, 796, 796, 738, 738, 738, 738, - -46, -46, 716, 716, 716, 716, -1149, 4, 3279, 3354, - 1035, 3096, -1149, 3354, -1149, -1149, -1149, 716, -1149, 3354, - 3279, 3279, 943, 1038, 1040, 6498, 1041, 949, 1042, 1044, - 6519, 951, 1046, 1048, 3279, -1149, 702, 2520, 3354, 6540, - 3385, 6561, 6582, 3354, 2232, 1052, 1051, 6603, 1339, 1339, - 1339, 1339, 6624, 6645, 6666, 2232, 3279, 909, -1149, 196, - 3354, 3354, -1149, -1149, 906, 907, 3354, 4719, 4745, 4771, - 4381, 156, 196, 1983, 6687, 3495, 6708, 6729, 3354, 1055, - 3354, 6750, -1149, 5569, 5592, -1149, 708, 712, 5615, 5638, - 1058, 1059, 1060, 913, 3354, 2127, 3354, 3354, -1149, 0, - -1149, -1149, 3354, 1065, 1063, 1064, 1066, 1068, 5661, 71, - -1149, 3711, -1149, 927, 931, 926, -1149, 1073, -1149, -1149, - -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, - -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, - -1149, -1149, -1149, -1149, -1149, 3354, 3354, -1149, -1149, -1149, - -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, 3354, - 3354, 3354, 3354, 3354, 3354, -1149, 3279, 485, -1149, -1149, - -1149, 3354, -1149, 485, 5684, 1074, 1075, 934, -1149, 49, - 3354, 1078, 1079, 1715, -1149, 1080, 939, -2, 1082, -1149, - 3279, 3279, 3279, 3279, 3354, -1149, 957, 485, 189, 4797, - 196, -1149, 3279, 3739, 3306, 716, -1149, 3044, -1149, 1037, - 2232, 2232, 1084, 2232, 753, 2232, 2232, 1086, 1039, 2232, - 2232, 735, -1149, 3279, 2478, 1089, 1091, 1092, 1093, 3063, - -1149, -1149, 1095, -1149, 1096, 956, 6981, -1149, 958, 959, - 962, 1100, 1102, 1103, 1105, 736, 1108, 270, 4823, 4849, - -1149, -1149, 3767, 196, 196, 196, 1109, 1110, 963, 973, - -29, -1149, 306, -1149, 156, 1130, 1132, 1133, 1134, 6981, - -1149, 2513, 993, 1137, 1144, 1145, 1099, 1147, 1148, 2232, - 2232, 2232, 1151, 4875, -1149, 3347, 685, 1153, 1154, 5707, - -1149, 1008, 1010, 1012, 1013, 1157, 1155, -1149, 1160, -1149, - 1023, 3354, 3354, 2232, 1018, -1149, 6771, 5730, 6792, 5753, - 6813, 5776, 6834, 5799, 191, 1026, 6855, 1027, -23, -1149, - -1149, 107, 343, 1025, 1168, 2622, -1149, -1149, -1149, -2, - 3354, -1149, 758, -1149, 769, 792, 795, 801, 6981, -1149, - 1170, 10, 3354, 45, 805, -1149, 3354, 1028, 1116, 1116, - 2232, 1172, 1032, 1033, 1173, 1176, 2232, 1045, 1180, 1181, - -1149, 809, -1149, 1185, 2232, 2232, 2232, 1188, 1192, -1149, - 2232, 1187, 1193, 1194, 1196, 2232, 2232, 2232, -1149, 1197, - 236, 3354, 3354, 3354, 1047, 151, 218, 230, 1061, -1149, - 2232, 3354, -1149, -1149, 3135, -18, 2088, -1149, 1053, 2664, - -1149, 3279, -1149, -1149, -1149, 1057, -1149, -1149, 1201, 1204, - 1114, -1149, 3354, 3354, 3354, -1149, 1206, 1207, 1067, 2232, - 2232, 2232, 2232, -1149, 225, -1149, 3354, 4901, 4927, 810, - -1149, 3354, -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, - -1149, -1149, -1149, -1149, 2232, 596, 3354, 1209, 1216, 19, - -1149, 1215, 5822, -2, -1149, 1217, 1218, 1220, 1221, -1149, - -1149, 485, 4953, -1149, 1081, 6981, 3354, 196, 1222, 1224, - 1227, -1149, 3354, 3354, -1149, -1149, 1228, 3354, -1149, -1149, - -1149, 1208, 1246, 1247, 1121, 3354, -1149, 1248, 2232, 2232, - 2232, 2232, 1250, 917, 1251, 3354, -1149, 1339, 3795, 6876, - 3627, 16, 196, 1252, 196, 1253, 196, 1254, 3354, 300, - 1117, 6897, 3823, 311, -1149, 1259, 1482, 1263, 196, 1482, - 1266, 813, 3354, -1149, -1149, 2232, 3655, 656, 6918, -1149, - 2952, 1269, 1123, 1125, 1126, 1128, -1149, 200, 6981, 3354, - 3354, 2232, 1131, 814, 6981, 1274, 1276, 2657, -1149, 1277, - 1280, -1149, 1138, -1149, -1149, -1149, -1149, -1149, 1282, 3354, - -1149, 3851, 394, -1149, -1149, -1149, 3879, 3907, -1149, 3935, - 1285, -1149, -1149, 1241, 1287, 6981, -1149, 1288, 1290, 1292, - 1295, -1149, 1150, -1149, -1149, 4354, 2801, 1298, 1156, -1149, - 3354, -1149, 1152, 348, -1149, 1158, 375, -1149, 1175, 405, - -1149, 1177, 5845, 1300, 2232, 1315, 1183, 3354, -1149, 2808, - 414, -1149, 492, 570, -1149, 1318, 3963, 1232, 3354, -1149, - 3354, -1149, -1149, 3279, 2878, 1327, -1149, 2232, 2232, 2232, - 2232, -1149, 3354, 4979, 5005, -1149, 2232, 3354, 1328, -1149, - -1149, -1149, -2, -1149, 1237, -1149, 5031, 1331, 1333, 1335, - 1340, 1341, 1199, -1149, -1149, -1149, -1149, -1149, 2232, 3279, - -1149, -1149, 16, 3683, -1149, 3135, 156, 3135, 156, 3135, - 156, 1346, -1149, 818, 2232, -1149, 3991, 196, 3279, 196, - -1149, -1149, 3354, 4019, 4047, 822, -1149, -1149, 1229, 1230, - 1231, 1233, 1235, 6981, 3354, 3354, 825, 6981, -1149, 1368, - -1149, 3354, -1149, -1149, -1149, -1149, -1149, 3354, 826, 829, - 1236, 3354, -1149, 4075, 577, 260, 4103, 587, 424, 4131, - 608, 429, -1149, 2232, 1374, 1317, 2271, 1238, 617, 833, - 621, 2912, -1149, -1149, 1382, 1385, 1386, 1387, 1389, 3354, - 6939, 5057, 31, -1149, 5083, 4159, 1390, 1392, -1149, 4187, - 1393, 3354, 1394, 1396, 3354, 1397, 1398, 3354, 1399, 1255, - -1149, 3354, -1149, 156, -1149, 3279, 1400, 2808, -1149, -1149, - -1149, -1149, -1149, -1149, 834, -1149, 3354, -1149, 2232, 3354, - -1149, -1149, -1149, -1149, -1149, 1257, 4215, -1149, -1149, 1258, - 4243, -1149, -1149, 1260, 4271, -1149, 1405, 2945, 470, 2415, - 838, -1149, 692, 841, 1407, 1262, 6960, 842, 4299, 156, - 1412, 156, 1413, 156, 1414, -1149, -1149, -1149, -1149, 156, - 1416, 3279, 1417, -1149, 485, -1149, 1272, 1419, 525, -1149, - 1278, 528, -1149, 1279, 574, -1149, 1281, 578, -1149, 847, - -1149, 851, -1149, 1283, 2232, -1149, 1423, 156, 1426, 156, - 1428, 156, -1149, 1430, 485, 1431, 485, 854, -1149, 583, - -1149, 657, -1149, 693, -1149, -1149, -1149, 855, -1149, 1432, - 1433, 1434, 1436, 485, 1437, -1149, -1149, -1149, -1149, -1149, - -1149 + 3557, 30, 77, 3671, -1171, -1171, 1807, 79, -25, -51, + 18, 64, 115, 133, 139, -90, 2, 48, 165, 84, + 158, -56, 164, 169, 149, 156, 269, 350, 306, 310, + -5, 320, 508, 559, 60, 272, 340, 277, 163, 163, + 281, 323, 34, 372, 376, 398, 12, 40, 414, 453, + 457, 1961, 470, 333, 341, 352, 13, 27, -1171, 362, + -1171, 472, 364, -1171, 537, 546, 0, 17, 425, 436, + 442, 450, -1171, -1171, -1171, -1171, -1171, -1171, -1171, -1171, + -1171, -1171, -1171, -1171, -1171, -1171, -1171, -1171, -1171, -1171, + -1171, 19, 447, 78, -1171, -1171, -1171, 33, 100, 155, + 199, 220, 411, 478, 540, 556, 598, 604, 605, 611, + 614, 615, 639, 657, 662, 689, 690, 705, 455, 459, + 466, 488, -1171, 653, 516, 517, 522, -1171, -1171, -1171, + -1171, -1171, -1171, -1171, 3368, 3368, 3368, -1171, -1171, 3368, + 2924, 21, 677, 237, 3368, 679, 975, -1171, 700, 703, + 3368, 685, -1171, 3368, -1171, -1171, -1171, -1171, 3368, 3293, + 3368, 3368, 564, 3368, 3293, 3368, 3368, 568, 3293, 3368, + 3368, 2257, 571, 539, -1171, 572, 575, 1961, 1961, 1961, + 576, -1171, -1171, -1171, -1171, 582, 608, 644, 2257, 3368, + 792, 2257, 163, 163, 163, 3368, 3368, 218, -1171, 271, + 163, 641, 672, 686, 3145, 296, -70, 694, 708, 1961, + 2257, 711, 28, 682, -1171, 860, -1171, 709, 718, 728, + 729, -57, -1171, 22, 888, 894, 895, 2405, 1637, -1171, + -1171, 394, -1171, 897, -1171, 902, 3368, 3368, 3368, 760, + 3368, 761, 819, 3368, 3368, -1171, 3368, 917, -1171, 926, + -1171, 927, -1171, 349, 349, 349, 349, 796, 3368, 948, + 812, -1171, -1171, -1171, 959, 3368, 3368, 3368, 3368, 3368, + 3368, 3368, 3368, 3368, 3368, 3368, 3368, 3368, 3368, 3368, + 3368, 3368, 3368, 3368, 3368, 3368, 3368, 3368, 3368, 3368, + 3368, 3368, 3368, 3368, 3368, 3368, 3368, 3368, 3368, 3368, + 3368, 3368, 3368, 3368, 3368, 3368, 3368, 349, 349, 349, + 349, 3368, 349, 349, 349, -10, 835, 835, 835, 5908, + 11, 3293, 5149, 73, 831, 985, 858, 857, -1171, 864, + 3479, 1270, -1171, -1171, 3368, 3368, 3368, 3368, 3368, 3368, + 3368, 3368, 3368, 3368, 3368, 3368, 3368, 3368, 3368, -1171, + -1171, 1419, 98, 4447, 5929, 3293, 1665, -1171, 632, 5950, + 5971, 3368, 5992, 715, 6013, 6034, 3368, 720, 6055, 6076, + 1025, 3368, 3368, 3368, 3368, 1029, 1038, 1038, 3368, 898, + 899, 900, 903, 3368, 3368, 3368, 1046, 4367, 906, 1049, + 74, -1171, -1171, 4473, 4499, 163, 163, 237, 237, 253, + 3368, 3368, 3368, 3145, 3145, 3368, 3479, 275, -1171, 3368, + 3368, 3368, 3368, 1051, 1052, 3368, 1054, -1171, 3368, 3368, + 797, -1171, 3293, 3293, 3368, 3368, 3078, -1171, 3368, -1171, + -1171, -1171, 3293, 835, -1171, -1171, 735, 3368, 2553, -1171, + -1171, 6097, 6118, 6139, 963, 4525, -1171, 911, 2991, 6160, + 5172, -1171, -1171, 1685, -1171, 1840, 753, 918, -1171, 919, + 921, 922, 3368, 5195, 358, 3368, 10, -1171, 6181, 5218, + 6202, 5241, 6223, 5264, 6244, 5287, 6265, 5310, 6286, 5333, + 6307, 5356, 6328, 5379, 6349, 5402, 6370, 5425, 6391, 5448, + 4551, 4577, 6412, 5471, 6433, 5494, 6454, 5517, 6475, 5540, + 6496, 5563, 6517, 5586, 4603, 4629, 4655, 4681, 4707, 4733, + 273, 923, 924, 929, 1454, 925, 931, 928, 3368, -1171, + 2257, 2257, 752, 65, 78, 3368, 1067, 1073, 15, 930, + -1171, -38, 167, -37, 90, -1171, -1171, 3071, 803, 997, + 1083, 1083, 241, 241, 241, 241, 545, 545, 835, 835, + 835, 835, -1171, 6, 3293, 3368, 1078, 3293, 3293, 982, + 1082, 1084, 6538, 1085, 989, 1089, 1090, 6559, 993, 1092, + 1094, 3368, 6580, 3556, 6601, 6622, 3368, 2257, 1086, 1113, + 6643, 3435, 3435, 3435, 3435, 6664, 6685, 6706, 2257, 3293, + 968, -1171, 163, 3368, 3368, -1171, -1171, 965, 967, 3368, + 4759, 4785, 4811, 4421, 392, 163, 2000, 6727, 3723, 6748, + 6769, 3368, 1120, 3368, 6790, -1171, 5609, 5632, -1171, 759, + 773, 5655, 5678, -1171, 3293, 5701, 3751, 774, -1171, 3111, + 3293, 835, -1171, 1121, 1134, 1136, 974, 3368, 2148, 3368, + 3368, -1171, 8, -1171, -1171, 3368, 1142, 1140, 1144, 1147, + 1149, 5724, 70, -1171, 3779, -1171, 1000, 1008, 1003, -1171, + 1154, -1171, -1171, -1171, -1171, -1171, -1171, -1171, -1171, -1171, + -1171, -1171, -1171, -1171, -1171, -1171, -1171, -1171, -1171, -1171, + -1171, -1171, -1171, -1171, -1171, -1171, -1171, -1171, 3368, 3368, + -1171, -1171, -1171, -1171, -1171, -1171, -1171, -1171, -1171, -1171, + -1171, -1171, 3368, 3368, 3368, 3368, 3368, 3368, -1171, 3293, + 349, -1171, -1171, -1171, 3368, -1171, 349, 1155, 1156, 1011, + -1171, 29, 3368, 1158, 1159, 1483, -1171, 1161, 1015, 13, + 1164, -1171, 3293, 3293, 3293, 3293, 3368, -1171, 1035, 349, + 300, 4837, 163, 1665, -1171, 1122, 2257, 2257, 1166, 2257, + 905, 2257, 2257, 1167, 1123, 2257, 2257, 1630, 1169, 1170, + 1172, 1173, 3286, -1171, -1171, 1177, -1171, 1178, 1039, 7021, + -1171, 1042, 1043, 1045, 1181, 1189, 1190, 1192, 806, 1195, + 303, 4863, 4889, -1171, -1171, 3807, 163, 163, 163, 1197, + 1199, 1047, 1058, 35, 37, -31, -1171, 314, -1171, 392, + 1201, 1203, 1204, 1205, 7021, -1171, 1724, 1059, 1208, 1210, + 1221, 1157, 1222, 1226, 809, 57, -1171, -1171, 3368, 814, + 2257, 2257, 2257, 1229, 4915, -1171, 3139, 684, 1230, 1234, + 5747, -1171, 1087, 1088, 1091, 1096, 1233, 1236, -1171, 1235, + -1171, 1099, 3368, 3368, 2257, 1098, -1171, 6811, 5770, 6832, + 5793, 6853, 5816, 6874, 5839, 318, 1095, 6895, 1100, -1171, + -1171, 128, 198, 1105, 1252, 2507, -1171, -1171, -1171, 13, + 3368, -1171, 817, -1171, 818, 822, 823, 832, 7021, -1171, + 1254, 14, 3368, 46, 1106, 1206, 1206, 2257, 1258, 1109, + 1110, 1262, 1264, 2257, 1115, 1266, 1267, -1171, 1272, 2257, + 2257, 2257, 1271, 1274, -1171, 2257, 1275, 1276, 1277, 1278, + 2257, 2257, 2257, -1171, 1280, 560, 3368, 3368, 3368, 1125, + -84, -79, 207, 1127, -1171, 2257, 3368, -1171, 1282, -1171, + 1284, -1171, -1171, 3145, 356, 2109, -1171, 1137, 2701, -1171, + 3293, -1171, -1171, -1171, 1138, -1171, -1171, 1143, 7021, -1171, + 1291, 1292, 1198, -1171, 3368, 3368, 3368, -1171, 1295, 1296, + 1151, 2257, 2257, 2257, 2257, -1171, 358, -1171, 3368, 4941, + 4967, 833, -1171, 3368, -1171, -1171, -1171, -1171, -1171, -1171, + -1171, -1171, -1171, -1171, -1171, -1171, 2257, 78, 3368, 1299, + 1302, 15, -1171, 1301, 5862, 13, -1171, 1303, 1304, 1306, + 1307, -1171, -1171, 349, 4993, -1171, 3368, 163, 1309, 1310, + 1311, -1171, 3368, 3368, -1171, -1171, 1312, 3368, -1171, -1171, + 1314, 1315, 1317, 1215, 3368, -1171, 1318, 2257, 2257, 2257, + 2257, 1319, 987, 1320, 3368, -1171, 3435, 3835, 6916, 3363, + 237, 163, 1321, 163, 1323, 163, 1324, 3368, 602, 1153, + 6937, -1171, -1171, 3863, 347, -1171, 1325, 1425, 1326, 163, + 1425, 1327, 840, 3368, -1171, -1171, -1171, 2257, 3667, 638, + 6958, -1171, 2997, 1333, 1183, 1184, 1186, 1187, -1171, 390, + 7021, 3368, 3368, 2257, 1188, 841, 7021, 1337, 1342, 2546, + -1171, 1343, 1346, -1171, 1196, -1171, -1171, -1171, -1171, -1171, + 1347, 3368, 3891, 85, -1171, -1171, -1171, 3919, 3947, -1171, + 3975, 1349, -1171, -1171, 1308, 1351, 7021, -1171, 1352, 1355, + 1356, 1357, -1171, 1209, -1171, -1171, 4394, 2655, 1358, 1211, + -1171, 3368, -1171, 1212, 359, -1171, 1216, 368, -1171, 1218, + 399, -1171, 1219, 5885, 1360, 2257, 1348, 1220, 3368, -1171, + 2849, 429, -1171, 456, 458, -1171, 1362, 4003, 1279, 3368, + -1171, 3368, -1171, -1171, 3293, 2694, 1365, -1171, 2257, 2257, + 2257, 2257, -1171, 3368, 5019, 5045, -1171, 2257, 3368, 1371, + -1171, -1171, -1171, 13, -1171, 1281, -1171, 5071, 1372, 1374, + 1375, 1376, 1377, 1231, -1171, -1171, -1171, -1171, -1171, 2257, + 3293, -1171, -1171, 237, 3695, -1171, 3145, 392, 3145, 392, + 3145, 392, 1379, -1171, 844, 2257, -1171, 4031, 163, 3293, + 163, -1171, -1171, 3368, 4059, 4087, 847, -1171, -1171, 1237, + 1238, 1257, 1259, 1232, 7021, 3368, 3368, 848, 7021, -1171, + 1384, -1171, 3368, -1171, -1171, -1171, -1171, -1171, 3368, 853, + 859, 1260, 3368, -1171, 4115, 462, 407, 4143, 481, 432, + 4171, 501, 589, -1171, 2257, 1385, 1354, 2296, 1263, 503, + 862, 513, 2842, -1171, -1171, 1386, 1387, 1409, 1414, 1417, + 3368, 6979, 5097, 24, -1171, 5123, 4199, 1418, 1420, -1171, + 4227, 1421, 3368, 1424, 1426, 3368, 1427, 1431, 3368, 1432, + 1313, -1171, 3368, -1171, 392, -1171, 3293, 1455, 2849, -1171, + -1171, -1171, -1171, -1171, -1171, 865, -1171, 3368, -1171, 2257, + 3368, -1171, -1171, -1171, -1171, -1171, 1328, 4255, -1171, -1171, + 1329, 4283, -1171, -1171, 1330, 4311, -1171, 1460, 2919, 591, + 2444, 869, -1171, 515, 870, 1461, 1331, 7000, 874, 4339, + 392, 1462, 392, 1463, 392, 1465, -1171, -1171, -1171, -1171, + 392, 1467, 3293, 1468, -1171, 349, -1171, 1332, 1470, 626, + -1171, 1334, 634, -1171, 1335, 714, -1171, 1336, 716, -1171, + 878, -1171, 882, -1171, 1338, 2257, -1171, 1471, 392, 1475, + 392, 1476, 392, -1171, 1477, 349, 1489, 349, 885, -1171, + 800, -1171, 813, -1171, 837, -1171, -1171, -1171, 889, -1171, + 1495, 1497, 1498, 1500, 349, 1501, -1171, -1171, -1171, -1171, + -1171, -1171 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -1149, -1149, -1149, -1149, 573, -1149, -1149, -1149, -1149, 176, - -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, -1149, - -1149, -1149, -300, -3, -1149, -201, -1149, 579, 1443, -1149, - -1149, -1149, -1149, 3, -391, -202, -1149, -1149, -1149, -1149, - -1149, -1149, 1445, -1149, -1149, -1149, -1149, -1149, -1149, -1149, - -1149, -1149, -1149, -1149, -1149, -1149, -724, -717, -1149, -1149, - 1085, -1149, -1149, -1149, -1149, -1149, -1149, -6, -1149, 100, - -1149, -1148, 521, -114, 28, 43, -695, 480, -1149, -215, - 8 + -1171, -1171, -1171, -1171, 550, -1171, -1171, -1171, -1171, 229, + -1171, -1171, -1171, -1171, -1171, -1171, -1171, -1171, -1171, -1171, + -1171, -1171, -315, 20, -1171, -11, -1171, 624, 1508, -1171, + -1171, -1171, -1171, 3, -396, -201, -1171, -1171, -1171, -1171, + -1171, -1171, 1509, -1171, -1171, -1171, -1171, -1171, -1171, -1171, + -1171, -1171, -1171, -1171, -1171, -1171, -760, -753, -1171, -1171, + 1139, -1171, -1171, -1171, -1171, -1171, -1171, -6, -1171, 43, + -1171, -1170, 435, 49, 329, -71, -694, 523, -1171, -245, + -2 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -1459,1584 +1469,1593 @@ static const yytype_int16 yypgoto[] = #define YYTABLE_NINF -5 static const yytype_int16 yytable[] = { - 145, 404, 224, 144, 594, 595, 76, 817, 509, 5, - 725, 418, 504, 4, 147, 205, 990, 308, 1226, 642, - 312, 211, 861, 716, 443, 444, 445, 242, 151, 234, - 150, 236, 542, 437, 227, 439, 250, 1307, 251, 786, - 1238, 166, 166, 214, 414, 215, 415, 161, 148, 787, - 786, 993, 157, 852, 407, 788, 789, 393, 394, 158, - 787, 408, 206, 374, 375, 149, 788, 789, 393, 394, - 925, 153, 207, 923, 395, 440, 248, 494, 495, 496, - 497, 154, 499, 500, 501, 396, 216, 37, 38, 39, - 40, 330, 331, 332, 411, 252, 45, 253, 333, 48, - 249, 393, 394, 643, 644, 645, 646, 117, 118, 119, - 120, 309, 310, 121, 708, 162, 167, 722, 406, 136, - 137, 155, 163, 212, 922, 161, 826, 301, 302, 303, - 505, 187, 304, 307, 188, 1044, 726, 316, 196, 198, - 156, 204, 726, 336, 159, 313, 338, 853, 854, 818, - 225, 339, 348, 351, 352, 170, 354, 348, 356, 357, - 1337, 348, 360, 361, 981, 136, 137, 171, 647, 213, - 243, 717, 244, 172, 152, 228, 235, 245, 237, 543, - 393, 394, 385, 1308, 124, 125, 349, 416, 391, 392, - 173, 349, 157, 162, 708, 349, 160, 392, 169, 720, - 721, 350, 393, 394, 603, 723, 355, 710, 923, 164, - 359, 393, 394, 136, 137, 425, 426, 427, 589, 429, - 826, 174, 432, 433, 786, 434, 1387, 596, 625, 129, - 130, 131, 132, 176, 787, 165, 177, 447, 178, 168, - 788, 789, 1026, 1027, 452, 453, 454, 455, 456, 457, - 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, - 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, - 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, - 488, 489, 490, 491, 492, 493, 393, 394, 1083, 537, - 498, 388, 389, 184, 538, 254, 185, 255, 186, 397, - 348, 695, 1032, 405, 1033, 510, 696, 169, 549, 129, - 130, 131, 132, 521, 522, 523, 524, 525, 526, 527, - 528, 529, 530, 531, 532, 533, 534, 535, 786, 136, - 137, 192, 193, 175, 349, 871, 709, 970, 787, 547, - 551, 194, 551, 508, 788, 789, 1161, 555, 195, 506, - 975, 1162, 560, 393, 394, 189, 547, 348, 393, 394, - 190, 569, 570, 571, 572, 393, 394, 136, 137, 1034, - 577, 1035, 179, 548, 602, 582, 583, 584, 768, 769, - 770, 1036, 200, 1037, 256, 201, 257, 258, 202, 259, - 548, 349, 597, 598, 599, 301, 302, 600, 313, 313, - 191, 604, 605, 606, 607, 393, 394, 611, 199, 208, - 613, 614, 209, 1282, 348, 348, 618, 619, 260, 210, - 261, 911, 217, 262, 828, 263, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 567, 331, 332, - 638, 393, 394, 641, 333, 640, 393, 394, 349, 349, - 264, 218, 265, 1133, 266, 219, 267, 924, 129, 130, - 131, 132, 1137, 616, 617, 129, 130, 131, 132, 220, - 192, 193, 1245, 268, 1248, 269, 1251, 1229, 136, 137, - 194, 230, 845, 393, 394, 136, 137, 203, 847, 440, - 248, 221, 786, 592, 593, 222, 704, 786, 270, 1195, - 271, 389, 787, 713, 711, 223, 229, 787, 788, 789, - 393, 394, 870, 788, 789, 272, 712, 273, 274, 232, - 275, 117, 118, 119, 120, 231, 1197, 121, 923, 393, - 394, 923, 348, 729, 923, 704, 233, 733, 786, 247, - 393, 394, 238, 734, 735, 737, 239, 240, 787, 393, - 394, 974, 976, 241, 788, 789, 1199, 276, 348, 277, - 292, 735, 754, 293, 294, 1207, 349, 759, 278, 1328, - 279, 295, 766, 766, 766, 766, 296, 1285, 736, 738, - 348, 728, 1288, 297, 778, 779, 767, 767, 767, 767, - 782, 298, 349, 786, 299, 736, 786, 311, 124, 125, - 317, 248, 799, 787, 801, 334, 787, 751, 335, 788, - 789, 923, 788, 789, 349, 1358, 337, 1361, 813, 1364, - 815, 816, 280, 1347, 281, 1367, 819, 393, 394, 775, - 368, 386, 117, 118, 119, 120, 827, 551, 121, 552, - 1122, 923, 786, 1208, 923, 353, 786, 923, 358, 367, - 923, 786, 787, 1389, 369, 1391, 787, 1393, 788, 789, - 398, 787, 788, 789, 1150, 370, 399, 788, 789, 836, - 837, 282, 923, 283, 923, 284, 923, 285, 1376, 376, - 286, 1378, 287, 838, 839, 840, 841, 842, 843, 777, - 348, 365, 288, 944, 289, 846, 381, 372, 372, 372, - 382, 290, 792, 291, 855, 393, 394, 383, 384, 124, - 125, 387, 393, 394, 348, 348, 348, 348, 868, 400, - 409, 1209, 393, 394, 349, 786, 348, 1380, 1281, 372, - 412, 1382, 551, 410, 557, 787, 1400, 413, 1284, 844, - 419, 788, 789, 393, 394, 417, 424, 348, 349, 349, - 349, 349, 393, 394, 422, 420, 393, 394, 421, 1287, - 349, 786, 423, 864, 865, 866, 867, 551, 1295, 561, - 318, 787, 1297, 428, 430, 874, 1088, 788, 789, 431, - 435, 349, 319, 320, 321, 322, 323, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 891, 436, 7, 8, - 333, 1240, 632, 551, 633, 707, 882, 446, 883, 1151, - 1401, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 957, 958, 393, 394, 333, - 873, 945, 448, 515, 16, 17, 516, 19, 20, 517, - 22, 518, 24, 1351, 25, 827, 1402, 28, 29, 977, - 31, 32, 33, 551, 982, 752, 36, 136, 137, 551, - 333, 805, 541, 551, 244, 806, 992, 142, 438, 245, - 995, 449, 451, 328, 329, 330, 331, 332, 511, 52, - 53, 54, 333, 915, 916, 917, 551, 551, 890, 909, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 512, 1028, 1029, 1030, 333, 983, - 513, 984, 136, 137, 1039, 1041, 544, 502, 1042, 244, - 551, 1112, 985, 1113, 245, 348, 514, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 1056, 1057, 1058, 615, - 333, 180, 142, 551, 181, 986, 551, 182, 987, 183, - 1068, 1066, 551, 545, 988, 1074, 551, 546, 994, 349, - 551, 1071, 1010, 1072, 551, 1167, 1145, 1168, 568, 1253, - 1077, 1254, 573, 551, 1051, 1264, 1071, 1071, 1272, 1276, - 551, 574, 1277, 1076, 551, 1167, 1296, 1334, 578, 551, - 1091, 1350, 551, 1071, 1352, 1356, 1096, 1097, 551, 585, - 1383, 1099, 1384, 1256, 1385, 1071, 1403, 1399, 1404, 1105, - 579, 588, 580, 581, 608, 587, 610, 612, 623, 1115, - 634, 1116, 626, 635, 1043, 705, 706, 636, 637, 697, - 698, 699, 1132, 702, 313, 1117, 714, 701, 715, 703, - 348, 719, 730, 348, 739, 740, 1146, 741, 743, 745, - 744, 746, 748, 749, 1154, 750, 761, 763, 776, 780, - 781, 800, 812, 1163, 1164, 809, 810, 811, 1155, 820, - 821, 822, 831, 823, 349, 824, 832, 349, 833, 835, - 849, 850, 851, 1176, 856, 857, 860, 859, 863, 869, - 877, 880, 1329, 886, 887, 760, 893, 1092, 894, 895, - 896, 899, 901, 900, 902, 903, 774, 905, 904, 906, - 907, 908, 910, 918, 1193, 920, 919, 520, 921, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 1206, 1123, 547, 1126, 333, 1129, 926, 927, 1372, - 928, 929, 1213, 932, 1214, 931, 1140, 348, 1142, 1143, - 933, 934, 935, 936, 937, 941, 1223, 946, 947, 954, - 949, 1227, 950, 953, 951, 952, 955, 548, 956, 1395, - 961, 1398, 971, 973, 978, 979, 989, 997, 1001, 1004, - 996, 349, 1005, 348, 1002, 1003, 1008, 1009, 1409, 1243, - 1011, 1246, 1015, 1249, 1018, 313, 1215, 1007, 1016, 1031, - 1019, 1020, 348, 1021, 1025, 1048, 1261, 1053, 1038, 1052, - 1054, 1055, 1059, 1100, 1060, 1078, 1061, 349, 1270, 1271, - 1079, 1081, 1103, 1084, 1085, 1274, 1086, 1087, 1093, 1090, - 1094, 1275, 1239, 1095, 1098, 1279, 349, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 1259, 1101, 1102, 1106, 333, 1111, 1114, 1124, 1127, - 1130, 878, 879, 1074, 881, 1138, 884, 885, 1134, 1141, - 888, 889, 1144, 1156, 1157, 1316, 1158, 1159, 1320, 1160, - 1169, 1324, 1170, 1166, 1172, 1327, 1173, 1174, 1175, 348, - 1181, 348, 1182, 1183, 1184, 1244, 1185, 1247, 1186, 1250, - 1336, 1187, 1188, 1338, 1191, 1194, 1202, 1258, 1192, 1260, - 1196, 322, 323, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 1204, 349, 1210, 349, 333, 1198, 1212, 1200, - 938, 939, 940, 1217, 1228, 1205, 1230, 1232, 1330, 1233, - 1333, 1234, 89, 300, 248, 348, 1235, 1236, 93, 94, - 95, 1237, 1252, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 1273, 117, 118, 119, 120, 349, - 1290, 121, 1265, 1266, 1267, 1291, 1268, 1269, 1299, 1278, - 1294, 1300, 1301, 1302, 1369, 1303, 1311, 1332, 1312, 1314, - 1317, 1000, 1318, 1321, 1322, 1325, 1331, 1006, 1326, 1339, - 1341, 1345, 1343, 1353, 1354, 1012, 1013, 1014, 1359, 1362, - 1365, 1017, 1368, 1370, 1374, 1375, 1022, 1023, 1024, 1388, - 1377, 1379, 1390, 1381, 1392, 1386, 1394, 1396, 1405, 1406, - 1407, 1040, 1408, 1410, 991, 1304, 75, 1047, 83, 0, - 1050, 123, 124, 125, 126, 127, 128, 536, 999, 1080, - 576, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1062, 1063, 1064, 1065, 133, 134, 0, 0, 0, 135, - 0, 700, 0, 0, 138, 89, 340, 0, 0, 141, - 0, 93, 94, 95, 0, 1075, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 341, - 0, 0, 342, 0, 0, 343, 0, 344, 0, 1107, - 1108, 1109, 1110, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 37, 38, 39, 40, 41, 0, 0, - 0, 0, 45, 0, 0, 48, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1147, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 1165, 0, 123, 333, 0, 126, 127, 128, - 0, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 401, 1139, 333, - 0, 0, 135, 0, 0, 0, 0, 403, 0, 0, - 0, 0, 141, 0, 195, 565, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 89, 340, 0, 0, - 0, 0, 93, 94, 95, 1203, 0, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 1218, 1219, - 1220, 1221, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 0, 0, 342, 7, 8, 343, 0, 344, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 37, 38, 39, 40, 41, 0, - 0, 858, 0, 45, 0, 1255, 48, 0, 0, 515, - 16, 17, 516, 19, 20, 517, 22, 518, 24, 0, - 25, 0, 0, 28, 29, 0, 31, 32, 33, 0, - 0, 0, 36, 0, 0, 123, 0, 0, 126, 127, - 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1289, 52, 53, 54, 133, 345, - 0, 0, 0, 135, 0, 0, 0, 0, 138, 0, - 0, 0, 0, 141, 0, 0, 565, 89, 90, 91, - 0, 92, 0, 93, 94, 95, 0, 0, 96, 97, + 146, 597, 598, 406, 148, 249, 77, 1237, 525, 459, + 460, 461, 737, 420, 655, 828, 212, 239, 520, 728, + 1002, 167, 251, 257, 152, 323, 145, 427, 150, 1249, + 1318, 242, 416, 862, 417, 871, 4, 789, 206, 934, + 167, 927, 932, 929, 215, 177, 216, 790, 178, 453, + 179, 455, 1005, 791, 792, 395, 396, 793, 794, 158, + 395, 396, 510, 511, 512, 513, 159, 515, 516, 517, + 154, 1041, 720, 1042, 456, 263, 1043, 5, 1044, 409, + 524, 197, 199, 263, 205, 207, 410, 217, 358, 137, + 138, 264, 149, 363, 426, 208, 259, 367, 151, 143, + 168, 260, 656, 657, 658, 659, 118, 119, 120, 121, + 188, 158, 122, 189, 118, 119, 120, 121, 732, 734, + 122, 155, 213, 324, 325, 928, 931, 930, 316, 317, + 318, 863, 864, 319, 322, 720, 137, 138, 331, 156, + 521, 518, 738, 259, 351, 157, 328, 353, 260, 1348, + 738, 160, 354, 356, 359, 360, 250, 362, 356, 364, + 365, 829, 356, 368, 369, 137, 138, 660, 214, 240, + 258, 729, 259, 252, 153, 993, 243, 260, 428, 418, + 1319, 932, 265, 387, 266, 395, 396, 125, 126, 393, + 394, 130, 131, 132, 133, 125, 126, 161, 394, 130, + 131, 132, 133, 137, 138, 987, 171, 606, 722, 172, + 837, 137, 138, 395, 396, 1398, 137, 138, 721, 137, + 138, 433, 356, 837, 395, 396, 375, 376, 377, 592, + 441, 442, 443, 165, 445, 390, 391, 448, 449, 170, + 450, 327, 162, 399, 162, 638, 735, 407, 553, 267, + 522, 268, 463, 554, 130, 131, 132, 133, 413, 468, + 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, + 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, + 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, + 509, 1095, 193, 194, 269, 514, 270, 166, 37, 38, + 39, 40, 195, 169, 163, 356, 163, 45, 170, 196, + 48, 164, 173, 733, 130, 131, 132, 133, 537, 538, + 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 526, 137, 138, 395, 396, 271, 433, + 272, 619, 620, 456, 263, 562, 174, 395, 396, 175, + 567, 627, 1045, 176, 1046, 572, 573, 574, 575, 273, + 201, 274, 580, 202, 397, 180, 203, 585, 586, 587, + 343, 344, 345, 346, 347, 118, 119, 120, 121, 348, + 191, 122, 395, 396, 600, 601, 602, 316, 317, 603, + 328, 328, 437, 607, 608, 609, 610, 839, 599, 614, + 395, 396, 616, 617, 395, 396, 356, 356, 621, 622, + 625, 190, 626, 708, 789, 209, 356, 398, 709, 210, + 605, 629, 631, 192, 790, 395, 396, 200, 595, 596, + 791, 792, 395, 396, 793, 794, 391, 1256, 211, 1259, + 881, 1262, 408, 395, 396, 558, 651, 219, 916, 654, + 789, 220, 193, 194, 218, 856, 125, 126, 982, 933, + 790, 858, 195, 558, 235, 789, 791, 792, 245, 204, + 793, 794, 236, 740, 653, 790, 395, 396, 357, 1240, + 237, 791, 792, 357, 880, 793, 794, 357, 395, 396, + 789, 238, 1148, 932, 137, 138, 932, 395, 396, 932, + 790, 244, 625, 1055, 1206, 246, 791, 792, 778, 725, + 793, 794, 724, 1208, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 438, 346, 347, 395, 396, + 1172, 247, 348, 723, 1339, 1173, 986, 988, 356, 741, + 248, 631, 743, 814, 1210, 181, 434, 357, 182, 819, + 275, 183, 276, 184, 1293, 757, 1035, 1036, 395, 396, + 762, 771, 772, 773, 253, 769, 769, 769, 769, 770, + 770, 770, 770, 356, 1218, 254, 932, 781, 782, 1296, + 1369, 255, 1372, 785, 1375, 395, 396, 395, 396, 256, + 1378, 395, 396, 262, 307, 804, 370, 806, 308, 185, + 437, 1219, 186, 1220, 187, 309, 932, 1292, 356, 932, + 395, 396, 932, 386, 356, 932, 389, 277, 1400, 278, + 1402, 824, 1404, 826, 827, 780, 1295, 310, 855, 830, + 395, 396, 395, 396, 1133, 414, 1161, 932, 797, 932, + 357, 932, 395, 396, 395, 396, 1298, 789, 1306, 789, + 311, 874, 875, 876, 877, 312, 313, 790, 1308, 790, + 1362, 314, 838, 791, 792, 791, 792, 793, 794, 793, + 794, 326, 847, 848, 434, 332, 345, 346, 347, 279, + 352, 280, 956, 348, 789, 372, 849, 850, 851, 852, + 853, 854, 789, 356, 790, 281, 349, 282, 857, 350, + 791, 792, 790, 361, 793, 794, 865, 366, 791, 792, + 371, 373, 793, 794, 374, 378, 356, 356, 356, 356, + 878, 383, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 438, 346, 347, 1299, 283, 1358, 284, + 348, 357, 357, 285, 287, 286, 288, 384, 1100, 1144, + 289, 357, 290, 291, 293, 292, 294, 632, 334, 335, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, + 346, 347, 789, 1387, 789, 883, 348, 558, 295, 559, + 296, 1389, 790, 385, 790, 1162, 388, 400, 791, 792, + 791, 792, 793, 794, 793, 794, 297, 1251, 298, 7, + 8, 299, 948, 300, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 346, 347, 401, 920, + 921, 922, 348, 419, 957, 838, 969, 970, 301, 303, + 302, 304, 402, 411, 531, 16, 17, 532, 19, 20, + 533, 22, 534, 24, 305, 25, 306, 412, 28, 29, + 415, 31, 32, 33, 994, 422, 421, 36, 789, 1062, + 558, 1391, 564, 1393, 423, 558, 1004, 568, 790, 424, + 425, 789, 989, 357, 791, 792, 632, 744, 793, 794, + 558, 790, 628, 429, 53, 54, 55, 791, 792, 430, + 431, 793, 794, 439, 645, 789, 646, 558, 440, 719, + 1037, 1038, 1039, 444, 558, 790, 810, 446, 357, 1048, + 1050, 791, 792, 451, 447, 793, 794, 1053, 558, 558, + 811, 817, 452, 454, 356, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 462, 1068, 1069, + 1070, 348, 464, 357, 618, 717, 718, 1411, 889, 357, + 890, 558, 1080, 914, 558, 467, 947, 1086, 465, 558, + 1412, 949, 995, 558, 996, 997, 1054, 558, 558, 998, + 999, 333, 1089, 348, 527, 1088, 1078, 558, 1083, 1000, + 1084, 1123, 528, 1124, 1413, 558, 1178, 1156, 1179, 1264, + 1102, 1265, 558, 1083, 1275, 1283, 1107, 1108, 1083, 529, + 1287, 1110, 763, 143, 558, 1267, 1288, 558, 1116, 1307, + 1178, 530, 1345, 777, 558, 558, 1361, 1363, 1126, 1083, + 1127, 1367, 571, 558, 1128, 1394, 576, 1395, 357, 1396, + 1083, 1143, 1410, 328, 1414, 577, 1415, 581, 582, 583, + 1103, 356, 584, 588, 356, 591, 590, 1157, 611, 613, + 615, 357, 357, 357, 357, 636, 1165, 639, 647, 648, + 1166, 649, 650, 726, 711, 1174, 1175, 727, 710, 712, + 714, 715, 731, 716, 1134, 742, 1137, 745, 1140, 746, + 764, 747, 749, 1226, 750, 1187, 751, 752, 754, 755, + 1151, 756, 1153, 1154, 1340, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 766, + 1383, 779, 783, 348, 784, 1204, 805, 823, 820, 1250, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 821, 1217, 822, 433, 348, 831, 832, 1270, 842, + 1406, 833, 1409, 1224, 834, 1225, 835, 843, 356, 844, + 846, 859, 860, 861, 866, 867, 870, 1234, 869, 1420, + 873, 879, 1238, 887, 893, 884, 898, 899, 894, 900, + 901, 885, 886, 904, 888, 905, 891, 892, 910, 906, + 895, 896, 907, 908, 356, 909, 911, 912, 913, 915, + 1254, 923, 1257, 925, 1260, 924, 328, 926, 935, 936, + 944, 937, 938, 356, 941, 940, 942, 1272, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 943, 945, 1281, + 1282, 348, 946, 953, 958, 1341, 1285, 1344, 959, 965, + 966, 967, 1286, 961, 962, 983, 1290, 963, 968, 1255, + 985, 1258, 964, 1261, 973, 950, 951, 952, 990, 991, + 1001, 1269, 1006, 1271, 1011, 1012, 1013, 1007, 1014, 357, + 1015, 1017, 1018, 1019, 1086, 1024, 536, 1020, 1047, 972, + 1025, 1040, 1027, 1028, 1029, 1030, 1327, 1034, 1051, 1331, + 1052, 1380, 1335, 1059, 1063, 1064, 1338, 1065, 1066, 1067, + 356, 1071, 356, 1072, 1073, 1090, 1091, 1093, 1145, 1096, + 1097, 1347, 1098, 1099, 1349, 1104, 1105, 1106, 1109, 1111, + 1114, 1112, 1010, 1113, 1117, 1122, 1125, 1135, 1016, 1138, + 1141, 1149, 1152, 1155, 1021, 1022, 1023, 1167, 1168, 1169, + 1026, 1170, 1171, 1180, 1177, 1031, 1032, 1033, 1181, 1185, + 1183, 1343, 1184, 1186, 1192, 1215, 356, 1194, 1195, 1193, + 1049, 1196, 1197, 1198, 1202, 1199, 1213, 1203, 1221, 1205, + 1058, 1228, 1207, 1061, 1209, 1211, 1216, 1239, 1243, 1223, + 1244, 1245, 1246, 1247, 1241, 1263, 357, 1248, 1280, 357, + 1284, 1301, 1310, 1311, 1276, 1277, 1074, 1075, 1076, 1077, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, + 344, 345, 346, 347, 1278, 1312, 1279, 1289, 348, 1305, + 1313, 1087, 1302, 1314, 1322, 552, 1323, 1325, 90, 221, + 1328, 1003, 1329, 1332, 94, 95, 96, 1333, 1336, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 0, - 117, 118, 119, 120, 0, 630, 121, 0, 0, 7, - 8, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 713, 1342, 1118, 1119, 1120, 1121, 1356, 1364, 1370, 1373, + 1337, 1376, 223, 1379, 1381, 224, 1386, 1399, 225, 434, + 226, 1401, 1403, 1405, 1350, 1352, 1354, 1365, 1385, 868, + 1388, 1390, 1392, 357, 1397, 1407, 37, 38, 39, 40, + 41, 1416, 1158, 1417, 1418, 45, 1419, 1421, 48, 1315, + 1009, 76, 84, 0, 1092, 0, 579, 0, 1176, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 357, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 515, 16, 17, 516, 19, 20, - 517, 22, 518, 24, 0, 25, 0, 0, 28, 29, - 0, 31, 32, 33, 0, 0, 0, 36, 0, 0, - 122, 0, 0, 0, 0, 0, 123, 124, 125, 126, - 127, 128, 0, 0, 0, 0, 129, 130, 131, 132, - 52, 53, 54, 0, 0, 0, 0, 0, 0, 133, - 134, 0, 0, 0, 135, 0, 136, 137, 0, 138, - 0, 139, 0, 140, 141, 0, 142, 89, 340, 371, - 0, 0, 0, 93, 94, 95, 0, 0, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 0, - 631, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 341, 0, 0, 342, 7, 8, 343, 0, 344, + 0, 124, 0, 0, 127, 128, 129, 0, 357, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 403, 1150, 0, 348, 0, 136, + 0, 0, 0, 0, 405, 0, 0, 0, 0, 142, + 1214, 196, 435, 0, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 346, 347, 0, 0, + 0, 0, 348, 1229, 1230, 1231, 1232, 0, 0, 0, + 0, 0, 972, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 0, 972, 357, 897, 357, 0, 0, + 90, 221, 0, 0, 0, 0, 94, 95, 96, 0, + 1266, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 0, 437, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 223, 0, 0, 224, 0, 0, + 225, 357, 226, 0, 0, 0, 0, 7, 8, 1300, + 0, 0, 0, 0, 0, 0, 0, 0, 37, 38, + 39, 40, 41, 0, 0, 0, 0, 45, 0, 0, + 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 939, 0, 531, 16, 17, 532, 19, 20, 533, 22, + 534, 24, 0, 25, 0, 0, 28, 29, 0, 31, + 32, 33, 0, 124, 972, 36, 127, 128, 129, 0, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, + 344, 345, 346, 347, 0, 0, 134, 355, 348, 0, + 0, 136, 53, 54, 55, 0, 139, 0, 0, 0, + 0, 142, 0, 0, 435, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 557, 346, 347, 0, + 90, 91, 92, 348, 93, 0, 94, 95, 96, 0, + 972, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 643, 118, 119, 120, 121, 0, 0, 122, + 0, 0, 7, 8, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 346, 347, 0, 0, + 0, 0, 348, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 531, 16, 17, + 532, 19, 20, 533, 22, 534, 24, 0, 25, 0, + 0, 28, 29, 0, 31, 32, 33, 0, 0, 0, + 36, 0, 0, 0, 0, 0, 0, 123, 0, 0, + 0, 0, 0, 124, 125, 126, 127, 128, 129, 0, + 0, 0, 0, 130, 131, 132, 133, 53, 54, 55, + 0, 0, 0, 0, 0, 0, 134, 135, 0, 0, + 0, 136, 0, 137, 138, 0, 139, 0, 140, 0, + 141, 142, 0, 143, 90, 221, 222, 0, 0, 0, + 94, 95, 96, 0, 0, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 0, 644, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 223, 0, + 0, 224, 7, 8, 225, 0, 226, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 37, 38, 39, 40, 41, - 0, 0, 0, 0, 45, 0, 0, 48, 0, 0, - 515, 16, 17, 516, 19, 20, 517, 22, 518, 24, - 0, 25, 0, 0, 28, 29, 0, 31, 32, 33, - 0, 0, 0, 36, 0, 0, 123, 0, 0, 126, - 127, 128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 52, 53, 54, 133, - 362, 0, 0, 0, 135, 0, 0, 0, 0, 138, - 0, 89, 340, 1045, 141, 0, 363, 93, 94, 95, - 0, 0, 96, 97, 98, 99, 100, 101, 102, 103, + 0, 0, 37, 38, 39, 40, 41, 0, 0, 0, + 0, 45, 0, 0, 48, 0, 0, 531, 16, 17, + 532, 19, 20, 533, 22, 534, 24, 0, 25, 0, + 0, 28, 29, 0, 31, 32, 33, 0, 0, 0, + 36, 0, 0, 0, 0, 0, 0, 124, 0, 0, + 127, 128, 129, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 53, 54, 55, + 134, 227, 0, 0, 0, 136, 0, 0, 0, 0, + 139, 0, 90, 221, 1056, 142, 0, 228, 94, 95, + 96, 0, 0, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 341, 793, 0, 342, 7, - 8, 343, 0, 344, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, - 38, 39, 40, 41, 0, 0, 0, 0, 45, 0, - 0, 48, 0, 0, 515, 16, 17, 516, 19, 20, - 517, 22, 518, 24, 0, 25, 0, 0, 28, 29, - 0, 31, 32, 33, 0, 0, 0, 36, 0, 0, - 123, 0, 0, 126, 127, 128, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 52, 53, 54, 133, 362, 0, 0, 0, 135, 0, - 0, 0, 0, 138, 0, 89, 340, 0, 141, 0, - 1046, 93, 94, 95, 0, 0, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 341, - 814, 0, 342, 7, 8, 343, 0, 344, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 37, 38, 39, 40, 41, 0, 0, - 0, 0, 45, 0, 0, 48, 0, 0, 515, 16, - 17, 516, 19, 20, 517, 22, 518, 24, 0, 25, - 0, 0, 28, 29, 0, 31, 32, 33, 0, 0, - 0, 36, 0, 0, 123, 0, 0, 126, 127, 128, + 114, 115, 116, 117, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 223, 798, 0, 224, + 7, 8, 225, 0, 226, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 52, 53, 54, 133, 362, 0, - 0, 0, 135, 0, 0, 0, 0, 138, 0, 89, - 340, 0, 141, 0, 363, 93, 94, 95, 0, 0, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 37, 38, 39, 40, 41, 0, 0, 0, 0, 45, + 0, 0, 48, 0, 0, 531, 16, 17, 532, 19, + 20, 533, 22, 534, 24, 0, 25, 0, 0, 28, + 29, 0, 31, 32, 33, 0, 0, 0, 36, 0, + 0, 0, 0, 0, 0, 124, 0, 0, 127, 128, + 129, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 53, 54, 55, 134, 227, + 0, 0, 0, 136, 0, 0, 0, 0, 139, 0, + 90, 221, 0, 142, 0, 1057, 94, 95, 96, 0, + 0, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 341, 1292, 0, 342, 7, 8, 343, - 0, 344, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 37, 38, 39, - 40, 41, 0, 0, 0, 0, 45, 0, 0, 48, - 0, 0, 515, 16, 17, 516, 19, 20, 517, 22, - 518, 24, 0, 25, 0, 0, 28, 29, 0, 31, - 32, 33, 0, 0, 892, 36, 0, 0, 123, 0, - 0, 126, 127, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 52, 53, - 54, 133, 345, 0, 0, 0, 135, 0, 0, 930, - 0, 138, 0, 89, 340, 0, 141, 0, 564, 93, - 94, 95, 0, 0, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 341, 1348, 0, - 342, 0, 0, 343, 0, 344, 0, 0, 0, 0, + 116, 117, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 223, 825, 0, 224, 7, 8, + 225, 0, 226, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 37, 38, + 39, 40, 41, 0, 0, 0, 0, 45, 0, 0, + 48, 0, 0, 531, 16, 17, 532, 19, 20, 533, + 22, 534, 24, 0, 25, 0, 0, 28, 29, 0, + 31, 32, 33, 0, 0, 0, 36, 0, 0, 0, + 0, 0, 0, 124, 0, 0, 127, 128, 129, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 37, 38, 39, 40, 41, 0, 0, 0, 0, - 45, 0, 0, 48, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, - 0, 0, 333, 0, 0, 0, 0, 0, 980, 0, - 0, 0, 123, 0, 0, 126, 127, 128, 0, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 133, 345, 333, 0, 0, - 135, 0, 0, 1171, 0, 138, 0, 89, 340, 0, - 141, 0, 753, 93, 94, 95, 0, 0, 96, 97, + 0, 0, 0, 53, 54, 55, 134, 227, 0, 0, + 0, 136, 0, 0, 0, 0, 139, 0, 90, 221, + 0, 142, 0, 228, 94, 95, 96, 0, 0, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 0, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 223, 1303, 0, 224, 7, 8, 225, 0, + 226, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 37, 38, 39, 40, + 41, 0, 0, 0, 0, 45, 0, 0, 48, 0, + 0, 531, 16, 17, 532, 19, 20, 533, 22, 534, + 24, 0, 25, 0, 0, 28, 29, 0, 31, 32, + 33, 0, 0, 992, 36, 0, 0, 0, 0, 0, + 0, 124, 0, 0, 127, 128, 129, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 341, 0, 0, 342, 0, 0, 343, 0, 344, + 0, 53, 54, 55, 134, 355, 0, 0, 0, 136, + 0, 0, 1182, 0, 139, 0, 90, 221, 0, 142, + 0, 432, 94, 95, 96, 0, 0, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 223, 1359, 0, 224, 0, 0, 225, 0, 226, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 37, 38, 39, 40, 41, 0, + 0, 0, 0, 45, 0, 0, 48, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 0, 0, 0, + 0, 1201, 0, 0, 0, 0, 0, 0, 0, 124, + 0, 0, 127, 128, 129, 0, 334, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, + 0, 0, 134, 355, 348, 0, 0, 136, 0, 0, + 1227, 0, 139, 0, 90, 221, 0, 142, 0, 630, + 94, 95, 96, 0, 0, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 223, 0, + 0, 224, 0, 0, 225, 0, 226, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 37, 38, 39, 40, 41, - 0, 0, 0, 0, 45, 0, 0, 48, 319, 320, - 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 0, 0, 0, 0, 333, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 123, 0, 0, 126, - 127, 128, 0, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 133, - 362, 333, 0, 0, 135, 0, 0, 1190, 0, 138, - 0, 89, 340, 0, 141, 0, 1049, 93, 94, 95, - 0, 0, 96, 97, 98, 99, 100, 101, 102, 103, + 0, 0, 37, 38, 39, 40, 41, 0, 0, 0, + 0, 45, 0, 0, 48, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 124, 0, 0, + 127, 128, 129, 0, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 346, 347, 0, 0, + 134, 227, 348, 0, 0, 136, 0, 0, 1309, 0, + 139, 0, 90, 221, 0, 142, 0, 1060, 94, 95, + 96, 0, 0, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 341, 0, 0, 342, 0, - 0, 343, 0, 344, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, - 38, 39, 40, 41, 1216, 0, 89, 300, 45, 0, - 0, 48, 93, 94, 95, 0, 0, 96, 97, 98, + 114, 115, 116, 117, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 223, 0, 0, 224, + 0, 0, 225, 0, 226, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 37, 38, 39, 40, 41, 1357, 0, 90, 315, 45, + 0, 0, 48, 94, 95, 96, 0, 0, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 1298, 0, - 123, 0, 0, 126, 127, 128, 0, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 401, 1139, 333, 0, 0, 135, 0, - 0, 1346, 0, 403, 0, 89, 300, 248, 141, 0, - 195, 93, 94, 95, 0, 0, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 0, 117, 118, - 119, 120, 0, 0, 121, 123, 0, 0, 126, 127, - 128, 0, 0, 0, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 133, 134, - 0, 0, 333, 135, 0, 0, 0, 0, 138, 0, - 0, 305, 0, 141, 0, 306, 0, 0, 319, 320, - 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 549, 0, 0, 0, 333, 0, 0, 0, - 0, 0, 0, 0, 123, 124, 125, 126, 127, 128, - 0, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 133, 134, 333, - 0, 0, 135, 0, 0, 0, 0, 138, 549, 89, - 300, 0, 141, 0, 1153, 93, 94, 95, 0, 0, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 0, + 0, 0, 0, 0, 0, 124, 0, 0, 127, 128, + 129, 0, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 0, 0, 403, 1150, + 348, 0, 0, 136, 0, 0, 0, 0, 405, 640, + 90, 315, 263, 142, 0, 196, 94, 95, 96, 0, + 0, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 897, 0, 0, 0, 0, 627, 0, 89, 300, - 0, 0, 0, 0, 93, 94, 95, 0, 0, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, - 329, 550, 331, 332, 0, 0, 0, 0, 333, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 123, 0, - 0, 126, 127, 128, 0, 0, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 567, 331, 332, - 0, 133, 134, 0, 333, 0, 135, 0, 0, 0, - 0, 138, 0, 0, 731, 0, 141, 123, 732, 0, - 126, 127, 128, 0, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, - 401, 402, 333, 0, 0, 135, 0, 0, 0, 0, - 403, 724, 89, 340, 0, 141, 0, 195, 93, 94, - 95, 0, 0, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 876, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 341, 0, 0, 342, - 0, 0, 343, 0, 344, 0, 0, 0, 0, 0, + 116, 117, 0, 118, 119, 120, 121, 0, 0, 122, + 124, 0, 0, 127, 128, 129, 0, 0, 0, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 134, 135, 0, 0, 348, 136, 0, + 0, 0, 0, 139, 0, 0, 320, 0, 142, 736, + 321, 90, 315, 0, 0, 0, 0, 94, 95, 96, + 0, 0, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 124, 125, 126, 127, 128, 129, 818, + 0, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 134, 135, 0, 348, + 0, 136, 0, 0, 0, 0, 139, 955, 90, 315, + 0, 142, 0, 1164, 94, 95, 96, 0, 0, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 124, 0, 0, 127, 128, 129, + 0, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 134, 135, 348, + 0, 0, 136, 0, 0, 0, 0, 139, 0, 0, + 623, 0, 142, 0, 624, 0, 0, 0, 0, 0, + 0, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 124, 0, 0, 127, 128, 129, 0, 0, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 403, 404, 0, 348, 0, 136, + 0, 0, 0, 0, 405, 0, 90, 221, 0, 142, + 0, 196, 94, 95, 96, 0, 0, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 37, 38, 39, 40, 41, 943, 0, 89, 300, 45, - 0, 0, 48, 93, 94, 95, 0, 0, 96, 97, + 223, 0, 0, 224, 0, 0, 225, 0, 226, 0, + 0, 0, 0, 0, 902, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 37, 38, 39, 40, 41, 0, + 0, 90, 315, 45, 0, 0, 48, 94, 95, 96, + 0, 0, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 0, 0, 0, 0, 0, 0, 124, + 0, 0, 127, 128, 129, 0, 334, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, + 0, 0, 134, 355, 348, 0, 0, 136, 90, 315, + 263, 0, 139, 0, 94, 95, 96, 142, 0, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 0, - 0, 123, 0, 0, 126, 127, 128, 0, 0, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 133, 345, 0, 333, 0, 135, - 0, 0, 0, 0, 138, 0, 0, 0, 0, 141, - 0, 0, 319, 320, 321, 322, 323, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, - 333, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 123, 0, 0, 126, - 127, 128, 0, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 133, - 134, 333, 0, 0, 135, 0, -4, 1, 0, 138, - -4, 0, 0, 0, 141, 0, 0, 0, -4, -4, - 0, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, -4, 0, 0, 0, 0, -4, -4, 756, -4, - -4, -4, 0, -4, -4, -4, -4, -4, -4, -4, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 0, 118, 119, 120, 121, 0, 0, 122, 0, 0, + 0, 0, 0, 0, 124, 0, 0, 127, 128, 129, + 0, 7, 8, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 134, 135, 0, + 0, 348, 136, 0, 0, 0, 0, 139, 1131, 0, + 1132, 0, 142, 0, 0, 0, 531, 16, 17, 532, + 19, 20, 533, 22, 534, 24, 0, 25, 0, 0, + 28, 29, 0, 31, 32, 33, 0, 0, 0, 36, + 0, 124, 125, 126, 127, 128, 129, -4, 1, 0, + 0, -4, 0, 0, 0, 0, 0, 0, 0, -4, + -4, 0, 0, 0, 134, 135, 53, 54, 55, 136, + 0, 0, 0, 0, 139, 0, 0, 0, 0, 142, + 0, 0, -4, 0, 0, 0, 0, -4, -4, 0, -4, -4, -4, 0, -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, 0, -4, -4, 0, 0, 0, 0, -4, -4, - -4, -4, 0, 0, -4, 0, -4, 0, -4, -4, - -4, -4, -4, -4, -4, -4, -4, -4, 0, 0, - 6, 0, 0, 0, -4, -4, -4, -4, 7, 8, - 0, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 9, 0, 0, 0, 0, 10, 11, 796, 12, - 13, 14, 0, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 0, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 0, 35, 36, 37, 38, 39, - 40, 41, 42, 0, 43, 44, 45, 46, 47, 48, - 0, 0, 49, 50, 7, 8, 0, 0, 51, 52, - 53, 54, 0, 0, 55, 0, 56, 0, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 0, 0, - 0, 0, 0, 0, 67, 68, 69, 70, 0, 515, - 16, 17, 516, 19, 20, 517, 22, 518, 24, 0, - 25, 0, 0, 28, 29, 0, 31, 32, 33, 0, - 0, 0, 36, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 0, 0, 52, 53, 54, 1120, 0, - 1121, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 0, 0, 0, 0, 0, 1148, 0, 1149, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 0, - 0, 0, 0, 0, 1241, 0, 1242, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 0, 0, 0, - 0, 0, 0, 0, 829, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 0, 0, 0, 0, 0, - 0, 0, 875, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 0, 0, 0, 0, 0, 0, 0, - 914, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 0, 0, 0, 0, 0, 0, 0, 1118, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 0, - 0, 0, 0, 0, 0, 0, 1136, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 0, 0, 0, - 0, 0, 0, 0, 1177, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 0, 0, 0, 0, 0, - 0, 0, 1178, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 0, 0, 0, 0, 0, 0, 0, - 1179, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 0, 0, 0, 0, 0, 0, 0, 1180, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 0, - 0, 0, 0, 0, 0, 0, 1211, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 0, 0, 0, - 0, 0, 0, 0, 1257, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 0, 0, 0, 0, 0, - 0, 0, 1262, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 0, 0, 0, 0, 0, 0, 0, - 1263, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 0, 0, 0, 0, 0, 0, 0, 1280, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 0, - 0, 0, 0, 0, 0, 0, 1283, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 0, 0, 0, - 0, 0, 0, 0, 1286, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 0, 0, 0, 0, 0, - 0, 0, 1310, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 0, 0, 0, 0, 0, 0, 0, - 1313, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 0, 0, 0, 0, 0, 0, 0, 1340, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 0, - 0, 0, 0, 0, 0, 0, 1342, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 0, 0, 0, - 0, 0, 0, 0, 1344, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 0, 0, 0, 0, 0, - 0, 0, 1357, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 0, 0, 0, 0, 0, 0, 586, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 0, 0, 0, 0, 333, 0, - 0, 0, 0, 0, 0, 0, 1189, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 503, 0, 0, - 0, 0, 590, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 0, 0, 0, 0, 0, 539, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 0, - 0, 0, 0, 0, 590, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 0, 0, 0, 0, 0, - 591, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 0, 0, 0, 0, 0, 624, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 0, 0, 0, - 0, 0, 675, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 0, 0, 0, 0, 0, 676, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 0, - 0, 0, 0, 0, 689, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 0, 0, 0, 0, 0, - 690, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 0, 0, 0, 0, 0, 691, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 0, 0, 0, - 0, 0, 692, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 0, 0, 0, 0, 0, 693, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 0, - 0, 0, 0, 0, 694, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 0, 0, 0, 0, 0, - 783, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 0, 0, 0, 0, 0, 784, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 0, 0, 0, - 0, 0, 785, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 0, 0, 0, 0, 0, 872, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 0, - 0, 0, 0, 0, 912, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 0, 0, 0, 0, 0, - 913, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 0, 0, 0, 0, 0, 942, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 0, 0, 0, - 0, 0, 1069, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 0, 0, 0, 0, 0, 1070, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 0, - 0, 0, 0, 0, 1089, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 0, 0, 0, 0, 0, - 1224, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 0, 0, 0, 0, 0, 1225, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 0, 0, 0, - 0, 0, 1231, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 0, 0, 0, 0, 0, 1306, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 0, - 0, 0, 0, 0, 1309, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 0, 0, 507, 319, 320, - 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 0, 0, 0, 0, 333, 0, 0, 0, - 629, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 0, 0, 639, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, - 0, 0, 333, 0, 0, 0, 654, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 0, 0, 656, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 0, 0, 0, 0, 333, 0, - 0, 0, 658, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 0, 0, 660, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 0, 0, 0, 0, 333, 0, 0, 0, 662, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 0, - 0, 664, 319, 320, 321, 322, 323, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, - 333, 0, 0, 0, 666, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 0, 0, 668, 319, 320, - 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 0, 0, 0, 0, 333, 0, 0, 0, - 670, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 0, 0, 672, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, - 0, 0, 333, 0, 0, 0, 674, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 0, 0, 678, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 0, 0, 0, 0, 333, 0, - 0, 0, 680, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 0, 0, 682, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 0, 0, 0, 0, 333, 0, 0, 0, 684, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 0, - 0, 686, 319, 320, 321, 322, 323, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, - 333, 0, 0, 0, 688, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 0, 0, 803, 319, 320, - 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 0, 0, 0, 0, 333, 0, 0, 0, - 804, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 0, 0, 807, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, - 0, 0, 333, 0, 0, 0, 808, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 0, 0, 825, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 0, 0, 0, 0, 333, 0, - 0, 0, 848, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 0, 0, 948, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 0, 0, 0, 0, 333, 0, 0, 0, 963, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 0, - 0, 965, 319, 320, 321, 322, 323, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, - 333, 0, 0, 0, 967, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 0, 0, 969, 319, 320, - 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 0, 0, 0, 0, 333, 0, 0, 0, - 1082, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 0, 0, 1201, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, - 0, 0, 333, 0, 503, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 540, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 0, 0, 0, 0, 333, 0, 553, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 554, 319, 320, - 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 0, 0, 0, 0, 333, 0, 556, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 558, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 0, 0, 0, 0, 333, 0, - 559, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 562, 319, 320, 321, 322, 323, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, - 333, 0, 563, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 620, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, - 0, 0, 333, 0, 621, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 622, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 0, 0, 0, 0, 333, 0, 628, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 653, 319, 320, - 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 0, 0, 0, 0, 333, 0, 655, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 657, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 0, 0, 0, 0, 333, 0, - 659, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 661, 319, 320, 321, 322, 323, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, - 333, 0, 663, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 665, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, - 0, 0, 333, 0, 667, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 669, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 0, 0, 0, 0, 333, 0, 671, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 673, 319, 320, - 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 0, 0, 0, 0, 333, 0, 677, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 679, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 0, 0, 0, 0, 333, 0, - 681, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 683, 319, 320, 321, 322, 323, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, - 333, 0, 685, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 687, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, - 0, 0, 333, 0, 742, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 747, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 0, 0, 0, 0, 333, 0, 755, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 757, 319, 320, - 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 0, 0, 0, 0, 333, 0, 758, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 764, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 0, 0, 0, 0, 333, 0, - 771, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 772, 319, 320, 321, 322, 323, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, - 333, 0, 773, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 795, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, - 0, 0, 333, 0, 797, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 798, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 0, 0, 0, 0, 333, 0, 802, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333, 0, 962, 319, 320, - 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 0, 0, 0, 0, 333, 0, 964, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 0, 0, 0, 0, 333, 0, 966, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 0, 0, 0, 0, 333, 0, - 968, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 0, 0, 0, 0, 333, - 0, 972, 319, 320, 321, 322, 323, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, - 333, 0, 1119, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, - 0, 333, 0, 1135, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, - 0, 0, 333, 0, 1152, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, - 0, 0, 0, 333, 0, 1305, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 0, 0, 0, 0, 333, 0, 1355, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 0, 0, 0, 0, 333 + -4, -4, -4, -4, -4, 0, -4, -4, -4, -4, + -4, -4, -4, -4, 0, -4, -4, -4, -4, -4, + -4, 0, 0, -4, -4, 0, 0, 0, -4, 0, + 0, 0, 0, -4, -4, -4, -4, 0, 0, -4, + 0, -4, 0, -4, -4, -4, -4, -4, -4, -4, + -4, -4, -4, 0, 0, 6, 0, 0, 0, -4, + -4, -4, -4, 7, 8, 0, 334, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, + 0, 0, 0, 0, 348, 0, 9, 0, 0, 0, + 0, 10, 11, 759, 12, 13, 14, 0, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 0, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 0, + 35, 36, 37, 38, 39, 40, 41, 42, 0, 43, + 44, 45, 46, 47, 48, 0, 0, 49, 50, 0, + 0, 0, 51, 0, 0, 0, 0, 52, 53, 54, + 55, 0, 0, 56, 0, 57, 0, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 0, 0, 0, + 0, 0, 0, 68, 69, 70, 71, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 0, 0, 0, + 0, 0, 1159, 0, 1160, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 0, 0, 0, 0, 0, + 1252, 0, 1253, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 0, 0, 0, 0, 0, 0, 0, + 801, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 0, 0, 0, 0, 0, 0, 0, 816, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 0, + 0, 0, 0, 0, 0, 0, 840, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 0, 0, 0, + 0, 0, 0, 0, 919, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 0, 0, 0, 0, 0, + 0, 0, 1129, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 0, 0, 0, 0, 0, 0, 0, + 1147, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 0, 0, 0, 0, 0, 0, 0, 1188, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 0, + 0, 0, 0, 0, 0, 0, 1189, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 0, 0, 0, + 0, 0, 0, 0, 1190, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 0, 0, 0, 0, 0, + 0, 0, 1191, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 0, 0, 0, 0, 0, 0, 0, + 1222, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 0, 0, 0, 0, 0, 0, 0, 1268, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 0, + 0, 0, 0, 0, 0, 0, 1273, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 0, 0, 0, + 0, 0, 0, 0, 1274, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 0, 0, 0, 0, 0, + 0, 0, 1291, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 0, 0, 0, 0, 0, 0, 0, + 1294, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 0, 0, 0, 0, 0, 0, 0, 1297, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 0, + 0, 0, 0, 0, 0, 0, 1321, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 0, 0, 0, + 0, 0, 0, 0, 1324, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 0, 0, 0, 0, 0, + 0, 0, 1351, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 0, 0, 0, 0, 0, 0, 0, + 1353, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 0, 0, 0, 0, 0, 0, 0, 1355, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 0, + 0, 0, 0, 0, 0, 0, 1368, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 0, 0, 0, + 0, 0, 0, 589, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 346, 347, 0, 0, + 0, 0, 348, 0, 0, 0, 0, 0, 0, 0, + 1200, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 519, 0, 0, 0, 0, 593, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 0, 0, 0, + 0, 0, 555, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 0, 0, 0, 0, 0, 593, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 0, + 0, 0, 0, 0, 594, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 0, 0, 0, 0, 0, + 637, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 0, 0, 0, 0, 0, 688, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 0, 0, 0, + 0, 0, 689, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 0, 0, 0, 0, 0, 702, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 0, + 0, 0, 0, 0, 703, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 0, 0, 0, 0, 0, + 704, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 0, 0, 0, 0, 0, 705, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 0, 0, 0, + 0, 0, 706, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 0, 0, 0, 0, 0, 707, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 0, + 0, 0, 0, 0, 786, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 0, 0, 0, 0, 0, + 787, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 0, 0, 0, 0, 0, 788, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 0, 0, 0, + 0, 0, 882, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 0, 0, 0, 0, 0, 917, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 0, + 0, 0, 0, 0, 918, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 0, 0, 0, 0, 0, + 954, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 0, 0, 0, 0, 0, 1081, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 0, 0, 0, + 0, 0, 1082, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 0, 0, 0, 0, 0, 1101, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 0, + 0, 0, 0, 0, 1235, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 0, 0, 0, 0, 0, + 1236, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 0, 0, 0, 0, 0, 1242, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 0, 0, 0, + 0, 0, 1317, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 0, 0, 0, 0, 0, 1320, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 0, + 0, 523, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 0, 0, 0, 0, + 348, 0, 0, 0, 642, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 0, 0, 652, 334, 335, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, + 346, 347, 0, 0, 0, 0, 348, 0, 0, 0, + 667, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 0, 0, 669, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 346, 347, 0, 0, + 0, 0, 348, 0, 0, 0, 671, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 0, 0, 673, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, + 344, 345, 346, 347, 0, 0, 0, 0, 348, 0, + 0, 0, 675, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 0, 0, 677, 334, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, + 0, 0, 0, 0, 348, 0, 0, 0, 679, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 0, + 0, 681, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 0, 0, 0, 0, + 348, 0, 0, 0, 683, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 0, 0, 685, 334, 335, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, + 346, 347, 0, 0, 0, 0, 348, 0, 0, 0, + 687, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 0, 0, 691, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 346, 347, 0, 0, + 0, 0, 348, 0, 0, 0, 693, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 0, 0, 695, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, + 344, 345, 346, 347, 0, 0, 0, 0, 348, 0, + 0, 0, 697, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 0, 0, 699, 334, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, + 0, 0, 0, 0, 348, 0, 0, 0, 701, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 0, + 0, 808, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 0, 0, 0, 0, + 348, 0, 0, 0, 809, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 0, 0, 812, 334, 335, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, + 346, 347, 0, 0, 0, 0, 348, 0, 0, 0, + 813, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 0, 0, 815, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 346, 347, 0, 0, + 0, 0, 348, 0, 0, 0, 836, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 0, 0, 960, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, + 344, 345, 346, 347, 0, 0, 0, 0, 348, 0, + 0, 0, 975, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 0, 0, 977, 334, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, + 0, 0, 0, 0, 348, 0, 0, 0, 979, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 0, + 0, 981, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 0, 0, 0, 0, + 348, 0, 0, 0, 1094, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 0, 0, 1212, 334, 335, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, + 346, 347, 0, 0, 0, 0, 348, 0, 519, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 556, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, + 344, 345, 346, 347, 0, 0, 0, 0, 348, 0, + 560, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 561, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 0, 0, 0, 0, + 348, 0, 563, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 565, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 346, 347, 0, 0, + 0, 0, 348, 0, 566, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 569, 334, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, + 0, 0, 0, 0, 348, 0, 570, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 633, 334, 335, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, + 346, 347, 0, 0, 0, 0, 348, 0, 634, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 635, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, + 344, 345, 346, 347, 0, 0, 0, 0, 348, 0, + 641, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 666, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 0, 0, 0, 0, + 348, 0, 668, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 670, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 346, 347, 0, 0, + 0, 0, 348, 0, 672, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 674, 334, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, + 0, 0, 0, 0, 348, 0, 676, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 678, 334, 335, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, + 346, 347, 0, 0, 0, 0, 348, 0, 680, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 682, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, + 344, 345, 346, 347, 0, 0, 0, 0, 348, 0, + 684, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 686, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 0, 0, 0, 0, + 348, 0, 690, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 692, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 346, 347, 0, 0, + 0, 0, 348, 0, 694, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 696, 334, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, + 0, 0, 0, 0, 348, 0, 698, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 700, 334, 335, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, + 346, 347, 0, 0, 0, 0, 348, 0, 748, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 753, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, + 344, 345, 346, 347, 0, 0, 0, 0, 348, 0, + 758, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 760, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 0, 0, 0, 0, + 348, 0, 761, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 767, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 346, 347, 0, 0, + 0, 0, 348, 0, 774, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 775, 334, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, + 0, 0, 0, 0, 348, 0, 776, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 800, 334, 335, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, + 346, 347, 0, 0, 0, 0, 348, 0, 802, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 803, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, + 344, 345, 346, 347, 0, 0, 0, 0, 348, 0, + 807, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348, + 0, 974, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 0, 0, 0, 0, + 348, 0, 976, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, + 0, 348, 0, 978, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 346, 347, 0, 0, + 0, 0, 348, 0, 980, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 348, 0, 984, 334, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, + 0, 0, 0, 0, 348, 0, 1130, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 348, 0, 1146, 334, 335, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, + 346, 347, 0, 0, 0, 0, 348, 0, 1163, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 348, 0, 1316, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, + 344, 345, 346, 347, 0, 0, 0, 0, 348, 0, + 1366, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 348 }; static const yytype_int16 yycheck[] = { - 6, 203, 4, 6, 395, 396, 3, 7, 308, 0, - 6, 213, 7, 6, 6, 4, 6, 4, 1166, 4, - 4, 4, 717, 4, 239, 240, 241, 4, 6, 5, - 145, 5, 5, 235, 4, 237, 145, 6, 147, 68, - 1188, 77, 77, 4, 4, 6, 6, 77, 13, 78, - 68, 6, 145, 4, 145, 84, 85, 135, 136, 152, - 78, 152, 51, 177, 178, 53, 84, 85, 135, 136, - 794, 6, 61, 790, 152, 4, 5, 292, 293, 294, - 295, 6, 297, 298, 299, 152, 47, 71, 72, 73, - 74, 137, 138, 139, 208, 145, 80, 147, 144, 83, - 92, 135, 136, 88, 89, 90, 91, 36, 37, 38, - 39, 98, 99, 42, 7, 145, 152, 152, 152, 142, - 143, 6, 152, 106, 153, 77, 149, 133, 134, 135, - 125, 50, 138, 139, 53, 153, 132, 143, 38, 39, - 6, 41, 132, 149, 145, 142, 152, 98, 99, 149, - 152, 157, 158, 159, 160, 57, 162, 163, 164, 165, - 1308, 167, 168, 169, 859, 142, 143, 53, 153, 152, - 147, 152, 149, 53, 152, 145, 152, 154, 152, 152, - 135, 136, 188, 152, 113, 114, 158, 147, 194, 195, - 6, 163, 145, 145, 7, 167, 145, 203, 145, 152, - 152, 158, 135, 136, 406, 152, 163, 507, 925, 145, - 167, 135, 136, 142, 143, 221, 222, 223, 151, 225, - 149, 53, 228, 229, 68, 231, 1374, 151, 430, 122, - 123, 124, 125, 50, 78, 145, 53, 243, 55, 145, - 84, 85, 6, 7, 250, 251, 252, 253, 254, 255, - 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 6, 397, 398, 204, 6, 5, 3, 1177, 323, 254, + 255, 256, 6, 214, 4, 7, 4, 4, 7, 4, + 6, 77, 5, 4, 6, 4, 6, 5, 53, 1199, + 6, 4, 4, 4, 6, 729, 6, 68, 4, 799, + 77, 6, 795, 6, 4, 50, 6, 78, 53, 250, + 55, 252, 6, 84, 85, 139, 140, 88, 89, 149, + 139, 140, 307, 308, 309, 310, 156, 312, 313, 314, + 6, 155, 7, 157, 4, 5, 155, 0, 157, 149, + 7, 38, 39, 5, 41, 51, 156, 47, 159, 146, + 147, 93, 13, 164, 151, 61, 153, 168, 149, 156, + 156, 158, 92, 93, 94, 95, 36, 37, 38, 39, + 50, 149, 42, 53, 36, 37, 38, 39, 156, 156, + 42, 6, 110, 102, 103, 90, 157, 90, 134, 135, + 136, 102, 103, 139, 140, 7, 146, 147, 144, 6, + 129, 151, 136, 153, 150, 6, 143, 153, 158, 1319, + 136, 149, 158, 159, 160, 161, 156, 163, 164, 165, + 166, 153, 168, 169, 170, 146, 147, 157, 156, 156, + 151, 156, 153, 156, 156, 869, 149, 158, 156, 151, + 156, 934, 149, 189, 151, 139, 140, 117, 118, 195, + 196, 126, 127, 128, 129, 117, 118, 149, 204, 126, + 127, 128, 129, 146, 147, 7, 57, 408, 523, 53, + 153, 146, 147, 139, 140, 1385, 146, 147, 153, 146, + 147, 227, 228, 153, 139, 140, 177, 178, 179, 155, + 236, 237, 238, 149, 240, 192, 193, 243, 244, 149, + 246, 4, 77, 200, 77, 446, 156, 204, 150, 149, + 321, 151, 258, 155, 126, 127, 128, 129, 209, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, - 286, 287, 288, 289, 290, 291, 135, 136, 983, 146, - 296, 191, 192, 50, 151, 145, 53, 147, 55, 199, - 306, 146, 151, 203, 153, 308, 151, 145, 8, 122, - 123, 124, 125, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 333, 68, 142, - 143, 135, 136, 53, 306, 146, 149, 146, 78, 345, - 151, 145, 151, 7, 84, 85, 146, 353, 152, 306, - 7, 151, 358, 135, 136, 145, 362, 363, 135, 136, - 50, 367, 368, 369, 370, 135, 136, 142, 143, 151, - 376, 153, 55, 345, 151, 381, 382, 383, 579, 580, - 581, 151, 47, 153, 145, 50, 147, 145, 53, 147, - 362, 363, 398, 399, 400, 401, 402, 403, 395, 396, - 152, 407, 408, 409, 410, 135, 136, 413, 152, 53, - 416, 417, 53, 153, 420, 421, 422, 423, 145, 50, - 147, 151, 50, 145, 639, 147, 126, 127, 128, 129, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 995, 139, 140, 149, 311, 151, 149, 71, 72, + 73, 74, 149, 149, 149, 321, 149, 80, 149, 156, + 83, 156, 53, 156, 126, 127, 128, 129, 334, 335, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, + 346, 347, 348, 323, 146, 147, 139, 140, 149, 355, + 151, 422, 423, 4, 5, 361, 6, 139, 140, 53, + 366, 432, 155, 53, 157, 371, 372, 373, 374, 149, + 47, 151, 378, 50, 156, 55, 53, 383, 384, 385, + 139, 140, 141, 142, 143, 36, 37, 38, 39, 148, + 50, 42, 139, 140, 400, 401, 402, 403, 404, 405, + 397, 398, 8, 409, 410, 411, 412, 652, 155, 415, + 139, 140, 418, 419, 139, 140, 422, 423, 424, 425, + 426, 149, 428, 150, 68, 53, 432, 156, 155, 53, + 155, 437, 438, 156, 78, 139, 140, 156, 395, 396, + 84, 85, 139, 140, 88, 89, 403, 1207, 50, 1209, + 150, 1211, 156, 139, 140, 155, 462, 4, 155, 465, + 68, 4, 139, 140, 50, 710, 117, 118, 150, 155, + 78, 716, 149, 155, 4, 68, 84, 85, 6, 156, + 88, 89, 149, 554, 464, 78, 139, 140, 159, 1183, + 149, 84, 85, 164, 739, 88, 89, 168, 139, 140, + 68, 149, 155, 1256, 146, 147, 1259, 139, 140, 1262, + 78, 149, 518, 157, 155, 151, 84, 85, 589, 525, + 88, 89, 524, 155, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 139, 140, + 150, 4, 148, 523, 1304, 155, 861, 862, 554, 555, + 4, 557, 558, 624, 155, 47, 227, 228, 50, 630, + 149, 53, 151, 55, 157, 571, 6, 7, 139, 140, + 576, 582, 583, 584, 149, 581, 582, 583, 584, 581, + 582, 583, 584, 589, 155, 149, 1339, 593, 594, 157, + 1350, 149, 1352, 599, 1354, 139, 140, 139, 140, 149, + 1360, 139, 140, 156, 149, 611, 171, 613, 149, 50, + 8, 155, 53, 155, 55, 149, 1369, 155, 624, 1372, + 139, 140, 1375, 188, 630, 1378, 191, 149, 1388, 151, + 1390, 637, 1392, 639, 640, 592, 155, 149, 709, 645, + 139, 140, 139, 140, 1040, 210, 8, 1400, 605, 1402, + 321, 1404, 139, 140, 139, 140, 155, 68, 155, 68, + 7, 732, 733, 734, 735, 149, 149, 78, 155, 78, + 155, 149, 652, 84, 85, 84, 85, 88, 89, 88, + 89, 4, 688, 689, 355, 6, 141, 142, 143, 149, + 5, 151, 8, 148, 68, 156, 702, 703, 704, 705, + 706, 707, 68, 709, 78, 149, 6, 151, 714, 6, + 84, 85, 78, 149, 88, 89, 722, 149, 84, 85, + 149, 149, 88, 89, 149, 149, 732, 733, 734, 735, + 736, 149, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 157, 149, 157, 151, + 148, 422, 423, 149, 149, 151, 151, 149, 1003, 157, + 149, 432, 151, 149, 149, 151, 151, 438, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 68, 157, 68, 742, 148, 155, 149, 157, + 151, 157, 78, 149, 78, 157, 4, 156, 84, 85, + 84, 85, 88, 89, 88, 89, 149, 1203, 151, 12, + 13, 149, 818, 151, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 156, 786, + 787, 788, 148, 151, 150, 815, 842, 843, 149, 149, + 151, 151, 156, 149, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 149, 58, 151, 149, 61, 62, + 149, 64, 65, 66, 870, 156, 6, 70, 68, 940, + 155, 157, 157, 157, 156, 155, 882, 157, 78, 151, + 151, 68, 862, 554, 84, 85, 557, 558, 88, 89, + 155, 78, 157, 5, 97, 98, 99, 84, 85, 5, + 5, 88, 89, 6, 151, 68, 153, 155, 6, 157, + 916, 917, 918, 153, 155, 78, 157, 156, 589, 925, + 926, 84, 85, 6, 105, 88, 89, 933, 155, 155, + 157, 157, 6, 6, 940, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 151, 954, 955, + 956, 148, 4, 624, 157, 520, 521, 157, 53, 630, + 55, 155, 968, 157, 155, 6, 157, 973, 156, 155, + 157, 157, 155, 155, 157, 157, 933, 155, 155, 157, + 157, 6, 988, 148, 153, 987, 966, 155, 155, 157, + 157, 4, 7, 6, 157, 155, 155, 157, 157, 155, + 1006, 157, 155, 155, 157, 157, 1012, 1013, 155, 151, + 157, 1017, 577, 156, 155, 1216, 157, 155, 1024, 157, + 155, 157, 157, 588, 155, 155, 157, 157, 1034, 155, + 1036, 157, 7, 155, 1036, 157, 7, 155, 709, 157, + 155, 1047, 157, 1040, 155, 7, 157, 149, 149, 149, + 1007, 1057, 149, 7, 1060, 6, 150, 1063, 7, 7, + 6, 732, 733, 734, 735, 102, 1072, 156, 150, 150, + 1072, 150, 150, 6, 150, 1081, 1082, 4, 155, 150, + 155, 150, 152, 155, 1041, 7, 1043, 105, 1045, 7, + 4, 7, 7, 1164, 105, 1101, 7, 7, 105, 7, + 1057, 7, 1059, 1060, 1305, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 6, + 1365, 153, 157, 148, 157, 1131, 6, 153, 7, 1200, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 7, 1148, 7, 1150, 148, 4, 7, 1219, 149, + 1395, 7, 1397, 1159, 7, 1161, 7, 149, 1164, 156, + 6, 6, 6, 152, 6, 6, 151, 1173, 7, 1414, + 6, 136, 1178, 7, 7, 53, 7, 7, 55, 7, + 7, 746, 747, 6, 749, 7, 751, 752, 7, 150, + 755, 756, 150, 150, 1200, 150, 7, 7, 6, 4, + 1206, 4, 1208, 156, 1210, 6, 1203, 149, 7, 6, + 53, 7, 7, 1219, 6, 156, 6, 1223, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 6, 6, 1235, + 1236, 148, 6, 4, 4, 1306, 1242, 1308, 4, 6, + 4, 6, 1248, 156, 156, 150, 1252, 156, 149, 1206, + 150, 1208, 156, 1210, 156, 820, 821, 822, 153, 7, + 6, 1218, 156, 1220, 6, 156, 156, 61, 6, 940, + 6, 156, 6, 6, 1280, 4, 6, 5, 151, 844, + 6, 156, 7, 7, 7, 7, 1292, 7, 6, 1295, + 6, 1362, 1298, 156, 156, 152, 1302, 6, 6, 101, + 1306, 6, 1308, 7, 153, 6, 4, 6, 155, 6, + 6, 1317, 6, 6, 1320, 6, 6, 6, 6, 5, + 105, 6, 887, 6, 6, 6, 6, 6, 893, 6, + 6, 6, 6, 6, 899, 900, 901, 4, 155, 155, + 905, 155, 155, 6, 156, 910, 911, 912, 6, 153, + 7, 1308, 6, 6, 5, 7, 1362, 6, 6, 51, + 925, 6, 6, 6, 6, 156, 6, 156, 6, 157, + 935, 6, 156, 938, 156, 156, 156, 6, 6, 100, + 6, 6, 6, 6, 103, 6, 1057, 156, 156, 1060, + 6, 6, 6, 6, 157, 157, 961, 962, 963, 964, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 446, 135, 136, 449, 144, 448, 135, 136, 420, 421, - 145, 4, 147, 153, 145, 4, 147, 151, 122, 123, - 124, 125, 151, 420, 421, 122, 123, 124, 125, 4, - 135, 136, 1196, 145, 1198, 147, 1200, 1172, 142, 143, - 145, 6, 697, 135, 136, 142, 143, 152, 703, 4, - 5, 145, 68, 393, 394, 145, 502, 68, 145, 151, - 147, 401, 78, 509, 507, 145, 145, 78, 84, 85, - 135, 136, 727, 84, 85, 145, 508, 147, 145, 4, - 147, 36, 37, 38, 39, 147, 151, 42, 1245, 135, - 136, 1248, 538, 539, 1251, 541, 4, 543, 68, 152, - 135, 136, 145, 549, 550, 551, 145, 145, 78, 135, - 136, 851, 852, 145, 84, 85, 151, 145, 564, 147, - 145, 567, 568, 145, 145, 151, 538, 573, 145, 1293, - 147, 145, 578, 579, 580, 581, 7, 153, 550, 551, - 586, 538, 153, 145, 590, 591, 578, 579, 580, 581, - 596, 145, 564, 68, 145, 567, 68, 4, 113, 114, - 6, 5, 608, 78, 610, 6, 78, 564, 6, 84, - 85, 1328, 84, 85, 586, 1339, 5, 1341, 624, 1343, - 626, 627, 145, 153, 147, 1349, 632, 135, 136, 586, - 152, 4, 36, 37, 38, 39, 639, 151, 42, 153, - 1031, 1358, 68, 151, 1361, 145, 68, 1364, 145, 145, - 1367, 68, 78, 1377, 145, 1379, 78, 1381, 84, 85, - 152, 78, 84, 85, 8, 145, 152, 84, 85, 675, - 676, 145, 1389, 147, 1391, 145, 1393, 147, 153, 145, - 145, 153, 147, 689, 690, 691, 692, 693, 694, 589, - 696, 170, 145, 8, 147, 701, 145, 176, 177, 178, - 145, 145, 602, 147, 710, 135, 136, 145, 187, 113, - 114, 190, 135, 136, 720, 721, 722, 723, 724, 152, - 145, 151, 135, 136, 696, 68, 732, 153, 151, 208, - 209, 153, 151, 145, 153, 78, 153, 145, 151, 696, - 6, 84, 85, 135, 136, 147, 6, 753, 720, 721, - 722, 723, 135, 136, 147, 152, 135, 136, 152, 151, - 732, 68, 147, 720, 721, 722, 723, 151, 151, 153, - 6, 78, 151, 149, 152, 732, 991, 84, 85, 101, - 6, 753, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 753, 6, 12, 13, - 144, 1192, 147, 151, 149, 153, 53, 147, 55, 153, - 153, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 831, 832, 135, 136, 144, - 730, 146, 4, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 151, 58, 848, 153, 61, 62, 852, - 64, 65, 66, 151, 860, 153, 70, 142, 143, 151, - 144, 153, 147, 151, 149, 153, 872, 152, 6, 154, - 876, 152, 6, 135, 136, 137, 138, 139, 149, 93, - 94, 95, 144, 783, 784, 785, 151, 151, 153, 153, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 7, 911, 912, 913, 144, 151, - 147, 153, 142, 143, 920, 921, 5, 147, 924, 149, - 151, 4, 153, 6, 154, 931, 153, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 942, 943, 944, 153, - 144, 47, 152, 151, 50, 153, 151, 53, 153, 55, - 956, 954, 151, 5, 153, 961, 151, 5, 153, 931, - 151, 151, 153, 153, 151, 151, 153, 153, 7, 151, - 976, 153, 7, 151, 931, 153, 151, 151, 153, 153, - 151, 7, 153, 975, 151, 151, 153, 153, 145, 151, - 996, 153, 151, 151, 153, 153, 1002, 1003, 151, 7, - 153, 1007, 151, 1205, 153, 151, 151, 153, 153, 1015, - 145, 6, 145, 145, 7, 146, 7, 6, 98, 1025, - 146, 1027, 152, 146, 924, 504, 505, 146, 146, 151, - 146, 146, 1038, 146, 1031, 1027, 6, 151, 4, 151, - 1046, 148, 7, 1049, 101, 7, 1052, 7, 7, 7, - 101, 7, 101, 7, 1060, 7, 4, 6, 149, 153, - 153, 6, 149, 1069, 1070, 7, 7, 7, 1060, 4, - 7, 7, 145, 7, 1046, 7, 145, 1049, 152, 6, - 6, 6, 148, 1089, 6, 6, 147, 7, 6, 132, - 53, 7, 1294, 7, 55, 574, 7, 997, 7, 7, - 7, 6, 146, 7, 146, 146, 585, 7, 146, 7, - 7, 6, 4, 4, 1120, 152, 6, 6, 145, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 1137, 1032, 1139, 1034, 144, 1036, 7, 6, 1354, - 7, 7, 1148, 6, 1150, 152, 1046, 1153, 1048, 1049, - 6, 6, 53, 6, 6, 4, 1162, 4, 4, 4, - 152, 1167, 152, 6, 152, 152, 6, 1139, 145, 1384, - 152, 1386, 146, 146, 149, 7, 6, 61, 6, 6, - 152, 1153, 6, 1189, 152, 152, 6, 6, 1403, 1195, - 5, 1197, 4, 1199, 7, 1192, 1153, 152, 6, 152, - 7, 7, 1208, 7, 7, 152, 1212, 6, 147, 152, - 6, 97, 6, 5, 7, 6, 149, 1189, 1224, 1225, - 4, 6, 101, 6, 6, 1231, 6, 6, 6, 148, - 6, 1237, 1189, 6, 6, 1241, 1208, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 1208, 6, 6, 6, 144, 6, 6, 6, 6, - 6, 740, 741, 1269, 743, 6, 745, 746, 151, 6, - 749, 750, 6, 4, 151, 1281, 151, 151, 1284, 151, - 6, 1287, 6, 152, 7, 1291, 6, 149, 6, 1295, - 5, 1297, 51, 6, 6, 1195, 6, 1197, 6, 1199, - 1306, 6, 152, 1309, 6, 153, 6, 1207, 152, 1209, - 152, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 7, 1295, 6, 1297, 144, 152, 96, 152, - 809, 810, 811, 6, 6, 152, 99, 6, 1295, 6, - 1297, 6, 3, 4, 5, 1351, 6, 6, 9, 10, - 11, 152, 6, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 6, 36, 37, 38, 39, 1351, - 6, 42, 153, 153, 153, 68, 153, 152, 6, 153, - 152, 6, 6, 6, 1351, 6, 6, 1297, 6, 6, - 6, 880, 6, 6, 6, 6, 6, 886, 153, 152, - 152, 6, 152, 6, 152, 894, 895, 896, 6, 6, - 6, 900, 6, 6, 152, 6, 905, 906, 907, 6, - 152, 152, 6, 152, 6, 152, 6, 6, 6, 6, - 6, 920, 6, 6, 871, 1269, 3, 926, 3, -1, - 929, 112, 113, 114, 115, 116, 117, 6, 879, 979, - 375, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 949, 950, 951, 952, 135, 136, -1, -1, -1, 140, - -1, 6, -1, -1, 145, 3, 4, -1, -1, 150, - -1, 9, 10, 11, -1, 974, 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, -1, -1, -1, -1, 47, - -1, -1, 50, -1, -1, 53, -1, 55, -1, 1018, - 1019, 1020, 1021, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 71, 72, 73, 74, 75, -1, -1, - -1, -1, 80, -1, -1, 83, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 1055, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, 1071, -1, 112, 144, -1, 115, 116, 117, - -1, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, 135, 136, 144, - -1, -1, 140, -1, -1, -1, -1, 145, -1, -1, - -1, -1, 150, -1, 152, 153, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 3, 4, -1, -1, - -1, -1, 9, 10, 11, 1134, -1, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 1157, 1158, - 1159, 1160, -1, -1, -1, -1, -1, -1, -1, -1, - 47, -1, -1, 50, 12, 13, 53, -1, 55, -1, + 140, 141, 142, 143, 157, 6, 157, 157, 148, 156, + 6, 986, 68, 6, 6, 6, 6, 6, 3, 4, + 6, 881, 6, 6, 9, 10, 11, 6, 6, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 6, 6, 1027, 1028, 1029, 1030, 6, 6, 6, 6, + 157, 6, 47, 6, 6, 50, 6, 6, 53, 1150, + 55, 6, 6, 6, 156, 156, 156, 156, 156, 6, + 156, 156, 156, 1164, 156, 6, 71, 72, 73, 74, + 75, 6, 1067, 6, 6, 80, 6, 6, 83, 1280, + 886, 3, 3, -1, 991, -1, 377, -1, 1083, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 1200, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 71, 72, 73, 74, 75, -1, - -1, 6, -1, 80, -1, 1204, 83, -1, -1, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, - 58, -1, -1, 61, 62, -1, 64, 65, 66, -1, - -1, -1, 70, -1, -1, 112, -1, -1, 115, 116, - 117, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 1253, 93, 94, 95, 135, 136, - -1, -1, -1, 140, -1, -1, -1, -1, 145, -1, - -1, -1, -1, 150, -1, -1, 153, 3, 4, 5, - -1, 7, -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, - 36, 37, 38, 39, -1, 153, 42, -1, -1, 12, - 13, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, + -1, 116, -1, -1, 119, 120, 121, -1, 1219, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, 139, 140, -1, 148, -1, 144, + -1, -1, -1, -1, 149, -1, -1, -1, -1, 154, + 1145, 156, 157, -1, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, -1, -1, + -1, -1, 148, 1168, 1169, 1170, 1171, -1, -1, -1, + -1, -1, 1177, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, -1, 1199, 1306, 6, 1308, -1, -1, + 3, 4, -1, -1, -1, -1, 9, 10, 11, -1, + 1215, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, -1, 8, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 47, -1, -1, 50, -1, -1, + 53, 1362, 55, -1, -1, -1, -1, 12, 13, 1264, + -1, -1, -1, -1, -1, -1, -1, -1, 71, 72, + 73, 74, 75, -1, -1, -1, -1, 80, -1, -1, + 83, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 6, -1, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, -1, 58, -1, -1, 61, 62, -1, 64, + 65, 66, -1, 116, 1319, 70, 119, 120, 121, -1, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, -1, -1, 139, 140, 148, -1, + -1, 144, 97, 98, 99, -1, 149, -1, -1, -1, + -1, 154, -1, -1, 157, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + 3, 4, 5, 148, 7, -1, 9, 10, 11, -1, + 1385, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 157, 36, 37, 38, 39, -1, -1, 42, + -1, -1, 12, 13, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, -1, -1, + -1, -1, 148, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, -1, 58, -1, + -1, 61, 62, -1, 64, 65, 66, -1, -1, -1, + 70, -1, -1, -1, -1, -1, -1, 110, -1, -1, + -1, -1, -1, 116, 117, 118, 119, 120, 121, -1, + -1, -1, -1, 126, 127, 128, 129, 97, 98, 99, + -1, -1, -1, -1, -1, -1, 139, 140, -1, -1, + -1, 144, -1, 146, 147, -1, 149, -1, 151, -1, + 153, 154, -1, 156, 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, -1, 157, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 47, -1, + -1, 50, 12, 13, 53, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, -1, 58, -1, -1, 61, 62, - -1, 64, 65, 66, -1, -1, -1, 70, -1, -1, - 106, -1, -1, -1, -1, -1, 112, 113, 114, 115, - 116, 117, -1, -1, -1, -1, 122, 123, 124, 125, - 93, 94, 95, -1, -1, -1, -1, -1, -1, 135, - 136, -1, -1, -1, 140, -1, 142, 143, -1, 145, - -1, 147, -1, 149, 150, -1, 152, 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, -1, - 153, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 47, -1, -1, 50, 12, 13, 53, -1, 55, + -1, -1, 71, 72, 73, 74, 75, -1, -1, -1, + -1, 80, -1, -1, 83, -1, -1, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, -1, 58, -1, + -1, 61, 62, -1, 64, 65, 66, -1, -1, -1, + 70, -1, -1, -1, -1, -1, -1, 116, -1, -1, + 119, 120, 121, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 97, 98, 99, + 139, 140, -1, -1, -1, 144, -1, -1, -1, -1, + 149, -1, 3, 4, 5, 154, -1, 156, 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, -1, -1, -1, -1, 47, 157, -1, 50, + 12, 13, 53, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 71, 72, 73, 74, 75, - -1, -1, -1, -1, 80, -1, -1, 83, -1, -1, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - -1, 58, -1, -1, 61, 62, -1, 64, 65, 66, - -1, -1, -1, 70, -1, -1, 112, -1, -1, 115, - 116, 117, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 93, 94, 95, 135, - 136, -1, -1, -1, 140, -1, -1, -1, -1, 145, - -1, 3, 4, 5, 150, -1, 152, 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, -1, -1, -1, -1, 47, 153, -1, 50, 12, - 13, 53, -1, 55, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 71, - 72, 73, 74, 75, -1, -1, -1, -1, 80, -1, - -1, 83, -1, -1, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, -1, 58, -1, -1, 61, 62, - -1, 64, 65, 66, -1, -1, -1, 70, -1, -1, - 112, -1, -1, 115, 116, 117, -1, -1, -1, -1, + 71, 72, 73, 74, 75, -1, -1, -1, -1, 80, + -1, -1, 83, -1, -1, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, -1, 58, -1, -1, 61, + 62, -1, 64, 65, 66, -1, -1, -1, 70, -1, + -1, -1, -1, -1, -1, 116, -1, -1, 119, 120, + 121, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 97, 98, 99, 139, 140, + -1, -1, -1, 144, -1, -1, -1, -1, 149, -1, + 3, 4, -1, 154, -1, 156, 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, + -1, -1, -1, -1, 47, 157, -1, 50, 12, 13, + 53, -1, 55, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 71, 72, + 73, 74, 75, -1, -1, -1, -1, 80, -1, -1, + 83, -1, -1, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, -1, 58, -1, -1, 61, 62, -1, + 64, 65, 66, -1, -1, -1, 70, -1, -1, -1, + -1, -1, -1, 116, -1, -1, 119, 120, 121, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 93, 94, 95, 135, 136, -1, -1, -1, 140, -1, - -1, -1, -1, 145, -1, 3, 4, -1, 150, -1, - 152, 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, -1, -1, -1, -1, 47, - 153, -1, 50, 12, 13, 53, -1, 55, -1, -1, + -1, -1, -1, 97, 98, 99, 139, 140, -1, -1, + -1, 144, -1, -1, -1, -1, 149, -1, 3, 4, + -1, 154, -1, 156, 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, -1, -1, - -1, -1, -1, 71, 72, 73, 74, 75, -1, -1, - -1, -1, 80, -1, -1, 83, -1, -1, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, -1, 58, - -1, -1, 61, 62, -1, 64, 65, 66, -1, -1, - -1, 70, -1, -1, 112, -1, -1, 115, 116, 117, + -1, -1, 47, 157, -1, 50, 12, 13, 53, -1, + 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 71, 72, 73, 74, + 75, -1, -1, -1, -1, 80, -1, -1, 83, -1, + -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, -1, 58, -1, -1, 61, 62, -1, 64, 65, + 66, -1, -1, 6, 70, -1, -1, -1, -1, -1, + -1, 116, -1, -1, 119, 120, 121, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 93, 94, 95, 135, 136, -1, - -1, -1, 140, -1, -1, -1, -1, 145, -1, 3, - 4, -1, 150, -1, 152, 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, -1, - -1, -1, -1, 47, 153, -1, 50, 12, 13, 53, - -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 71, 72, 73, - 74, 75, -1, -1, -1, -1, 80, -1, -1, 83, - -1, -1, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, -1, 58, -1, -1, 61, 62, -1, 64, - 65, 66, -1, -1, 6, 70, -1, -1, 112, -1, - -1, 115, 116, 117, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 93, 94, - 95, 135, 136, -1, -1, -1, 140, -1, -1, 6, - -1, 145, -1, 3, 4, -1, 150, -1, 152, 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, -1, -1, -1, -1, 47, 153, -1, - 50, -1, -1, 53, -1, 55, -1, -1, -1, -1, + -1, 97, 98, 99, 139, 140, -1, -1, -1, 144, + -1, -1, 6, -1, 149, -1, 3, 4, -1, 154, + -1, 156, 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, -1, -1, -1, -1, - -1, 71, 72, 73, 74, 75, -1, -1, -1, -1, - 80, -1, -1, 83, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, - -1, -1, 144, -1, -1, -1, -1, -1, 6, -1, - -1, -1, 112, -1, -1, 115, 116, 117, -1, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, 135, 136, 144, -1, -1, - 140, -1, -1, 6, -1, 145, -1, 3, 4, -1, - 150, -1, 152, 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, + 47, 157, -1, 50, -1, -1, 53, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 47, -1, -1, 50, -1, -1, 53, -1, 55, + -1, -1, -1, -1, 71, 72, 73, 74, 75, -1, + -1, -1, -1, 80, -1, -1, 83, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, -1, -1, -1, + -1, 6, -1, -1, -1, -1, -1, -1, -1, 116, + -1, -1, 119, 120, 121, -1, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + -1, -1, 139, 140, 148, -1, -1, 144, -1, -1, + 6, -1, 149, -1, 3, 4, -1, 154, -1, 156, + 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, -1, -1, -1, -1, 47, -1, + -1, 50, -1, -1, 53, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 71, 72, 73, 74, 75, - -1, -1, -1, -1, 80, -1, -1, 83, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, -1, -1, -1, -1, 144, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 112, -1, -1, 115, - 116, 117, -1, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, 135, - 136, 144, -1, -1, 140, -1, -1, 6, -1, 145, - -1, 3, 4, -1, 150, -1, 152, 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, -1, -1, -1, -1, 47, -1, -1, 50, -1, - -1, 53, -1, 55, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 71, - 72, 73, 74, 75, 6, -1, 3, 4, 80, -1, - -1, 83, 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, 6, -1, - 112, -1, -1, 115, 116, 117, -1, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, 135, 136, 144, -1, -1, 140, -1, - -1, 6, -1, 145, -1, 3, 4, 5, 150, -1, - 152, 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, -1, -1, 42, 112, -1, -1, 115, 116, - 117, -1, -1, -1, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 135, 136, - -1, -1, 144, 140, -1, -1, -1, -1, 145, -1, - -1, 148, -1, 150, -1, 152, -1, -1, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 8, -1, -1, -1, 144, -1, -1, -1, - -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, - -1, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, 135, 136, 144, - -1, -1, 140, -1, -1, -1, -1, 145, 8, 3, - 4, -1, 150, -1, 152, 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, 68, -1, -1, -1, -1, 8, -1, 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, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, -1, -1, -1, -1, 144, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, 112, -1, - -1, 115, 116, 117, -1, -1, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - -1, 135, 136, -1, 144, -1, 140, -1, -1, -1, - -1, 145, -1, -1, 148, -1, 150, 112, 152, -1, - 115, 116, 117, -1, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, - 135, 136, 144, -1, -1, 140, -1, -1, -1, -1, - 145, 8, 3, 4, -1, 150, -1, 152, 9, 10, + -1, -1, 71, 72, 73, 74, 75, -1, -1, -1, + -1, 80, -1, -1, 83, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 116, -1, -1, + 119, 120, 121, -1, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, -1, -1, + 139, 140, 148, -1, -1, 144, -1, -1, 6, -1, + 149, -1, 3, 4, -1, 154, -1, 156, 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, 8, -1, -1, -1, -1, -1, + 31, 32, 33, 34, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 47, -1, -1, 50, -1, -1, 53, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 71, 72, 73, 74, 75, 8, -1, 3, 4, 80, + 71, 72, 73, 74, 75, 6, -1, 3, 4, 80, -1, -1, 83, 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, 112, -1, -1, 115, 116, 117, -1, -1, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, 135, 136, -1, 144, -1, 140, - -1, -1, -1, -1, 145, -1, -1, -1, -1, 150, - -1, -1, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, -1, -1, -1, -1, - 144, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 112, -1, -1, 115, - 116, 117, -1, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, 135, - 136, 144, -1, -1, 140, -1, 0, 1, -1, 145, - 4, -1, -1, -1, 150, -1, -1, -1, 12, 13, - -1, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, 35, -1, -1, -1, -1, 40, 41, 153, 43, - 44, 45, -1, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, -1, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, -1, 69, 70, 71, 72, 73, - 74, 75, 76, -1, 78, 79, 80, 81, 82, 83, - -1, -1, 86, 87, -1, -1, -1, -1, 92, 93, - 94, 95, -1, -1, 98, -1, 100, -1, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, -1, -1, - 4, -1, -1, -1, 118, 119, 120, 121, 12, 13, - -1, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, 35, -1, -1, -1, -1, 40, 41, 153, 43, - 44, 45, -1, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, -1, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, -1, 69, 70, 71, 72, 73, - 74, 75, 76, -1, 78, 79, 80, 81, 82, 83, - -1, -1, 86, 87, 12, 13, -1, -1, 92, 93, - 94, 95, -1, -1, 98, -1, 100, -1, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, -1, -1, - -1, -1, -1, -1, 118, 119, 120, 121, -1, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, - 58, -1, -1, 61, 62, -1, 64, 65, 66, -1, - -1, -1, 70, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, -1, -1, 93, 94, 95, 151, -1, - 153, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, -1, -1, -1, -1, -1, 151, -1, 153, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, -1, - -1, -1, -1, -1, 151, -1, 153, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, -1, -1, -1, - -1, -1, -1, -1, 153, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, -1, -1, -1, -1, -1, - -1, -1, 153, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, -1, -1, -1, -1, -1, -1, -1, - 153, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, -1, -1, -1, -1, -1, -1, -1, 153, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, -1, - -1, -1, -1, -1, -1, -1, 153, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, -1, -1, -1, - -1, -1, -1, -1, 153, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, -1, -1, -1, -1, -1, - -1, -1, 153, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, -1, -1, -1, -1, -1, -1, -1, - 153, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, -1, -1, -1, -1, -1, -1, -1, 153, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, -1, - -1, -1, -1, -1, -1, -1, 153, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, -1, -1, -1, - -1, -1, -1, -1, 153, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, -1, -1, -1, -1, -1, - -1, -1, 153, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, -1, -1, -1, -1, -1, -1, -1, - 153, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, -1, -1, -1, -1, -1, -1, -1, 153, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, -1, - -1, -1, -1, -1, -1, -1, 153, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, -1, -1, -1, - -1, -1, -1, -1, 153, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, -1, -1, -1, -1, -1, - -1, -1, 153, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, -1, -1, -1, -1, -1, -1, -1, - 153, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, -1, -1, -1, -1, -1, -1, -1, 153, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, -1, - -1, -1, -1, -1, -1, -1, 153, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, -1, -1, -1, - -1, -1, -1, -1, 153, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, -1, -1, -1, -1, -1, - -1, -1, 153, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, -1, -1, -1, -1, -1, -1, 152, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, -1, -1, -1, -1, 144, -1, - -1, -1, -1, -1, -1, -1, 152, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, 146, -1, -1, - -1, -1, 151, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, -1, -1, -1, -1, -1, 151, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, -1, - -1, -1, -1, -1, 151, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, -1, -1, -1, -1, -1, - 151, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, -1, -1, -1, -1, -1, 151, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, -1, -1, -1, - -1, -1, 151, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, -1, -1, -1, -1, -1, 151, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, -1, - -1, -1, -1, -1, 151, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, -1, -1, -1, -1, -1, - 151, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, -1, -1, -1, -1, -1, 151, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, -1, -1, -1, - -1, -1, 151, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, -1, -1, -1, -1, -1, 151, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, -1, - -1, -1, -1, -1, 151, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, -1, -1, -1, -1, -1, - 151, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, -1, -1, -1, -1, -1, 151, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, -1, -1, -1, - -1, -1, 151, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, -1, -1, -1, -1, -1, 151, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, -1, - -1, -1, -1, -1, 151, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, -1, -1, -1, -1, -1, - 151, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, -1, -1, -1, -1, -1, 151, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, -1, -1, -1, - -1, -1, 151, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, -1, -1, -1, -1, -1, 151, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, -1, - -1, -1, -1, -1, 151, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, -1, -1, -1, -1, -1, - 151, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, -1, -1, -1, -1, -1, 151, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, -1, -1, -1, - -1, -1, 151, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, -1, -1, -1, -1, -1, 151, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, -1, - -1, -1, -1, -1, 151, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, -1, -1, 148, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, -1, -1, -1, -1, 144, -1, -1, -1, - 148, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, -1, -1, 148, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, - -1, -1, 144, -1, -1, -1, 148, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, -1, -1, 148, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, -1, -1, -1, -1, 144, -1, - -1, -1, 148, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, -1, -1, 148, 126, 127, 128, 129, + -1, -1, -1, -1, -1, 116, -1, -1, 119, 120, + 121, -1, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, -1, -1, 139, 140, + 148, -1, -1, 144, -1, -1, -1, -1, 149, 8, + 3, 4, 5, 154, -1, 156, 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, -1, -1, 42, + 116, -1, -1, 119, 120, 121, -1, -1, -1, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 139, 140, -1, -1, 148, 144, -1, + -1, -1, -1, 149, -1, -1, 152, -1, 154, 8, + 156, 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, 116, 117, 118, 119, 120, 121, 8, + -1, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, 139, 140, -1, 148, + -1, 144, -1, -1, -1, -1, 149, 8, 3, 4, + -1, 154, -1, 156, 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, -1, -1, + -1, -1, -1, -1, 116, -1, -1, 119, 120, 121, + -1, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, 139, 140, 148, + -1, -1, 144, -1, -1, -1, -1, 149, -1, -1, + 152, -1, 154, -1, 156, -1, -1, -1, -1, -1, + -1, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, 116, -1, -1, 119, 120, 121, -1, -1, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, 139, 140, -1, 148, -1, 144, + -1, -1, -1, -1, 149, -1, 3, 4, -1, 154, + -1, 156, 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, -1, -1, -1, -1, + 47, -1, -1, 50, -1, -1, 53, -1, 55, -1, + -1, -1, -1, -1, 68, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 71, 72, 73, 74, 75, -1, + -1, 3, 4, 80, -1, -1, 83, 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, 116, + -1, -1, 119, 120, 121, -1, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + -1, -1, 139, 140, 148, -1, -1, 144, 3, 4, + 5, -1, 149, -1, 9, 10, 11, 154, -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, -1, -1, 42, -1, -1, + -1, -1, -1, -1, 116, -1, -1, 119, 120, 121, + -1, 12, 13, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 139, 140, -1, + -1, 148, 144, -1, -1, -1, -1, 149, 155, -1, + 157, -1, 154, -1, -1, -1, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, -1, 58, -1, -1, + 61, 62, -1, 64, 65, 66, -1, -1, -1, 70, + -1, 116, 117, 118, 119, 120, 121, 0, 1, -1, + -1, 4, -1, -1, -1, -1, -1, -1, -1, 12, + 13, -1, -1, -1, 139, 140, 97, 98, 99, 144, + -1, -1, -1, -1, 149, -1, -1, -1, -1, 154, + -1, -1, 35, -1, -1, -1, -1, 40, 41, -1, + 43, 44, 45, -1, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, -1, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, -1, 69, 70, 71, 72, + 73, 74, 75, 76, -1, 78, 79, 80, 81, 82, + 83, -1, -1, 86, 87, -1, -1, -1, 91, -1, + -1, -1, -1, 96, 97, 98, 99, -1, -1, 102, + -1, 104, -1, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, -1, -1, 4, -1, -1, -1, 122, + 123, 124, 125, 12, 13, -1, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + -1, -1, -1, -1, 148, -1, 35, -1, -1, -1, + -1, 40, 41, 157, 43, 44, 45, -1, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, -1, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, -1, + 69, 70, 71, 72, 73, 74, 75, 76, -1, 78, + 79, 80, 81, 82, 83, -1, -1, 86, 87, -1, + -1, -1, 91, -1, -1, -1, -1, 96, 97, 98, + 99, -1, -1, 102, -1, 104, -1, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, -1, -1, -1, + -1, -1, -1, 122, 123, 124, 125, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, -1, -1, -1, + -1, -1, 155, -1, 157, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, -1, -1, -1, -1, -1, + 155, -1, 157, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, -1, -1, -1, -1, -1, -1, -1, + 157, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, -1, -1, -1, -1, -1, -1, -1, 157, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, -1, + -1, -1, -1, -1, -1, -1, 157, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, -1, -1, -1, + -1, -1, -1, -1, 157, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, -1, -1, -1, -1, -1, + -1, -1, 157, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, -1, -1, -1, -1, -1, -1, -1, + 157, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, -1, -1, -1, -1, -1, -1, -1, 157, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, -1, + -1, -1, -1, -1, -1, -1, 157, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, -1, -1, -1, + -1, -1, -1, -1, 157, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, -1, -1, -1, -1, -1, + -1, -1, 157, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, -1, -1, -1, -1, -1, -1, -1, + 157, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, -1, -1, -1, -1, -1, -1, -1, 157, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, -1, + -1, -1, -1, -1, -1, -1, 157, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, -1, -1, -1, + -1, -1, -1, -1, 157, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, -1, -1, -1, -1, -1, + -1, -1, 157, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, -1, -1, -1, -1, -1, -1, -1, + 157, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, -1, -1, -1, -1, -1, -1, -1, 157, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, -1, + -1, -1, -1, -1, -1, -1, 157, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, -1, -1, -1, + -1, -1, -1, -1, 157, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, -1, -1, -1, -1, -1, + -1, -1, 157, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, -1, -1, -1, -1, -1, -1, -1, + 157, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, -1, -1, -1, -1, -1, -1, -1, 157, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, -1, + -1, -1, -1, -1, -1, -1, 157, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, -1, -1, -1, + -1, -1, -1, 156, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, -1, -1, + -1, -1, 148, -1, -1, -1, -1, -1, -1, -1, + 156, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, 150, -1, -1, -1, -1, 155, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, -1, -1, -1, + -1, -1, 155, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, -1, -1, -1, -1, -1, 155, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, -1, + -1, -1, -1, -1, 155, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, -1, -1, -1, -1, -1, + 155, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, -1, -1, -1, -1, -1, 155, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, -1, -1, -1, + -1, -1, 155, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, -1, -1, -1, -1, -1, 155, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, -1, + -1, -1, -1, -1, 155, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, -1, -1, -1, -1, -1, + 155, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, -1, -1, -1, -1, -1, 155, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, -1, -1, -1, + -1, -1, 155, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, -1, -1, -1, -1, -1, 155, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, -1, + -1, -1, -1, -1, 155, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, -1, -1, -1, -1, -1, + 155, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, -1, -1, -1, -1, -1, 155, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, -1, -1, -1, + -1, -1, 155, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, -1, -1, -1, -1, -1, 155, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, -1, + -1, -1, -1, -1, 155, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, -1, -1, -1, -1, -1, + 155, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, -1, -1, -1, -1, -1, 155, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, -1, -1, -1, + -1, -1, 155, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, -1, -1, -1, -1, -1, 155, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, -1, + -1, -1, -1, -1, 155, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, -1, -1, -1, -1, -1, + 155, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, -1, -1, -1, -1, -1, 155, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, -1, -1, -1, + -1, -1, 155, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, -1, -1, -1, -1, -1, 155, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, -1, + -1, 152, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, -1, -1, -1, -1, + 148, -1, -1, -1, 152, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, -1, -1, 152, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, -1, -1, -1, -1, 148, -1, -1, -1, + 152, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, -1, -1, 152, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, -1, -1, + -1, -1, 148, -1, -1, -1, 152, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, -1, -1, 152, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - -1, -1, -1, -1, 144, -1, -1, -1, 148, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, -1, - -1, 148, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, -1, -1, -1, -1, - 144, -1, -1, -1, 148, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, -1, -1, 148, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, -1, -1, -1, -1, 144, -1, -1, -1, - 148, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, -1, -1, 148, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, - -1, -1, 144, -1, -1, -1, 148, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, -1, -1, 148, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, -1, -1, -1, -1, 144, -1, - -1, -1, 148, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, -1, -1, 148, 126, 127, 128, 129, + 140, 141, 142, 143, -1, -1, -1, -1, 148, -1, + -1, -1, 152, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, -1, -1, 152, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + -1, -1, -1, -1, 148, -1, -1, -1, 152, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, -1, + -1, 152, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, -1, -1, -1, -1, + 148, -1, -1, -1, 152, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, -1, -1, 152, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, -1, -1, -1, -1, 148, -1, -1, -1, + 152, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, -1, -1, 152, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, -1, -1, + -1, -1, 148, -1, -1, -1, 152, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, -1, -1, 152, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - -1, -1, -1, -1, 144, -1, -1, -1, 148, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, -1, - -1, 148, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, -1, -1, -1, -1, - 144, -1, -1, -1, 148, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, -1, -1, 148, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, -1, -1, -1, -1, 144, -1, -1, -1, - 148, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, -1, -1, 148, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, - -1, -1, 144, -1, -1, -1, 148, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, -1, -1, 148, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, -1, -1, -1, -1, 144, -1, - -1, -1, 148, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, -1, -1, 148, 126, 127, 128, 129, + 140, 141, 142, 143, -1, -1, -1, -1, 148, -1, + -1, -1, 152, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, -1, -1, 152, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + -1, -1, -1, -1, 148, -1, -1, -1, 152, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, -1, + -1, 152, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, -1, -1, -1, -1, + 148, -1, -1, -1, 152, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, -1, -1, 152, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, -1, -1, -1, -1, 148, -1, -1, -1, + 152, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, -1, -1, 152, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, -1, -1, + -1, -1, 148, -1, -1, -1, 152, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, -1, -1, 152, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - -1, -1, -1, -1, 144, -1, -1, -1, 148, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, -1, - -1, 148, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, -1, -1, -1, -1, - 144, -1, -1, -1, 148, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, -1, -1, 148, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, -1, -1, -1, -1, 144, -1, -1, -1, - 148, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, -1, -1, 148, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, - -1, -1, 144, -1, 146, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, 146, 126, 127, 128, 129, + 140, 141, 142, 143, -1, -1, -1, -1, 148, -1, + -1, -1, 152, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, -1, -1, 152, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + -1, -1, -1, -1, 148, -1, -1, -1, 152, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, -1, + -1, 152, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, -1, -1, -1, -1, + 148, -1, -1, -1, 152, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, -1, -1, 152, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, -1, -1, -1, -1, 148, -1, 150, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, 150, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - -1, -1, -1, -1, 144, -1, 146, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, 146, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, -1, -1, -1, -1, 144, -1, 146, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, 146, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, -1, -1, -1, -1, 144, -1, - 146, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, 146, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, -1, -1, -1, -1, - 144, -1, 146, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, 146, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, - -1, -1, 144, -1, 146, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, 146, 126, 127, 128, 129, + 140, 141, 142, 143, -1, -1, -1, -1, 148, -1, + 150, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, 150, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, -1, -1, -1, -1, + 148, -1, 150, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, 150, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, -1, -1, + -1, -1, 148, -1, 150, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, 150, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + -1, -1, -1, -1, 148, -1, 150, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, 150, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, -1, -1, -1, -1, 148, -1, 150, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, 150, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - -1, -1, -1, -1, 144, -1, 146, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, 146, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, -1, -1, -1, -1, 144, -1, 146, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, 146, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, -1, -1, -1, -1, 144, -1, - 146, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, 146, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, -1, -1, -1, -1, - 144, -1, 146, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, 146, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, - -1, -1, 144, -1, 146, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, 146, 126, 127, 128, 129, + 140, 141, 142, 143, -1, -1, -1, -1, 148, -1, + 150, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, 150, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, -1, -1, -1, -1, + 148, -1, 150, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, 150, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, -1, -1, + -1, -1, 148, -1, 150, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, 150, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + -1, -1, -1, -1, 148, -1, 150, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, 150, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, -1, -1, -1, -1, 148, -1, 150, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, 150, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - -1, -1, -1, -1, 144, -1, 146, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, 146, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, -1, -1, -1, -1, 144, -1, 146, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, 146, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, -1, -1, -1, -1, 144, -1, - 146, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, 146, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, -1, -1, -1, -1, - 144, -1, 146, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, 146, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, - -1, -1, 144, -1, 146, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, 146, 126, 127, 128, 129, + 140, 141, 142, 143, -1, -1, -1, -1, 148, -1, + 150, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, 150, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, -1, -1, -1, -1, + 148, -1, 150, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, 150, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, -1, -1, + -1, -1, 148, -1, 150, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, 150, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + -1, -1, -1, -1, 148, -1, 150, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, 150, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, -1, -1, -1, -1, 148, -1, 150, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, 150, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - -1, -1, -1, -1, 144, -1, 146, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, 146, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, -1, -1, -1, -1, 144, -1, 146, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, 146, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, -1, -1, -1, -1, 144, -1, - 146, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, 146, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, -1, -1, -1, -1, - 144, -1, 146, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, 146, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, - -1, -1, 144, -1, 146, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, 146, 126, 127, 128, 129, + 140, 141, 142, 143, -1, -1, -1, -1, 148, -1, + 150, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, 150, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, -1, -1, -1, -1, + 148, -1, 150, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, 150, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, -1, -1, + -1, -1, 148, -1, 150, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, 150, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + -1, -1, -1, -1, 148, -1, 150, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, 150, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, -1, -1, -1, -1, 148, -1, 150, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, 150, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - -1, -1, -1, -1, 144, -1, 146, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144, -1, 146, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, -1, -1, -1, -1, 144, -1, 146, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, -1, -1, -1, -1, 144, -1, 146, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, -1, -1, -1, -1, 144, -1, - 146, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, -1, -1, -1, -1, 144, - -1, 146, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, -1, -1, -1, -1, - 144, -1, 146, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, - -1, 144, -1, 146, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, - -1, -1, 144, -1, 146, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, - -1, -1, -1, 144, -1, 146, 126, 127, 128, 129, + 140, 141, 142, 143, -1, -1, -1, -1, 148, -1, + 150, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148, + -1, 150, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, -1, -1, -1, -1, + 148, -1, 150, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, -1, -1, -1, + -1, 148, -1, 150, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, -1, -1, + -1, -1, 148, -1, 150, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, -1, + -1, -1, -1, 148, -1, 150, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + -1, -1, -1, -1, 148, -1, 150, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, -1, -1, -1, -1, 148, -1, 150, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, -1, -1, -1, -1, 148, -1, 150, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, -1, -1, -1, -1, 148, -1, 150, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - -1, -1, -1, -1, 144, -1, 146, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, -1, -1, -1, -1, 144 + 140, 141, 142, 143, -1, -1, -1, -1, 148, -1, + 150, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, -1, -1, -1, -1, 148 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 1, 156, 157, 6, 0, 4, 12, 13, 35, + 0, 1, 160, 161, 6, 0, 4, 12, 13, 35, 40, 41, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 86, - 87, 92, 93, 94, 95, 98, 100, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 118, 119, 120, - 121, 158, 160, 161, 179, 183, 188, 191, 192, 193, - 194, 195, 196, 197, 217, 218, 219, 220, 221, 3, - 4, 5, 7, 9, 10, 11, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, - 39, 42, 106, 112, 113, 114, 115, 116, 117, 122, - 123, 124, 125, 135, 136, 140, 142, 143, 145, 147, - 149, 150, 152, 177, 178, 222, 223, 235, 13, 53, - 145, 6, 152, 6, 6, 6, 6, 145, 152, 145, - 145, 77, 145, 152, 145, 145, 77, 152, 145, 145, - 57, 53, 53, 6, 53, 53, 50, 53, 55, 55, - 47, 50, 53, 55, 50, 53, 55, 50, 53, 145, - 50, 152, 135, 136, 145, 152, 224, 225, 224, 152, - 47, 50, 53, 152, 224, 4, 51, 61, 53, 53, - 50, 4, 106, 152, 4, 6, 47, 50, 4, 4, - 4, 145, 145, 145, 4, 152, 231, 4, 145, 145, - 6, 147, 4, 4, 5, 152, 5, 152, 145, 145, - 145, 145, 4, 147, 149, 154, 178, 152, 5, 235, - 145, 147, 145, 147, 145, 147, 145, 147, 145, 147, - 145, 147, 145, 147, 145, 147, 145, 147, 145, 147, - 145, 147, 145, 147, 145, 147, 145, 147, 145, 147, - 145, 147, 145, 147, 145, 147, 145, 147, 145, 147, - 145, 147, 145, 145, 145, 145, 7, 145, 145, 145, - 4, 222, 222, 222, 222, 148, 152, 222, 4, 98, - 99, 4, 4, 188, 189, 190, 222, 6, 6, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 144, 6, 6, 222, 5, 222, 222, - 4, 47, 50, 53, 55, 136, 188, 197, 222, 229, - 230, 222, 222, 145, 222, 230, 222, 222, 145, 230, - 222, 222, 136, 152, 222, 227, 229, 145, 152, 145, - 145, 5, 227, 228, 228, 228, 145, 184, 185, 186, - 187, 145, 145, 145, 227, 222, 4, 227, 224, 224, - 224, 222, 222, 135, 136, 152, 152, 224, 152, 152, - 152, 135, 136, 145, 190, 224, 152, 145, 152, 145, - 145, 228, 227, 145, 4, 6, 147, 147, 190, 6, - 152, 152, 147, 147, 6, 222, 222, 222, 149, 222, - 152, 101, 222, 222, 222, 6, 6, 190, 6, 190, - 4, 234, 235, 234, 234, 234, 147, 222, 4, 152, - 162, 6, 222, 222, 222, 222, 222, 222, 222, 222, - 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, - 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, - 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, - 222, 222, 222, 222, 234, 234, 234, 234, 222, 234, - 234, 234, 147, 146, 7, 125, 230, 148, 7, 177, - 178, 149, 7, 147, 153, 47, 50, 53, 55, 183, - 6, 222, 222, 222, 222, 222, 222, 222, 222, 222, - 222, 222, 222, 222, 222, 222, 6, 146, 151, 151, - 146, 147, 5, 152, 5, 5, 5, 222, 229, 8, - 137, 151, 153, 146, 146, 222, 146, 153, 146, 146, - 222, 153, 146, 146, 152, 153, 230, 137, 7, 222, - 222, 222, 222, 7, 7, 215, 215, 222, 145, 145, - 145, 145, 222, 222, 222, 7, 152, 146, 6, 151, - 151, 151, 224, 224, 189, 189, 151, 222, 222, 222, - 222, 201, 151, 190, 222, 222, 222, 222, 7, 216, - 7, 222, 6, 222, 222, 153, 230, 230, 222, 222, - 146, 146, 146, 98, 151, 190, 152, 8, 146, 148, - 153, 153, 147, 149, 146, 146, 146, 146, 222, 148, - 178, 222, 4, 88, 89, 90, 91, 153, 165, 169, - 172, 174, 175, 146, 148, 146, 148, 146, 148, 146, - 148, 146, 148, 146, 148, 146, 148, 146, 148, 146, - 148, 146, 148, 146, 148, 151, 151, 146, 148, 146, - 148, 146, 148, 146, 148, 146, 148, 146, 148, 151, - 151, 151, 151, 151, 151, 146, 151, 151, 146, 146, - 6, 151, 146, 151, 222, 227, 227, 153, 7, 149, - 177, 178, 235, 222, 6, 4, 4, 152, 232, 148, - 152, 152, 152, 152, 8, 6, 132, 159, 230, 222, - 7, 148, 152, 222, 222, 222, 229, 222, 229, 101, - 7, 7, 146, 7, 101, 7, 7, 146, 101, 7, - 7, 230, 153, 152, 222, 146, 153, 146, 146, 222, - 227, 4, 214, 6, 146, 180, 222, 235, 180, 180, - 180, 146, 146, 146, 227, 230, 149, 224, 222, 222, - 153, 153, 222, 151, 151, 151, 68, 78, 84, 85, - 211, 212, 224, 153, 198, 146, 153, 146, 146, 222, - 6, 222, 146, 148, 148, 153, 153, 148, 148, 7, - 7, 7, 149, 222, 153, 222, 222, 7, 149, 222, - 4, 7, 7, 7, 7, 148, 149, 178, 234, 153, - 166, 145, 145, 152, 176, 6, 222, 222, 222, 222, - 222, 222, 222, 222, 230, 234, 222, 234, 148, 6, - 6, 148, 4, 98, 99, 222, 6, 6, 6, 7, - 147, 231, 233, 6, 230, 230, 230, 230, 222, 132, - 234, 146, 151, 224, 230, 153, 8, 53, 227, 227, - 7, 227, 53, 55, 227, 227, 7, 55, 227, 227, - 153, 230, 6, 7, 7, 7, 7, 68, 213, 6, - 7, 146, 146, 146, 146, 7, 7, 7, 6, 153, - 4, 151, 151, 151, 153, 224, 224, 224, 4, 6, - 152, 145, 153, 212, 151, 211, 7, 6, 7, 7, - 6, 152, 6, 6, 6, 53, 6, 6, 227, 227, - 227, 4, 151, 8, 8, 146, 4, 4, 148, 152, - 152, 152, 152, 6, 4, 6, 145, 222, 222, 226, - 227, 152, 146, 148, 146, 148, 146, 148, 146, 148, - 146, 146, 146, 146, 177, 7, 177, 178, 149, 7, - 6, 231, 222, 151, 153, 153, 153, 153, 153, 6, - 6, 159, 222, 6, 153, 222, 152, 61, 182, 182, - 227, 6, 152, 152, 6, 6, 227, 152, 6, 6, - 153, 5, 227, 227, 227, 4, 6, 227, 7, 7, - 7, 7, 227, 227, 227, 7, 6, 7, 222, 222, - 222, 152, 151, 153, 151, 153, 151, 153, 147, 222, - 227, 222, 222, 224, 153, 5, 152, 227, 152, 152, - 227, 230, 152, 6, 6, 97, 222, 222, 222, 6, - 7, 149, 227, 227, 227, 227, 178, 163, 222, 151, - 151, 151, 153, 164, 222, 227, 235, 222, 6, 4, - 232, 6, 148, 231, 6, 6, 6, 6, 234, 151, - 148, 222, 224, 6, 6, 6, 222, 222, 6, 222, - 5, 6, 6, 101, 181, 222, 6, 227, 227, 227, - 227, 6, 4, 6, 6, 222, 222, 235, 153, 146, - 151, 153, 189, 224, 6, 202, 224, 6, 203, 224, - 6, 204, 222, 153, 151, 146, 153, 151, 6, 136, - 224, 6, 224, 224, 6, 153, 222, 227, 151, 153, - 8, 153, 146, 152, 222, 235, 4, 151, 151, 151, - 151, 146, 151, 222, 222, 227, 152, 151, 153, 6, - 6, 6, 7, 6, 149, 6, 222, 153, 153, 153, - 153, 5, 51, 6, 6, 6, 6, 6, 152, 152, - 6, 6, 152, 222, 153, 151, 152, 151, 152, 151, - 152, 148, 6, 227, 7, 152, 222, 151, 151, 151, - 6, 153, 96, 222, 222, 230, 6, 6, 227, 227, - 227, 227, 167, 222, 151, 151, 226, 222, 6, 231, - 99, 151, 6, 6, 6, 6, 6, 152, 226, 230, - 189, 151, 153, 222, 224, 211, 222, 224, 211, 222, - 224, 211, 6, 151, 153, 227, 190, 153, 224, 230, - 224, 222, 153, 153, 153, 153, 153, 153, 153, 152, - 222, 222, 153, 6, 222, 222, 153, 153, 153, 222, - 153, 151, 153, 153, 151, 153, 153, 151, 153, 227, - 6, 68, 153, 199, 152, 151, 153, 151, 6, 6, - 6, 6, 6, 6, 164, 146, 151, 6, 152, 151, - 153, 6, 6, 153, 6, 205, 222, 6, 6, 206, - 222, 6, 6, 207, 222, 6, 153, 222, 211, 190, - 230, 6, 224, 230, 153, 170, 222, 226, 222, 152, - 153, 152, 153, 152, 153, 6, 6, 153, 153, 200, - 153, 151, 153, 6, 152, 146, 153, 153, 211, 6, - 208, 211, 6, 209, 211, 6, 210, 211, 6, 230, - 6, 168, 234, 173, 152, 6, 153, 152, 153, 152, - 153, 152, 153, 153, 151, 153, 152, 226, 6, 211, - 6, 211, 6, 211, 6, 234, 6, 171, 234, 153, - 153, 153, 153, 151, 153, 6, 6, 6, 6, 234, - 6 + 87, 91, 96, 97, 98, 99, 102, 104, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 122, 123, + 124, 125, 162, 164, 165, 183, 187, 192, 195, 196, + 197, 198, 199, 200, 201, 221, 222, 223, 224, 225, + 3, 4, 5, 7, 9, 10, 11, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, + 38, 39, 42, 110, 116, 117, 118, 119, 120, 121, + 126, 127, 128, 129, 139, 140, 144, 146, 147, 149, + 151, 153, 154, 156, 181, 182, 226, 227, 239, 13, + 53, 149, 6, 156, 6, 6, 6, 6, 149, 156, + 149, 149, 77, 149, 156, 149, 149, 77, 156, 149, + 149, 57, 53, 53, 6, 53, 53, 50, 53, 55, + 55, 47, 50, 53, 55, 50, 53, 55, 50, 53, + 149, 50, 156, 139, 140, 149, 156, 228, 229, 228, + 156, 47, 50, 53, 156, 228, 4, 51, 61, 53, + 53, 50, 4, 110, 156, 4, 6, 47, 50, 4, + 4, 4, 5, 47, 50, 53, 55, 140, 156, 192, + 201, 226, 231, 232, 233, 4, 149, 149, 149, 4, + 156, 235, 4, 149, 149, 6, 151, 4, 4, 5, + 156, 5, 156, 149, 149, 149, 149, 4, 151, 153, + 158, 182, 156, 5, 239, 149, 151, 149, 151, 149, + 151, 149, 151, 149, 151, 149, 151, 149, 151, 149, + 151, 149, 151, 149, 151, 149, 151, 149, 151, 149, + 151, 149, 151, 149, 151, 149, 151, 149, 151, 149, + 151, 149, 151, 149, 151, 149, 151, 149, 149, 149, + 149, 7, 149, 149, 149, 4, 226, 226, 226, 226, + 152, 156, 226, 4, 102, 103, 4, 4, 192, 193, + 194, 226, 6, 6, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 148, 6, + 6, 226, 5, 226, 226, 140, 226, 233, 234, 226, + 226, 149, 226, 234, 226, 226, 149, 234, 226, 226, + 231, 149, 156, 149, 149, 232, 232, 232, 149, 188, + 189, 190, 191, 149, 149, 149, 231, 226, 4, 231, + 228, 228, 228, 226, 226, 139, 140, 156, 156, 228, + 156, 156, 156, 139, 140, 149, 194, 228, 156, 149, + 156, 149, 149, 232, 231, 149, 4, 6, 151, 151, + 194, 6, 156, 156, 151, 151, 151, 5, 156, 5, + 5, 5, 156, 226, 233, 157, 234, 8, 141, 6, + 6, 226, 226, 226, 153, 226, 156, 105, 226, 226, + 226, 6, 6, 194, 6, 194, 4, 238, 239, 238, + 238, 238, 151, 226, 4, 156, 166, 6, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 238, 238, 238, 238, 226, 238, 238, 238, 151, 150, + 7, 129, 234, 152, 7, 181, 182, 153, 7, 151, + 157, 47, 50, 53, 55, 187, 6, 226, 226, 226, + 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 6, 150, 155, 155, 150, 141, 155, 157, + 150, 150, 226, 150, 157, 150, 150, 226, 157, 150, + 150, 7, 226, 226, 226, 226, 7, 7, 219, 219, + 226, 149, 149, 149, 149, 226, 226, 226, 7, 156, + 150, 6, 155, 155, 155, 228, 228, 193, 193, 155, + 226, 226, 226, 226, 205, 155, 194, 226, 226, 226, + 226, 7, 220, 7, 226, 6, 226, 226, 157, 234, + 234, 226, 226, 152, 156, 226, 226, 234, 157, 226, + 156, 226, 233, 150, 150, 150, 102, 155, 194, 156, + 8, 150, 152, 157, 157, 151, 153, 150, 150, 150, + 150, 226, 152, 182, 226, 4, 92, 93, 94, 95, + 157, 169, 173, 176, 178, 179, 150, 152, 150, 152, + 150, 152, 150, 152, 150, 152, 150, 152, 150, 152, + 150, 152, 150, 152, 150, 152, 150, 152, 155, 155, + 150, 152, 150, 152, 150, 152, 150, 152, 150, 152, + 150, 152, 155, 155, 155, 155, 155, 155, 150, 155, + 155, 150, 150, 6, 155, 150, 155, 231, 231, 157, + 7, 153, 181, 182, 239, 226, 6, 4, 4, 156, + 236, 152, 156, 156, 156, 156, 8, 6, 136, 163, + 234, 226, 7, 226, 233, 105, 7, 7, 150, 7, + 105, 7, 7, 150, 105, 7, 7, 226, 150, 157, + 150, 150, 226, 231, 4, 218, 6, 150, 184, 226, + 239, 184, 184, 184, 150, 150, 150, 231, 234, 153, + 228, 226, 226, 157, 157, 226, 155, 155, 155, 68, + 78, 84, 85, 88, 89, 215, 216, 228, 157, 202, + 150, 157, 150, 150, 226, 6, 226, 150, 152, 152, + 157, 157, 152, 152, 234, 152, 157, 157, 8, 234, + 7, 7, 7, 153, 226, 157, 226, 226, 7, 153, + 226, 4, 7, 7, 7, 7, 152, 153, 182, 238, + 157, 170, 149, 149, 156, 180, 6, 226, 226, 226, + 226, 226, 226, 226, 226, 234, 238, 226, 238, 6, + 6, 152, 4, 102, 103, 226, 6, 6, 6, 7, + 151, 235, 237, 6, 234, 234, 234, 234, 226, 136, + 238, 150, 155, 228, 53, 231, 231, 7, 231, 53, + 55, 231, 231, 7, 55, 231, 231, 6, 7, 7, + 7, 7, 68, 217, 6, 7, 150, 150, 150, 150, + 7, 7, 7, 6, 157, 4, 155, 155, 155, 157, + 228, 228, 228, 4, 6, 156, 149, 6, 90, 6, + 90, 157, 216, 155, 215, 7, 6, 7, 7, 6, + 156, 6, 6, 6, 53, 6, 6, 157, 226, 157, + 231, 231, 231, 4, 155, 8, 8, 150, 4, 4, + 152, 156, 156, 156, 156, 6, 4, 6, 149, 226, + 226, 230, 231, 156, 150, 152, 150, 152, 150, 152, + 150, 152, 150, 150, 150, 150, 181, 7, 181, 182, + 153, 7, 6, 235, 226, 155, 157, 157, 157, 157, + 157, 6, 6, 163, 226, 6, 156, 61, 186, 186, + 231, 6, 156, 156, 6, 6, 231, 156, 6, 6, + 5, 231, 231, 231, 4, 6, 231, 7, 7, 7, + 7, 231, 231, 231, 7, 6, 7, 226, 226, 226, + 156, 155, 157, 155, 157, 155, 157, 151, 226, 231, + 226, 6, 6, 226, 228, 157, 5, 156, 231, 156, + 156, 231, 234, 156, 152, 6, 6, 101, 226, 226, + 226, 6, 7, 153, 231, 231, 231, 231, 182, 167, + 226, 155, 155, 155, 157, 168, 226, 231, 239, 226, + 6, 4, 236, 6, 152, 235, 6, 6, 6, 6, + 238, 155, 226, 228, 6, 6, 6, 226, 226, 6, + 226, 5, 6, 6, 105, 185, 226, 6, 231, 231, + 231, 231, 6, 4, 6, 6, 226, 226, 239, 157, + 150, 155, 157, 193, 228, 6, 206, 228, 6, 207, + 228, 6, 208, 226, 157, 155, 150, 157, 155, 6, + 140, 228, 6, 228, 228, 6, 157, 226, 231, 155, + 157, 8, 157, 150, 156, 226, 239, 4, 155, 155, + 155, 155, 150, 155, 226, 226, 231, 156, 155, 157, + 6, 6, 6, 7, 6, 153, 6, 226, 157, 157, + 157, 157, 5, 51, 6, 6, 6, 6, 6, 156, + 156, 6, 6, 156, 226, 157, 155, 156, 155, 156, + 155, 156, 152, 6, 231, 7, 156, 226, 155, 155, + 155, 6, 157, 100, 226, 226, 234, 6, 6, 231, + 231, 231, 231, 171, 226, 155, 155, 230, 226, 6, + 235, 103, 155, 6, 6, 6, 6, 6, 156, 230, + 234, 193, 155, 157, 226, 228, 215, 226, 228, 215, + 226, 228, 215, 6, 155, 157, 231, 194, 157, 228, + 234, 228, 226, 157, 157, 157, 157, 157, 157, 157, + 156, 226, 226, 157, 6, 226, 226, 157, 157, 157, + 226, 157, 155, 157, 157, 155, 157, 157, 155, 157, + 231, 6, 68, 157, 203, 156, 155, 157, 155, 6, + 6, 6, 6, 6, 6, 168, 150, 155, 6, 156, + 155, 157, 6, 6, 157, 6, 209, 226, 6, 6, + 210, 226, 6, 6, 211, 226, 6, 157, 226, 215, + 194, 234, 6, 228, 234, 157, 174, 226, 230, 226, + 156, 157, 156, 157, 156, 157, 6, 6, 157, 157, + 204, 157, 155, 157, 6, 156, 150, 157, 157, 215, + 6, 212, 215, 6, 213, 215, 6, 214, 215, 6, + 234, 6, 172, 238, 177, 156, 6, 157, 156, 157, + 156, 157, 156, 157, 157, 155, 157, 156, 230, 6, + 215, 6, 215, 6, 215, 6, 238, 6, 175, 238, + 157, 157, 157, 157, 155, 157, 6, 6, 6, 6, + 238, 6 }; #define yyerrok (yyerrstatus = 0) @@ -3859,133 +3878,133 @@ yyreduce: case 3: /* Line 1464 of yacc.c */ -#line 159 "Gmsh.y" +#line 160 "Gmsh.y" { yyerrok; return 1; ;} break; case 6: /* Line 1464 of yacc.c */ -#line 170 "Gmsh.y" +#line 171 "Gmsh.y" { return 1; ;} break; case 7: /* Line 1464 of yacc.c */ -#line 171 "Gmsh.y" +#line 172 "Gmsh.y" { return 1; ;} break; case 8: /* Line 1464 of yacc.c */ -#line 172 "Gmsh.y" +#line 173 "Gmsh.y" { return 1; ;} break; case 9: /* Line 1464 of yacc.c */ -#line 173 "Gmsh.y" +#line 174 "Gmsh.y" { return 1; ;} break; case 10: /* Line 1464 of yacc.c */ -#line 174 "Gmsh.y" +#line 175 "Gmsh.y" { List_Delete((yyvsp[(1) - (1)].l)); return 1; ;} break; case 11: /* Line 1464 of yacc.c */ -#line 175 "Gmsh.y" +#line 176 "Gmsh.y" { return 1; ;} break; case 12: /* Line 1464 of yacc.c */ -#line 176 "Gmsh.y" +#line 177 "Gmsh.y" { return 1; ;} break; case 13: /* Line 1464 of yacc.c */ -#line 177 "Gmsh.y" +#line 178 "Gmsh.y" { return 1; ;} break; case 14: /* Line 1464 of yacc.c */ -#line 178 "Gmsh.y" +#line 179 "Gmsh.y" { List_Delete((yyvsp[(1) - (1)].l)); return 1; ;} break; case 15: /* Line 1464 of yacc.c */ -#line 179 "Gmsh.y" +#line 180 "Gmsh.y" { return 1; ;} break; case 16: /* Line 1464 of yacc.c */ -#line 180 "Gmsh.y" +#line 181 "Gmsh.y" { return 1; ;} break; case 17: /* Line 1464 of yacc.c */ -#line 181 "Gmsh.y" +#line 182 "Gmsh.y" { return 1; ;} break; case 18: /* Line 1464 of yacc.c */ -#line 182 "Gmsh.y" +#line 183 "Gmsh.y" { return 1; ;} break; case 19: /* Line 1464 of yacc.c */ -#line 183 "Gmsh.y" +#line 184 "Gmsh.y" { return 1; ;} break; case 20: /* Line 1464 of yacc.c */ -#line 184 "Gmsh.y" +#line 185 "Gmsh.y" { return 1; ;} break; case 21: /* Line 1464 of yacc.c */ -#line 185 "Gmsh.y" +#line 186 "Gmsh.y" { return 1; ;} break; case 22: /* Line 1464 of yacc.c */ -#line 186 "Gmsh.y" +#line 187 "Gmsh.y" { return 1; ;} break; case 23: /* Line 1464 of yacc.c */ -#line 191 "Gmsh.y" +#line 192 "Gmsh.y" { (yyval.c) = (char*)"w"; ;} @@ -3994,7 +4013,7 @@ yyreduce: case 24: /* Line 1464 of yacc.c */ -#line 195 "Gmsh.y" +#line 196 "Gmsh.y" { (yyval.c) = (char*)"a"; ;} @@ -4003,7 +4022,7 @@ yyreduce: case 25: /* Line 1464 of yacc.c */ -#line 202 "Gmsh.y" +#line 203 "Gmsh.y" { Msg::Direct((yyvsp[(3) - (5)].c)); Free((yyvsp[(3) - (5)].c)); @@ -4013,7 +4032,7 @@ yyreduce: case 26: /* Line 1464 of yacc.c */ -#line 207 "Gmsh.y" +#line 208 "Gmsh.y" { std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(6) - (7)].c)); FILE *fp = fopen(tmp.c_str(), (yyvsp[(5) - (7)].c)); @@ -4032,7 +4051,7 @@ yyreduce: case 27: /* Line 1464 of yacc.c */ -#line 221 "Gmsh.y" +#line 222 "Gmsh.y" { char tmpstring[1024]; int i = PrintListOfDouble((yyvsp[(3) - (7)].c), (yyvsp[(5) - (7)].l), tmpstring); @@ -4050,7 +4069,7 @@ yyreduce: case 28: /* Line 1464 of yacc.c */ -#line 234 "Gmsh.y" +#line 235 "Gmsh.y" { char tmpstring[1024]; int i = PrintListOfDouble((yyvsp[(3) - (9)].c), (yyvsp[(5) - (9)].l), tmpstring); @@ -4078,7 +4097,7 @@ yyreduce: case 29: /* Line 1464 of yacc.c */ -#line 262 "Gmsh.y" +#line 263 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(1) - (6)].c), "View") && ViewData->finalize()){ @@ -4097,7 +4116,7 @@ yyreduce: case 30: /* Line 1464 of yacc.c */ -#line 276 "Gmsh.y" +#line 277 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (6)].c), "View")){ @@ -4113,7 +4132,7 @@ yyreduce: case 31: /* Line 1464 of yacc.c */ -#line 287 "Gmsh.y" +#line 288 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (6)].c), "View")){ @@ -4129,7 +4148,7 @@ yyreduce: case 32: /* Line 1464 of yacc.c */ -#line 301 "Gmsh.y" +#line 302 "Gmsh.y" { #if defined(HAVE_POST) ViewData = new PViewDataList(); @@ -4140,35 +4159,35 @@ yyreduce: case 38: /* Line 1464 of yacc.c */ -#line 315 "Gmsh.y" +#line 316 "Gmsh.y" { ViewCoord.push_back((yyvsp[(1) - (1)].d)); ;} break; case 39: /* Line 1464 of yacc.c */ -#line 317 "Gmsh.y" +#line 318 "Gmsh.y" { ViewCoord.push_back((yyvsp[(3) - (3)].d)); ;} break; case 40: /* Line 1464 of yacc.c */ -#line 322 "Gmsh.y" +#line 323 "Gmsh.y" { if(ViewValueList) ViewValueList->push_back((yyvsp[(1) - (1)].d)); ;} break; case 41: /* Line 1464 of yacc.c */ -#line 324 "Gmsh.y" +#line 325 "Gmsh.y" { if(ViewValueList) ViewValueList->push_back((yyvsp[(3) - (3)].d)); ;} break; case 42: /* Line 1464 of yacc.c */ -#line 329 "Gmsh.y" +#line 330 "Gmsh.y" { #if defined(HAVE_POST) if(!strncmp((yyvsp[(1) - (1)].c), "SP", 2)){ @@ -4277,7 +4296,7 @@ yyreduce: case 43: /* Line 1464 of yacc.c */ -#line 433 "Gmsh.y" +#line 434 "Gmsh.y" { #if defined(HAVE_POST) if(ViewValueList){ @@ -4292,7 +4311,7 @@ yyreduce: case 44: /* Line 1464 of yacc.c */ -#line 443 "Gmsh.y" +#line 444 "Gmsh.y" { #if defined(HAVE_POST) if(ViewValueList) (*ViewNumList)++; @@ -4303,7 +4322,7 @@ yyreduce: case 45: /* Line 1464 of yacc.c */ -#line 452 "Gmsh.y" +#line 453 "Gmsh.y" { #if defined(HAVE_POST) for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c)) + 1; i++) ViewData->T2C.push_back((yyvsp[(1) - (1)].c)[i]); @@ -4315,7 +4334,7 @@ yyreduce: case 46: /* Line 1464 of yacc.c */ -#line 459 "Gmsh.y" +#line 460 "Gmsh.y" { #if defined(HAVE_POST) for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c)) + 1; i++) ViewData->T2C.push_back((yyvsp[(3) - (3)].c)[i]); @@ -4327,7 +4346,7 @@ yyreduce: case 47: /* Line 1464 of yacc.c */ -#line 469 "Gmsh.y" +#line 470 "Gmsh.y" { #if defined(HAVE_POST) ViewData->T2D.push_back((yyvsp[(3) - (8)].d)); @@ -4341,7 +4360,7 @@ yyreduce: case 48: /* Line 1464 of yacc.c */ -#line 478 "Gmsh.y" +#line 479 "Gmsh.y" { #if defined(HAVE_POST) ViewData->NbT2++; @@ -4352,7 +4371,7 @@ yyreduce: case 49: /* Line 1464 of yacc.c */ -#line 487 "Gmsh.y" +#line 488 "Gmsh.y" { #if defined(HAVE_POST) for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c)) + 1; i++) ViewData->T3C.push_back((yyvsp[(1) - (1)].c)[i]); @@ -4364,7 +4383,7 @@ yyreduce: case 50: /* Line 1464 of yacc.c */ -#line 494 "Gmsh.y" +#line 495 "Gmsh.y" { #if defined(HAVE_POST) for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c)) + 1; i++) ViewData->T3C.push_back((yyvsp[(3) - (3)].c)[i]); @@ -4376,7 +4395,7 @@ yyreduce: case 51: /* Line 1464 of yacc.c */ -#line 504 "Gmsh.y" +#line 505 "Gmsh.y" { #if defined(HAVE_POST) ViewData->T3D.push_back((yyvsp[(3) - (10)].d)); ViewData->T3D.push_back((yyvsp[(5) - (10)].d)); @@ -4389,7 +4408,7 @@ yyreduce: case 52: /* Line 1464 of yacc.c */ -#line 512 "Gmsh.y" +#line 513 "Gmsh.y" { #if defined(HAVE_POST) ViewData->NbT3++; @@ -4400,7 +4419,7 @@ yyreduce: case 53: /* Line 1464 of yacc.c */ -#line 522 "Gmsh.y" +#line 523 "Gmsh.y" { #if defined(HAVE_POST) int type = @@ -4421,7 +4440,7 @@ yyreduce: case 54: /* Line 1464 of yacc.c */ -#line 541 "Gmsh.y" +#line 542 "Gmsh.y" { #if defined(HAVE_POST) int type = @@ -4442,7 +4461,7 @@ yyreduce: case 55: /* Line 1464 of yacc.c */ -#line 560 "Gmsh.y" +#line 561 "Gmsh.y" { #if defined(HAVE_POST) ViewValueList = &ViewData->Time; @@ -4453,7 +4472,7 @@ yyreduce: case 56: /* Line 1464 of yacc.c */ -#line 566 "Gmsh.y" +#line 567 "Gmsh.y" { ;} break; @@ -4461,56 +4480,56 @@ yyreduce: case 57: /* Line 1464 of yacc.c */ -#line 573 "Gmsh.y" +#line 574 "Gmsh.y" { (yyval.i) = 0; ;} break; case 58: /* Line 1464 of yacc.c */ -#line 574 "Gmsh.y" +#line 575 "Gmsh.y" { (yyval.i) = 1; ;} break; case 59: /* Line 1464 of yacc.c */ -#line 575 "Gmsh.y" +#line 576 "Gmsh.y" { (yyval.i) = 2; ;} break; case 60: /* Line 1464 of yacc.c */ -#line 576 "Gmsh.y" +#line 577 "Gmsh.y" { (yyval.i) = 3; ;} break; case 61: /* Line 1464 of yacc.c */ -#line 577 "Gmsh.y" +#line 578 "Gmsh.y" { (yyval.i) = 4; ;} break; case 62: /* Line 1464 of yacc.c */ -#line 581 "Gmsh.y" +#line 582 "Gmsh.y" { (yyval.i) = 1; ;} break; case 63: /* Line 1464 of yacc.c */ -#line 582 "Gmsh.y" +#line 583 "Gmsh.y" { (yyval.i) = -1; ;} break; case 64: /* Line 1464 of yacc.c */ -#line 590 "Gmsh.y" +#line 591 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){ if(!(yyvsp[(2) - (4)].i)) @@ -4541,7 +4560,7 @@ yyreduce: case 65: /* Line 1464 of yacc.c */ -#line 616 "Gmsh.y" +#line 617 "Gmsh.y" { int index = (int)(yyvsp[(3) - (7)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (7)].c))){ @@ -4573,7 +4592,7 @@ yyreduce: case 66: /* Line 1464 of yacc.c */ -#line 643 "Gmsh.y" +#line 644 "Gmsh.y" { if(List_Nbr((yyvsp[(4) - (9)].l)) != List_Nbr((yyvsp[(8) - (9)].l))){ yymsg(0, "Incompatible array dimensions in affectation"); @@ -4618,7 +4637,7 @@ yyreduce: case 67: /* Line 1464 of yacc.c */ -#line 683 "Gmsh.y" +#line 684 "Gmsh.y" { if(gmsh_yysymbols.count((yyvsp[(1) - (6)].c))) gmsh_yysymbols[(yyvsp[(1) - (6)].c)].clear(); @@ -4633,7 +4652,7 @@ yyreduce: case 68: /* Line 1464 of yacc.c */ -#line 693 "Gmsh.y" +#line 694 "Gmsh.y" { // appends to the list for(int i = 0; i < List_Nbr((yyvsp[(5) - (6)].l)); i++) @@ -4646,7 +4665,7 @@ yyreduce: case 69: /* Line 1464 of yacc.c */ -#line 701 "Gmsh.y" +#line 702 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c))) yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (3)].c)); @@ -4663,7 +4682,7 @@ yyreduce: case 70: /* Line 1464 of yacc.c */ -#line 713 "Gmsh.y" +#line 714 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c))) yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (6)].c)); @@ -4680,7 +4699,7 @@ yyreduce: case 71: /* Line 1464 of yacc.c */ -#line 725 "Gmsh.y" +#line 726 "Gmsh.y" { gmsh_yystringsymbols[(yyvsp[(1) - (4)].c)] = std::string((yyvsp[(3) - (4)].c)); Free((yyvsp[(1) - (4)].c)); @@ -4691,7 +4710,7 @@ yyreduce: case 72: /* Line 1464 of yacc.c */ -#line 734 "Gmsh.y" +#line 735 "Gmsh.y" { std::string tmp((yyvsp[(5) - (6)].c)); StringOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (6)].c), 0, (yyvsp[(3) - (6)].c), tmp); @@ -4702,7 +4721,7 @@ yyreduce: case 73: /* Line 1464 of yacc.c */ -#line 740 "Gmsh.y" +#line 741 "Gmsh.y" { std::string tmp((yyvsp[(8) - (9)].c)); StringOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c), tmp); @@ -4713,7 +4732,7 @@ yyreduce: case 74: /* Line 1464 of yacc.c */ -#line 749 "Gmsh.y" +#line 750 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (6)].c), 0, (yyvsp[(3) - (6)].c), d)){ @@ -4736,7 +4755,7 @@ yyreduce: case 75: /* Line 1464 of yacc.c */ -#line 767 "Gmsh.y" +#line 768 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c), d)){ @@ -4759,7 +4778,7 @@ yyreduce: case 76: /* Line 1464 of yacc.c */ -#line 785 "Gmsh.y" +#line 786 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(3) - (5)].c), d)){ @@ -4773,7 +4792,7 @@ yyreduce: case 77: /* Line 1464 of yacc.c */ -#line 794 "Gmsh.y" +#line 795 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (8)].c), (int)(yyvsp[(3) - (8)].d), (yyvsp[(6) - (8)].c), d)){ @@ -4787,7 +4806,7 @@ yyreduce: case 78: /* Line 1464 of yacc.c */ -#line 806 "Gmsh.y" +#line 807 "Gmsh.y" { ColorOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (8)].c), 0, (yyvsp[(5) - (8)].c), (yyvsp[(7) - (8)].u)); Free((yyvsp[(1) - (8)].c)); Free((yyvsp[(5) - (8)].c)); @@ -4797,7 +4816,7 @@ yyreduce: case 79: /* Line 1464 of yacc.c */ -#line 811 "Gmsh.y" +#line 812 "Gmsh.y" { ColorOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (11)].c), (int)(yyvsp[(3) - (11)].d), (yyvsp[(8) - (11)].c), (yyvsp[(10) - (11)].u)); Free((yyvsp[(1) - (11)].c)); Free((yyvsp[(8) - (11)].c)); @@ -4807,7 +4826,7 @@ yyreduce: case 80: /* Line 1464 of yacc.c */ -#line 819 "Gmsh.y" +#line 820 "Gmsh.y" { GmshColorTable *ct = GetColorTable(0); if(!ct) @@ -4832,7 +4851,7 @@ yyreduce: case 81: /* Line 1464 of yacc.c */ -#line 839 "Gmsh.y" +#line 840 "Gmsh.y" { GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (9)].d)); if(!ct) @@ -4857,7 +4876,7 @@ yyreduce: case 82: /* Line 1464 of yacc.c */ -#line 862 "Gmsh.y" +#line 863 "Gmsh.y" { #if defined(HAVE_MESH) if(!strcmp((yyvsp[(1) - (5)].c),"Background")) @@ -4871,7 +4890,7 @@ yyreduce: case 83: /* Line 1464 of yacc.c */ -#line 871 "Gmsh.y" +#line 872 "Gmsh.y" { #if defined(HAVE_MESH) if(!GModel::current()->getFields()->newField((int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c))) @@ -4884,7 +4903,7 @@ yyreduce: case 84: /* Line 1464 of yacc.c */ -#line 879 "Gmsh.y" +#line 880 "Gmsh.y" { #if defined(HAVE_MESH) Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (9)].d)); @@ -4911,7 +4930,7 @@ yyreduce: case 85: /* Line 1464 of yacc.c */ -#line 901 "Gmsh.y" +#line 902 "Gmsh.y" { #if defined(HAVE_MESH) Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (9)].d)); @@ -4939,7 +4958,7 @@ yyreduce: case 86: /* Line 1464 of yacc.c */ -#line 924 "Gmsh.y" +#line 925 "Gmsh.y" { #if defined(HAVE_MESH) Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (11)].d)); @@ -4969,7 +4988,7 @@ yyreduce: case 87: /* Line 1464 of yacc.c */ -#line 952 "Gmsh.y" +#line 953 "Gmsh.y" { #if defined(HAVE_PLUGINS) try { @@ -4986,7 +5005,7 @@ yyreduce: case 88: /* Line 1464 of yacc.c */ -#line 964 "Gmsh.y" +#line 965 "Gmsh.y" { #if defined(HAVE_PLUGINS) try { @@ -5003,7 +5022,7 @@ yyreduce: case 89: /* Line 1464 of yacc.c */ -#line 981 "Gmsh.y" +#line 982 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(1) - (1)].d); ;} @@ -5012,7 +5031,7 @@ yyreduce: case 90: /* Line 1464 of yacc.c */ -#line 985 "Gmsh.y" +#line 986 "Gmsh.y" { (yyval.i) = GModel::current()->setPhysicalName (std::string((yyvsp[(1) - (1)].c)), curPhysDim, @@ -5024,7 +5043,7 @@ yyreduce: case 91: /* Line 1464 of yacc.c */ -#line 995 "Gmsh.y" +#line 996 "Gmsh.y" { (yyval.l) = 0; ;} @@ -5033,7 +5052,7 @@ yyreduce: case 92: /* Line 1464 of yacc.c */ -#line 999 "Gmsh.y" +#line 1000 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(Vertex*)); Vertex *v = FindPoint((int)(yyvsp[(4) - (5)].d)); @@ -5048,7 +5067,7 @@ yyreduce: case 93: /* Line 1464 of yacc.c */ -#line 1011 "Gmsh.y" +#line 1012 "Gmsh.y" { for(int i = 0; i < 4; i++) (yyval.v)[i] = 0.; ;} @@ -5057,7 +5076,7 @@ yyreduce: case 94: /* Line 1464 of yacc.c */ -#line 1015 "Gmsh.y" +#line 1016 "Gmsh.y" { for(int i = 0; i < 4; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i]; ;} @@ -5066,7 +5085,7 @@ yyreduce: case 95: /* Line 1464 of yacc.c */ -#line 1025 "Gmsh.y" +#line 1026 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindPoint(num)){ @@ -5094,7 +5113,7 @@ yyreduce: case 96: /* Line 1464 of yacc.c */ -#line 1048 "Gmsh.y" +#line 1049 "Gmsh.y" { curPhysDim = 0; ;} @@ -5103,7 +5122,7 @@ yyreduce: case 97: /* Line 1464 of yacc.c */ -#line 1052 "Gmsh.y" +#line 1053 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_POINT)){ @@ -5124,7 +5143,7 @@ yyreduce: case 98: /* Line 1464 of yacc.c */ -#line 1068 "Gmsh.y" +#line 1069 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ double d; @@ -5148,7 +5167,7 @@ yyreduce: case 99: /* Line 1464 of yacc.c */ -#line 1090 "Gmsh.y" +#line 1091 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -5171,7 +5190,7 @@ yyreduce: case 100: /* Line 1464 of yacc.c */ -#line 1108 "Gmsh.y" +#line 1109 "Gmsh.y" { for (int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ double dnum; @@ -5197,7 +5216,7 @@ yyreduce: case 101: /* Line 1464 of yacc.c */ -#line 1129 "Gmsh.y" +#line 1130 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -5220,7 +5239,7 @@ yyreduce: case 102: /* Line 1464 of yacc.c */ -#line 1147 "Gmsh.y" +#line 1148 "Gmsh.y" { int num = (int)(yyvsp[(3) - (8)].d); if(FindCurve(num)){ @@ -5255,7 +5274,7 @@ yyreduce: case 103: /* Line 1464 of yacc.c */ -#line 1177 "Gmsh.y" +#line 1178 "Gmsh.y" { int num = (int)(yyvsp[(3) - (8)].d); if(FindCurve(num)){ @@ -5290,7 +5309,7 @@ yyreduce: case 104: /* Line 1464 of yacc.c */ -#line 1207 "Gmsh.y" +#line 1208 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -5313,7 +5332,7 @@ yyreduce: case 105: /* Line 1464 of yacc.c */ -#line 1225 "Gmsh.y" +#line 1226 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -5336,7 +5355,7 @@ yyreduce: case 106: /* Line 1464 of yacc.c */ -#line 1243 "Gmsh.y" +#line 1244 "Gmsh.y" { int num = (int)(yyvsp[(3) - (11)].d); if(List_Nbr((yyvsp[(6) - (11)].l)) + (int)(yyvsp[(10) - (11)].d) + 1 != List_Nbr((yyvsp[(8) - (11)].l))){ @@ -5367,7 +5386,7 @@ yyreduce: case 107: /* Line 1464 of yacc.c */ -#line 1269 "Gmsh.y" +#line 1270 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindEdgeLoop(num)){ @@ -5389,7 +5408,7 @@ yyreduce: case 108: /* Line 1464 of yacc.c */ -#line 1286 "Gmsh.y" +#line 1287 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindCurve(num)){ @@ -5412,7 +5431,7 @@ yyreduce: case 109: /* Line 1464 of yacc.c */ -#line 1304 "Gmsh.y" +#line 1305 "Gmsh.y" { curPhysDim = 1; ;} @@ -5421,7 +5440,7 @@ yyreduce: case 110: /* Line 1464 of yacc.c */ -#line 1308 "Gmsh.y" +#line 1309 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_LINE)){ @@ -5442,7 +5461,7 @@ yyreduce: case 111: /* Line 1464 of yacc.c */ -#line 1327 "Gmsh.y" +#line 1328 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindSurface(num)){ @@ -5465,7 +5484,7 @@ yyreduce: case 112: /* Line 1464 of yacc.c */ -#line 1345 "Gmsh.y" +#line 1346 "Gmsh.y" { int num = (int)(yyvsp[(4) - (9)].d), type = 0; if(FindSurface(num)){ @@ -5509,7 +5528,7 @@ yyreduce: case 113: /* Line 1464 of yacc.c */ -#line 1384 "Gmsh.y" +#line 1385 "Gmsh.y" { myGmshSurface = 0; (yyval.s).Type = 0; @@ -5520,7 +5539,7 @@ yyreduce: case 114: /* Line 1464 of yacc.c */ -#line 1390 "Gmsh.y" +#line 1391 "Gmsh.y" { myGmshSurface = gmshSurface::getSurface((int)(yyvsp[(3) - (4)].d)); (yyval.s).Type = 0; @@ -5531,7 +5550,7 @@ yyreduce: case 115: /* Line 1464 of yacc.c */ -#line 1396 "Gmsh.y" +#line 1397 "Gmsh.y" { int num = (int)(yyvsp[(4) - (10)].d); myGmshSurface = gmshParametricSurface::NewParametricSurface(num, (yyvsp[(7) - (10)].c), (yyvsp[(8) - (10)].c), (yyvsp[(9) - (10)].c)); @@ -5543,7 +5562,7 @@ yyreduce: case 116: /* Line 1464 of yacc.c */ -#line 1403 "Gmsh.y" +#line 1404 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if (List_Nbr((yyvsp[(6) - (7)].l)) != 2){ @@ -5573,7 +5592,7 @@ yyreduce: case 117: /* Line 1464 of yacc.c */ -#line 1428 "Gmsh.y" +#line 1429 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if (List_Nbr((yyvsp[(6) - (7)].l)) != 2){ @@ -5603,7 +5622,7 @@ yyreduce: case 118: /* Line 1464 of yacc.c */ -#line 1453 "Gmsh.y" +#line 1454 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindSurfaceLoop(num)){ @@ -5624,7 +5643,7 @@ yyreduce: case 119: /* Line 1464 of yacc.c */ -#line 1469 "Gmsh.y" +#line 1470 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindSurface(num)){ @@ -5646,7 +5665,7 @@ yyreduce: case 120: /* Line 1464 of yacc.c */ -#line 1487 "Gmsh.y" +#line 1488 "Gmsh.y" { int num = (int)(yyvsp[(4) - (12)].d); if(FindSurface(num)){ @@ -5681,7 +5700,7 @@ yyreduce: case 121: /* Line 1464 of yacc.c */ -#line 1517 "Gmsh.y" +#line 1518 "Gmsh.y" { curPhysDim = 2; ;} @@ -5690,7 +5709,7 @@ yyreduce: case 122: /* Line 1464 of yacc.c */ -#line 1521 "Gmsh.y" +#line 1522 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){ @@ -5711,7 +5730,7 @@ yyreduce: case 123: /* Line 1464 of yacc.c */ -#line 1541 "Gmsh.y" +#line 1542 "Gmsh.y" { yymsg(0, "'Complex Volume' command is deprecated: use 'Volume' instead"); int num = (int)(yyvsp[(4) - (8)].d); @@ -5734,7 +5753,7 @@ yyreduce: case 124: /* Line 1464 of yacc.c */ -#line 1559 "Gmsh.y" +#line 1560 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindVolume(num)){ @@ -5756,7 +5775,7 @@ yyreduce: case 125: /* Line 1464 of yacc.c */ -#line 1576 "Gmsh.y" +#line 1577 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindVolume(num)){ @@ -5777,7 +5796,7 @@ yyreduce: case 126: /* Line 1464 of yacc.c */ -#line 1592 "Gmsh.y" +#line 1593 "Gmsh.y" { curPhysDim = 3; ;} @@ -5786,7 +5805,7 @@ yyreduce: case 127: /* Line 1464 of yacc.c */ -#line 1596 "Gmsh.y" +#line 1597 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME)){ @@ -5807,7 +5826,7 @@ yyreduce: case 128: /* Line 1464 of yacc.c */ -#line 1618 "Gmsh.y" +#line 1619 "Gmsh.y" { TranslateShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(4) - (5)].l)); (yyval.l) = (yyvsp[(4) - (5)].l); @@ -5817,7 +5836,7 @@ yyreduce: case 129: /* Line 1464 of yacc.c */ -#line 1623 "Gmsh.y" +#line 1624 "Gmsh.y" { RotateShapes((yyvsp[(3) - (11)].v)[0], (yyvsp[(3) - (11)].v)[1], (yyvsp[(3) - (11)].v)[2], (yyvsp[(5) - (11)].v)[0], (yyvsp[(5) - (11)].v)[1], (yyvsp[(5) - (11)].v)[2], (yyvsp[(7) - (11)].d), (yyvsp[(10) - (11)].l)); (yyval.l) = (yyvsp[(10) - (11)].l); @@ -5827,7 +5846,7 @@ yyreduce: case 130: /* Line 1464 of yacc.c */ -#line 1628 "Gmsh.y" +#line 1629 "Gmsh.y" { SymmetryShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(2) - (5)].v)[3], (yyvsp[(4) - (5)].l)); (yyval.l) = (yyvsp[(4) - (5)].l); @@ -5837,7 +5856,7 @@ yyreduce: case 131: /* Line 1464 of yacc.c */ -#line 1633 "Gmsh.y" +#line 1634 "Gmsh.y" { DilatShapes((yyvsp[(3) - (9)].v)[0], (yyvsp[(3) - (9)].v)[1], (yyvsp[(3) - (9)].v)[2], (yyvsp[(5) - (9)].d), (yyvsp[(8) - (9)].l)); (yyval.l) = (yyvsp[(8) - (9)].l); @@ -5847,7 +5866,7 @@ yyreduce: case 132: /* Line 1464 of yacc.c */ -#line 1638 "Gmsh.y" +#line 1639 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); if(!strcmp((yyvsp[(1) - (4)].c), "Duplicata")){ @@ -5875,7 +5894,7 @@ yyreduce: case 133: /* Line 1464 of yacc.c */ -#line 1661 "Gmsh.y" +#line 1662 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); IntersectCurvesWithSurface((yyvsp[(4) - (9)].l), (int)(yyvsp[(8) - (9)].d), (yyval.l)); @@ -5886,7 +5905,7 @@ yyreduce: case 134: /* Line 1464 of yacc.c */ -#line 1667 "Gmsh.y" +#line 1668 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape*)); List_T *tmp = ListOfDouble2ListOfInt((yyvsp[(7) - (9)].l)); @@ -5899,21 +5918,21 @@ yyreduce: case 135: /* Line 1464 of yacc.c */ -#line 1677 "Gmsh.y" +#line 1678 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 136: /* Line 1464 of yacc.c */ -#line 1678 "Gmsh.y" +#line 1679 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 137: /* Line 1464 of yacc.c */ -#line 1683 "Gmsh.y" +#line 1684 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); ;} @@ -5922,7 +5941,7 @@ yyreduce: case 138: /* Line 1464 of yacc.c */ -#line 1687 "Gmsh.y" +#line 1688 "Gmsh.y" { List_Add((yyval.l), &(yyvsp[(2) - (2)].s)); ;} @@ -5931,7 +5950,7 @@ yyreduce: case 139: /* Line 1464 of yacc.c */ -#line 1691 "Gmsh.y" +#line 1692 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -5959,7 +5978,7 @@ yyreduce: case 140: /* Line 1464 of yacc.c */ -#line 1714 "Gmsh.y" +#line 1715 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -5987,7 +6006,7 @@ yyreduce: case 141: /* Line 1464 of yacc.c */ -#line 1737 "Gmsh.y" +#line 1738 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -6015,7 +6034,7 @@ yyreduce: case 142: /* Line 1464 of yacc.c */ -#line 1760 "Gmsh.y" +#line 1761 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -6043,7 +6062,7 @@ yyreduce: case 143: /* Line 1464 of yacc.c */ -#line 1788 "Gmsh.y" +#line 1789 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) if(List_Nbr((yyvsp[(7) - (8)].l)) == 4){ @@ -6069,7 +6088,7 @@ yyreduce: case 144: /* Line 1464 of yacc.c */ -#line 1810 "Gmsh.y" +#line 1811 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) if(List_Nbr((yyvsp[(12) - (14)].l)) == 0){ @@ -6094,7 +6113,7 @@ yyreduce: case 145: /* Line 1464 of yacc.c */ -#line 1831 "Gmsh.y" +#line 1832 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) if(List_Nbr((yyvsp[(14) - (16)].l)) == 0){ @@ -6120,7 +6139,7 @@ yyreduce: case 146: /* Line 1464 of yacc.c */ -#line 1852 "Gmsh.y" +#line 1853 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) if(List_Nbr((yyvsp[(10) - (12)].l)) == 1){ @@ -6145,7 +6164,7 @@ yyreduce: case 147: /* Line 1464 of yacc.c */ -#line 1872 "Gmsh.y" +#line 1873 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) if(!strcmp((yyvsp[(2) - (8)].c), "Union")){ @@ -6262,7 +6281,7 @@ yyreduce: case 148: /* Line 1464 of yacc.c */ -#line 1984 "Gmsh.y" +#line 1985 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) if(!strcmp((yyvsp[(2) - (8)].c), "MathEval")){ @@ -6286,7 +6305,7 @@ yyreduce: case 149: /* Line 1464 of yacc.c */ -#line 2003 "Gmsh.y" +#line 2004 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) if(!strcmp((yyvsp[(2) - (6)].c), "CutMesh")){ @@ -6311,7 +6330,7 @@ yyreduce: case 150: /* Line 1464 of yacc.c */ -#line 2024 "Gmsh.y" +#line 2025 "Gmsh.y" { #if defined(HAVE_DINTEGRATION) if(!strcmp((yyvsp[(2) - (14)].c), "Cylinder") && List_Nbr((yyvsp[(12) - (14)].l)) == 1){ @@ -6419,7 +6438,7 @@ yyreduce: case 151: /* Line 1464 of yacc.c */ -#line 2132 "Gmsh.y" +#line 2133 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -6433,7 +6452,7 @@ yyreduce: case 152: /* Line 1464 of yacc.c */ -#line 2141 "Gmsh.y" +#line 2142 "Gmsh.y" { #if defined(HAVE_MESH) GModel::current()->getFields()->deleteField((int)(yyvsp[(4) - (6)].d)); @@ -6444,7 +6463,7 @@ yyreduce: case 153: /* Line 1464 of yacc.c */ -#line 2147 "Gmsh.y" +#line 2148 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (6)].c), "View")){ @@ -6464,7 +6483,7 @@ yyreduce: case 154: /* Line 1464 of yacc.c */ -#line 2162 "Gmsh.y" +#line 2163 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){ ClearProject(); @@ -6497,7 +6516,7 @@ yyreduce: case 155: /* Line 1464 of yacc.c */ -#line 2190 "Gmsh.y" +#line 2191 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (4)].c), "Empty") && !strcmp((yyvsp[(3) - (4)].c), "Views")){ @@ -6514,7 +6533,7 @@ yyreduce: case 156: /* Line 1464 of yacc.c */ -#line 2207 "Gmsh.y" +#line 2208 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ Shape TheShape; @@ -6528,7 +6547,7 @@ yyreduce: case 157: /* Line 1464 of yacc.c */ -#line 2221 "Gmsh.y" +#line 2222 "Gmsh.y" { for(int i = 0; i < 4; i++) VisibilityShape((yyvsp[(2) - (3)].c), i, 1); @@ -6539,7 +6558,7 @@ yyreduce: case 158: /* Line 1464 of yacc.c */ -#line 2227 "Gmsh.y" +#line 2228 "Gmsh.y" { for(int i = 0; i < 4; i++) VisibilityShape((yyvsp[(2) - (3)].c), i, 0); @@ -6550,7 +6569,7 @@ yyreduce: case 159: /* Line 1464 of yacc.c */ -#line 2233 "Gmsh.y" +#line 2234 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -6564,7 +6583,7 @@ yyreduce: case 160: /* Line 1464 of yacc.c */ -#line 2242 "Gmsh.y" +#line 2243 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -6578,7 +6597,7 @@ yyreduce: case 161: /* Line 1464 of yacc.c */ -#line 2256 "Gmsh.y" +#line 2257 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Include")){ std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(2) - (3)].c)); @@ -6625,7 +6644,7 @@ yyreduce: case 162: /* Line 1464 of yacc.c */ -#line 2298 "Gmsh.y" +#line 2299 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(1) - (7)].c), "Save") && !strcmp((yyvsp[(2) - (7)].c), "View")){ @@ -6647,7 +6666,7 @@ yyreduce: case 163: /* Line 1464 of yacc.c */ -#line 2315 "Gmsh.y" +#line 2316 "Gmsh.y" { #if defined(HAVE_POST) && defined(HAVE_MESH) if(!strcmp((yyvsp[(1) - (7)].c), "Background") && !strcmp((yyvsp[(2) - (7)].c), "Mesh") && !strcmp((yyvsp[(3) - (7)].c), "View")){ @@ -6667,7 +6686,7 @@ yyreduce: case 164: /* Line 1464 of yacc.c */ -#line 2330 "Gmsh.y" +#line 2331 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){ SleepInSeconds((yyvsp[(2) - (3)].d)); @@ -6691,7 +6710,7 @@ yyreduce: case 165: /* Line 1464 of yacc.c */ -#line 2349 "Gmsh.y" +#line 2350 "Gmsh.y" { #if defined(HAVE_PLUGINS) try { @@ -6708,7 +6727,7 @@ yyreduce: case 166: /* Line 1464 of yacc.c */ -#line 2361 "Gmsh.y" +#line 2362 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (3)].c), "ElementsFromAllViews")) @@ -6737,7 +6756,7 @@ yyreduce: case 167: /* Line 1464 of yacc.c */ -#line 2385 "Gmsh.y" +#line 2386 "Gmsh.y" { exit(0); ;} @@ -6746,7 +6765,7 @@ yyreduce: case 168: /* Line 1464 of yacc.c */ -#line 2389 "Gmsh.y" +#line 2390 "Gmsh.y" { // FIXME: this is a hack to force a transfer from the old DB to // the new DB. This will become unnecessary if/when we fill the @@ -6758,7 +6777,7 @@ yyreduce: case 169: /* Line 1464 of yacc.c */ -#line 2396 "Gmsh.y" +#line 2397 "Gmsh.y" { CTX::instance()->forcedBBox = 0; GModel::current()->importGEOInternals(); @@ -6769,7 +6788,7 @@ yyreduce: case 170: /* Line 1464 of yacc.c */ -#line 2402 "Gmsh.y" +#line 2403 "Gmsh.y" { CTX::instance()->forcedBBox = 1; SetBoundingBox((yyvsp[(3) - (15)].d), (yyvsp[(5) - (15)].d), (yyvsp[(7) - (15)].d), (yyvsp[(9) - (15)].d), (yyvsp[(11) - (15)].d), (yyvsp[(13) - (15)].d)); @@ -6779,7 +6798,7 @@ yyreduce: case 171: /* Line 1464 of yacc.c */ -#line 2407 "Gmsh.y" +#line 2408 "Gmsh.y" { #if defined(HAVE_OPENGL) drawContext::global()->draw(); @@ -6790,7 +6809,7 @@ yyreduce: case 172: /* Line 1464 of yacc.c */ -#line 2413 "Gmsh.y" +#line 2414 "Gmsh.y" { GModel::current()->createTopologyFromMesh(); ;} @@ -6799,7 +6818,7 @@ yyreduce: case 173: /* Line 1464 of yacc.c */ -#line 2417 "Gmsh.y" +#line 2418 "Gmsh.y" { GModel::current()->createTopologyFromMesh(1); ;} @@ -6808,7 +6827,7 @@ yyreduce: case 174: /* Line 1464 of yacc.c */ -#line 2421 "Gmsh.y" +#line 2422 "Gmsh.y" { GModel::current()->importGEOInternals(); GModel::current()->refineMesh(CTX::instance()->mesh.secondOrderLinear); @@ -6818,7 +6837,7 @@ yyreduce: case 175: /* Line 1464 of yacc.c */ -#line 2431 "Gmsh.y" +#line 2432 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (6)].d); @@ -6840,7 +6859,7 @@ yyreduce: case 176: /* Line 1464 of yacc.c */ -#line 2448 "Gmsh.y" +#line 2449 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (8)].d); @@ -6862,7 +6881,7 @@ yyreduce: case 177: /* Line 1464 of yacc.c */ -#line 2465 "Gmsh.y" +#line 2466 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (8)].d); @@ -6886,7 +6905,7 @@ yyreduce: case 178: /* Line 1464 of yacc.c */ -#line 2484 "Gmsh.y" +#line 2485 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (10)].d); @@ -6910,7 +6929,7 @@ yyreduce: case 179: /* Line 1464 of yacc.c */ -#line 2503 "Gmsh.y" +#line 2504 "Gmsh.y" { if(ImbricatedLoop <= 0){ yymsg(0, "Invalid For/EndFor loop"); @@ -6945,7 +6964,7 @@ yyreduce: case 180: /* Line 1464 of yacc.c */ -#line 2533 "Gmsh.y" +#line 2534 "Gmsh.y" { if(!FunctionManager::Instance()->createFunction ((yyvsp[(2) - (2)].c), gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -6958,7 +6977,7 @@ yyreduce: case 181: /* Line 1464 of yacc.c */ -#line 2541 "Gmsh.y" +#line 2542 "Gmsh.y" { if(!FunctionManager::Instance()->leaveFunction (&gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -6969,7 +6988,7 @@ yyreduce: case 182: /* Line 1464 of yacc.c */ -#line 2547 "Gmsh.y" +#line 2548 "Gmsh.y" { if(!FunctionManager::Instance()->enterFunction ((yyvsp[(2) - (3)].c), &gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -6981,7 +7000,7 @@ yyreduce: case 183: /* Line 1464 of yacc.c */ -#line 2554 "Gmsh.y" +#line 2555 "Gmsh.y" { if(!(yyvsp[(3) - (4)].d)) skip_until("If", "EndIf"); ;} @@ -6990,7 +7009,7 @@ yyreduce: case 184: /* Line 1464 of yacc.c */ -#line 2558 "Gmsh.y" +#line 2559 "Gmsh.y" { ;} break; @@ -6998,7 +7017,7 @@ yyreduce: case 185: /* Line 1464 of yacc.c */ -#line 2567 "Gmsh.y" +#line 2568 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (5)].l), @@ -7011,7 +7030,7 @@ yyreduce: case 186: /* Line 1464 of yacc.c */ -#line 2575 "Gmsh.y" +#line 2576 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, (yyvsp[(10) - (11)].l), @@ -7024,7 +7043,7 @@ yyreduce: case 187: /* Line 1464 of yacc.c */ -#line 2583 "Gmsh.y" +#line 2584 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (13)].l), @@ -7037,16 +7056,17 @@ yyreduce: case 188: /* Line 1464 of yacc.c */ -#line 2591 "Gmsh.y" +#line 2592 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; ;} break; case 189: /* Line 1464 of yacc.c */ -#line 2595 "Gmsh.y" +#line 2597 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (7)].l), @@ -7059,16 +7079,17 @@ yyreduce: case 190: /* Line 1464 of yacc.c */ -#line 2603 "Gmsh.y" +#line 2605 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; ;} break; case 191: /* Line 1464 of yacc.c */ -#line 2607 "Gmsh.y" +#line 2610 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, (yyvsp[(10) - (13)].l), @@ -7081,16 +7102,17 @@ yyreduce: case 192: /* Line 1464 of yacc.c */ -#line 2615 "Gmsh.y" +#line 2618 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; ;} break; case 193: /* Line 1464 of yacc.c */ -#line 2619 "Gmsh.y" +#line 2623 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (15)].l), @@ -7103,16 +7125,17 @@ yyreduce: case 194: /* Line 1464 of yacc.c */ -#line 2627 "Gmsh.y" +#line 2631 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; ;} break; case 195: /* Line 1464 of yacc.c */ -#line 2631 "Gmsh.y" +#line 2636 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(BOUNDARY_LAYER, (yyvsp[(3) - (6)].l), 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., @@ -7124,7 +7147,7 @@ yyreduce: case 196: /* Line 1464 of yacc.c */ -#line 2639 "Gmsh.y" +#line 2644 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (8)].d), @@ -7136,7 +7159,7 @@ yyreduce: case 197: /* Line 1464 of yacc.c */ -#line 2646 "Gmsh.y" +#line 2651 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (8)].d), @@ -7148,7 +7171,7 @@ yyreduce: case 198: /* Line 1464 of yacc.c */ -#line 2653 "Gmsh.y" +#line 2658 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (8)].d), @@ -7160,7 +7183,7 @@ yyreduce: case 199: /* Line 1464 of yacc.c */ -#line 2660 "Gmsh.y" +#line 2665 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), @@ -7172,7 +7195,7 @@ yyreduce: case 200: /* Line 1464 of yacc.c */ -#line 2667 "Gmsh.y" +#line 2672 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), @@ -7184,7 +7207,7 @@ yyreduce: case 201: /* Line 1464 of yacc.c */ -#line 2674 "Gmsh.y" +#line 2679 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), @@ -7196,7 +7219,7 @@ yyreduce: case 202: /* Line 1464 of yacc.c */ -#line 2681 "Gmsh.y" +#line 2686 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (14)].d), @@ -7208,7 +7231,7 @@ yyreduce: case 203: /* Line 1464 of yacc.c */ -#line 2688 "Gmsh.y" +#line 2693 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (14)].d), @@ -7220,7 +7243,7 @@ yyreduce: case 204: /* Line 1464 of yacc.c */ -#line 2695 "Gmsh.y" +#line 2700 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (14)].d), @@ -7232,16 +7255,17 @@ yyreduce: case 205: /* Line 1464 of yacc.c */ -#line 2702 "Gmsh.y" +#line 2707 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; ;} break; case 206: /* Line 1464 of yacc.c */ -#line 2706 "Gmsh.y" +#line 2712 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), @@ -7253,16 +7277,17 @@ yyreduce: case 207: /* Line 1464 of yacc.c */ -#line 2713 "Gmsh.y" +#line 2719 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; ;} break; case 208: /* Line 1464 of yacc.c */ -#line 2717 "Gmsh.y" +#line 2724 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), @@ -7274,16 +7299,17 @@ yyreduce: case 209: /* Line 1464 of yacc.c */ -#line 2724 "Gmsh.y" +#line 2731 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; ;} break; case 210: /* Line 1464 of yacc.c */ -#line 2728 "Gmsh.y" +#line 2736 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), @@ -7295,16 +7321,17 @@ yyreduce: case 211: /* Line 1464 of yacc.c */ -#line 2735 "Gmsh.y" +#line 2743 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; ;} break; case 212: /* Line 1464 of yacc.c */ -#line 2739 "Gmsh.y" +#line 2748 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (16)].d), @@ -7316,16 +7343,17 @@ yyreduce: case 213: /* Line 1464 of yacc.c */ -#line 2746 "Gmsh.y" +#line 2755 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; ;} break; case 214: /* Line 1464 of yacc.c */ -#line 2750 "Gmsh.y" +#line 2760 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (16)].d), @@ -7337,16 +7365,17 @@ yyreduce: case 215: /* Line 1464 of yacc.c */ -#line 2757 "Gmsh.y" +#line 2767 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; ;} break; case 216: /* Line 1464 of yacc.c */ -#line 2761 "Gmsh.y" +#line 2772 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (16)].d), @@ -7358,16 +7387,17 @@ yyreduce: case 217: /* Line 1464 of yacc.c */ -#line 2768 "Gmsh.y" +#line 2779 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; ;} break; case 218: /* Line 1464 of yacc.c */ -#line 2772 "Gmsh.y" +#line 2784 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (18)].d), @@ -7379,16 +7409,17 @@ yyreduce: case 219: /* Line 1464 of yacc.c */ -#line 2779 "Gmsh.y" +#line 2791 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; ;} break; case 220: /* Line 1464 of yacc.c */ -#line 2783 "Gmsh.y" +#line 2796 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (18)].d), @@ -7400,16 +7431,17 @@ yyreduce: case 221: /* Line 1464 of yacc.c */ -#line 2790 "Gmsh.y" +#line 2803 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; ;} break; case 222: /* Line 1464 of yacc.c */ -#line 2794 "Gmsh.y" +#line 2808 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (18)].d), @@ -7421,7 +7453,7 @@ yyreduce: case 223: /* Line 1464 of yacc.c */ -#line 2805 "Gmsh.y" +#line 2819 "Gmsh.y" { ;} break; @@ -7429,7 +7461,7 @@ yyreduce: case 224: /* Line 1464 of yacc.c */ -#line 2808 "Gmsh.y" +#line 2822 "Gmsh.y" { ;} break; @@ -7437,7 +7469,7 @@ yyreduce: case 225: /* Line 1464 of yacc.c */ -#line 2814 "Gmsh.y" +#line 2828 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; extr.mesh.NbLayer = 1; @@ -7451,7 +7483,7 @@ yyreduce: case 226: /* Line 1464 of yacc.c */ -#line 2823 "Gmsh.y" +#line 2837 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; extr.mesh.NbLayer = List_Nbr((yyvsp[(3) - (7)].l)); @@ -7476,7 +7508,7 @@ yyreduce: case 227: /* Line 1464 of yacc.c */ -#line 2843 "Gmsh.y" +#line 2857 "Gmsh.y" { yymsg(0, "Explicit region numbers in layers are deprecated"); extr.mesh.ExtrudeMesh = true; @@ -7504,7 +7536,7 @@ yyreduce: case 228: /* Line 1464 of yacc.c */ -#line 2866 "Gmsh.y" +#line 2880 "Gmsh.y" { extr.mesh.Recombine = true; ;} @@ -7513,7 +7545,43 @@ yyreduce: case 229: /* Line 1464 of yacc.c */ -#line 2870 "Gmsh.y" +#line 2884 "Gmsh.y" + { + extr.mesh.QuadToTri = QUADTRI_DBL_1; + ;} + break; + + case 230: + +/* Line 1464 of yacc.c */ +#line 2888 "Gmsh.y" + { + extr.mesh.QuadToTri = QUADTRI_DBL_1_RECOMB; + ;} + break; + + case 231: + +/* Line 1464 of yacc.c */ +#line 2892 "Gmsh.y" + { + extr.mesh.QuadToTri = QUADTRI_SNGL_1; + ;} + break; + + case 232: + +/* Line 1464 of yacc.c */ +#line 2896 "Gmsh.y" + { + extr.mesh.QuadToTri = QUADTRI_SNGL_1_RECOMB; + ;} + break; + + case 233: + +/* Line 1464 of yacc.c */ +#line 2900 "Gmsh.y" { int num = (int)(yyvsp[(3) - (9)].d); if(FindSurface(num)){ @@ -7534,10 +7602,10 @@ yyreduce: ;} break; - case 230: + case 234: /* Line 1464 of yacc.c */ -#line 2889 "Gmsh.y" +#line 2919 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (6)].c), "Index")) extr.mesh.BoundaryLayerIndex = (yyvsp[(4) - (6)].d); @@ -7547,19 +7615,19 @@ yyreduce: ;} break; - case 231: + case 235: /* Line 1464 of yacc.c */ -#line 2901 "Gmsh.y" +#line 2931 "Gmsh.y" { (yyval.v)[0] = (yyval.v)[1] = 1.; ;} break; - case 232: + case 236: /* Line 1464 of yacc.c */ -#line 2905 "Gmsh.y" +#line 2935 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Progression") || !strcmp((yyvsp[(2) - (3)].c), "Power")) (yyval.v)[0] = 1.; @@ -7574,19 +7642,19 @@ yyreduce: ;} break; - case 233: + case 237: /* Line 1464 of yacc.c */ -#line 2920 "Gmsh.y" +#line 2950 "Gmsh.y" { (yyval.i) = -1; // left ;} break; - case 234: + case 238: /* Line 1464 of yacc.c */ -#line 2924 "Gmsh.y" +#line 2954 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "Right")) (yyval.i) = 1; @@ -7598,46 +7666,46 @@ yyreduce: ;} break; - case 235: + case 239: /* Line 1464 of yacc.c */ -#line 2936 "Gmsh.y" +#line 2966 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(double)); ;} break; - case 236: + case 240: /* Line 1464 of yacc.c */ -#line 2940 "Gmsh.y" +#line 2970 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); ;} break; - case 237: + case 241: /* Line 1464 of yacc.c */ -#line 2945 "Gmsh.y" +#line 2975 "Gmsh.y" { (yyval.i) = 45; ;} break; - case 238: + case 242: /* Line 1464 of yacc.c */ -#line 2949 "Gmsh.y" +#line 2979 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(2) - (2)].d); ;} break; - case 239: + case 243: /* Line 1464 of yacc.c */ -#line 2956 "Gmsh.y" +#line 2986 "Gmsh.y" { int type = (int)(yyvsp[(6) - (7)].v)[0]; double coef = fabs((yyvsp[(6) - (7)].v)[1]); @@ -7695,10 +7763,10 @@ yyreduce: ;} break; - case 240: + case 244: /* Line 1464 of yacc.c */ -#line 3012 "Gmsh.y" +#line 3042 "Gmsh.y" { int k = List_Nbr((yyvsp[(4) - (6)].l)); if(k != 0 && k != 3 && k != 4){ @@ -7770,20 +7838,20 @@ yyreduce: ;} break; - case 241: + case 245: /* Line 1464 of yacc.c */ -#line 3082 "Gmsh.y" +#line 3112 "Gmsh.y" { yymsg(1, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)"); List_Delete((yyvsp[(7) - (8)].l)); ;} break; - case 242: + case 246: /* Line 1464 of yacc.c */ -#line 3087 "Gmsh.y" +#line 3117 "Gmsh.y" { int k = List_Nbr((yyvsp[(4) - (5)].l)); if(k != 0 && k != 6 && k != 8){ @@ -7852,10 +7920,51 @@ yyreduce: ;} break; - case 243: + case 247: + +/* Line 1464 of yacc.c */ +#line 3184 "Gmsh.y" + { + if(!(yyvsp[(2) - (3)].l)){ + List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Volumes); + if(List_Nbr(tmp)){ + for(int i = 0; i < List_Nbr(tmp); i++){ + Volume *v; + List_Read(tmp, i, &v); + v->QuadTri = TRANSFINITE_QUADTRI_1; + } + } + else{ + for(GModel::riter it = GModel::current()->firstRegion(); + it != GModel::current()->lastRegion(); it++) + (*it)->meshAttributes.QuadTri = TRANSFINITE_QUADTRI_1; + } + List_Delete(tmp); + } + else{ + for(int i = 0; i < List_Nbr((yyvsp[(2) - (3)].l)); i++){ + double d; + List_Read((yyvsp[(2) - (3)].l), i, &d); + Volume *v = FindVolume((int)d); + if(v) + v->QuadTri = TRANSFINITE_QUADTRI_1; + else{ + GRegion *gr = GModel::current()->getRegionByTag((int)d); + if(gr) + gr->meshAttributes.QuadTri = TRANSFINITE_QUADTRI_1; + else + yymsg(1, "Unknown region %d", (int)d); + } + } + List_Delete((yyvsp[(2) - (3)].l)); + } + ;} + break; + + case 248: /* Line 1464 of yacc.c */ -#line 3154 "Gmsh.y" +#line 3220 "Gmsh.y" { if(!(yyvsp[(3) - (5)].l)){ List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces); @@ -7900,10 +8009,10 @@ yyreduce: ;} break; - case 244: + case 249: /* Line 1464 of yacc.c */ -#line 3197 "Gmsh.y" +#line 3263 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ double d; @@ -7925,10 +8034,10 @@ yyreduce: ;} break; - case 245: + case 250: /* Line 1464 of yacc.c */ -#line 3222 "Gmsh.y" +#line 3288 "Gmsh.y" { if(List_Nbr((yyvsp[(5) - (6)].l)) != List_Nbr((yyvsp[(3) - (6)].l))){ yymsg(0, "Number of master (%d) different from number of slave (%d) lines", @@ -7957,10 +8066,10 @@ yyreduce: ;} break; - case 246: + case 251: /* Line 1464 of yacc.c */ -#line 3250 "Gmsh.y" +#line 3316 "Gmsh.y" { if (List_Nbr((yyvsp[(5) - (12)].l)) != List_Nbr((yyvsp[(10) - (12)].l))){ yymsg(0, "Number of master surface edges (%d) different from number of " @@ -7998,10 +8107,10 @@ yyreduce: ;} break; - case 247: + case 252: /* Line 1464 of yacc.c */ -#line 3293 "Gmsh.y" +#line 3359 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); if(s){ @@ -8026,10 +8135,10 @@ yyreduce: ;} break; - case 248: + case 253: /* Line 1464 of yacc.c */ -#line 3316 "Gmsh.y" +#line 3382 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); if(s){ @@ -8054,35 +8163,35 @@ yyreduce: ;} break; - case 249: + case 254: /* Line 1464 of yacc.c */ -#line 3339 "Gmsh.y" +#line 3405 "Gmsh.y" { ;} break; - case 250: + case 255: /* Line 1464 of yacc.c */ -#line 3342 "Gmsh.y" +#line 3408 "Gmsh.y" { ;} break; - case 251: + case 256: /* Line 1464 of yacc.c */ -#line 3351 "Gmsh.y" +#line 3417 "Gmsh.y" { ReplaceAllDuplicates(); ;} break; - case 252: + case 257: /* Line 1464 of yacc.c */ -#line 3355 "Gmsh.y" +#line 3421 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Geometry")) ReplaceAllDuplicates(); @@ -8094,10 +8203,10 @@ yyreduce: ;} break; - case 253: + case 258: /* Line 1464 of yacc.c */ -#line 3365 "Gmsh.y" +#line 3431 "Gmsh.y" { if(List_Nbr((yyvsp[(4) - (6)].l)) >= 2){ double d; @@ -8129,10 +8238,10 @@ yyreduce: ;} break; - case 254: + case 259: /* Line 1464 of yacc.c */ -#line 3402 "Gmsh.y" +#line 3468 "Gmsh.y" { List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (11)].l)); @@ -8170,10 +8279,10 @@ yyreduce: ;} break; - case 255: + case 260: /* Line 1464 of yacc.c */ -#line 3439 "Gmsh.y" +#line 3505 "Gmsh.y" { List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (11)].l)); std::vector<int> domain; @@ -8210,10 +8319,10 @@ yyreduce: ;} break; - case 256: + case 261: /* Line 1464 of yacc.c */ -#line 3475 "Gmsh.y" +#line 3541 "Gmsh.y" { List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (11)].l)); std::vector<int> domain; @@ -8250,10 +8359,10 @@ yyreduce: ;} break; - case 257: + case 262: /* Line 1464 of yacc.c */ -#line 3510 "Gmsh.y" +#line 3576 "Gmsh.y" { List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (11)].l)); std::vector<int> domain; @@ -8290,66 +8399,66 @@ yyreduce: ;} break; - case 258: + case 263: /* Line 1464 of yacc.c */ -#line 3549 "Gmsh.y" +#line 3615 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; - case 259: + case 264: /* Line 1464 of yacc.c */ -#line 3550 "Gmsh.y" +#line 3616 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (3)].d); ;} break; - case 260: + case 265: /* Line 1464 of yacc.c */ -#line 3551 "Gmsh.y" +#line 3617 "Gmsh.y" { (yyval.d) = -(yyvsp[(2) - (2)].d); ;} break; - case 261: + case 266: /* Line 1464 of yacc.c */ -#line 3552 "Gmsh.y" +#line 3618 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (2)].d); ;} break; - case 262: + case 267: /* Line 1464 of yacc.c */ -#line 3553 "Gmsh.y" +#line 3619 "Gmsh.y" { (yyval.d) = !(yyvsp[(2) - (2)].d); ;} break; - case 263: + case 268: /* Line 1464 of yacc.c */ -#line 3554 "Gmsh.y" +#line 3620 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d); ;} break; - case 264: + case 269: /* Line 1464 of yacc.c */ -#line 3555 "Gmsh.y" +#line 3621 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d); ;} break; - case 265: + case 270: /* Line 1464 of yacc.c */ -#line 3556 "Gmsh.y" +#line 3622 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d); ;} break; - case 266: + case 271: /* Line 1464 of yacc.c */ -#line 3558 "Gmsh.y" +#line 3624 "Gmsh.y" { if(!(yyvsp[(3) - (3)].d)) yymsg(0, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); @@ -8358,430 +8467,430 @@ yyreduce: ;} break; - case 267: + case 272: /* Line 1464 of yacc.c */ -#line 3564 "Gmsh.y" +#line 3630 "Gmsh.y" { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d); ;} break; - case 268: + case 273: /* Line 1464 of yacc.c */ -#line 3565 "Gmsh.y" +#line 3631 "Gmsh.y" { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); ;} break; - case 269: + case 274: /* Line 1464 of yacc.c */ -#line 3566 "Gmsh.y" +#line 3632 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d); ;} break; - case 270: + case 275: /* Line 1464 of yacc.c */ -#line 3567 "Gmsh.y" +#line 3633 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d); ;} break; - case 271: + case 276: /* Line 1464 of yacc.c */ -#line 3568 "Gmsh.y" +#line 3634 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d); ;} break; - case 272: + case 277: /* Line 1464 of yacc.c */ -#line 3569 "Gmsh.y" +#line 3635 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d); ;} break; - case 273: + case 278: /* Line 1464 of yacc.c */ -#line 3570 "Gmsh.y" +#line 3636 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d); ;} break; - case 274: + case 279: /* Line 1464 of yacc.c */ -#line 3571 "Gmsh.y" +#line 3637 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d); ;} break; - case 275: + case 280: /* Line 1464 of yacc.c */ -#line 3572 "Gmsh.y" +#line 3638 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d); ;} break; - case 276: + case 281: /* Line 1464 of yacc.c */ -#line 3573 "Gmsh.y" +#line 3639 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d); ;} break; - case 277: + case 282: /* Line 1464 of yacc.c */ -#line 3574 "Gmsh.y" +#line 3640 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); ;} break; - case 278: + case 283: /* Line 1464 of yacc.c */ -#line 3575 "Gmsh.y" +#line 3641 "Gmsh.y" { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; - case 279: + case 284: /* Line 1464 of yacc.c */ -#line 3576 "Gmsh.y" +#line 3642 "Gmsh.y" { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; - case 280: + case 285: /* Line 1464 of yacc.c */ -#line 3577 "Gmsh.y" +#line 3643 "Gmsh.y" { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; - case 281: + case 286: /* Line 1464 of yacc.c */ -#line 3578 "Gmsh.y" +#line 3644 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; - case 282: + case 287: /* Line 1464 of yacc.c */ -#line 3579 "Gmsh.y" +#line 3645 "Gmsh.y" { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; - case 283: + case 288: /* Line 1464 of yacc.c */ -#line 3580 "Gmsh.y" +#line 3646 "Gmsh.y" { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; - case 284: + case 289: /* Line 1464 of yacc.c */ -#line 3581 "Gmsh.y" +#line 3647 "Gmsh.y" { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; - case 285: + case 290: /* Line 1464 of yacc.c */ -#line 3582 "Gmsh.y" +#line 3648 "Gmsh.y" { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; - case 286: + case 291: /* Line 1464 of yacc.c */ -#line 3583 "Gmsh.y" +#line 3649 "Gmsh.y" { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; - case 287: + case 292: /* Line 1464 of yacc.c */ -#line 3584 "Gmsh.y" +#line 3650 "Gmsh.y" { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; - case 288: + case 293: /* Line 1464 of yacc.c */ -#line 3585 "Gmsh.y" +#line 3651 "Gmsh.y" { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} break; - case 289: + case 294: /* Line 1464 of yacc.c */ -#line 3586 "Gmsh.y" +#line 3652 "Gmsh.y" { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; - case 290: + case 295: /* Line 1464 of yacc.c */ -#line 3587 "Gmsh.y" +#line 3653 "Gmsh.y" { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; - case 291: + case 296: /* Line 1464 of yacc.c */ -#line 3588 "Gmsh.y" +#line 3654 "Gmsh.y" { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; - case 292: + case 297: /* Line 1464 of yacc.c */ -#line 3589 "Gmsh.y" +#line 3655 "Gmsh.y" { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; - case 293: + case 298: /* Line 1464 of yacc.c */ -#line 3590 "Gmsh.y" +#line 3656 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; - case 294: + case 299: /* Line 1464 of yacc.c */ -#line 3591 "Gmsh.y" +#line 3657 "Gmsh.y" { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; - case 295: + case 300: /* Line 1464 of yacc.c */ -#line 3592 "Gmsh.y" +#line 3658 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; - case 296: + case 301: /* Line 1464 of yacc.c */ -#line 3593 "Gmsh.y" +#line 3659 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; - case 297: + case 302: /* Line 1464 of yacc.c */ -#line 3594 "Gmsh.y" +#line 3660 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;} break; - case 298: + case 303: /* Line 1464 of yacc.c */ -#line 3595 "Gmsh.y" +#line 3661 "Gmsh.y" { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;} break; - case 299: + case 304: /* Line 1464 of yacc.c */ -#line 3597 "Gmsh.y" +#line 3663 "Gmsh.y" { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; - case 300: + case 305: /* Line 1464 of yacc.c */ -#line 3598 "Gmsh.y" +#line 3664 "Gmsh.y" { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; - case 301: + case 306: /* Line 1464 of yacc.c */ -#line 3599 "Gmsh.y" +#line 3665 "Gmsh.y" { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; - case 302: + case 307: /* Line 1464 of yacc.c */ -#line 3600 "Gmsh.y" +#line 3666 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; - case 303: + case 308: /* Line 1464 of yacc.c */ -#line 3601 "Gmsh.y" +#line 3667 "Gmsh.y" { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; - case 304: + case 309: /* Line 1464 of yacc.c */ -#line 3602 "Gmsh.y" +#line 3668 "Gmsh.y" { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; - case 305: + case 310: /* Line 1464 of yacc.c */ -#line 3603 "Gmsh.y" +#line 3669 "Gmsh.y" { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; - case 306: + case 311: /* Line 1464 of yacc.c */ -#line 3604 "Gmsh.y" +#line 3670 "Gmsh.y" { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; - case 307: + case 312: /* Line 1464 of yacc.c */ -#line 3605 "Gmsh.y" +#line 3671 "Gmsh.y" { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; - case 308: + case 313: /* Line 1464 of yacc.c */ -#line 3606 "Gmsh.y" +#line 3672 "Gmsh.y" { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; - case 309: + case 314: /* Line 1464 of yacc.c */ -#line 3607 "Gmsh.y" +#line 3673 "Gmsh.y" { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} break; - case 310: + case 315: /* Line 1464 of yacc.c */ -#line 3608 "Gmsh.y" +#line 3674 "Gmsh.y" { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; - case 311: + case 316: /* Line 1464 of yacc.c */ -#line 3609 "Gmsh.y" +#line 3675 "Gmsh.y" { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; - case 312: + case 317: /* Line 1464 of yacc.c */ -#line 3610 "Gmsh.y" +#line 3676 "Gmsh.y" { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; - case 313: + case 318: /* Line 1464 of yacc.c */ -#line 3611 "Gmsh.y" +#line 3677 "Gmsh.y" { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; - case 314: + case 319: /* Line 1464 of yacc.c */ -#line 3612 "Gmsh.y" +#line 3678 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; - case 315: + case 320: /* Line 1464 of yacc.c */ -#line 3613 "Gmsh.y" +#line 3679 "Gmsh.y" { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; - case 316: + case 321: /* Line 1464 of yacc.c */ -#line 3614 "Gmsh.y" +#line 3680 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; - case 317: + case 322: /* Line 1464 of yacc.c */ -#line 3615 "Gmsh.y" +#line 3681 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; - case 318: + case 323: /* Line 1464 of yacc.c */ -#line 3616 "Gmsh.y" +#line 3682 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;} break; - case 319: + case 324: /* Line 1464 of yacc.c */ -#line 3617 "Gmsh.y" +#line 3683 "Gmsh.y" { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;} break; - case 320: + case 325: /* Line 1464 of yacc.c */ -#line 3626 "Gmsh.y" +#line 3692 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; - case 321: + case 326: /* Line 1464 of yacc.c */ -#line 3627 "Gmsh.y" +#line 3693 "Gmsh.y" { (yyval.d) = 3.141592653589793; ;} break; - case 322: + case 327: /* Line 1464 of yacc.c */ -#line 3628 "Gmsh.y" +#line 3694 "Gmsh.y" { (yyval.d) = Msg::GetCommRank(); ;} break; - case 323: + case 328: /* Line 1464 of yacc.c */ -#line 3629 "Gmsh.y" +#line 3695 "Gmsh.y" { (yyval.d) = Msg::GetCommSize(); ;} break; - case 324: + case 329: /* Line 1464 of yacc.c */ -#line 3630 "Gmsh.y" +#line 3696 "Gmsh.y" { (yyval.d) = GetGmshMajorVersion(); ;} break; - case 325: + case 330: /* Line 1464 of yacc.c */ -#line 3631 "Gmsh.y" +#line 3697 "Gmsh.y" { (yyval.d) = GetGmshMinorVersion(); ;} break; - case 326: + case 331: /* Line 1464 of yacc.c */ -#line 3632 "Gmsh.y" +#line 3698 "Gmsh.y" { (yyval.d) = GetGmshPatchVersion(); ;} break; - case 327: + case 332: /* Line 1464 of yacc.c */ -#line 3637 "Gmsh.y" +#line 3703 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (1)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (1)].c)); @@ -8799,10 +8908,10 @@ yyreduce: ;} break; - case 328: + case 333: /* Line 1464 of yacc.c */ -#line 3656 "Gmsh.y" +#line 3722 "Gmsh.y" { char tmpstring[1024]; sprintf(tmpstring, "%s_%d", (yyvsp[(1) - (5)].c), (int)(yyvsp[(4) - (5)].d)) ; @@ -8822,10 +8931,10 @@ yyreduce: ;} break; - case 329: + case 334: /* Line 1464 of yacc.c */ -#line 3674 "Gmsh.y" +#line 3740 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){ @@ -8842,10 +8951,10 @@ yyreduce: ;} break; - case 330: + case 335: /* Line 1464 of yacc.c */ -#line 3689 "Gmsh.y" +#line 3755 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(2) - (4)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(2) - (4)].c)); @@ -8857,10 +8966,10 @@ yyreduce: ;} break; - case 331: + case 336: /* Line 1464 of yacc.c */ -#line 3699 "Gmsh.y" +#line 3765 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (2)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (2)].c)); @@ -8878,10 +8987,10 @@ yyreduce: ;} break; - case 332: + case 337: /* Line 1464 of yacc.c */ -#line 3715 "Gmsh.y" +#line 3781 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){ @@ -8898,30 +9007,30 @@ yyreduce: ;} break; - case 333: + case 338: /* Line 1464 of yacc.c */ -#line 3733 "Gmsh.y" +#line 3799 "Gmsh.y" { NumberOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), (yyval.d)); Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(3) - (3)].c)); ;} break; - case 334: + case 339: /* Line 1464 of yacc.c */ -#line 3738 "Gmsh.y" +#line 3804 "Gmsh.y" { NumberOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), (yyval.d)); Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c)); ;} break; - case 335: + case 340: /* Line 1464 of yacc.c */ -#line 3743 "Gmsh.y" +#line 3809 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (4)].c), 0, (yyvsp[(3) - (4)].c), d)){ @@ -8933,10 +9042,10 @@ yyreduce: ;} break; - case 336: + case 341: /* Line 1464 of yacc.c */ -#line 3753 "Gmsh.y" +#line 3819 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c), d)){ @@ -8948,158 +9057,158 @@ yyreduce: ;} break; - case 337: + case 342: /* Line 1464 of yacc.c */ -#line 3763 "Gmsh.y" +#line 3829 "Gmsh.y" { (yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d)); Free((yyvsp[(3) - (6)].c)); ;} break; - case 338: + case 343: /* Line 1464 of yacc.c */ -#line 3771 "Gmsh.y" +#line 3837 "Gmsh.y" { memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double)); ;} break; - case 339: + case 344: /* Line 1464 of yacc.c */ -#line 3775 "Gmsh.y" +#line 3841 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i]; ;} break; - case 340: + case 345: /* Line 1464 of yacc.c */ -#line 3779 "Gmsh.y" +#line 3845 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i]; ;} break; - case 341: + case 346: /* Line 1464 of yacc.c */ -#line 3783 "Gmsh.y" +#line 3849 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i]; ;} break; - case 342: + case 347: /* Line 1464 of yacc.c */ -#line 3787 "Gmsh.y" +#line 3853 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i]; ;} break; - case 343: + case 348: /* Line 1464 of yacc.c */ -#line 3794 "Gmsh.y" +#line 3860 "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 344: + case 349: /* Line 1464 of yacc.c */ -#line 3798 "Gmsh.y" +#line 3864 "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 345: + case 350: /* Line 1464 of yacc.c */ -#line 3802 "Gmsh.y" +#line 3868 "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 346: + case 351: /* Line 1464 of yacc.c */ -#line 3806 "Gmsh.y" +#line 3872 "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 347: + case 352: /* Line 1464 of yacc.c */ -#line 3813 "Gmsh.y" +#line 3879 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(List_T*)); List_Add((yyval.l), &((yyvsp[(1) - (1)].l))); ;} break; - case 348: + case 353: /* Line 1464 of yacc.c */ -#line 3818 "Gmsh.y" +#line 3884 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].l))); ;} break; - case 349: + case 354: /* Line 1464 of yacc.c */ -#line 3825 "Gmsh.y" +#line 3891 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); ;} break; - case 350: + case 355: /* Line 1464 of yacc.c */ -#line 3830 "Gmsh.y" +#line 3896 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; - case 351: + case 356: /* Line 1464 of yacc.c */ -#line 3834 "Gmsh.y" +#line 3900 "Gmsh.y" { // creates an empty list (yyval.l) = List_Create(2, 1, sizeof(double)); ;} break; - case 352: + case 357: /* Line 1464 of yacc.c */ -#line 3839 "Gmsh.y" +#line 3905 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); ;} break; - case 353: + case 358: /* Line 1464 of yacc.c */ -#line 3843 "Gmsh.y" +#line 3909 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -9109,10 +9218,10 @@ yyreduce: ;} break; - case 354: + case 359: /* Line 1464 of yacc.c */ -#line 3851 "Gmsh.y" +#line 3917 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (5)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -9122,19 +9231,19 @@ yyreduce: ;} break; - case 355: + case 360: /* Line 1464 of yacc.c */ -#line 3862 "Gmsh.y" +#line 3928 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; - case 356: + case 361: /* Line 1464 of yacc.c */ -#line 3866 "Gmsh.y" +#line 3932 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all")) (yyval.l) = 0; @@ -9145,10 +9254,10 @@ yyreduce: ;} break; - case 357: + case 362: /* Line 1464 of yacc.c */ -#line 3878 "Gmsh.y" +#line 3944 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -9158,10 +9267,10 @@ yyreduce: ;} break; - case 358: + case 363: /* Line 1464 of yacc.c */ -#line 3886 "Gmsh.y" +#line 3952 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (3)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -9171,10 +9280,10 @@ yyreduce: ;} break; - case 359: + case 364: /* Line 1464 of yacc.c */ -#line 3894 "Gmsh.y" +#line 3960 "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)); @@ -9183,10 +9292,10 @@ yyreduce: ;} break; - case 360: + case 365: /* Line 1464 of yacc.c */ -#line 3901 "Gmsh.y" +#line 3967 "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)){ @@ -9199,10 +9308,10 @@ yyreduce: ;} break; - case 361: + case 366: /* Line 1464 of yacc.c */ -#line 3912 "Gmsh.y" +#line 3978 "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 @@ -9224,46 +9333,46 @@ yyreduce: ;} break; - case 362: + case 367: /* Line 1464 of yacc.c */ -#line 3932 "Gmsh.y" +#line 3998 "Gmsh.y" { (yyval.l) = GetAllEntityNumbers(0); ;} break; - case 363: + case 368: /* Line 1464 of yacc.c */ -#line 3936 "Gmsh.y" +#line 4002 "Gmsh.y" { (yyval.l) = GetAllEntityNumbers(1); ;} break; - case 364: + case 369: /* Line 1464 of yacc.c */ -#line 3940 "Gmsh.y" +#line 4006 "Gmsh.y" { (yyval.l) = GetAllEntityNumbers(2); ;} break; - case 365: + case 370: /* Line 1464 of yacc.c */ -#line 3944 "Gmsh.y" +#line 4010 "Gmsh.y" { (yyval.l) = GetAllEntityNumbers(3); ;} break; - case 366: + case 371: /* Line 1464 of yacc.c */ -#line 3948 "Gmsh.y" +#line 4014 "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++){ @@ -9275,10 +9384,10 @@ yyreduce: ;} break; - case 367: + case 372: /* Line 1464 of yacc.c */ -#line 3958 "Gmsh.y" +#line 4024 "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++){ @@ -9290,10 +9399,10 @@ yyreduce: ;} break; - case 368: + case 373: /* Line 1464 of yacc.c */ -#line 3968 "Gmsh.y" +#line 4034 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c))) @@ -9305,10 +9414,10 @@ yyreduce: ;} break; - case 369: + case 374: /* Line 1464 of yacc.c */ -#line 3978 "Gmsh.y" +#line 4044 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c))) @@ -9327,38 +9436,38 @@ yyreduce: ;} break; - case 370: + case 375: /* Line 1464 of yacc.c */ -#line 3998 "Gmsh.y" +#line 4064 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); ;} break; - case 371: + case 376: /* Line 1464 of yacc.c */ -#line 4003 "Gmsh.y" +#line 4069 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; - case 372: + case 377: /* Line 1464 of yacc.c */ -#line 4007 "Gmsh.y" +#line 4073 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].d))); ;} break; - case 373: + case 378: /* Line 1464 of yacc.c */ -#line 4011 "Gmsh.y" +#line 4077 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){ double d; @@ -9369,28 +9478,28 @@ yyreduce: ;} break; - case 374: + case 379: /* Line 1464 of yacc.c */ -#line 4023 "Gmsh.y" +#line 4089 "Gmsh.y" { (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d)); ;} break; - case 375: + case 380: /* Line 1464 of yacc.c */ -#line 4027 "Gmsh.y" +#line 4093 "Gmsh.y" { (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255); ;} break; - case 376: + case 381: /* Line 1464 of yacc.c */ -#line 4039 "Gmsh.y" +#line 4105 "Gmsh.y" { int flag; (yyval.u) = GetColorForString(ColorString, -1, (yyvsp[(1) - (1)].c), &flag); @@ -9399,10 +9508,10 @@ yyreduce: ;} break; - case 377: + case 382: /* Line 1464 of yacc.c */ -#line 4046 "Gmsh.y" +#line 4112 "Gmsh.y" { unsigned int val = 0; ColorOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(5) - (5)].c), val); @@ -9411,19 +9520,19 @@ yyreduce: ;} break; - case 378: + case 383: /* Line 1464 of yacc.c */ -#line 4056 "Gmsh.y" +#line 4122 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); ;} break; - case 379: + case 384: /* Line 1464 of yacc.c */ -#line 4060 "Gmsh.y" +#line 4126 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (6)].d)); @@ -9437,38 +9546,38 @@ yyreduce: ;} break; - case 380: + case 385: /* Line 1464 of yacc.c */ -#line 4075 "Gmsh.y" +#line 4141 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); List_Add((yyval.l), &((yyvsp[(1) - (1)].u))); ;} break; - case 381: + case 386: /* Line 1464 of yacc.c */ -#line 4080 "Gmsh.y" +#line 4146 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].u))); ;} break; - case 382: + case 387: /* Line 1464 of yacc.c */ -#line 4087 "Gmsh.y" +#line 4153 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; - case 383: + case 388: /* Line 1464 of yacc.c */ -#line 4091 "Gmsh.y" +#line 4157 "Gmsh.y" { if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){ yymsg(0, "Unknown string variable '%s'", (yyvsp[(1) - (1)].c)); @@ -9483,10 +9592,10 @@ yyreduce: ;} break; - case 384: + case 389: /* Line 1464 of yacc.c */ -#line 4104 "Gmsh.y" +#line 4170 "Gmsh.y" { std::string out; StringOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), out); @@ -9496,10 +9605,10 @@ yyreduce: ;} break; - case 385: + case 390: /* Line 1464 of yacc.c */ -#line 4112 "Gmsh.y" +#line 4178 "Gmsh.y" { std::string out; StringOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), out); @@ -9509,19 +9618,19 @@ yyreduce: ;} break; - case 386: + case 391: /* Line 1464 of yacc.c */ -#line 4123 "Gmsh.y" +#line 4189 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; - case 387: + case 392: /* Line 1464 of yacc.c */ -#line 4127 "Gmsh.y" +#line 4193 "Gmsh.y" { (yyval.c) = (char *)Malloc(32 * sizeof(char)); time_t now; @@ -9531,10 +9640,10 @@ yyreduce: ;} break; - case 388: + case 393: /* Line 1464 of yacc.c */ -#line 4135 "Gmsh.y" +#line 4201 "Gmsh.y" { const char *env = GetEnvironmentVar((yyvsp[(3) - (4)].c)); if(!env) env = ""; @@ -9544,10 +9653,10 @@ yyreduce: ;} break; - case 389: + case 394: /* Line 1464 of yacc.c */ -#line 4143 "Gmsh.y" +#line 4209 "Gmsh.y" { std::string s = Msg::GetString((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c)); (yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char)); @@ -9557,10 +9666,10 @@ yyreduce: ;} break; - case 390: + case 395: /* Line 1464 of yacc.c */ -#line 4151 "Gmsh.y" +#line 4217 "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)); @@ -9570,10 +9679,10 @@ yyreduce: ;} break; - case 391: + case 396: /* Line 1464 of yacc.c */ -#line 4159 "Gmsh.y" +#line 4225 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); int i; @@ -9589,10 +9698,10 @@ yyreduce: ;} break; - case 392: + case 397: /* Line 1464 of yacc.c */ -#line 4173 "Gmsh.y" +#line 4239 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); int i; @@ -9608,19 +9717,19 @@ yyreduce: ;} break; - case 393: + case 398: /* Line 1464 of yacc.c */ -#line 4187 "Gmsh.y" +#line 4253 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); ;} break; - case 394: + case 399: /* Line 1464 of yacc.c */ -#line 4191 "Gmsh.y" +#line 4257 "Gmsh.y" { char tmpstring[1024]; int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring); @@ -9644,7 +9753,7 @@ yyreduce: /* Line 1464 of yacc.c */ -#line 9648 "Gmsh.tab.cpp" +#line 9757 "Gmsh.tab.cpp" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -9856,7 +9965,7 @@ yyreturn: /* Line 1684 of yacc.c */ -#line 4211 "Gmsh.y" +#line 4277 "Gmsh.y" int PrintListOfDouble(char *format, List_T *list, char *buffer) diff --git a/Parser/Gmsh.tab.hpp b/Parser/Gmsh.tab.hpp index 2df76cba4ad0e77159990e61ff3439eaf0d0fdeb..4fab2558212b06e445c6821335b36bb7da30d653 100644 --- a/Parser/Gmsh.tab.hpp +++ b/Parser/Gmsh.tab.hpp @@ -123,53 +123,57 @@ tHole = 340, tAlias = 341, tAliasWithOptions = 342, - tText2D = 343, - tText3D = 344, - tInterpolationScheme = 345, - tTime = 346, - tCombine = 347, - tBSpline = 348, - tBezier = 349, - tNurbs = 350, - tNurbsOrder = 351, - tNurbsKnots = 352, - tColor = 353, - tColorTable = 354, - tFor = 355, - tIn = 356, - tEndFor = 357, - tIf = 358, - tEndIf = 359, - tExit = 360, - tField = 361, - tReturn = 362, - tCall = 363, - tFunction = 364, - tShow = 365, - tHide = 366, - tGetValue = 367, - tGetEnv = 368, - tGetString = 369, - tGMSH_MAJOR_VERSION = 370, - tGMSH_MINOR_VERSION = 371, - tGMSH_PATCH_VERSION = 372, - tHomRank = 373, - tHomGen = 374, - tHomCut = 375, - tHomSeq = 376, - tAFFECTDIVIDE = 377, - tAFFECTTIMES = 378, - tAFFECTMINUS = 379, - tAFFECTPLUS = 380, - tOR = 381, - tAND = 382, - tNOTEQUAL = 383, - tEQUAL = 384, - tGREATEROREQUAL = 385, - tLESSOREQUAL = 386, - UNARYPREC = 387, - tMINUSMINUS = 388, - tPLUSPLUS = 389 + tQuadTriDbl = 343, + tQuadTriSngl = 344, + tRecombLaterals = 345, + tTransfQuadTri = 346, + tText2D = 347, + tText3D = 348, + tInterpolationScheme = 349, + tTime = 350, + tCombine = 351, + tBSpline = 352, + tBezier = 353, + tNurbs = 354, + tNurbsOrder = 355, + tNurbsKnots = 356, + tColor = 357, + tColorTable = 358, + tFor = 359, + tIn = 360, + tEndFor = 361, + tIf = 362, + tEndIf = 363, + tExit = 364, + tField = 365, + tReturn = 366, + tCall = 367, + tFunction = 368, + tShow = 369, + tHide = 370, + tGetValue = 371, + tGetEnv = 372, + tGetString = 373, + tGMSH_MAJOR_VERSION = 374, + tGMSH_MINOR_VERSION = 375, + tGMSH_PATCH_VERSION = 376, + tHomRank = 377, + tHomGen = 378, + tHomCut = 379, + tHomSeq = 380, + tAFFECTDIVIDE = 381, + tAFFECTTIMES = 382, + tAFFECTMINUS = 383, + tAFFECTPLUS = 384, + tOR = 385, + tAND = 386, + tNOTEQUAL = 387, + tEQUAL = 388, + tGREATEROREQUAL = 389, + tLESSOREQUAL = 390, + UNARYPREC = 391, + tMINUSMINUS = 392, + tPLUSPLUS = 393 }; #endif @@ -193,7 +197,7 @@ typedef union YYSTYPE /* Line 1685 of yacc.c */ -#line 197 "Gmsh.tab.hpp" +#line 201 "Gmsh.tab.hpp" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index 9dc3f5a809e7ca1cdbb7ab4313ca3c5a0f176532..c6265ae2ba0e1febb2ab549e5fa7fbfb33afa7e3 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -111,6 +111,7 @@ fullMatrix<double> ListOfListOfDouble2Matrix(List_T *list); %token tRotate tTranslate tSymmetry tDilate tExtrude tLevelset %token tLoop tRecombine tSmoother tSplit tDelete tCoherence tIntersect %token tLayers tHole tAlias tAliasWithOptions +%token tQuadTriDbl tQuadTriSngl tRecombLaterals tTransfQuadTri %token tText2D tText3D tInterpolationScheme tTime tCombine %token tBSpline tBezier tNurbs tNurbsOrder tNurbsKnots %token tColor tColorTable tFor tIn tEndFor tIf tEndIf tExit @@ -2590,6 +2591,7 @@ Extrude : | tExtrude VExpr '{' ListOfShapes { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; } ExtrudeParameters '}' { @@ -2602,6 +2604,7 @@ Extrude : | tExtrude '{' VExpr ',' VExpr ',' FExpr '}' '{' ListOfShapes { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; } ExtrudeParameters '}' { @@ -2614,6 +2617,7 @@ Extrude : | tExtrude '{' VExpr ',' VExpr ',' VExpr ',' FExpr '}' '{' ListOfShapes { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; } ExtrudeParameters '}' { @@ -2626,6 +2630,7 @@ Extrude : | tExtrude '{' ListOfShapes { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; } ExtrudeParameters '}' { @@ -2701,6 +2706,7 @@ Extrude : | tExtrude tPoint '{' FExpr ',' VExpr '}' { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; } '{' ExtrudeParameters '}' tEND { @@ -2712,6 +2718,7 @@ Extrude : | tExtrude tLine '{' FExpr ',' VExpr '}' { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; } '{' ExtrudeParameters '}' tEND { @@ -2723,6 +2730,7 @@ Extrude : | tExtrude tSurface '{' FExpr ',' VExpr '}' { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; } '{' ExtrudeParameters '}' tEND { @@ -2734,6 +2742,7 @@ Extrude : | tExtrude tPoint '{' FExpr ',' VExpr ',' VExpr ',' FExpr '}' { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; } '{' ExtrudeParameters '}' tEND { @@ -2745,6 +2754,7 @@ Extrude : | tExtrude tLine '{' FExpr ',' VExpr ',' VExpr ',' FExpr '}' { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; } '{' ExtrudeParameters '}' tEND { @@ -2756,6 +2766,7 @@ Extrude : | tExtrude tSurface '{' FExpr ',' VExpr ',' VExpr ',' FExpr '}' { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; } '{' ExtrudeParameters '}' tEND { @@ -2767,6 +2778,7 @@ Extrude : | tExtrude tPoint '{' FExpr ',' VExpr ',' VExpr ',' VExpr ',' FExpr'}' { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; } '{' ExtrudeParameters '}' tEND { @@ -2778,6 +2790,7 @@ Extrude : | tExtrude tLine '{' FExpr ',' VExpr ',' VExpr ',' VExpr ',' FExpr '}' { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; } '{' ExtrudeParameters '}' tEND { @@ -2789,6 +2802,7 @@ Extrude : | tExtrude tSurface '{' FExpr ',' VExpr ',' VExpr ',' VExpr ',' FExpr '}' { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; + extr.mesh.QuadToTri = NO_QUADTRI; } '{' ExtrudeParameters '}' tEND { @@ -2866,6 +2880,22 @@ ExtrudeParameter : { extr.mesh.Recombine = true; } + | tQuadTriDbl tEND + { + extr.mesh.QuadToTri = QUADTRI_DBL_1; + } + | tQuadTriDbl tRecombLaterals tEND + { + extr.mesh.QuadToTri = QUADTRI_DBL_1_RECOMB; + } + | tQuadTriSngl tEND + { + extr.mesh.QuadToTri = QUADTRI_SNGL_1; + } + | tQuadTriSngl tRecombLaterals tEND + { + extr.mesh.QuadToTri = QUADTRI_SNGL_1_RECOMB; + } | tHole '(' FExpr ')' tAFFECT ListOfDouble tUsing FExpr tEND { int num = (int)$3; @@ -3150,6 +3180,42 @@ Transfinite : } List_Delete($4); } + | tTransfQuadTri ListOfDoubleOrAll tEND + { + if(!$2){ + List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Volumes); + if(List_Nbr(tmp)){ + for(int i = 0; i < List_Nbr(tmp); i++){ + Volume *v; + List_Read(tmp, i, &v); + v->QuadTri = TRANSFINITE_QUADTRI_1; + } + } + else{ + for(GModel::riter it = GModel::current()->firstRegion(); + it != GModel::current()->lastRegion(); it++) + (*it)->meshAttributes.QuadTri = TRANSFINITE_QUADTRI_1; + } + List_Delete(tmp); + } + else{ + for(int i = 0; i < List_Nbr($2); i++){ + double d; + List_Read($2, i, &d); + Volume *v = FindVolume((int)d); + if(v) + v->QuadTri = TRANSFINITE_QUADTRI_1; + else{ + GRegion *gr = GModel::current()->getRegionByTag((int)d); + if(gr) + gr->meshAttributes.QuadTri = TRANSFINITE_QUADTRI_1; + else + yymsg(1, "Unknown region %d", (int)d); + } + } + List_Delete($2); + } + } | tRecombine tSurface ListOfDoubleOrAll RecombineAngle tEND { if(!$3){ diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp index 78217ea13158a378e87d01db7083b09532124dcf..bb225372ad2a7332af72cf399583560e4cac3d5e 100644 --- a/Parser/Gmsh.yy.cpp +++ b/Parser/Gmsh.yy.cpp @@ -379,8 +379,8 @@ static void yy_fatal_error (yyconst char msg[] ); *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 155 -#define YY_END_OF_BUFFER 156 +#define YY_NUM_RULES 159 +#define YY_END_OF_BUFFER 160 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -388,82 +388,85 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[672] = +static yyconst flex_int16_t yy_accept[701] = { 0, - 0, 0, 156, 154, 1, 1, 154, 5, 154, 6, - 154, 154, 154, 154, 154, 149, 21, 2, 154, 16, - 154, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 154, 28, 24, 19, 25, 17, 26, - 18, 0, 151, 3, 4, 20, 150, 149, 0, 29, - 27, 30, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 93, 92, 153, 153, - - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 111, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 139, 140, 153, 153, - 153, 153, 153, 153, 153, 23, 22, 0, 150, 0, - 0, 152, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 49, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 64, - 153, 153, 153, 153, 153, 77, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 100, 153, 153, 153, 153, 153, 153, 153, 153, 153, - - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 126, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 145, 153, 153, 153, 153, 153, 0, 151, - 0, 0, 150, 31, 153, 153, 153, 153, 35, 37, - 153, 153, 153, 57, 153, 44, 153, 153, 153, 153, - 153, 153, 153, 48, 153, 153, 153, 153, 63, 153, - 153, 153, 153, 72, 153, 73, 153, 153, 76, 153, - 153, 153, 153, 153, 85, 86, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 98, 153, 99, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - - 153, 153, 121, 153, 153, 153, 153, 153, 136, 127, - 153, 153, 153, 153, 125, 153, 153, 153, 153, 153, - 153, 141, 144, 153, 153, 153, 153, 10, 15, 9, - 8, 153, 12, 14, 0, 150, 33, 153, 153, 153, - 39, 153, 153, 153, 153, 153, 153, 153, 52, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 70, - 153, 153, 74, 75, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 91, 153, 153, 96, 153, 153, 153, - 101, 153, 153, 153, 107, 108, 153, 153, 153, 112, - 153, 113, 153, 153, 153, 153, 153, 153, 120, 153, - - 153, 153, 130, 153, 153, 153, 153, 153, 153, 153, - 146, 153, 147, 153, 11, 153, 13, 153, 32, 36, - 38, 153, 41, 153, 153, 153, 45, 153, 153, 153, - 153, 153, 153, 153, 153, 60, 62, 153, 153, 69, - 153, 153, 153, 153, 153, 79, 153, 153, 89, 88, - 153, 90, 153, 153, 102, 97, 153, 153, 153, 104, - 153, 153, 153, 117, 153, 116, 153, 153, 123, 119, - 153, 128, 129, 153, 133, 153, 153, 153, 153, 153, - 153, 153, 148, 7, 153, 40, 42, 153, 153, 153, - 153, 153, 47, 51, 153, 153, 153, 153, 66, 153, - - 153, 153, 67, 153, 153, 153, 153, 153, 153, 87, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 132, 153, 153, 131, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 54, 153, 153, 153, - 65, 68, 153, 78, 153, 153, 153, 153, 81, 153, - 153, 103, 105, 106, 153, 109, 110, 153, 153, 153, - 124, 153, 153, 137, 153, 153, 153, 153, 153, 153, - 153, 46, 153, 153, 153, 153, 71, 153, 153, 153, - 80, 153, 94, 153, 153, 118, 153, 134, 153, 138, - 153, 143, 153, 153, 56, 153, 53, 153, 153, 153, - - 153, 153, 153, 153, 114, 153, 122, 153, 153, 153, - 43, 153, 55, 153, 61, 153, 153, 153, 153, 115, - 135, 142, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 50, 58, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 34, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 82, 83, 84, 153, 153, 153, 153, 95, 59, - 0 + 0, 0, 160, 158, 1, 1, 158, 5, 158, 6, + 158, 158, 158, 158, 158, 153, 21, 2, 158, 16, + 158, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 158, 28, 24, 19, 25, 17, + 26, 18, 0, 155, 3, 4, 20, 154, 153, 0, + 29, 27, 30, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 93, 92, 157, + + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 111, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 142, 143, + 157, 157, 157, 157, 157, 157, 157, 23, 22, 0, + 154, 0, 0, 156, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 49, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 64, 157, 157, 157, 157, 157, 77, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 100, 157, 157, 157, 157, 157, 157, 157, + + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 129, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 149, 157, 157, 157, 157, + 157, 0, 155, 0, 0, 154, 31, 157, 157, 157, + 157, 35, 37, 157, 157, 157, 57, 157, 44, 157, + 157, 157, 157, 157, 157, 157, 48, 157, 157, 157, + 157, 63, 157, 157, 157, 157, 72, 157, 73, 157, + 157, 76, 157, 157, 157, 157, 157, 85, 86, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 98, 157, 99, 157, 157, 157, 157, 157, 157, 157, + + 157, 157, 157, 157, 157, 157, 124, 157, 157, 157, + 157, 157, 139, 130, 157, 157, 157, 157, 128, 157, + 157, 157, 157, 157, 157, 144, 148, 157, 157, 157, + 157, 10, 15, 9, 8, 157, 12, 14, 0, 154, + 33, 157, 157, 157, 39, 157, 157, 157, 157, 157, + 157, 157, 52, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 70, 157, 157, 74, 75, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 91, 157, 157, + 96, 157, 157, 157, 101, 157, 157, 157, 107, 108, + 157, 157, 157, 112, 157, 113, 157, 157, 157, 157, + + 157, 157, 157, 123, 157, 157, 157, 133, 157, 157, + 157, 157, 157, 157, 157, 150, 157, 151, 157, 11, + 157, 13, 157, 32, 36, 38, 157, 41, 157, 157, + 157, 45, 157, 157, 157, 157, 157, 157, 157, 157, + 60, 62, 157, 157, 69, 157, 157, 157, 157, 157, + 79, 157, 157, 89, 88, 157, 90, 157, 157, 102, + 97, 157, 157, 157, 104, 157, 157, 157, 117, 157, + 116, 157, 157, 157, 126, 122, 157, 131, 132, 157, + 136, 157, 157, 157, 157, 157, 157, 157, 152, 7, + 157, 40, 42, 157, 157, 157, 157, 157, 47, 51, + + 157, 157, 157, 157, 66, 157, 157, 157, 67, 157, + 157, 157, 157, 157, 157, 87, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 135, 157, 157, 134, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 54, 157, 157, 157, 65, + 68, 157, 78, 157, 157, 157, 157, 81, 157, 157, + 103, 105, 106, 157, 109, 110, 157, 157, 157, 157, + 157, 157, 127, 157, 157, 140, 157, 157, 157, 157, + 157, 157, 157, 157, 46, 157, 157, 157, 157, 71, + 157, 157, 157, 80, 157, 94, 157, 157, 157, 157, + + 157, 120, 157, 137, 157, 141, 157, 157, 147, 157, + 157, 56, 157, 53, 157, 157, 157, 157, 157, 157, + 157, 114, 157, 118, 157, 157, 125, 157, 157, 157, + 157, 43, 157, 55, 157, 61, 157, 157, 157, 157, + 115, 119, 157, 138, 157, 145, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 146, 157, 50, 58, 157, 157, 157, + 157, 121, 157, 157, 157, 157, 157, 157, 34, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 82, 83, 84, 157, 157, 157, 157, 95, 59, 0 + } ; static yyconst flex_int32_t yy_ec[256] = @@ -476,12 +479,12 @@ static yyconst flex_int32_t yy_ec[256] = 16, 17, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 1, 1, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 39, 39, 39, - 1, 1, 1, 1, 46, 1, 47, 48, 49, 50, + 39, 40, 41, 42, 43, 44, 45, 46, 46, 46, + 1, 1, 1, 1, 47, 1, 48, 49, 50, 51, - 51, 52, 53, 54, 55, 39, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 1, 72, 1, 1, 1, 1, 1, 1, + 52, 53, 54, 55, 56, 46, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 1, 73, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -498,7 +501,7 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[73] = +static yyconst flex_int32_t yy_meta[74] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, @@ -507,265 +510,278 @@ static yyconst flex_int32_t yy_meta[73] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 1 + 2, 2, 1 } ; -static yyconst flex_int16_t yy_base[673] = +static yyconst flex_int16_t yy_base[702] = { 0, - 0, 0, 793, 794, 794, 794, 771, 794, 785, 794, - 769, 64, 65, 63, 75, 77, 794, 794, 768, 767, - 766, 46, 48, 66, 51, 65, 78, 46, 45, 71, - 0, 727, 90, 80, 719, 721, 92, 106, 109, 145, - 719, 722, 730, 708, 794, 794, 794, 794, 794, 794, - 794, 768, 167, 794, 794, 794, 172, 187, 211, 794, - 794, 794, 0, 718, 722, 727, 720, 727, 712, 701, - 705, 62, 715, 722, 705, 152, 716, 59, 709, 718, - 707, 713, 713, 93, 713, 709, 699, 698, 694, 697, - 714, 689, 703, 111, 691, 709, 0, 685, 689, 678, - - 92, 688, 137, 715, 695, 681, 693, 679, 678, 670, - 0, 35, 136, 684, 679, 113, 672, 679, 675, 675, - 673, 176, 669, 668, 667, 137, 0, 0, 694, 669, - 677, 679, 670, 667, 655, 794, 794, 227, 232, 241, - 247, 252, 658, 674, 190, 661, 660, 661, 662, 657, - 658, 656, 656, 649, 662, 659, 649, 174, 645, 653, - 659, 654, 653, 656, 634, 646, 242, 643, 634, 0, - 635, 633, 639, 635, 644, 0, 644, 662, 244, 640, - 639, 249, 629, 661, 636, 621, 634, 631, 632, 631, - 667, 619, 633, 612, 629, 625, 628, 619, 609, 613, - - 618, 611, 622, 609, 617, 606, 610, 598, 616, 611, - 593, 606, 599, 607, 602, 601, 590, 254, 602, 595, - 603, 624, 596, 602, 589, 588, 580, 244, 299, 304, - 313, 318, 323, 0, 581, 584, 588, 595, 0, 626, - 585, 588, 588, 0, 571, 0, 589, 578, 571, 570, - 577, 215, 581, 0, 565, 570, 563, 562, 0, 565, - 565, 572, 568, 0, 556, 0, 571, 557, 0, 554, - 572, 558, 551, 568, 0, 0, 548, 562, 565, 560, - 545, 569, 545, 543, 543, 540, 547, 0, 590, 0, - 212, 545, 537, 537, 541, 538, 542, 545, 540, 529, - - 530, 527, 0, 533, 531, 526, 523, 537, 0, 0, - 521, 522, 148, 525, 0, 536, 519, 530, 533, 528, - 543, 0, 0, 507, 512, 522, 516, 0, 0, 516, - 0, 521, 514, 0, 328, 333, 525, 505, 509, 508, - 0, 507, 502, 509, 506, 513, 510, 509, 517, 499, - 506, 490, 500, 503, 502, 501, 500, 212, 487, 0, - 499, 498, 0, 0, 492, 246, 479, 482, 487, 478, - 483, 482, 478, 0, 501, 474, 0, 473, 482, 471, - 0, 487, 478, 472, 0, 0, 480, 480, 480, 0, - 469, 0, 486, 474, 477, 473, 464, 471, 0, 467, - - 469, 468, 0, 453, 452, 465, 458, 465, 448, 452, - 0, 177, 0, 460, 0, 457, 0, 454, 0, 0, - 493, 456, 0, 447, 448, 439, 0, 444, 455, 450, - 431, 440, 439, 455, 433, 0, 0, 122, 440, 0, - 439, 442, 432, 188, 468, 0, 435, 423, 0, 0, - 432, 0, 450, 435, 0, 0, 434, 425, 412, 0, - 417, 426, 433, 0, 418, 0, 423, 442, 0, 0, - 425, 0, 0, 423, 0, 422, 426, 421, 408, 420, - 414, 421, 0, 0, 402, 0, 0, 413, 425, 413, - 414, 414, 0, 0, 411, 413, 399, 411, 0, 393, - - 407, 408, 0, 395, 421, 416, 409, 391, 398, 0, - 414, 398, 381, 389, 393, 380, 393, 384, 386, 380, - 387, 374, 0, 381, 370, 0, 364, 382, 373, 366, - 376, 405, 368, 364, 375, 368, 0, 359, 362, 357, - 0, 0, 362, 0, 383, 382, 393, 364, 0, 393, - 350, 0, 0, 0, 359, 0, 0, 362, 361, 347, - 0, 341, 354, 0, 351, 352, 355, 368, 344, 345, - 347, 0, 350, 349, 339, 347, 0, 357, 356, 365, - 0, 352, 0, 344, 329, 0, 337, 0, 323, 0, - 324, 0, 327, 318, 0, 322, 0, 321, 327, 333, - - 336, 335, 334, 348, 0, 327, 0, 326, 325, 310, - 0, 309, 0, 313, 0, 328, 327, 326, 332, 0, - 0, 0, 313, 312, 313, 338, 337, 336, 326, 301, - 311, 289, 318, 317, 316, 309, 295, 0, 317, 311, - 310, 284, 283, 246, 249, 275, 273, 272, 277, 0, - 270, 262, 261, 260, 265, 231, 251, 250, 246, 253, - 160, 0, 0, 0, 121, 91, 105, 34, 0, 0, - 794, 82 + 0, 0, 828, 829, 829, 829, 806, 829, 820, 829, + 804, 65, 66, 64, 76, 78, 829, 829, 803, 802, + 801, 46, 57, 65, 50, 64, 77, 47, 29, 79, + 0, 761, 89, 81, 753, 755, 99, 751, 100, 103, + 92, 752, 755, 763, 741, 829, 829, 829, 829, 829, + 829, 829, 802, 162, 829, 829, 829, 167, 182, 191, + 829, 829, 829, 0, 751, 755, 760, 753, 760, 745, + 734, 738, 106, 748, 755, 738, 157, 749, 132, 742, + 751, 740, 746, 746, 155, 746, 742, 732, 731, 727, + 730, 748, 722, 736, 69, 724, 743, 0, 718, 722, + + 711, 142, 721, 131, 749, 728, 714, 726, 712, 711, + 703, 0, 101, 45, 717, 724, 711, 170, 704, 711, + 707, 707, 705, 169, 701, 700, 699, 128, 0, 0, + 727, 701, 709, 711, 702, 699, 687, 829, 829, 228, + 233, 242, 215, 248, 690, 706, 228, 693, 692, 693, + 694, 689, 690, 688, 688, 681, 694, 691, 681, 164, + 677, 685, 691, 686, 685, 688, 666, 678, 115, 675, + 666, 0, 667, 665, 671, 667, 676, 0, 676, 695, + 227, 672, 671, 247, 661, 694, 668, 653, 666, 663, + 664, 663, 700, 651, 665, 644, 661, 657, 660, 651, + + 641, 645, 650, 643, 654, 641, 649, 648, 637, 641, + 629, 647, 642, 624, 637, 630, 638, 633, 632, 621, + 241, 633, 626, 634, 656, 627, 633, 620, 619, 611, + 233, 289, 294, 303, 308, 313, 0, 612, 615, 619, + 626, 0, 658, 616, 619, 619, 0, 602, 0, 620, + 609, 602, 601, 608, 216, 612, 0, 596, 601, 594, + 593, 0, 596, 596, 603, 599, 0, 587, 0, 602, + 588, 0, 585, 603, 589, 582, 599, 0, 0, 579, + 593, 596, 591, 576, 601, 576, 574, 574, 571, 578, + 0, 622, 0, 199, 576, 568, 568, 572, 569, 573, + + 576, 571, 560, 561, 558, 233, 0, 564, 562, 557, + 554, 568, 0, 0, 552, 553, 207, 556, 0, 567, + 550, 561, 564, 559, 575, 0, 0, 538, 543, 553, + 547, 0, 0, 547, 0, 552, 545, 0, 318, 323, + 557, 536, 540, 539, 0, 538, 533, 540, 537, 544, + 541, 540, 549, 530, 537, 521, 531, 534, 533, 532, + 531, 224, 518, 0, 530, 529, 0, 0, 523, 258, + 510, 513, 518, 509, 514, 513, 509, 0, 533, 505, + 0, 504, 513, 502, 0, 518, 509, 503, 0, 0, + 511, 511, 511, 0, 500, 0, 518, 505, 493, 507, + + 503, 494, 501, 0, 497, 499, 498, 0, 483, 482, + 495, 488, 495, 478, 482, 0, 288, 0, 490, 0, + 487, 0, 484, 0, 0, 524, 486, 0, 477, 478, + 469, 0, 474, 485, 480, 461, 470, 469, 486, 463, + 0, 0, 226, 470, 0, 469, 472, 462, 261, 499, + 0, 465, 453, 0, 0, 462, 0, 481, 465, 0, + 0, 464, 455, 442, 0, 447, 456, 463, 0, 448, + 0, 453, 308, 473, 0, 0, 455, 0, 0, 453, + 0, 452, 456, 451, 438, 450, 304, 452, 0, 0, + 433, 0, 0, 444, 457, 444, 445, 445, 0, 0, + + 442, 444, 430, 442, 0, 424, 438, 439, 0, 426, + 453, 448, 441, 422, 429, 0, 446, 429, 412, 420, + 424, 411, 424, 415, 417, 318, 423, 410, 417, 404, + 0, 411, 400, 0, 394, 412, 396, 402, 395, 405, + 435, 397, 393, 404, 397, 0, 388, 391, 386, 0, + 0, 391, 0, 413, 412, 423, 393, 0, 423, 379, + 0, 0, 0, 388, 0, 0, 391, 393, 381, 374, + 387, 373, 0, 367, 380, 0, 377, 386, 377, 380, + 394, 369, 370, 372, 0, 375, 374, 364, 372, 0, + 383, 382, 391, 0, 378, 0, 369, 354, 359, 362, + + 363, 0, 359, 0, 345, 0, 361, 345, 0, 348, + 339, 0, 343, 0, 342, 348, 354, 357, 356, 355, + 370, 0, 348, 0, 341, 334, 0, 345, 305, 344, + 329, 0, 328, 0, 332, 0, 348, 347, 346, 352, + 0, 0, 340, 0, 323, 0, 330, 329, 330, 355, + 354, 353, 343, 320, 321, 315, 325, 303, 333, 332, + 330, 321, 300, 0, 303, 0, 326, 320, 317, 316, + 315, 0, 290, 293, 322, 321, 320, 325, 0, 319, + 311, 308, 278, 284, 239, 258, 244, 199, 198, 145, + 0, 0, 0, 156, 121, 144, 51, 0, 0, 829, + + 81 } ; -static yyconst flex_int16_t yy_def[673] = +static yyconst flex_int16_t yy_def[702] = { 0, - 671, 1, 671, 671, 671, 671, 671, 671, 671, 671, - 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, - 671, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 671, 671, 671, 671, 671, 671, 671, - 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, - 671, 671, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 671, 671, 671, 671, 671, - 671, 671, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 671, 671, - 671, 671, 671, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 671, 671, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, - 0, 671 + 700, 1, 700, 700, 700, 700, 700, 700, 700, 700, + 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + 700, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 700, 700, 700, 700, 700, 700, + 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + 700, 700, 700, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 700, 700, 700, + 700, 700, 700, 700, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 700, 700, 700, 700, 700, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 700, 700, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 701, + 701, 701, 701, 701, 701, 701, 701, 701, 701, 0, + + 700 } ; -static yyconst flex_int16_t yy_nxt[867] = +static yyconst flex_int16_t yy_nxt[903] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 31, 38, - 39, 40, 41, 42, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 43, 31, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 44, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 44, 48, 52, 50, 53, 53, 53, 53, 53, - 91, 200, 54, 63, 49, 51, 55, 57, 69, 58, - 58, 58, 58, 58, 64, 56, 92, 670, 70, 93, - - 201, 78, 65, 59, 94, 79, 96, 71, 66, 67, - 68, 162, 72, 80, 95, 163, 73, 104, 151, 74, - 75, 81, 97, 82, 85, 76, 152, 59, 77, 98, - 83, 669, 86, 84, 87, 88, 100, 89, 108, 105, - 101, 668, 109, 90, 102, 110, 111, 169, 112, 103, - 188, 113, 115, 170, 114, 667, 116, 171, 189, 127, - 128, 206, 119, 120, 207, 117, 121, 181, 182, 122, - 123, 118, 499, 124, 125, 129, 500, 208, 126, 53, - 53, 53, 53, 53, 139, 139, 139, 139, 139, 191, - 202, 130, 203, 138, 220, 221, 192, 57, 140, 58, - - 58, 58, 58, 58, 131, 156, 402, 132, 157, 158, - 505, 159, 403, 59, 236, 160, 666, 138, 506, 141, - 141, 251, 140, 142, 142, 142, 142, 142, 481, 214, - 237, 238, 215, 482, 252, 229, 229, 59, 216, 230, - 230, 230, 230, 230, 139, 139, 139, 139, 139, 232, - 232, 382, 383, 233, 233, 233, 233, 233, 231, 142, - 142, 142, 142, 142, 142, 142, 142, 142, 142, 261, - 272, 351, 262, 277, 352, 438, 439, 278, 316, 665, - 444, 664, 231, 445, 273, 663, 662, 274, 279, 280, - 661, 317, 328, 318, 660, 329, 659, 658, 657, 656, - - 330, 655, 654, 653, 331, 652, 332, 333, 651, 650, - 334, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 335, 335, 649, 648, 336, 336, 336, 336, 336, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, - 647, 646, 645, 644, 643, 642, 641, 640, 639, 638, - 637, 636, 635, 634, 633, 632, 631, 630, 629, 628, - 627, 626, 625, 624, 623, 622, 621, 620, 619, 618, - 617, 616, 615, 614, 613, 612, 611, 610, 609, 608, - 607, 606, 605, 604, 603, 602, 601, 600, 599, 598, - - 597, 596, 595, 594, 593, 592, 591, 590, 589, 588, - 587, 586, 585, 584, 583, 582, 581, 580, 579, 578, - 577, 576, 575, 574, 573, 572, 571, 570, 569, 568, - 567, 566, 565, 564, 563, 562, 561, 560, 559, 558, - 557, 556, 555, 554, 553, 552, 551, 550, 549, 548, - 547, 546, 545, 544, 543, 542, 541, 540, 539, 538, - 537, 536, 535, 534, 533, 532, 531, 530, 529, 528, - 527, 526, 525, 524, 523, 522, 521, 520, 519, 518, - 517, 516, 515, 514, 513, 512, 511, 510, 509, 508, - 507, 504, 503, 502, 501, 498, 497, 496, 495, 494, - - 493, 492, 491, 490, 489, 488, 487, 486, 485, 484, - 483, 480, 479, 478, 477, 476, 475, 474, 473, 472, - 471, 470, 469, 468, 467, 466, 465, 464, 463, 462, - 461, 460, 459, 458, 457, 456, 455, 454, 453, 452, - 451, 450, 449, 448, 447, 446, 443, 442, 441, 440, - 437, 436, 435, 434, 433, 432, 431, 430, 429, 428, - 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, - 417, 416, 415, 414, 413, 412, 411, 410, 409, 408, - 407, 406, 405, 404, 401, 400, 399, 398, 397, 396, - 395, 394, 393, 392, 391, 390, 389, 388, 387, 386, - - 385, 384, 381, 380, 379, 378, 377, 376, 375, 374, - 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, - 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, - 353, 350, 349, 348, 347, 346, 345, 344, 343, 342, - 341, 340, 339, 338, 337, 327, 326, 325, 324, 323, - 322, 321, 320, 319, 315, 314, 313, 312, 311, 310, - 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, - 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, - 289, 288, 287, 286, 285, 284, 283, 282, 281, 276, - 275, 271, 270, 269, 268, 267, 266, 265, 264, 263, - - 260, 259, 258, 257, 256, 255, 254, 253, 250, 249, - 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, - 235, 234, 228, 227, 226, 225, 224, 223, 222, 219, - 218, 217, 213, 212, 211, 210, 209, 205, 204, 199, - 198, 197, 196, 195, 194, 193, 190, 187, 186, 185, - 184, 183, 180, 179, 178, 177, 176, 175, 174, 173, - 172, 168, 167, 166, 165, 164, 161, 155, 154, 153, - 150, 149, 148, 147, 146, 145, 144, 143, 137, 136, - 135, 134, 133, 107, 106, 99, 62, 61, 60, 47, - 46, 45, 671, 3, 671, 671, 671, 671, 671, 671, - - 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, - 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, - 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, - 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, - 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, - 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, - 671, 671, 671, 671, 671, 671 + 31, 31, 45, 49, 53, 51, 54, 54, 54, 54, + 54, 92, 64, 55, 94, 50, 52, 56, 58, 95, + 59, 59, 59, 59, 59, 65, 57, 70, 93, 96, + + 204, 79, 205, 66, 60, 80, 129, 130, 71, 67, + 68, 69, 73, 81, 97, 699, 74, 72, 105, 75, + 76, 82, 131, 83, 86, 77, 183, 184, 78, 60, + 84, 98, 87, 85, 88, 89, 101, 90, 99, 132, + 102, 106, 264, 91, 103, 265, 109, 117, 202, 104, + 110, 118, 133, 111, 112, 134, 113, 121, 122, 114, + 119, 123, 115, 153, 124, 125, 120, 203, 126, 127, + 698, 154, 697, 128, 54, 54, 54, 54, 54, 141, + 141, 141, 141, 141, 193, 164, 223, 224, 140, 165, + 696, 194, 58, 142, 59, 59, 59, 59, 59, 143, + + 143, 190, 695, 144, 144, 144, 144, 144, 60, 191, + 171, 158, 254, 140, 159, 160, 172, 161, 142, 209, + 173, 162, 210, 217, 694, 255, 218, 144, 144, 144, + 144, 144, 219, 60, 693, 211, 232, 232, 386, 387, + 233, 233, 233, 233, 233, 141, 141, 141, 141, 141, + 235, 235, 239, 275, 236, 236, 236, 236, 236, 234, + 144, 144, 144, 144, 144, 320, 407, 276, 240, 241, + 277, 280, 408, 355, 399, 281, 356, 505, 321, 692, + 322, 506, 332, 511, 234, 333, 282, 283, 443, 444, + 334, 512, 449, 691, 335, 450, 336, 337, 399, 690, + + 338, 233, 233, 233, 233, 233, 233, 233, 233, 233, + 233, 339, 339, 689, 688, 340, 340, 340, 340, 340, + 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, + 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, + 487, 527, 537, 568, 687, 488, 645, 686, 685, 684, + 683, 682, 681, 680, 679, 678, 677, 676, 569, 538, + 675, 674, 673, 528, 672, 527, 537, 671, 568, 670, + 645, 669, 668, 667, 666, 665, 664, 663, 662, 661, + 660, 659, 569, 658, 657, 656, 655, 654, 653, 652, + 651, 650, 649, 648, 647, 646, 644, 643, 642, 641, + + 640, 639, 638, 637, 636, 635, 634, 633, 632, 631, + 630, 629, 628, 627, 626, 625, 624, 623, 622, 621, + 620, 619, 618, 617, 616, 615, 614, 613, 612, 611, + 610, 609, 608, 607, 606, 605, 604, 603, 602, 601, + 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, + 590, 589, 588, 587, 586, 585, 584, 583, 582, 581, + 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, + 570, 567, 566, 565, 564, 563, 562, 561, 560, 559, + 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, + 548, 547, 546, 545, 544, 543, 542, 541, 540, 539, + + 536, 535, 534, 533, 532, 531, 530, 529, 526, 525, + 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, + 514, 513, 510, 509, 508, 507, 504, 503, 502, 501, + 500, 499, 498, 497, 496, 495, 494, 493, 492, 491, + 490, 489, 486, 485, 484, 483, 482, 481, 480, 479, + 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, + 468, 467, 466, 465, 464, 463, 462, 461, 460, 459, + 458, 457, 456, 455, 454, 453, 452, 451, 448, 447, + 446, 445, 442, 441, 440, 439, 438, 437, 436, 435, + 434, 433, 432, 431, 430, 429, 428, 427, 426, 425, + + 424, 423, 422, 421, 420, 419, 418, 417, 416, 415, + 414, 413, 412, 411, 410, 409, 406, 405, 404, 403, + 402, 401, 400, 398, 397, 396, 395, 394, 393, 392, + 391, 390, 389, 388, 385, 384, 383, 382, 381, 380, + 379, 378, 377, 376, 375, 374, 373, 372, 371, 370, + 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, + 359, 358, 357, 354, 353, 352, 351, 350, 349, 348, + 347, 346, 345, 344, 343, 342, 341, 331, 330, 329, + 328, 327, 326, 325, 324, 323, 319, 318, 317, 316, + 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, + + 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, + 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, + 285, 284, 279, 278, 274, 273, 272, 271, 270, 269, + 268, 267, 266, 263, 262, 261, 260, 259, 258, 257, + 256, 253, 252, 251, 250, 249, 248, 247, 246, 245, + 244, 243, 242, 238, 237, 231, 230, 229, 228, 227, + 226, 225, 222, 221, 220, 216, 215, 214, 213, 212, + 208, 207, 206, 201, 200, 199, 198, 197, 196, 195, + 192, 189, 188, 187, 186, 185, 182, 181, 180, 179, + 178, 177, 176, 175, 174, 170, 169, 168, 167, 166, + + 163, 157, 156, 155, 152, 151, 150, 149, 148, 147, + 146, 145, 139, 138, 137, 136, 135, 116, 108, 107, + 100, 63, 62, 61, 48, 47, 46, 700, 3, 700, + 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + + 700, 700 } ; -static yyconst flex_int16_t yy_chk[867] = +static yyconst flex_int16_t yy_chk[903] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -774,94 +790,99 @@ static yyconst flex_int16_t yy_chk[867] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 12, 14, 13, 14, 14, 14, 14, 14, - 28, 112, 15, 672, 12, 13, 15, 16, 23, 16, - 16, 16, 16, 16, 22, 15, 28, 668, 23, 29, - - 112, 25, 22, 16, 29, 25, 30, 23, 22, 22, - 22, 78, 24, 25, 29, 78, 24, 34, 72, 24, - 24, 26, 30, 26, 27, 24, 72, 16, 24, 30, - 26, 667, 27, 26, 27, 27, 33, 27, 37, 34, - 33, 666, 37, 27, 33, 37, 37, 84, 37, 33, - 101, 37, 38, 84, 37, 665, 38, 84, 101, 40, - 40, 116, 39, 39, 116, 38, 39, 94, 94, 39, - 39, 38, 438, 39, 39, 40, 438, 116, 39, 53, - 53, 53, 53, 53, 57, 57, 57, 57, 57, 103, - 113, 40, 113, 53, 126, 126, 103, 58, 57, 58, - - 58, 58, 58, 58, 40, 76, 313, 40, 76, 76, - 444, 76, 313, 58, 145, 76, 661, 53, 444, 59, - 59, 158, 57, 59, 59, 59, 59, 59, 412, 122, - 145, 145, 122, 412, 158, 138, 138, 58, 122, 138, - 138, 138, 138, 138, 139, 139, 139, 139, 139, 140, - 140, 291, 291, 140, 140, 140, 140, 140, 139, 141, - 141, 141, 141, 141, 142, 142, 142, 142, 142, 167, - 179, 252, 167, 182, 252, 358, 358, 182, 218, 660, - 366, 659, 139, 366, 179, 658, 657, 179, 182, 182, - 656, 218, 228, 218, 655, 228, 654, 653, 652, 651, - - 228, 649, 648, 647, 228, 646, 228, 228, 645, 644, - 228, 229, 229, 229, 229, 229, 230, 230, 230, 230, - 230, 231, 231, 643, 642, 231, 231, 231, 231, 231, - 232, 232, 232, 232, 232, 233, 233, 233, 233, 233, - 335, 335, 335, 335, 335, 336, 336, 336, 336, 336, - 641, 640, 639, 637, 636, 635, 634, 633, 632, 631, - 630, 629, 628, 627, 626, 625, 624, 623, 619, 618, - 617, 616, 614, 612, 610, 609, 608, 606, 604, 603, - 602, 601, 600, 599, 598, 596, 594, 593, 591, 589, - 587, 585, 584, 582, 580, 579, 578, 576, 575, 574, - - 573, 571, 570, 569, 568, 567, 566, 565, 563, 562, - 560, 559, 558, 555, 551, 550, 548, 547, 546, 545, - 543, 540, 539, 538, 536, 535, 534, 533, 532, 531, - 530, 529, 528, 527, 525, 524, 522, 521, 520, 519, - 518, 517, 516, 515, 514, 513, 512, 511, 509, 508, - 507, 506, 505, 504, 502, 501, 500, 498, 497, 496, - 495, 492, 491, 490, 489, 488, 485, 482, 481, 480, - 479, 478, 477, 476, 474, 471, 468, 467, 465, 463, - 462, 461, 459, 458, 457, 454, 453, 451, 448, 447, - 445, 443, 442, 441, 439, 435, 434, 433, 432, 431, - - 430, 429, 428, 426, 425, 424, 422, 421, 418, 416, - 414, 410, 409, 408, 407, 406, 405, 404, 402, 401, - 400, 398, 397, 396, 395, 394, 393, 391, 389, 388, - 387, 384, 383, 382, 380, 379, 378, 376, 375, 373, - 372, 371, 370, 369, 368, 367, 365, 362, 361, 359, - 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, - 347, 346, 345, 344, 343, 342, 340, 339, 338, 337, - 333, 332, 330, 327, 326, 325, 324, 321, 320, 319, - 318, 317, 316, 314, 312, 311, 308, 307, 306, 305, - 304, 302, 301, 300, 299, 298, 297, 296, 295, 294, - - 293, 292, 289, 287, 286, 285, 284, 283, 282, 281, - 280, 279, 278, 277, 274, 273, 272, 271, 270, 268, - 267, 265, 263, 262, 261, 260, 258, 257, 256, 255, - 253, 251, 250, 249, 248, 247, 245, 243, 242, 241, - 240, 238, 237, 236, 235, 227, 226, 225, 224, 223, - 222, 221, 220, 219, 217, 216, 215, 214, 213, 212, - 211, 210, 209, 208, 207, 206, 205, 204, 203, 202, - 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, - 191, 190, 189, 188, 187, 186, 185, 184, 183, 181, - 180, 178, 177, 175, 174, 173, 172, 171, 169, 168, - - 166, 165, 164, 163, 162, 161, 160, 159, 157, 156, - 155, 154, 153, 152, 151, 150, 149, 148, 147, 146, - 144, 143, 135, 134, 133, 132, 131, 130, 129, 125, - 124, 123, 121, 120, 119, 118, 117, 115, 114, 110, - 109, 108, 107, 106, 105, 104, 102, 100, 99, 98, - 96, 95, 93, 92, 91, 90, 89, 88, 87, 86, - 85, 83, 82, 81, 80, 79, 77, 75, 74, 73, - 71, 70, 69, 68, 67, 66, 65, 64, 52, 44, - 43, 42, 41, 36, 35, 32, 21, 20, 19, 11, - 9, 7, 3, 671, 671, 671, 671, 671, 671, 671, - - 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, - 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, - 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, - 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, - 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, - 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, - 671, 671, 671, 671, 671, 671 + 1, 1, 1, 12, 14, 13, 14, 14, 14, 14, + 14, 28, 701, 15, 29, 12, 13, 15, 16, 29, + 16, 16, 16, 16, 16, 22, 15, 23, 28, 29, + + 114, 25, 114, 22, 16, 25, 41, 41, 23, 22, + 22, 22, 24, 25, 30, 697, 24, 23, 34, 24, + 24, 26, 41, 26, 27, 24, 95, 95, 24, 16, + 26, 30, 27, 26, 27, 27, 33, 27, 30, 41, + 33, 34, 169, 27, 33, 169, 37, 39, 113, 33, + 37, 39, 41, 37, 37, 41, 37, 40, 40, 37, + 39, 40, 37, 73, 40, 40, 39, 113, 40, 40, + 696, 73, 695, 40, 54, 54, 54, 54, 54, 58, + 58, 58, 58, 58, 104, 79, 128, 128, 54, 79, + 694, 104, 59, 58, 59, 59, 59, 59, 59, 60, + + 60, 102, 690, 60, 60, 60, 60, 60, 59, 102, + 85, 77, 160, 54, 77, 77, 85, 77, 58, 118, + 85, 77, 118, 124, 689, 160, 124, 143, 143, 143, + 143, 143, 124, 59, 688, 118, 140, 140, 294, 294, + 140, 140, 140, 140, 140, 141, 141, 141, 141, 141, + 142, 142, 147, 181, 142, 142, 142, 142, 142, 141, + 144, 144, 144, 144, 144, 221, 317, 181, 147, 147, + 181, 184, 317, 255, 306, 184, 255, 443, 221, 687, + 221, 443, 231, 449, 141, 231, 184, 184, 362, 362, + 231, 449, 370, 686, 231, 370, 231, 231, 306, 685, + + 231, 232, 232, 232, 232, 232, 233, 233, 233, 233, + 233, 234, 234, 684, 683, 234, 234, 234, 234, 234, + 235, 235, 235, 235, 235, 236, 236, 236, 236, 236, + 339, 339, 339, 339, 339, 340, 340, 340, 340, 340, + 417, 473, 487, 526, 682, 417, 629, 681, 680, 678, + 677, 676, 675, 674, 673, 671, 670, 669, 526, 487, + 668, 667, 665, 473, 663, 473, 487, 662, 526, 661, + 629, 660, 659, 658, 657, 656, 655, 654, 653, 652, + 651, 650, 526, 649, 648, 647, 645, 643, 640, 639, + 638, 637, 635, 633, 631, 630, 628, 626, 625, 623, + + 621, 620, 619, 618, 617, 616, 615, 613, 611, 610, + 608, 607, 605, 603, 601, 600, 599, 598, 597, 595, + 593, 592, 591, 589, 588, 587, 586, 584, 583, 582, + 581, 580, 579, 578, 577, 575, 574, 572, 571, 570, + 569, 568, 567, 564, 560, 559, 557, 556, 555, 554, + 552, 549, 548, 547, 545, 544, 543, 542, 541, 540, + 539, 538, 537, 536, 535, 533, 532, 530, 529, 528, + 527, 525, 524, 523, 522, 521, 520, 519, 518, 517, + 515, 514, 513, 512, 511, 510, 508, 507, 506, 504, + 503, 502, 501, 498, 497, 496, 495, 494, 491, 488, + + 486, 485, 484, 483, 482, 480, 477, 474, 472, 470, + 468, 467, 466, 464, 463, 462, 459, 458, 456, 453, + 452, 450, 448, 447, 446, 444, 440, 439, 438, 437, + 436, 435, 434, 433, 431, 430, 429, 427, 426, 423, + 421, 419, 415, 414, 413, 412, 411, 410, 409, 407, + 406, 405, 403, 402, 401, 400, 399, 398, 397, 395, + 393, 392, 391, 388, 387, 386, 384, 383, 382, 380, + 379, 377, 376, 375, 374, 373, 372, 371, 369, 366, + 365, 363, 361, 360, 359, 358, 357, 356, 355, 354, + 353, 352, 351, 350, 349, 348, 347, 346, 344, 343, + + 342, 341, 337, 336, 334, 331, 330, 329, 328, 325, + 324, 323, 322, 321, 320, 318, 316, 315, 312, 311, + 310, 309, 308, 305, 304, 303, 302, 301, 300, 299, + 298, 297, 296, 295, 292, 290, 289, 288, 287, 286, + 285, 284, 283, 282, 281, 280, 277, 276, 275, 274, + 273, 271, 270, 268, 266, 265, 264, 263, 261, 260, + 259, 258, 256, 254, 253, 252, 251, 250, 248, 246, + 245, 244, 243, 241, 240, 239, 238, 230, 229, 228, + 227, 226, 225, 224, 223, 222, 220, 219, 218, 217, + 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, + + 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, + 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, + 186, 185, 183, 182, 180, 179, 177, 176, 175, 174, + 173, 171, 170, 168, 167, 166, 165, 164, 163, 162, + 161, 159, 158, 157, 156, 155, 154, 153, 152, 151, + 150, 149, 148, 146, 145, 137, 136, 135, 134, 133, + 132, 131, 127, 126, 125, 123, 122, 121, 120, 119, + 117, 116, 115, 111, 110, 109, 108, 107, 106, 105, + 103, 101, 100, 99, 97, 96, 94, 93, 92, 91, + 90, 89, 88, 87, 86, 84, 83, 82, 81, 80, + + 78, 76, 75, 74, 72, 71, 70, 69, 68, 67, + 66, 65, 53, 45, 44, 43, 42, 38, 36, 35, + 32, 21, 20, 19, 11, 9, 7, 3, 700, 700, + 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, + + 700, 700 } ; static yy_state_type yy_last_accepting_state; @@ -918,7 +939,7 @@ void skipline(void); #define YY_NO_UNISTD_H #endif -#line 922 "Gmsh.yy.cpp" +#line 943 "Gmsh.yy.cpp" #define INITIAL 0 @@ -1103,7 +1124,7 @@ YY_DECL #line 49 "Gmsh.l" -#line 1107 "Gmsh.yy.cpp" +#line 1128 "Gmsh.yy.cpp" if ( !(yy_init) ) { @@ -1156,13 +1177,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 672 ) + if ( yy_current_state >= 701 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 794 ); + while ( yy_base[yy_current_state] != 829 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1775,185 +1796,205 @@ return tPlugin; case 118: YY_RULE_SETUP #line 184 "Gmsh.l" -return tRecombine; +return tQuadTriDbl; YY_BREAK case 119: YY_RULE_SETUP #line 185 "Gmsh.l" -return tRotate; +return tQuadTriSngl; YY_BREAK case 120: YY_RULE_SETUP -#line 186 "Gmsh.l" -return tRuled; +#line 187 "Gmsh.l" +return tRecombine; YY_BREAK case 121: YY_RULE_SETUP -#line 187 "Gmsh.l" -return tRand; +#line 188 "Gmsh.l" +return tRecombLaterals; YY_BREAK case 122: YY_RULE_SETUP -#line 188 "Gmsh.l" -return tRefineMesh; +#line 189 "Gmsh.l" +return tRotate; YY_BREAK case 123: YY_RULE_SETUP -#line 189 "Gmsh.l" -return tReturn; +#line 190 "Gmsh.l" +return tRuled; YY_BREAK case 124: YY_RULE_SETUP #line 191 "Gmsh.l" -return tSmoother; +return tRand; YY_BREAK case 125: YY_RULE_SETUP #line 192 "Gmsh.l" -return tSqrt; +return tRefineMesh; YY_BREAK case 126: YY_RULE_SETUP #line 193 "Gmsh.l" -return tSin; +return tReturn; YY_BREAK case 127: YY_RULE_SETUP -#line 194 "Gmsh.l" -return tSinh; +#line 195 "Gmsh.l" +return tSmoother; YY_BREAK case 128: YY_RULE_SETUP -#line 195 "Gmsh.l" -return tSphere; +#line 196 "Gmsh.l" +return tSqrt; YY_BREAK case 129: YY_RULE_SETUP -#line 196 "Gmsh.l" -return tSpline; +#line 197 "Gmsh.l" +return tSin; YY_BREAK case 130: YY_RULE_SETUP -#line 197 "Gmsh.l" -return tSplit; +#line 198 "Gmsh.l" +return tSinh; YY_BREAK case 131: YY_RULE_SETUP -#line 198 "Gmsh.l" -return tSurface; +#line 199 "Gmsh.l" +return tSphere; YY_BREAK case 132: YY_RULE_SETUP -#line 199 "Gmsh.l" -return tSprintf; +#line 200 "Gmsh.l" +return tSpline; YY_BREAK case 133: YY_RULE_SETUP -#line 200 "Gmsh.l" -return tStrCat; +#line 201 "Gmsh.l" +return tSplit; YY_BREAK case 134: YY_RULE_SETUP -#line 201 "Gmsh.l" -return tStrPrefix; +#line 202 "Gmsh.l" +return tSurface; YY_BREAK case 135: YY_RULE_SETUP -#line 202 "Gmsh.l" -return tStrRelative; +#line 203 "Gmsh.l" +return tSprintf; YY_BREAK case 136: YY_RULE_SETUP -#line 203 "Gmsh.l" -return tShow; +#line 204 "Gmsh.l" +return tStrCat; YY_BREAK case 137: YY_RULE_SETUP -#line 204 "Gmsh.l" -return tSymmetry; +#line 205 "Gmsh.l" +return tStrPrefix; YY_BREAK case 138: YY_RULE_SETUP -#line 205 "Gmsh.l" -return tSyncModel; +#line 206 "Gmsh.l" +return tStrRelative; YY_BREAK case 139: YY_RULE_SETUP #line 207 "Gmsh.l" -return tText2D; +return tShow; YY_BREAK case 140: YY_RULE_SETUP #line 208 "Gmsh.l" -return tText3D; +return tSymmetry; YY_BREAK case 141: YY_RULE_SETUP #line 209 "Gmsh.l" -return tTime; +return tSyncModel; YY_BREAK case 142: YY_RULE_SETUP -#line 210 "Gmsh.l" -return tTransfinite; +#line 211 "Gmsh.l" +return tText2D; YY_BREAK case 143: YY_RULE_SETUP -#line 211 "Gmsh.l" -return tTranslate; +#line 212 "Gmsh.l" +return tText3D; YY_BREAK case 144: YY_RULE_SETUP -#line 212 "Gmsh.l" -return tTanh; +#line 213 "Gmsh.l" +return tTime; YY_BREAK case 145: YY_RULE_SETUP -#line 213 "Gmsh.l" -return tTan; +#line 214 "Gmsh.l" +return tTransfinite; YY_BREAK case 146: YY_RULE_SETUP -#line 214 "Gmsh.l" -return tToday; +#line 215 "Gmsh.l" +return tTransfQuadTri; YY_BREAK case 147: YY_RULE_SETUP #line 216 "Gmsh.l" -return tUsing; +return tTranslate; YY_BREAK case 148: YY_RULE_SETUP -#line 218 "Gmsh.l" -return tVolume; +#line 217 "Gmsh.l" +return tTanh; YY_BREAK case 149: -#line 221 "Gmsh.l" +YY_RULE_SETUP +#line 218 "Gmsh.l" +return tTan; + YY_BREAK case 150: -#line 222 "Gmsh.l" +YY_RULE_SETUP +#line 219 "Gmsh.l" +return tToday; + YY_BREAK case 151: -#line 223 "Gmsh.l" +YY_RULE_SETUP +#line 221 "Gmsh.l" +return tUsing; + YY_BREAK case 152: YY_RULE_SETUP #line 223 "Gmsh.l" -{ gmsh_yylval.d = atof((char *)gmsh_yytext); return tDOUBLE; } +return tVolume; YY_BREAK case 153: +#line 226 "Gmsh.l" +case 154: +#line 227 "Gmsh.l" +case 155: +#line 228 "Gmsh.l" +case 156: +YY_RULE_SETUP +#line 228 "Gmsh.l" +{ gmsh_yylval.d = atof((char *)gmsh_yytext); return tDOUBLE; } + YY_BREAK +case 157: YY_RULE_SETUP -#line 225 "Gmsh.l" +#line 230 "Gmsh.l" { gmsh_yylval.c = strsave((char*)gmsh_yytext); return tSTRING; } YY_BREAK -case 154: +case 158: YY_RULE_SETUP -#line 227 "Gmsh.l" +#line 232 "Gmsh.l" return gmsh_yytext[0]; YY_BREAK -case 155: +case 159: YY_RULE_SETUP -#line 229 "Gmsh.l" +#line 234 "Gmsh.l" ECHO; YY_BREAK -#line 1957 "Gmsh.yy.cpp" +#line 1998 "Gmsh.yy.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2245,7 +2286,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 672 ) + if ( yy_current_state >= 701 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2273,11 +2314,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 672 ) + if ( yy_current_state >= 701 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 671); + yy_is_jam = (yy_current_state == 700); return yy_is_jam ? 0 : yy_current_state; } @@ -2950,7 +2991,7 @@ void gmsh_yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 229 "Gmsh.l" +#line 234 "Gmsh.l" diff --git a/doc/CREDITS.txt b/doc/CREDITS.txt index 8522821b18a9f4a52589f8fdd1d115c6c8d192de..bc8673ed450445276c7ed58f7548353802e5d807 100644 --- a/doc/CREDITS.txt +++ b/doc/CREDITS.txt @@ -20,9 +20,10 @@ connection), Matt Gundry (Plot3d mesh format), Matti Pellikka format), Pierre Badel (root finding and minimization), Ruth Sabariego (pyramids), Stephen Guzik (CGNS and partitioners), Bastien Gorissen (parallel remote), Eric Bechet (solver), Gilles Marckmann (camera and -stero mode), Ashish Negi (Salome/Netgen CAD healing). See comments in -the sources for more information. If we forgot to list your -contributions please send us an email! +stero mode), Ashish Negi (Salome/Netgen CAD healing), Trevor Strickler +(structured/unstructured coupling with pyramids). See comments in the +sources for more information. If we forgot to list your contributions +please send us an email! The AVL tree code (Common/avl.*) and the YUV image code (Graphics/gl2yuv.*) are copyright (C) 1988-1993, 1995 The Regents of