diff --git a/Common/Context.h b/Common/Context.h index 3d021709dc5d4413aba63f9be5852f8c041399bc..6f59eb23563b9189f720722f04d0dd3275c65abe 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -278,7 +278,7 @@ class CTX { int jpegQuality, jpegSmoothing, geoLabels, geoOnlyPhysicals; int text, texAsEquation; int gifDither, gifSort, gifInterlace, gifTransparent; - int posElementary, posElement, posGamma, posEta, posRho, posDisto; + int posElementary, posElement, posGamma, posEta, posSICN, posSIGE, posDisto; int compositeWindows, deleteTmpFiles, background; int width, height; double parameter, parameterFirst, parameterLast, parameterSteps; diff --git a/Common/CreateFile.cpp b/Common/CreateFile.cpp index f744e81f1ec5484322bf62cc01199dc48c4b51c5..7ec744426dacf7c2091fc665bf8c63b64f8c7d16 100644 --- a/Common/CreateFile.cpp +++ b/Common/CreateFile.cpp @@ -377,10 +377,10 @@ void CreateOutputFile(const std::string &fileName, int format, case FORMAT_POS: GModel::current()->writePOS (name, CTX::instance()->print.posElementary, - CTX::instance()->print.posElement, CTX::instance()->print.posGamma, - CTX::instance()->print.posEta, CTX::instance()->print.posRho, - CTX::instance()->print.posDisto, CTX::instance()->mesh.saveAll, - CTX::instance()->mesh.scalingFactor); + CTX::instance()->print.posElement, + CTX::instance()->print.posSICN, CTX::instance()->print.posSIGE, + CTX::instance()->print.posGamma, CTX::instance()->print.posDisto, + CTX::instance()->mesh.saveAll, CTX::instance()->mesh.scalingFactor); break; case FORMAT_GEO: diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index bb81237d857af2181a5af7a5ca9da40d1a6cb13f..0cc4c889c7a901ea29856fb4b442a18a9389d19e 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -1189,8 +1189,9 @@ StringXNumber MeshOptions_Number[] = { { F|O, "QualitySup" , opt_mesh_quality_sup , 0.0 , "Only display elements whose quality measure is smaller than QualitySup" }, { F|O, "QualityType" , opt_mesh_quality_type , 2. , - "Type of quality measure (0=gamma~vol/sum_face/max_edge, " - "1=eta~vol^(2/3)/sum_edge^2, 2=rho~min_edge/max_edge)" }, + "Type of quality measure (0=SICN~signed inverse condition number, " + "1=SIGE~signed inverse gradient error, 2=gamma~vol/sum_face/max_edge, " + "3=Disto~minJ/maxJ"}, { F|O, "RadiusInf" , opt_mesh_radius_inf , 0.0 , "Only display elements whose longest edge is greater than RadiusInf" }, @@ -1756,9 +1757,12 @@ StringXNumber PrintOptions_Number[] = { { F|O, "PostEta" , opt_print_pos_eta , 0. , "Save Eta quality measure in mesh statistics exported as " "post-processing views" }, - { F|O, "PostRho" , opt_print_pos_rho , 0. , - "Save Rho quality measure in mesh statistics exported as " - "post-processing views" }, + { F|O, "PostSICN" , opt_print_pos_SICN , 0. , + "Save SICN (signed inverse condition number) quality measure in mesh " + "statistics exported as post-processing views" }, + { F|O, "PostSICN" , opt_print_pos_SIGE , 0. , + "Save SIGE (signed inverse gradient error) quality measure in mesh " + "statistics exported as post-processing views" }, { F|O, "PostDisto" , opt_print_pos_disto , 0. , "Save Disto quality measure in mesh statistics exported as " "post-processing views" }, diff --git a/Common/Options.cpp b/Common/Options.cpp index fde99c8175c59cfbb89dd2c12deeb50fb9689b10..a92fc16b4526ef5371ce418db17dd4bbeca0609a 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -5158,7 +5158,7 @@ double opt_mesh_quality_type(OPT_ARGS_NUM) if(CTX::instance()->mesh.qualityType != val) CTX::instance()->mesh.changed |= (ENT_LINE | ENT_SURFACE | ENT_VOLUME); CTX::instance()->mesh.qualityType = (int)val; - if(CTX::instance()->mesh.qualityType < 0 || CTX::instance()->mesh.qualityType > 4) + if(CTX::instance()->mesh.qualityType < 0 || CTX::instance()->mesh.qualityType > 3) CTX::instance()->mesh.qualityType = 0; } #if defined(HAVE_FLTK) @@ -9174,11 +9174,18 @@ double opt_print_pos_eta(OPT_ARGS_NUM) return CTX::instance()->print.posEta; } -double opt_print_pos_rho(OPT_ARGS_NUM) +double opt_print_pos_SICN(OPT_ARGS_NUM) { if(action & GMSH_SET) - CTX::instance()->print.posRho = (int)val; - return CTX::instance()->print.posRho; + CTX::instance()->print.posSICN = (int)val; + return CTX::instance()->print.posSICN; +} + +double opt_print_pos_SIGE(OPT_ARGS_NUM) +{ + if(action & GMSH_SET) + CTX::instance()->print.posSIGE = (int)val; + return CTX::instance()->print.posSIGE; } double opt_print_pos_disto(OPT_ARGS_NUM) diff --git a/Common/Options.h b/Common/Options.h index 8a2e7791340e4887a731eca98a3eb4ff64597908..8b4bdbc3c14e5af9c9c45184daf5dc68947a0437 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -718,7 +718,8 @@ double opt_print_pos_elementary(OPT_ARGS_NUM); double opt_print_pos_element(OPT_ARGS_NUM); double opt_print_pos_gamma(OPT_ARGS_NUM); double opt_print_pos_eta(OPT_ARGS_NUM); -double opt_print_pos_rho(OPT_ARGS_NUM); +double opt_print_pos_SICN(OPT_ARGS_NUM); +double opt_print_pos_SIGE(OPT_ARGS_NUM); double opt_print_pos_disto(OPT_ARGS_NUM); double opt_print_gif_dither(OPT_ARGS_NUM); double opt_print_gif_sort(OPT_ARGS_NUM); diff --git a/Fltk/fileDialogs.cpp b/Fltk/fileDialogs.cpp index b0e7ce1e1c36e328819816fbb2a319dede208f61..7250892adaed22d526919038710c9592c969923d 100644 --- a/Fltk/fileDialogs.cpp +++ b/Fltk/fileDialogs.cpp @@ -912,7 +912,7 @@ int meshStatFileDialog(const char *name) { struct _meshStatFileDialog{ Fl_Window *window; - Fl_Check_Button *b[7]; + Fl_Check_Button *b[8]; Fl_Button *ok, *cancel; }; static _meshStatFileDialog *dialog = NULL; @@ -921,7 +921,7 @@ int meshStatFileDialog(const char *name) if(!dialog){ dialog = new _meshStatFileDialog; - int h = 3 * WB + 8 * BH, w = 2 * BBB + 3 * WB, y = WB; + int h = 3 * WB + 9 * BH, w = 2 * BBB + 3 * WB, y = WB; dialog->window = new Fl_Double_Window(w, h, "POS Options"); dialog->window->box(GMSH_WINDOW_BOX); dialog->window->set_modal(); @@ -932,12 +932,14 @@ int meshStatFileDialog(const char *name) dialog->b[2] = new Fl_Check_Button (WB, y, 2 * BBB + WB, BH, "Print element numbers"); y += BH; dialog->b[3] = new Fl_Check_Button - (WB, y, 2 * BBB + WB, BH, "Print Gamma quality measure"); y += BH; + (WB, y, 2 * BBB + WB, BH, "Print SICN quality measure"); y += BH; dialog->b[4] = new Fl_Check_Button - (WB, y, 2 * BBB + WB, BH, "Print Eta quality measure"); y += BH; + (WB, y, 2 * BBB + WB, BH, "Print SIGE quality measure"); y += BH; dialog->b[5] = new Fl_Check_Button - (WB, y, 2 * BBB + WB, BH, "Print Rho quality measure"); y += BH; + (WB, y, 2 * BBB + WB, BH, "Print Gamma quality measure"); y += BH; dialog->b[6] = new Fl_Check_Button + (WB, y, 2 * BBB + WB, BH, "Print Eta quality measure"); y += BH; + dialog->b[7] = new Fl_Check_Button (WB, y, 2 * BBB + WB, BH, "Print Disto quality measure"); y += BH; for(int i = 0; i < 6; i++) dialog->b[i]->type(FL_TOGGLE_BUTTON); @@ -950,9 +952,10 @@ int meshStatFileDialog(const char *name) dialog->b[0]->value(CTX::instance()->mesh.saveAll ? 1 : 0); dialog->b[1]->value(CTX::instance()->print.posElementary ? 1 : 0); dialog->b[2]->value(CTX::instance()->print.posElement ? 1 : 0); - dialog->b[3]->value(CTX::instance()->print.posGamma ? 1 : 0); - dialog->b[4]->value(CTX::instance()->print.posEta ? 1 : 0); - dialog->b[5]->value(CTX::instance()->print.posRho ? 1 : 0); + dialog->b[3]->value(CTX::instance()->print.posSICN ? 1 : 0); + dialog->b[4]->value(CTX::instance()->print.posSIGE ? 1 : 0); + dialog->b[5]->value(CTX::instance()->print.posGamma ? 1 : 0); + dialog->b[6]->value(CTX::instance()->print.posEta ? 1 : 0); dialog->window->show(); while(dialog->window->shown()){ @@ -964,10 +967,13 @@ int meshStatFileDialog(const char *name) opt_mesh_save_all(0, GMSH_SET | GMSH_GUI, dialog->b[0]->value() ? 1 : 0); opt_print_pos_elementary(0, GMSH_SET | GMSH_GUI, dialog->b[1]->value() ? 1 : 0); opt_print_pos_element(0, GMSH_SET | GMSH_GUI, dialog->b[2]->value() ? 1 : 0); - opt_print_pos_gamma(0, GMSH_SET | GMSH_GUI, dialog->b[3]->value() ? 1 : 0); - opt_print_pos_eta(0, GMSH_SET | GMSH_GUI, dialog->b[4]->value() ? 1 : 0); - opt_print_pos_rho(0, GMSH_SET | GMSH_GUI, dialog->b[5]->value() ? 1 : 0); - opt_print_pos_disto(0, GMSH_SET | GMSH_GUI, dialog->b[6]->value() ? 1 : 0); + opt_print_pos_SICN(0, GMSH_SET | GMSH_GUI, + dialog->b[3]->value() ? 1 : 0); + opt_print_pos_SIGE(0, GMSH_SET | GMSH_GUI, + dialog->b[4]->value() ? 1 : 0); + opt_print_pos_gamma(0, GMSH_SET | GMSH_GUI, dialog->b[5]->value() ? 1 : 0); + opt_print_pos_eta(0, GMSH_SET | GMSH_GUI, dialog->b[6]->value() ? 1 : 0); + opt_print_pos_disto(0, GMSH_SET | GMSH_GUI, dialog->b[7]->value() ? 1 : 0); CreateOutputFile(name, FORMAT_POS); dialog->window->hide(); return 1; diff --git a/Fltk/graphicWindow.cpp b/Fltk/graphicWindow.cpp index c4bd9be8692f416807d1c29074c28d08eaffa5c7..f75ecfbacd3d28d0a62d90077a2d63ffb24ec9b7 100644 --- a/Fltk/graphicWindow.cpp +++ b/Fltk/graphicWindow.cpp @@ -2086,8 +2086,7 @@ static std::vector<std::string> getInfoStrings(MElement *ele) std::ostringstream sstream; sstream.precision(12); sstream << " Quality: " - << "gamma = " << ele->gammaShapeMeasure() << " " - << "rho = " << ele->rhoShapeMeasure(); + << "gamma = " << ele->gammaShapeMeasure(); info.push_back(sstream.str()); } { diff --git a/Fltk/optionWindow.cpp b/Fltk/optionWindow.cpp index efa878f7530b20ca034470f7124c38f521b61a49..e2358c070dbbf896caa71cdb692e4f854238cacb 100644 --- a/Fltk/optionWindow.cpp +++ b/Fltk/optionWindow.cpp @@ -2520,7 +2520,6 @@ optionWindow::optionWindow(int deltaFontSize) {"SICN", 0, 0, 0}, {"SIGE", 0, 0, 0}, {"Gamma", 0, 0, 0}, - {"Rho", 0, 0, 0}, {"Disto", 0, 0, 0}, {0} }; diff --git a/Fltk/statisticsWindow.cpp b/Fltk/statisticsWindow.cpp index da79328a8f1b5123fe028555f9cef326bdbd4856..29364f45086ee459462720522910263ff5fd2bb7 100644 --- a/Fltk/statisticsWindow.cpp +++ b/Fltk/statisticsWindow.cpp @@ -20,7 +20,6 @@ enum QM_HISTO {QMH_SICN_XY, QMH_SICN_3D, QMH_GAMMA_XY, QMH_GAMMA_3D, - QMH_RHO_XY, QMH_RHO_3D, QMH_SIGE_XY, QMH_SIGE_3D}; void statistics_cb(Fl_Widget *w, void *data) @@ -53,13 +52,6 @@ static void statistics_histogram_cb(Fl_Widget *w, void *data) } new PView("Gamma", "# Elements", x, y); } - else if (qmh == QMH_RHO_XY) { - for(int i = 0; i < 100; i++){ - x.push_back((double)i / 99); - y.push_back(FlGui::instance()->stats->quality[2][i]); - } - new PView("Rho", "# Elements", x, y); - } else if (qmh == QMH_SIGE_XY) { for(int i = 0; i < 100; i++){ x.push_back((double)(2*i-99) / 99); @@ -79,15 +71,12 @@ static void statistics_histogram_cb(Fl_Widget *w, void *data) d[e->getNum()].push_back(e->minSICNShapeMeasure()); else if (qmh == QMH_GAMMA_3D) d[e->getNum()].push_back(e->gammaShapeMeasure()); - else if (qmh == QMH_RHO_3D) - d[e->getNum()].push_back(e->rhoShapeMeasure()); else if (qmh == QMH_SIGE_3D) d[e->getNum()].push_back(e->minSIGEShapeMeasure()); } } std::string name = (qmh == QMH_SICN_3D) ? "SICN" : (qmh == QMH_GAMMA_3D) ? "Gamma" : - (qmh == QMH_RHO_3D) ? "Rho" : (qmh == QMH_SIGE_3D) ? "SIGE" : ""; new PView(name, "ElementData", GModel::current(), d); } diff --git a/Fltk/statisticsWindow.h b/Fltk/statisticsWindow.h index 7445bef6373e7a2b4908f608dab46b21be528d63..dabbd2afb31e69092b684d679f6a8fde1eddb0c9 100644 --- a/Fltk/statisticsWindow.h +++ b/Fltk/statisticsWindow.h @@ -18,7 +18,7 @@ class statisticsWindow{ Fl_Button *butt[8]; Fl_Group *group[3]; Fl_Box *memUsage; - double quality[4][100]; + double quality[3][100]; public: statisticsWindow(int deltaFontSize); void compute(bool elementQuality); diff --git a/Geo/GModel.h b/Geo/GModel.h index b0f99a3b724d2937e9873201fb8016663bf4a8c4..e292adf43f030b3fc9c63415c21ad805693b6038 100644 --- a/Geo/GModel.h +++ b/Geo/GModel.h @@ -633,8 +633,9 @@ class GModel { // mesh statistics (saved as a Gmsh post-processing view) int writePOS(const std::string &name, bool printElementary, - bool printElementNumber, bool printSICN, bool printGamma, bool printRho, - bool printDisto, bool saveAll=false, double scalingFactor=1.0); + bool printElementNumber, bool printSICN, bool printSIGE, + bool printGamma, bool printDisto, bool saveAll=false, + double scalingFactor=1.0); // Stereo lithography format int readSTL(const std::string &name, double tolerance=1.e-3); diff --git a/Geo/GModelIO_POS.cpp b/Geo/GModelIO_POS.cpp index 10b4fb39a3ad2fd0edc50d9a64f6d6a26ce82016..dfed5982be90e97f84e8a3c9354b09ce597bd951 100644 --- a/Geo/GModelIO_POS.cpp +++ b/Geo/GModelIO_POS.cpp @@ -9,8 +9,8 @@ #include "MElement.h" int GModel::writePOS(const std::string &name, bool printElementary, - bool printElementNumber, bool printSICN, bool printGamma, - bool printRho, bool printDisto, + bool printElementNumber, bool printSICN, bool printSIGE, + bool printGamma, bool printDisto, bool saveAll, double scalingFactor) { FILE *fp = Fopen(name.c_str(), "w"); @@ -36,32 +36,29 @@ int GModel::writePOS(const std::string &name, bool printElementary, } */ - bool f[6] = {printElementary, printElementNumber, printSICN, printGamma, printRho, - printDisto}; - bool first = true; std::string names; - if(f[0]){ + if(printElementary){ if(first) first = false; else names += ","; names += "\"Elementary Entity\""; } - if(f[1]){ + if(printElementNumber){ if(first) first = false; else names += ","; names += "\"Element Number\""; } - if(f[2]){ + if(printSICN){ if(first) first = false; else names += ","; names += "\"SICN\""; } - if(f[3]){ + if(printSIGE){ if(first) first = false; else names += ","; - names += "\"Gamma\""; + names += "\"SIGE\""; } - if(f[4]){ + if(printGamma){ if(first) first = false; else names += ","; - names += "\"Rho\""; + names += "\"Gamma\""; } - if(f[5]){ + if(printDisto){ if(first) first = false; else names += ","; names += "\"Disto\""; } @@ -79,7 +76,8 @@ int GModel::writePOS(const std::string &name, bool printElementary, if(saveAll || entities[i]->physicals.size()) for(unsigned int j = 0; j < entities[i]->getNumMeshElements(); j++) entities[i]->getMeshElement(j)->writePOS - (fp, f[0], f[1], f[2], f[3], f[4], f[5], scalingFactor, entities[i]->tag()); + (fp, printElementary, printElementNumber, printSICN, printSIGE, + printGamma, printDisto, scalingFactor, entities[i]->tag()); fprintf(fp, "};\n"); fclose(fp); diff --git a/Geo/GModelVertexArrays.cpp b/Geo/GModelVertexArrays.cpp index 7b1445e4c28deb404c459759fc2cc7844e498807..02567d774ba73d1a3bd333482b7ec07ee3e0ec22 100644 --- a/Geo/GModelVertexArrays.cpp +++ b/Geo/GModelVertexArrays.cpp @@ -103,10 +103,8 @@ bool isElementVisible(MElement *ele) if(!ele->getVisibility()) return false; if(CTX::instance()->mesh.qualitySup) { double q; - if(CTX::instance()->mesh.qualityType == 4) + if(CTX::instance()->mesh.qualityType == 3) q = ele->distoShapeMeasure(); - else if(CTX::instance()->mesh.qualityType == 3) - q = ele->rhoShapeMeasure(); else if(CTX::instance()->mesh.qualityType == 2) q = ele->gammaShapeMeasure(); else if(CTX::instance()->mesh.qualityType == 1) diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp index 6d7b81afd25a9343bbbf7bccfe584346fc268804..d71b0ff71dac7da7b3b55debdf944470e000bef8 100644 --- a/Geo/MElement.cpp +++ b/Geo/MElement.cpp @@ -116,16 +116,6 @@ double MElement::maxEdge() return m; } -double MElement::rhoShapeMeasure() -{ - double min = minEdge(); - double max = maxEdge(); - if(max) - return min / max; - else - return 0.; -} - double MElement::maxDistToStraight() const { const nodalBasis *lagBasis = getFunctionSpace(); @@ -334,8 +324,7 @@ void MElement::signedInvCondNumRange(double &iCNMin, double &iCNMax, GEntity *ge #endif } -void MElement::signedInvGradErrorRange(double &minSIGE, double &maxSIGE, - GEntity *ge) +void MElement::signedInvGradErrorRange(double &minSIGE, double &maxSIGE) { jacobianBasedQuality::sampleIGEMeasure(this, getPolynomialOrder(), minSIGE, maxSIGE); @@ -1143,7 +1132,7 @@ void MElement::writeMSH2(FILE *fp, double version, bool binary, int num, } void MElement::writePOS(FILE *fp, bool printElementary, bool printElementNumber, - bool printSICN, bool printGamma, bool printRho, + bool printSICN, bool printSIGE, bool printGamma, bool printDisto, double scalingFactor, int elementary) { const char *str = getStringForPOS(); @@ -1177,19 +1166,19 @@ void MElement::writePOS(FILE *fp, bool printElementary, bool printElementNumber, fprintf(fp, "%g", sICNMin); } } - if(printGamma){ - double gamma = gammaShapeMeasure(); + if(printSIGE){ + double sIGEMin = minSIGEShapeMeasure(); for(int i = 0; i < n; i++){ if(first) first = false; else fprintf(fp, ","); - fprintf(fp, "%g", gamma); - //fprintf(fp, "%d", getVertex(i)->getNum()); + fprintf(fp, "%g", sIGEMin); } } - if(printRho){ - double rho = rhoShapeMeasure(); + if(printGamma){ + double gamma = gammaShapeMeasure(); for(int i = 0; i < n; i++){ if(first) first = false; else fprintf(fp, ","); - fprintf(fp, "%g", rho); + fprintf(fp, "%g", gamma); + //fprintf(fp, "%d", getVertex(i)->getNum()); } } if(printDisto){ diff --git a/Geo/MElement.h b/Geo/MElement.h index 9c1318fed98deb755d3a9d8f595800ee24411bcb..20b7f37ffee9b91ce44b6cb17b833d9015387537 100644 --- a/Geo/MElement.h +++ b/Geo/MElement.h @@ -199,7 +199,6 @@ class MElement // get the quality measures double skewness(); - virtual double rhoShapeMeasure(); virtual double gammaShapeMeasure(){ return 0.; } virtual double etaShapeMeasure(){ return 0.; } double minSICNShapeMeasure() @@ -228,7 +227,7 @@ class MElement virtual void scaledJacRange(double &jmin, double &jmax, GEntity *ge = 0) const; virtual void idealJacRange(double &jmin, double &jmax, GEntity *ge = 0); virtual void signedInvCondNumRange(double &iCNMin, double &iCNMax, GEntity *ge = 0); - virtual void signedInvGradErrorRange(double &minSIGE, double &maxSIGE, GEntity *ge = 0); + virtual void signedInvGradErrorRange(double &minSIGE, double &maxSIGE); // get the radius of the inscribed circle/sphere if it exists, // otherwise get the minimum radius of all the circles/spheres @@ -376,7 +375,7 @@ class MElement int parentNum=0, int dom1Num = 0, int dom2Num = 0, std::vector<short> *ghosts=0); virtual void writePOS(FILE *fp, bool printElementary, bool printElementNumber, - bool printSICN, bool printGamma, bool printRho, + bool printSICN, bool printSIGE, bool printGamma, bool printDisto,double scalingFactor=1.0, int elementary=1); virtual void writeSTL(FILE *fp, bool binary=false, double scalingFactor=1.0); virtual void writeVRML(FILE *fp); diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp index a956ebf86d759d75023748331c544e9e61f159e6..abe434ac1c59bd60313349300a1ff41690650417 100644 --- a/Mesh/Generator.cpp +++ b/Mesh/Generator.cpp @@ -119,9 +119,8 @@ template<class T> static void GetQualityMeasure(std::vector<T*> &ele, double &gamma, double &gammaMin, double &gammaMax, double &minSICN, double &minSICNMin, double &minSICNMax, - double &rho, double &rhoMin, double &rhoMax, double &minSIGE, double &minSIGEMin, double &minSIGEMax, - double quality[4][100]) + double quality[3][100]) { for(unsigned int i = 0; i < ele.size(); i++){ double g = ele[i]->gammaShapeMeasure(); @@ -136,20 +135,15 @@ static void GetQualityMeasure(std::vector<T*> &ele, minSIGE += e; minSIGEMin = std::min(minSIGEMin, e); minSIGEMax = std::max(minSIGEMax, e); - double r = ele[i]->rhoShapeMeasure(); - rho += r; - rhoMin = std::min(rhoMin, r); - rhoMax = std::max(rhoMax, r); for(int j = 0; j < 100; j++){ if(s > (2*j-100) / 100. && s <= (2*j-98) / 100.) quality[0][j]++; if(g > j / 100. && g <= (j + 1) / 100.) quality[1][j]++; - if(r > j / 100. && r <= (j + 1) / 100.) quality[2][j]++; - if(e > (2*j-100) / 100. && e <= (2*j-98) / 100.) quality[3][j]++; + if(e > (2*j-100) / 100. && e <= (2*j-98) / 100.) quality[2][j]++; } } } -void GetStatistics(double stat[50], double quality[4][100]) +void GetStatistics(double stat[50], double quality[3][100]) { for(int i = 0; i < 50; i++) stat[i] = 0.; @@ -198,22 +192,21 @@ void GetStatistics(double stat[50], double quality[4][100]) double minSICN = 0., minSICNMin = 1., minSICNMax = -1.; double minSIGE = 0., minSIGEMin = 1., minSIGEMax = -1.; double gamma = 0., gammaMin = 1., gammaMax = 0.; - double rho = 0., rhoMin = 1., rhoMax = 0.; double N = stat[9] + stat[10] + stat[11] + stat[12] + stat[13]; if(N){ // if we have 3D elements for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); ++it){ GetQualityMeasure((*it)->tetrahedra, gamma, gammaMin, gammaMax, - minSICN, minSICNMin, minSICNMax, rho, rhoMin, rhoMax, + minSICN, minSICNMin, minSICNMax, minSIGE, minSIGEMin, minSIGEMax, quality); GetQualityMeasure((*it)->hexahedra, gamma, gammaMin, gammaMax, - minSICN, minSICNMin, minSICNMax, rho, rhoMin, rhoMax, + minSICN, minSICNMin, minSICNMax, minSIGE, minSIGEMin, minSIGEMax, quality); GetQualityMeasure((*it)->prisms, gamma, gammaMin, gammaMax, - minSICN, minSICNMin, minSICNMax, rho, rhoMin, rhoMax, + minSICN, minSICNMin, minSICNMax, minSIGE, minSIGEMin, minSIGEMax, quality); GetQualityMeasure((*it)->pyramids, gamma, gammaMin, gammaMax, - minSICN, minSICNMin, minSICNMax, rho, rhoMin, rhoMax, + minSICN, minSICNMin, minSICNMax, minSIGE, minSIGEMin, minSIGEMax, quality); } } @@ -221,17 +214,16 @@ void GetStatistics(double stat[50], double quality[4][100]) N = stat[7] + stat[8]; for(GModel::fiter it = m->firstFace(); it != m->lastFace(); ++it){ GetQualityMeasure((*it)->quadrangles, gamma, gammaMin, gammaMax, - minSICN, minSICNMin, minSICNMax, rho, rhoMin, rhoMax, + minSICN, minSICNMin, minSICNMax, minSIGE, minSIGEMin, minSIGEMax, quality); GetQualityMeasure((*it)->triangles, gamma, gammaMin, gammaMax, - minSICN, minSICNMin, minSICNMax, rho, rhoMin, rhoMax, + minSICN, minSICNMin, minSICNMax, minSIGE, minSIGEMin, minSIGEMax, quality); } } if(N){ stat[18] = minSICN / N; stat[19] = minSICNMin; stat[20] = minSICNMax; stat[21] = gamma / N; stat[22] = gammaMin; stat[23] = gammaMax; -// stat[24] = rho / N; stat[25] = rhoMin; stat[26] = rhoMax; stat[24] = minSIGE / N; stat[25] = minSIGEMin; stat[26] = minSIGEMax; } } diff --git a/Mesh/meshGRegionDelaunayInsertion.cpp b/Mesh/meshGRegionDelaunayInsertion.cpp index 84a0a1b7dfd88bdc80bf3c82ca8904009d9cac54..7231da70bc8620d058c84a69c645cfda585a572d 100644 --- a/Mesh/meshGRegionDelaunayInsertion.cpp +++ b/Mesh/meshGRegionDelaunayInsertion.cpp @@ -396,7 +396,7 @@ void printTets (const char *fn, std::list<MTet4*> &cavity, bool force = false ) MTet4 *tet = *ittet; if (force || !tet->isDeleted()){ MTetrahedron *t = tet->tet(); - t->writePOS (f, false,false,false,true,false,false); + t->writePOS (f, false,false,false,false,true,false); } ittet++; }