From 8b29e5da62d892a388cf3c7d6f7be36b5be2a7b4 Mon Sep 17 00:00:00 2001 From: Gaetan Bricteux <gaetan.bricteux@uclouvain.be> Date: Wed, 31 Oct 2012 10:48:24 +0000 Subject: [PATCH] remove warnings --- Common/GmshRemote.cpp | 4 +- Common/Options.cpp | 320 +++++++++++++++++-------------- Geo/GEdge.cpp | 16 +- Geo/GFaceCompound.cpp | 4 +- Geo/GModelIO_MSH.cpp | 2 +- Geo/GModelIO_OCC.cpp | 8 +- Geo/MElement.cpp | 8 +- Geo/OCCEdge.cpp | 4 +- Geo/SOrientedBoundingBox.cpp | 4 +- Graphics/drawGeom.cpp | 6 +- Mesh/CenterlineField.cpp | 4 +- Mesh/Field.cpp | 4 +- Mesh/HighOrder.cpp | 2 +- Mesh/Levy3D.cpp | 18 +- Mesh/QuadTriExtruded2D.cpp | 4 +- Mesh/QuadTriExtruded3D.cpp | 28 +-- Mesh/QuadTriUtils.cpp | 10 +- Mesh/Voronoi3D.cpp | 10 +- Mesh/meshGFaceBoundaryLayers.cpp | 4 +- Mesh/meshGFaceOptimize.cpp | 16 +- Mesh/meshGRegion.cpp | 4 +- Mesh/qualityMeasures.cpp | 8 +- Numeric/Numeric.cpp | 12 +- Parser/Gmsh.y | 2 +- Solver/dofManager.cpp | 4 +- contrib/onelab/OnelabClients.cpp | 6 +- 26 files changed, 269 insertions(+), 243 deletions(-) diff --git a/Common/GmshRemote.cpp b/Common/GmshRemote.cpp index e4f3266e15..b00fb19491 100644 --- a/Common/GmshRemote.cpp +++ b/Common/GmshRemote.cpp @@ -133,7 +133,7 @@ static void addToVertexArrays(int length, const char* bytes, int swap) static void gatherAndSendVertexArrays(GmshClient* client, bool swap) { #if defined(HAVE_MPI) - int rank = Msg::GetCommRank(); + //int rank = Msg::GetCommRank(); int nbDaemon = Msg::GetCommSize(); // tell every node to start computing int mpi_msg = MPI_GMSH_COMPUTE_VIEW; @@ -147,7 +147,7 @@ static void gatherAndSendVertexArrays(GmshClient* client, bool swap) MPI_Status status; MPI_Recv(&nbArrays, 1, MPI_INT, MPI_ANY_SOURCE, MPI_GMSH_DATA_READY, MPI_COMM_WORLD, &status); - int source = status.MPI_SOURCE; + //int source = status.MPI_SOURCE; // get each varray in turn, then add it to the varrays of // the master node for (int j = 0; j < nbArrays; j++) { diff --git a/Common/Options.cpp b/Common/Options.cpp index bb2259f97f..78013e28c1 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -883,6 +883,32 @@ void PrintOptionsDoc() opt = view->getOptions(); \ } +#define GET_VIEWo(error_val) \ + PView *view = 0; \ + PViewOptions *opt; \ + if(PView::list.empty()) \ + opt = PViewOptions::reference(); \ + else{ \ + if(num < 0 || num >= (int)PView::list.size()){ \ + Msg::Warning("View[%d] does not exist", num); \ + return (error_val); \ + } \ + view = PView::list[num]; \ + opt = view->getOptions(); \ + } + +#define GET_VIEWd(error_val) \ + PView *view = 0; \ + PViewData *data = 0; \ + if(!PView::list.empty()){ \ + if(num < 0 || num >= (int)PView::list.size()){ \ + Msg::Warning("View[%d] does not exist", num); \ + return (error_val); \ + } \ + view = PView::list[num]; \ + data = view->getData(); \ + } + // String option routines std::string opt_general_axes_label0(OPT_ARGS_STR) @@ -1242,7 +1268,7 @@ int _gui_action_valid(int action, int num) std::string opt_view_name(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWd(""); if(!data) return ""; if(action & GMSH_SET) { data->setName(val); @@ -1275,7 +1301,7 @@ std::string opt_view_name(OPT_ARGS_STR) std::string opt_view_format(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->format = val; } @@ -1292,7 +1318,7 @@ std::string opt_view_format(OPT_ARGS_STR) std::string opt_view_filename(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWd(""); if(!data) return ""; return data->getFileName(); #else @@ -1303,7 +1329,7 @@ std::string opt_view_filename(OPT_ARGS_STR) std::string opt_view_axes_label0(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->axesLabel[0] = val; } @@ -1320,7 +1346,7 @@ std::string opt_view_axes_label0(OPT_ARGS_STR) std::string opt_view_axes_label1(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->axesLabel[1] = val; } @@ -1337,7 +1363,7 @@ std::string opt_view_axes_label1(OPT_ARGS_STR) std::string opt_view_axes_label2(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->axesLabel[2] = val; } @@ -1354,7 +1380,7 @@ std::string opt_view_axes_label2(OPT_ARGS_STR) std::string opt_view_axes_format0(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->axesFormat[0] = val; } @@ -1371,7 +1397,7 @@ std::string opt_view_axes_format0(OPT_ARGS_STR) std::string opt_view_axes_format1(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->axesFormat[1] = val; } @@ -1388,7 +1414,7 @@ std::string opt_view_axes_format1(OPT_ARGS_STR) std::string opt_view_axes_format2(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->axesFormat[2] = val; } @@ -1405,7 +1431,7 @@ std::string opt_view_axes_format2(OPT_ARGS_STR) std::string opt_view_gen_raise0(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->genRaiseX = val; if(view) view->setChanged(true); @@ -1423,7 +1449,7 @@ std::string opt_view_gen_raise0(OPT_ARGS_STR) std::string opt_view_gen_raise1(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->genRaiseY = val; if(view) view->setChanged(true); @@ -1441,7 +1467,7 @@ std::string opt_view_gen_raise1(OPT_ARGS_STR) std::string opt_view_gen_raise2(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->genRaiseZ = val; if(view) view->setChanged(true); @@ -1495,7 +1521,7 @@ void _string2stipple(std::string str, int &repeat, int &pattern) std::string opt_view_stipple0(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->stippleString[0] = val; _string2stipple(opt->stippleString[0], opt->stipple[0][0], opt->stipple[0][1]); @@ -1509,7 +1535,7 @@ std::string opt_view_stipple0(OPT_ARGS_STR) std::string opt_view_stipple1(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->stippleString[1] = val; _string2stipple(opt->stippleString[1], opt->stipple[1][0], opt->stipple[1][1]); @@ -1523,7 +1549,7 @@ std::string opt_view_stipple1(OPT_ARGS_STR) std::string opt_view_stipple2(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->stippleString[2] = val; _string2stipple(opt->stippleString[2], opt->stipple[2][0], opt->stipple[2][1]); @@ -1537,7 +1563,7 @@ std::string opt_view_stipple2(OPT_ARGS_STR) std::string opt_view_stipple3(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->stippleString[3] = val; _string2stipple(opt->stippleString[3], opt->stipple[3][0], opt->stipple[3][1]); @@ -1551,7 +1577,7 @@ std::string opt_view_stipple3(OPT_ARGS_STR) std::string opt_view_stipple4(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->stippleString[4] = val; _string2stipple(opt->stippleString[4], opt->stipple[4][0], opt->stipple[4][1]); @@ -1565,7 +1591,7 @@ std::string opt_view_stipple4(OPT_ARGS_STR) std::string opt_view_stipple5(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->stippleString[5] = val; _string2stipple(opt->stippleString[5], opt->stipple[5][0], opt->stipple[5][1]); @@ -1579,7 +1605,7 @@ std::string opt_view_stipple5(OPT_ARGS_STR) std::string opt_view_stipple6(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->stippleString[6] = val; _string2stipple(opt->stippleString[6], opt->stipple[6][0], opt->stipple[6][1]); @@ -1593,7 +1619,7 @@ std::string opt_view_stipple6(OPT_ARGS_STR) std::string opt_view_stipple7(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->stippleString[7] = val; _string2stipple(opt->stippleString[7], opt->stipple[7][0], opt->stipple[7][1]); @@ -1607,7 +1633,7 @@ std::string opt_view_stipple7(OPT_ARGS_STR) std::string opt_view_stipple8(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->stippleString[8] = val; _string2stipple(opt->stippleString[8], opt->stipple[8][0], opt->stipple[8][1]); @@ -1621,7 +1647,7 @@ std::string opt_view_stipple8(OPT_ARGS_STR) std::string opt_view_stipple9(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) { opt->stippleString[9] = val; _string2stipple(opt->stippleString[9], opt->stipple[9][0], opt->stipple[9][1]); @@ -1635,7 +1661,7 @@ std::string opt_view_stipple9(OPT_ARGS_STR) std::string opt_view_attributes(OPT_ARGS_STR) { #if defined(HAVE_POST) - GET_VIEW(""); + GET_VIEWo(""); if(action & GMSH_SET) opt->attributes = val; return opt->attributes; @@ -5900,7 +5926,7 @@ double opt_post_file_format(OPT_ARGS_NUM) double opt_view_nb_timestep(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWd(0.); if(!data) return 1; #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) @@ -5918,7 +5944,7 @@ double opt_view_nb_timestep(OPT_ARGS_NUM) double opt_view_nb_non_empty_timestep(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWd(0.); if(!data) return 0; int n = 0; for(int i = 0; i < data->getNumTimeSteps(); i++) @@ -5958,7 +5984,7 @@ double opt_view_timestep(OPT_ARGS_NUM) double opt_view_min(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWd(0.); if(!data) return 0.; // use adaptive data if available return view->getData(true)->getMin(); @@ -5970,7 +5996,7 @@ double opt_view_min(OPT_ARGS_NUM) double opt_view_max(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWd(0.); if(!data) return 0.; // use adaptive data if available return view->getData(true)->getMax(); @@ -5982,7 +6008,7 @@ double opt_view_max(OPT_ARGS_NUM) double opt_view_custom_min(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->customMin = val; if(view) view->setChanged(true); @@ -6001,7 +6027,7 @@ double opt_view_custom_min(OPT_ARGS_NUM) double opt_view_custom_max(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->customMax = val; if(view) view->setChanged(true); @@ -6019,7 +6045,7 @@ double opt_view_custom_max(OPT_ARGS_NUM) double opt_view_custom_abscissa_min(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->customAbscissaMin = val; if(view) view->setChanged(true); @@ -6033,7 +6059,7 @@ double opt_view_custom_abscissa_min(OPT_ARGS_NUM) double opt_view_custom_abscissa_max(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->customAbscissaMax = val; if(view) view->setChanged(true); @@ -6047,7 +6073,7 @@ double opt_view_custom_abscissa_max(OPT_ARGS_NUM) double opt_view_xmin(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWd(0.); if(!data) return 0.; return data->getBoundingBox().min().x(); #else @@ -6058,7 +6084,7 @@ double opt_view_xmin(OPT_ARGS_NUM) double opt_view_xmax(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWd(0.); if(!data) return 0.; return data->getBoundingBox().max().x(); #else @@ -6069,7 +6095,7 @@ double opt_view_xmax(OPT_ARGS_NUM) double opt_view_ymin(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWd(0.); if(!data) return 0.; return data->getBoundingBox().min().y(); #else @@ -6080,7 +6106,7 @@ double opt_view_ymin(OPT_ARGS_NUM) double opt_view_ymax(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWd(0.); if(!data) return 0.; return data->getBoundingBox().max().y(); #else @@ -6091,7 +6117,7 @@ double opt_view_ymax(OPT_ARGS_NUM) double opt_view_zmin(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWd(0.); if(!data) return 0.; return data->getBoundingBox().min().z(); #else @@ -6102,7 +6128,7 @@ double opt_view_zmin(OPT_ARGS_NUM) double opt_view_zmax(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWd(0.); if(!data) return 0.; return data->getBoundingBox().max().z(); #else @@ -6113,7 +6139,7 @@ double opt_view_zmax(OPT_ARGS_NUM) double opt_view_offset0(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->offset[0] = val; if(view) view->setChanged(true); @@ -6131,7 +6157,7 @@ double opt_view_offset0(OPT_ARGS_NUM) double opt_view_offset1(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->offset[1] = val; if(view) view->setChanged(true); @@ -6149,7 +6175,7 @@ double opt_view_offset1(OPT_ARGS_NUM) double opt_view_offset2(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->offset[2] = val; if(view) view->setChanged(true); @@ -6167,7 +6193,7 @@ double opt_view_offset2(OPT_ARGS_NUM) double opt_view_raise0(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->raise[0] = val; if(view) view->setChanged(true); @@ -6185,7 +6211,7 @@ double opt_view_raise0(OPT_ARGS_NUM) double opt_view_raise1(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->raise[1] = val; if(view) view->setChanged(true); @@ -6203,7 +6229,7 @@ double opt_view_raise1(OPT_ARGS_NUM) double opt_view_raise2(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->raise[2] = val; if(view) view->setChanged(true); @@ -6221,7 +6247,7 @@ double opt_view_raise2(OPT_ARGS_NUM) double opt_view_normal_raise(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->normalRaise = val; if(view) view->setChanged(true); @@ -6239,7 +6265,7 @@ double opt_view_normal_raise(OPT_ARGS_NUM) double opt_view_transform00(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->transform[0][0] = val; if(view) view->setChanged(true); @@ -6257,7 +6283,7 @@ double opt_view_transform00(OPT_ARGS_NUM) double opt_view_transform01(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->transform[0][1] = val; if(view) view->setChanged(true); @@ -6275,7 +6301,7 @@ double opt_view_transform01(OPT_ARGS_NUM) double opt_view_transform02(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->transform[0][2] = val; if(view) view->setChanged(true); @@ -6293,7 +6319,7 @@ double opt_view_transform02(OPT_ARGS_NUM) double opt_view_transform10(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->transform[1][0] = val; if(view) view->setChanged(true); @@ -6311,7 +6337,7 @@ double opt_view_transform10(OPT_ARGS_NUM) double opt_view_transform11(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->transform[1][1] = val; if(view) view->setChanged(true); @@ -6329,7 +6355,7 @@ double opt_view_transform11(OPT_ARGS_NUM) double opt_view_transform12(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->transform[1][2] = val; if(view) view->setChanged(true); @@ -6347,7 +6373,7 @@ double opt_view_transform12(OPT_ARGS_NUM) double opt_view_transform20(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->transform[2][0] = val; if(view) view->setChanged(true); @@ -6365,7 +6391,7 @@ double opt_view_transform20(OPT_ARGS_NUM) double opt_view_transform21(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->transform[2][1] = val; if(view) view->setChanged(true); @@ -6383,7 +6409,7 @@ double opt_view_transform21(OPT_ARGS_NUM) double opt_view_transform22(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->transform[2][2] = val; if(view) view->setChanged(true); @@ -6401,7 +6427,7 @@ double opt_view_transform22(OPT_ARGS_NUM) double opt_view_arrow_size_min(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->arrowSizeMin = val; } @@ -6418,7 +6444,7 @@ double opt_view_arrow_size_min(OPT_ARGS_NUM) double opt_view_arrow_size_max(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->arrowSizeMax = val; } @@ -6435,7 +6461,7 @@ double opt_view_arrow_size_max(OPT_ARGS_NUM) double opt_view_normals(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->normals = val; } @@ -6452,7 +6478,7 @@ double opt_view_normals(OPT_ARGS_NUM) double opt_view_tangents(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->tangents = val; } @@ -6469,7 +6495,7 @@ double opt_view_tangents(OPT_ARGS_NUM) double opt_view_displacement_factor(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->displacementFactor = val; if(view) view->setChanged(true); @@ -6487,7 +6513,7 @@ double opt_view_displacement_factor(OPT_ARGS_NUM) double opt_view_fake_transparency(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->fakeTransparency = (int)val; if(view) view->setChanged(true); @@ -6505,7 +6531,7 @@ double opt_view_fake_transparency(OPT_ARGS_NUM) double opt_view_explode(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->explode = val; if(view) view->setChanged(true); @@ -6523,7 +6549,7 @@ double opt_view_explode(OPT_ARGS_NUM) double opt_view_visible(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->visible = (int)val; } @@ -6541,7 +6567,7 @@ double opt_view_visible(OPT_ARGS_NUM) double opt_view_intervals_type(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->intervalsType = (int)val; if(opt->intervalsType < 1 || opt->intervalsType > 4) @@ -6562,7 +6588,7 @@ double opt_view_intervals_type(OPT_ARGS_NUM) double opt_view_saturate_values(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->saturateValues = (int)val; if(view) view->setChanged(true); @@ -6654,7 +6680,7 @@ double opt_view_target_error(OPT_ARGS_NUM) double opt_view_type(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->type = (int)val; if(opt->type < 1 || opt->type > 4) @@ -6675,7 +6701,7 @@ double opt_view_type(OPT_ARGS_NUM) double opt_view_auto_position(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->autoPosition = (int)val; if(opt->autoPosition < 0 || opt->autoPosition > 10) @@ -6696,7 +6722,7 @@ double opt_view_auto_position(OPT_ARGS_NUM) double opt_view_position0(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->position[0] = (int)val; } @@ -6713,7 +6739,7 @@ double opt_view_position0(OPT_ARGS_NUM) double opt_view_position1(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->position[1] = (int)val; } @@ -6730,7 +6756,7 @@ double opt_view_position1(OPT_ARGS_NUM) double opt_view_sampling(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->sampling = (int)val; if(view) view->setChanged(true); @@ -6748,7 +6774,7 @@ double opt_view_sampling(OPT_ARGS_NUM) double opt_view_size0(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->size[0] = (int)val; } @@ -6765,7 +6791,7 @@ double opt_view_size0(OPT_ARGS_NUM) double opt_view_size1(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->size[1] = (int)val; } @@ -6782,7 +6808,7 @@ double opt_view_size1(OPT_ARGS_NUM) double opt_view_axes(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->axes = (int)val; if(opt->axes < 0 || opt->axes > 5) @@ -6803,7 +6829,7 @@ double opt_view_axes(OPT_ARGS_NUM) double opt_view_axes_mikado(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->axesMikado = (int)val; } @@ -6821,7 +6847,7 @@ double opt_view_axes_mikado(OPT_ARGS_NUM) double opt_view_axes_auto_position(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->axesAutoPosition = (int)val; } @@ -6840,7 +6866,7 @@ double opt_view_axes_auto_position(OPT_ARGS_NUM) double opt_view_axes_xmin(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->axesPosition[0] = val; } @@ -6858,7 +6884,7 @@ double opt_view_axes_xmin(OPT_ARGS_NUM) double opt_view_axes_xmax(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->axesPosition[1] = val; } @@ -6876,7 +6902,7 @@ double opt_view_axes_xmax(OPT_ARGS_NUM) double opt_view_axes_ymin(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->axesPosition[2] = val; } @@ -6894,7 +6920,7 @@ double opt_view_axes_ymin(OPT_ARGS_NUM) double opt_view_axes_ymax(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->axesPosition[3] = val; } @@ -6912,7 +6938,7 @@ double opt_view_axes_ymax(OPT_ARGS_NUM) double opt_view_axes_zmin(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->axesPosition[4] = val; } @@ -6930,7 +6956,7 @@ double opt_view_axes_zmin(OPT_ARGS_NUM) double opt_view_axes_zmax(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->axesPosition[5] = val; } @@ -6948,7 +6974,7 @@ double opt_view_axes_zmax(OPT_ARGS_NUM) double opt_view_axes_tics0(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->axesTics[0] = val; } @@ -6966,7 +6992,7 @@ double opt_view_axes_tics0(OPT_ARGS_NUM) double opt_view_axes_tics1(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->axesTics[1] = val; } @@ -6984,7 +7010,7 @@ double opt_view_axes_tics1(OPT_ARGS_NUM) double opt_view_axes_tics2(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->axesTics[2] = val; } @@ -7002,7 +7028,7 @@ double opt_view_axes_tics2(OPT_ARGS_NUM) double opt_view_nb_iso(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->nbIso = (int)val; if(view) view->setChanged(true); @@ -7020,7 +7046,7 @@ double opt_view_nb_iso(OPT_ARGS_NUM) double opt_view_boundary(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->boundary = (int)val; if(opt->boundary < 0 || opt->boundary > 3) @@ -7041,7 +7067,7 @@ double opt_view_boundary(OPT_ARGS_NUM) double opt_view_light(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->light = (int)val; if(view) view->setChanged(true); @@ -7061,7 +7087,7 @@ double opt_view_light(OPT_ARGS_NUM) double opt_view_light_two_side(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->lightTwoSide = (int)val; } @@ -7078,7 +7104,7 @@ double opt_view_light_two_side(OPT_ARGS_NUM) double opt_view_light_lines(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->lightLines = (int)val; } @@ -7095,7 +7121,7 @@ double opt_view_light_lines(OPT_ARGS_NUM) double opt_view_smooth_normals(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->smoothNormals = (int)val; if(view) view->setChanged(true); @@ -7113,7 +7139,7 @@ double opt_view_smooth_normals(OPT_ARGS_NUM) double opt_view_angle_smooth_normals(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->angleSmoothNormals = val; if(view) view->setChanged(true); @@ -7131,7 +7157,7 @@ double opt_view_angle_smooth_normals(OPT_ARGS_NUM) double opt_view_show_element(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->showElement = (int)val; if(view) view->setChanged(true); @@ -7149,7 +7175,7 @@ double opt_view_show_element(OPT_ARGS_NUM) double opt_view_show_time(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->showTime = (int)val; if(opt->showTime < 0 || opt->showTime > 4) @@ -7168,7 +7194,7 @@ double opt_view_show_time(OPT_ARGS_NUM) double opt_view_show_scale(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->showScale = (int)val; } @@ -7185,7 +7211,7 @@ double opt_view_show_scale(OPT_ARGS_NUM) double opt_view_draw_strings(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->drawStrings = (int)val; } @@ -7202,7 +7228,7 @@ double opt_view_draw_strings(OPT_ARGS_NUM) double opt_view_draw_points(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->drawPoints = (int)val; if(view) view->setChanged(true); @@ -7224,7 +7250,7 @@ double opt_view_draw_points(OPT_ARGS_NUM) double opt_view_draw_lines(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->drawLines = (int)val; if(view) view->setChanged(true); @@ -7246,7 +7272,7 @@ double opt_view_draw_lines(OPT_ARGS_NUM) double opt_view_draw_triangles(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->drawTriangles = (int)val; if(view) view->setChanged(true); @@ -7268,7 +7294,7 @@ double opt_view_draw_triangles(OPT_ARGS_NUM) double opt_view_draw_quadrangles(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->drawQuadrangles = (int)val; if(view) view->setChanged(true); @@ -7290,7 +7316,7 @@ double opt_view_draw_quadrangles(OPT_ARGS_NUM) double opt_view_draw_tetrahedra(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->drawTetrahedra = (int)val; if(view) view->setChanged(true); @@ -7312,7 +7338,7 @@ double opt_view_draw_tetrahedra(OPT_ARGS_NUM) double opt_view_draw_hexahedra(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->drawHexahedra = (int)val; if(view) view->setChanged(true); @@ -7334,7 +7360,7 @@ double opt_view_draw_hexahedra(OPT_ARGS_NUM) double opt_view_draw_prisms(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->drawPrisms = (int)val; if(view) view->setChanged(true); @@ -7356,7 +7382,7 @@ double opt_view_draw_prisms(OPT_ARGS_NUM) double opt_view_draw_pyramids(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->drawPyramids = (int)val; if(view) view->setChanged(true); @@ -7378,7 +7404,7 @@ double opt_view_draw_pyramids(OPT_ARGS_NUM) double opt_view_draw_scalars(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->drawScalars = (int)val; if(view) view->setChanged(true); @@ -7400,7 +7426,7 @@ double opt_view_draw_scalars(OPT_ARGS_NUM) double opt_view_draw_vectors(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->drawVectors = (int)val; if(view) view->setChanged(true); @@ -7422,7 +7448,7 @@ double opt_view_draw_vectors(OPT_ARGS_NUM) double opt_view_draw_tensors(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->drawTensors = (int)val; if(view) view->setChanged(true); @@ -7444,7 +7470,7 @@ double opt_view_draw_tensors(OPT_ARGS_NUM) double opt_view_draw_skin_only(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->drawSkinOnly = (int)val; if(view) view->setChanged(true); @@ -7462,7 +7488,7 @@ double opt_view_draw_skin_only(OPT_ARGS_NUM) double opt_view_scale_type(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->scaleType = (int)val; if(opt->scaleType < 1 || opt->scaleType > 3) @@ -7483,7 +7509,7 @@ double opt_view_scale_type(OPT_ARGS_NUM) double opt_view_range_type(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->rangeType = (int)val; if(opt->rangeType < 1 || opt->rangeType > 3) @@ -7505,7 +7531,7 @@ double opt_view_range_type(OPT_ARGS_NUM) double opt_view_abscissa_range_type(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->abscissaRangeType = (int)val; if(opt->abscissaRangeType < 1 || opt->abscissaRangeType > 3) @@ -7521,7 +7547,7 @@ double opt_view_abscissa_range_type(OPT_ARGS_NUM) double opt_view_tensor_type(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->tensorType = (int)val; if(opt->tensorType > 6 || opt->tensorType < 1) @@ -7542,7 +7568,7 @@ double opt_view_tensor_type(OPT_ARGS_NUM) double opt_view_vector_type(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->vectorType = (int)val; if(opt->vectorType < 1 || opt->vectorType > 6) @@ -7563,7 +7589,7 @@ double opt_view_vector_type(OPT_ARGS_NUM) double opt_view_glyph_location(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->glyphLocation = (int)val; if(opt->glyphLocation < 1 || opt->glyphLocation > 2) @@ -7584,7 +7610,7 @@ double opt_view_glyph_location(OPT_ARGS_NUM) double opt_view_center_glyphs(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->centerGlyphs = (int)val; if(opt->centerGlyphs < 0 || opt->centerGlyphs > 2) @@ -7605,7 +7631,7 @@ double opt_view_center_glyphs(OPT_ARGS_NUM) double opt_view_point_size(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->pointSize = val; } @@ -7622,7 +7648,7 @@ double opt_view_point_size(OPT_ARGS_NUM) double opt_view_line_width(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->lineWidth = val; } @@ -7639,7 +7665,7 @@ double opt_view_line_width(OPT_ARGS_NUM) double opt_view_point_type(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->pointType = (int)val; if(opt->pointType < 0 || opt->pointType > 3) @@ -7660,7 +7686,7 @@ double opt_view_point_type(OPT_ARGS_NUM) double opt_view_line_type(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->lineType = (int)val; if(opt->lineType < 0 || opt->lineType > 2) @@ -7681,7 +7707,7 @@ double opt_view_line_type(OPT_ARGS_NUM) double opt_view_colormap_alpha(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->colorTable.dpar[COLORTABLE_ALPHA] = val; ColorTable_Recompute(&opt->colorTable); @@ -7701,7 +7727,7 @@ double opt_view_colormap_alpha(OPT_ARGS_NUM) double opt_view_colormap_alpha_power(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->colorTable.dpar[COLORTABLE_ALPHAPOW] = val; ColorTable_Recompute(&opt->colorTable); @@ -7721,7 +7747,7 @@ double opt_view_colormap_alpha_power(OPT_ARGS_NUM) double opt_view_colormap_beta(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->colorTable.dpar[COLORTABLE_BETA] = val; ColorTable_Recompute(&opt->colorTable); @@ -7741,7 +7767,7 @@ double opt_view_colormap_beta(OPT_ARGS_NUM) double opt_view_colormap_bias(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->colorTable.dpar[COLORTABLE_BIAS] = val; ColorTable_Recompute(&opt->colorTable); @@ -7761,7 +7787,7 @@ double opt_view_colormap_bias(OPT_ARGS_NUM) double opt_view_colormap_curvature(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->colorTable.dpar[COLORTABLE_CURVATURE] = val; ColorTable_Recompute(&opt->colorTable); @@ -7781,7 +7807,7 @@ double opt_view_colormap_curvature(OPT_ARGS_NUM) double opt_view_colormap_invert(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->colorTable.ipar[COLORTABLE_INVERT] = (int)val; ColorTable_Recompute(&opt->colorTable); @@ -7801,7 +7827,7 @@ double opt_view_colormap_invert(OPT_ARGS_NUM) double opt_view_colormap_number(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->colorTable.ipar[COLORTABLE_NUMBER] = (int)val; ColorTable_Recompute(&opt->colorTable); @@ -7821,7 +7847,7 @@ double opt_view_colormap_number(OPT_ARGS_NUM) double opt_view_colormap_rotation(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->colorTable.ipar[COLORTABLE_ROTATION] = (int)val; ColorTable_Recompute(&opt->colorTable); @@ -7841,7 +7867,7 @@ double opt_view_colormap_rotation(OPT_ARGS_NUM) double opt_view_colormap_swap(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->colorTable.ipar[COLORTABLE_SWAP] = (int)val; ColorTable_Recompute(&opt->colorTable); @@ -7861,7 +7887,7 @@ double opt_view_colormap_swap(OPT_ARGS_NUM) double opt_view_external_view(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->externalViewIndex = (int)val; if(view) view->setChanged(true); @@ -7885,7 +7911,7 @@ double opt_view_external_view(OPT_ARGS_NUM) double opt_view_gen_raise_view(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->viewIndexForGenRaise = (int)val; if(view) view->setChanged(true); @@ -7909,7 +7935,7 @@ double opt_view_gen_raise_view(OPT_ARGS_NUM) double opt_view_gen_raise_factor(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->genRaiseFactor = val; if(view) view->setChanged(true); @@ -7927,7 +7953,7 @@ double opt_view_gen_raise_factor(OPT_ARGS_NUM) double opt_view_use_gen_raise(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->useGenRaise = (int)val; if(view) view->setChanged(true); @@ -7947,7 +7973,7 @@ double opt_view_use_gen_raise(OPT_ARGS_NUM) double opt_view_use_stipple(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->useStipple = (int)val; } @@ -7965,7 +7991,7 @@ double opt_view_use_stipple(OPT_ARGS_NUM) double opt_view_clip(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->clip = (int)val; } @@ -7983,7 +8009,7 @@ double opt_view_clip(OPT_ARGS_NUM) double opt_view_force_num_components(OPT_ARGS_NUM) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->forceNumComponents = (int)val; if(view) view->setChanged(true); @@ -8009,7 +8035,7 @@ double opt_view_force_num_components(OPT_ARGS_NUM) static double ovcm(OPT_ARGS_NUM, int nn) { #if defined(HAVE_POST) - GET_VIEW(0.); + GET_VIEWo(0.); if(action & GMSH_SET) { opt->componentMap[nn] = (int)val; if(view) view->setChanged(true); @@ -8652,7 +8678,7 @@ unsigned int opt_mesh_color_19(OPT_ARGS_COL){ return opt_mesh_color_(19, num, ac unsigned int opt_view_color_points(OPT_ARGS_COL) { #if defined(HAVE_POST) - GET_VIEW(0); + GET_VIEWo(0); if(action & GMSH_SET) { opt->color.point = val; if(view) view->setChanged(true); @@ -8671,7 +8697,7 @@ unsigned int opt_view_color_points(OPT_ARGS_COL) unsigned int opt_view_color_lines(OPT_ARGS_COL) { #if defined(HAVE_POST) - GET_VIEW(0); + GET_VIEWo(0); if(action & GMSH_SET) { opt->color.line = val; if(view) view->setChanged(true); @@ -8690,7 +8716,7 @@ unsigned int opt_view_color_lines(OPT_ARGS_COL) unsigned int opt_view_color_triangles(OPT_ARGS_COL) { #if defined(HAVE_POST) - GET_VIEW(0); + GET_VIEWo(0); if(action & GMSH_SET) { opt->color.triangle = val; if(view) view->setChanged(true); @@ -8709,7 +8735,7 @@ unsigned int opt_view_color_triangles(OPT_ARGS_COL) unsigned int opt_view_color_quadrangles(OPT_ARGS_COL) { #if defined(HAVE_POST) - GET_VIEW(0); + GET_VIEWo(0); if(action & GMSH_SET) { opt->color.quadrangle = val; if(view) view->setChanged(true); @@ -8728,7 +8754,7 @@ unsigned int opt_view_color_quadrangles(OPT_ARGS_COL) unsigned int opt_view_color_tetrahedra(OPT_ARGS_COL) { #if defined(HAVE_POST) - GET_VIEW(0); + GET_VIEWo(0); if(action & GMSH_SET) { opt->color.tetrahedron = val; if(view) view->setChanged(true); @@ -8747,7 +8773,7 @@ unsigned int opt_view_color_tetrahedra(OPT_ARGS_COL) unsigned int opt_view_color_hexahedra(OPT_ARGS_COL) { #if defined(HAVE_POST) - GET_VIEW(0); + GET_VIEWo(0); if(action & GMSH_SET) { opt->color.hexahedron = val; if(view) view->setChanged(true); @@ -8766,7 +8792,7 @@ unsigned int opt_view_color_hexahedra(OPT_ARGS_COL) unsigned int opt_view_color_prisms(OPT_ARGS_COL) { #if defined(HAVE_POST) - GET_VIEW(0); + GET_VIEWo(0); if(action & GMSH_SET) { opt->color.prism = val; if(view) view->setChanged(true); @@ -8785,7 +8811,7 @@ unsigned int opt_view_color_prisms(OPT_ARGS_COL) unsigned int opt_view_color_pyramids(OPT_ARGS_COL) { #if defined(HAVE_POST) - GET_VIEW(0); + GET_VIEWo(0); if(action & GMSH_SET) { opt->color.pyramid = val; if(view) view->setChanged(true); @@ -8804,7 +8830,7 @@ unsigned int opt_view_color_pyramids(OPT_ARGS_COL) unsigned int opt_view_color_tangents(OPT_ARGS_COL) { #if defined(HAVE_POST) - GET_VIEW(0); + GET_VIEWo(0); if(action & GMSH_SET) { opt->color.tangents = val; if(view) view->setChanged(true); @@ -8823,7 +8849,7 @@ unsigned int opt_view_color_tangents(OPT_ARGS_COL) unsigned int opt_view_color_normals(OPT_ARGS_COL) { #if defined(HAVE_POST) - GET_VIEW(0); + GET_VIEWo(0); if(action & GMSH_SET) { opt->color.normals = val; if(view) view->setChanged(true); @@ -8842,7 +8868,7 @@ unsigned int opt_view_color_normals(OPT_ARGS_COL) unsigned int opt_view_color_text2d(OPT_ARGS_COL) { #if defined(HAVE_POST) - GET_VIEW(0); + GET_VIEWo(0); if(action & GMSH_SET) { opt->color.text2d = val; } @@ -8861,7 +8887,7 @@ unsigned int opt_view_color_text2d(OPT_ARGS_COL) unsigned int opt_view_color_text3d(OPT_ARGS_COL) { #if defined(HAVE_POST) - GET_VIEW(0); + GET_VIEWo(0); if(action & GMSH_SET) { opt->color.text3d = val; } @@ -8880,7 +8906,7 @@ unsigned int opt_view_color_text3d(OPT_ARGS_COL) unsigned int opt_view_color_axes(OPT_ARGS_COL) { #if defined(HAVE_POST) - GET_VIEW(0); + GET_VIEWo(0); if(action & GMSH_SET) { opt->color.axes = val; } @@ -8899,7 +8925,7 @@ unsigned int opt_view_color_axes(OPT_ARGS_COL) unsigned int opt_view_color_background2d(OPT_ARGS_COL) { #if defined(HAVE_POST) - GET_VIEW(0); + GET_VIEWo(0); if(action & GMSH_SET) { opt->color.background2d = val; } diff --git a/Geo/GEdge.cpp b/Geo/GEdge.cpp index 951ce31cc6..7869568f55 100644 --- a/Geo/GEdge.cpp +++ b/Geo/GEdge.cpp @@ -411,7 +411,7 @@ bool GEdge::XYZToU(const double X, const double Y, const double Z, const int MaxIter = 25; const int NumInitGuess = 11; - double err, err2; + double err;//, err2; int iter; Range<double> uu = parBounds(0); @@ -428,27 +428,27 @@ bool GEdge::XYZToU(const double X, const double Y, const double Z, for(int i = 0; i < NumInitGuess; i++){ u = init[i]; double uNew = u; - err = 1.0; + //err2 = 1.0; iter = 1; SVector3 dPQ = P - Q; - err2 = dPQ.norm(); + err = dPQ.norm(); - if (err2 < 1.e-8 * CTX::instance()->lc) return true; + if (err < 1.e-8 * CTX::instance()->lc) return true; - while(iter++ < MaxIter && err2 > 1e-8 * CTX::instance()->lc) { + while(iter++ < MaxIter && err > 1e-8 * CTX::instance()->lc) { SVector3 der = firstDer(u); uNew = u - relax * dot(dPQ,der) / dot(der,der); uNew = std::min(uMax,std::max(uMin,uNew)); P = position(uNew); dPQ = P - Q; - err2 = dPQ.norm(); - err = fabs(uNew - u); + err = dPQ.norm(); + //err2 = fabs(uNew - u); u = uNew; } - if (err2 < 1e-8 * CTX::instance()->lc) return true; + if (err < 1e-8 * CTX::instance()->lc) return true; } if(relax > 1.e-2) { diff --git a/Geo/GFaceCompound.cpp b/Geo/GFaceCompound.cpp index 4933261cb6..5e9b7786a5 100644 --- a/Geo/GFaceCompound.cpp +++ b/Geo/GFaceCompound.cpp @@ -1345,7 +1345,7 @@ SPoint2 GFaceCompound::getCoordinates(MVertex *v) const // for the Edge, find the left and right vertices of the initial // 1D mesh and interpolate to find (u,v) - MVertex *vL = v0; + //MVertex *vL = v0; MVertex *vR = v1; double tB = ge->parBounds(0).low(); double tE = ge->parBounds(0).high(); @@ -1371,7 +1371,7 @@ SPoint2 GFaceCompound::getCoordinates(MVertex *v) const } else{ itL = coordinates.find(vR); - vL = vR; + //vL = vR; tL = tR; } j++; diff --git a/Geo/GModelIO_MSH.cpp b/Geo/GModelIO_MSH.cpp index d59ebe1ea5..8d95a61769 100644 --- a/Geo/GModelIO_MSH.cpp +++ b/Geo/GModelIO_MSH.cpp @@ -253,7 +253,7 @@ int GModel::readMSH(const std::string &name) } } else{ - if(fread(&data[0], sizeof(int), numData, fp) != numData) return 0; + if((int) fread(&data[0], sizeof(int), numData, fp) != numData) return 0; if(swap) SwapBytes((char*)&data[0], sizeof(int), numData); } } diff --git a/Geo/GModelIO_OCC.cpp b/Geo/GModelIO_OCC.cpp index 45aabe1ebc..8bfbc5710f 100644 --- a/Geo/GModelIO_OCC.cpp +++ b/Geo/GModelIO_OCC.cpp @@ -815,10 +815,10 @@ void OCC_Internals::applyBooleanOperator(TopoDS_Shape tool, const BooleanOperato TopTools_ListOfShape listShapeC; addSimpleShapes(C, listShapeC); TopTools_ListIteratorOfListOfShape itSubC(listShapeC); - bool isOnlySolids = true; + //bool isOnlySolids = true; for(; itSubC.More(); itSubC.Next()) { TopoDS_Shape aValueC = itSubC.Value(); - if(aValueC.ShapeType() != TopAbs_SOLID) isOnlySolids = false; + //if(aValueC.ShapeType() != TopAbs_SOLID) isOnlySolids = false; } // if(isOnlySolids) // theNewShape = GlueFaces(C, Precision::Confusion()); @@ -874,10 +874,10 @@ void OCC_Internals::applyBooleanOperator(TopoDS_Shape tool, const BooleanOperato TopTools_ListOfShape listShapeC; addSimpleShapes(C, listShapeC); TopTools_ListIteratorOfListOfShape itSubC(listShapeC); - bool isOnlySolids = true; + //bool isOnlySolids = true; for(; itSubC.More(); itSubC.Next()) { TopoDS_Shape aValueC = itSubC.Value(); - if(aValueC.ShapeType() != TopAbs_SOLID) isOnlySolids = false; + //if(aValueC.ShapeType() != TopAbs_SOLID) isOnlySolids = false; } // if(isOnlySolids) // theNewShape = GlueFaces(C, Precision::Confusion()); diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp index 9b7280cc16..01d70c6917 100644 --- a/Geo/MElement.cpp +++ b/Geo/MElement.cpp @@ -755,7 +755,7 @@ void MElement::writeMSH(FILE *fp, bool binary, int entity, if(!binary){ fprintf(fp, "%d %d %d %d", num, type, entity, numData); - for(unsigned int i = 0; i < numData; i++) + for(int i = 0; i < numData; i++) fprintf(fp, " %d", data[i]); fprintf(fp, "\n"); } @@ -1522,7 +1522,7 @@ MElement *MElementFactory::create(int num, int type, const std::vector<int> &dat } std::vector<MVertex*> vertices(numVertices); - if(data.size() > startVertices + numVertices - 1){ + if((int) data.size() > startVertices + numVertices - 1){ for(int i = 0; i < numVertices; i++){ int numVertex = data[startVertices + i]; MVertex *v = model->getMeshVertexByTag(numVertex); @@ -1551,9 +1551,9 @@ MElement *MElementFactory::create(int num, int type, const std::vector<int> &dat } std::vector<short> ghosts; - if(data.size() > startPartitions){ + if((int) data.size() > startPartitions){ int numPartitions = data[startPartitions]; - if(numPartitions > 0 && data.size() > startPartitions + numPartitions - 1){ + if(numPartitions > 0 && (int) data.size() > startPartitions + numPartitions - 1){ part = data[startPartitions + 1]; for(int i = 1; i < numPartitions; i++) ghosts.push_back(data[startPartitions + 1 + i]); diff --git a/Geo/OCCEdge.cpp b/Geo/OCCEdge.cpp index 43759e3e82..59417f39cf 100644 --- a/Geo/OCCEdge.cpp +++ b/Geo/OCCEdge.cpp @@ -317,8 +317,8 @@ void OCCEdge::replaceEndingPointsInternals(GVertex *g0, GVertex *g1) Standard_Real aTol; BRep_Builder aBB; TopoDS_Edge E; - TopAbs_Orientation anOrE; - anOrE = c.Orientation(); + //TopAbs_Orientation anOrE; + //anOrE = c.Orientation(); aTol = BRep_Tool::Tolerance(c); E = aEx; E.EmptyCopy(); diff --git a/Geo/SOrientedBoundingBox.cpp b/Geo/SOrientedBoundingBox.cpp index 9fbd032a7f..f419aba855 100644 --- a/Geo/SOrientedBoundingBox.cpp +++ b/Geo/SOrientedBoundingBox.cpp @@ -285,13 +285,13 @@ SOrientedBoundingBox* SOrientedBoundingBox::buildOBB(std::vector<SPoint3> vertic } } - double means[3]; + //double means[3]; double sizes[3]; // Note: the size is computed in the box's coordinates! for(int i = 0 ; i < 3 ; i++) { sizes[i] = maxs(i) - mins(i); - means[i] = (maxs(i) - mins(i)) / 2.; + //means[i] = (maxs(i) - mins(i)) / 2.; } /* Msg::Debug("Sizes : %f %f %f",sizes[0],sizes[1], sizes[2]); diff --git a/Graphics/drawGeom.cpp b/Graphics/drawGeom.cpp index 07b43513d1..987d9f96f3 100644 --- a/Graphics/drawGeom.cpp +++ b/Graphics/drawGeom.cpp @@ -337,9 +337,9 @@ class drawGFace { f->buildRepresentationCross(); if(CTX::instance()->geom.surfaces) { - bool selected = false; - if (f->getSelection() || (f->getCompound() && f->getCompound()->getSelection())) - selected = true; + //bool selected = false; + //if (f->getSelection() || (f->getCompound() && f->getCompound()->getSelection())) + //selected = true; if(CTX::instance()->geom.surfaceType > 0 && f->va_geom_triangles){ _drawVertexArray(f->va_geom_triangles, CTX::instance()->geom.light, f->getSelection(), CTX::instance()->color.geom.selection); diff --git a/Mesh/CenterlineField.cpp b/Mesh/CenterlineField.cpp index d6bc9feeab..354eacbdd1 100644 --- a/Mesh/CenterlineField.cpp +++ b/Mesh/CenterlineField.cpp @@ -761,8 +761,8 @@ void Centerline::extrudeBoundaryLayerWall(GEdge* gin, std::vector<GEdge*> boundE if (dot(ne,nc) < 0) dir = 1; if (dir ==1 && hLayer > 0 ) hLayer *= -1.0; - int shift = 0; - if(is_cut) shift = NE; + //int shift = 0; + //if(is_cut) shift = NE; for (int i= 0; i< NF; i++){ GFace *gfc ; if (is_cut) gfc = current->getFaceByTag(NF+i+1); diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp index 83278e98a2..efb78c8a9e 100644 --- a/Mesh/Field.cpp +++ b/Mesh/Field.cpp @@ -1868,12 +1868,12 @@ double BoundaryLayerField::operator() (double x, double y, double z, GEntity *ge } double dist = 1.e22; - AttractorField *cc; + //AttractorField *cc; for (std::list<AttractorField*>::iterator it = _att_fields.begin(); it != _att_fields.end(); ++it){ double cdist = (*(*it)) (x, y, z); if (cdist < dist){ - cc = *it; + //cc = *it; dist = cdist; } } diff --git a/Mesh/HighOrder.cpp b/Mesh/HighOrder.cpp index 746bff9db9..a49a21a27c 100644 --- a/Mesh/HighOrder.cpp +++ b/Mesh/HighOrder.cpp @@ -1097,7 +1097,7 @@ static void setHighOrder(GRegion *gr, edgeContainer &edgeVertices, vq.push_back(ve[6*nPts + q]); vq.push_back(ve[7*nPts + q]); - int triverts = nPts*(nPts-1)/2; + //int triverts = nPts*(nPts-1)/2; if (nPts-q == 4) for (int f = 0; f < 12; f++) diff --git a/Mesh/Levy3D.cpp b/Mesh/Levy3D.cpp index 480208c9c4..1569811400 100644 --- a/Mesh/Levy3D.cpp +++ b/Mesh/Levy3D.cpp @@ -1057,7 +1057,7 @@ SVector3 LpCVT::simple(VoronoiElement element,int p){ SVector3 LpCVT::dF_dC1(VoronoiElement element,int p){ int i; - double u,v,w; + double u;//,v,w; double comp_x,comp_y,comp_z; double weight; double rho; @@ -1086,8 +1086,8 @@ SVector3 LpCVT::dF_dC1(VoronoiElement element,int p){ for(i=0;i<gauss_num;i++){ u = gauss_points(i,0); - v = gauss_points(i,1); - w = gauss_points(i,2); + //v = gauss_points(i,1); + //w = gauss_points(i,2); weight = gauss_weights(i); rho = rho_cache[i]; drho_dx = drho_dx_cache[i]; @@ -1109,7 +1109,7 @@ SVector3 LpCVT::dF_dC1(VoronoiElement element,int p){ SVector3 LpCVT::dF_dC2(VoronoiElement element,int p){ int i; - double u,v,w; + double v;//u,v,w; double comp_x,comp_y,comp_z; double weight; double rho; @@ -1137,9 +1137,9 @@ SVector3 LpCVT::dF_dC2(VoronoiElement element,int p){ gz = generator.z(); for(i=0;i<gauss_num;i++){ - u = gauss_points(i,0); + //u = gauss_points(i,0); v = gauss_points(i,1); - w = gauss_points(i,2); + //w = gauss_points(i,2); weight = gauss_weights(i); rho = rho_cache[i]; drho_dx = drho_dx_cache[i]; @@ -1161,7 +1161,7 @@ SVector3 LpCVT::dF_dC2(VoronoiElement element,int p){ SVector3 LpCVT::dF_dC3(VoronoiElement element,int p){ int i; - double u,v,w; + double w;//u,v,w; double comp_x,comp_y,comp_z; double weight; double rho; @@ -1189,8 +1189,8 @@ SVector3 LpCVT::dF_dC3(VoronoiElement element,int p){ gz = generator.z(); for(i=0;i<gauss_num;i++){ - u = gauss_points(i,0); - v = gauss_points(i,1); + //u = gauss_points(i,0); + //v = gauss_points(i,1); w = gauss_points(i,2); weight = gauss_weights(i); rho = rho_cache[i]; diff --git a/Mesh/QuadTriExtruded2D.cpp b/Mesh/QuadTriExtruded2D.cpp index a84bf0ba14..1f609d88c8 100644 --- a/Mesh/QuadTriExtruded2D.cpp +++ b/Mesh/QuadTriExtruded2D.cpp @@ -507,7 +507,7 @@ int MeshQuadToTriTopSurface( GFace *from, GFace *to, std::set<MVertex*, // count vertices that are on a boundary edge int edge_verts_count = 0; - int skip_index = 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() ){ @@ -515,7 +515,7 @@ int MeshQuadToTriTopSurface( GFace *from, GFace *to, std::set<MVertex*, bnd_indices[p] = 1; } else{ - skip_index = p; + //skip_index = p; bnd_indices[p] = 0; } } diff --git a/Mesh/QuadTriExtruded3D.cpp b/Mesh/QuadTriExtruded3D.cpp index f74c59b8ca..0bbb51d970 100644 --- a/Mesh/QuadTriExtruded3D.cpp +++ b/Mesh/QuadTriExtruded3D.cpp @@ -609,14 +609,14 @@ static void bruteForceEdgeQuadToTriPrism( GRegion *gr, MElement *elem, } // verify number of vertices - int n_lat; + //int n_lat; if( verts.size() != 6 ){ Msg::Error("In bruteForceEdgeQuadToTriPrism(), number of vertices not equal " "6."); return; } - else - n_lat = 3; + //else + //n_lat = 3; // NOTE THAT FACES ARE NUMBERED CONSECUTIVELY FROM 0, starting from vertex 0 and moving around laterally. @@ -2101,13 +2101,13 @@ static void bruteForceEdgeQuadToTriHexa( GRegion *gr, MElement *elem, } // verify number of vertices - int n_lat; + //int n_lat; if( verts.size() != 8 ){ Msg::Error("In bruteForceEdgeQuadToTriHexa(), number of vertices not equal 8."); return; } - else - n_lat = 4; + //else + //n_lat = 4; // numbers of each type of face //int num_degen = face_types["degen"].size(); @@ -4315,7 +4315,7 @@ static inline void QuadToTriPriPyrTet(std::vector<MVertex*> &v, GRegion *to, int ExtrudeParams *ep = to->meshAttributes.extrude; // need these for double layer extrusion purposes - unsigned int j_second_from_top = 0, k_second_from_top = 0; + /*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; @@ -4325,7 +4325,7 @@ static inline void QuadToTriPriPyrTet(std::vector<MVertex*> &v, GRegion *to, int 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; @@ -4825,10 +4825,10 @@ static inline bool createFullHexElems( std::vector<MVertex*> &v, GRegion *to, Ex int pyramid_top = -1, base_face_1 = -1; // variables to hold pyramid base corners and diagonal node indices: - int b1_diag[2], b2_diag[2], b3_diag[2]; + /*int 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 @@ -5494,7 +5494,7 @@ bool QuadToTriCreateElements(GRegion *to, CategorizedSourceElements &cat_src_el is_dbl = true; // Find where top divided layer starts - int j_top_start = 0, k_top_start = 0; + /*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; @@ -5508,10 +5508,10 @@ bool QuadToTriCreateElements(GRegion *to, CategorizedSourceElements &cat_src_el 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, + /*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; @@ -5520,7 +5520,7 @@ bool QuadToTriCreateElements(GRegion *to, CategorizedSourceElements &cat_src_el 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) diff --git a/Mesh/QuadTriUtils.cpp b/Mesh/QuadTriUtils.cpp index cb3b19226b..391307de91 100644 --- a/Mesh/QuadTriUtils.cpp +++ b/Mesh/QuadTriUtils.cpp @@ -496,9 +496,9 @@ int IsSurfaceALateralForRegion(GRegion *region, GFace *face) 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)); + //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) ); @@ -540,12 +540,12 @@ int IsSurfaceALateralForRegion(GRegion *region, GFace *face) bool edge_found = false; int common_count = 0; - GEdge *common_edge = NULL; + //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_edge = (*ite); common_count++; if( common_count > 1 ) return 0; diff --git a/Mesh/Voronoi3D.cpp b/Mesh/Voronoi3D.cpp index 7f8933fc06..6c9ae4865c 100644 --- a/Mesh/Voronoi3D.cpp +++ b/Mesh/Voronoi3D.cpp @@ -99,9 +99,9 @@ void clip::execute(std::vector<SPoint3>& vertices,std::vector<VoronoiElement>& c double min_x,max_x; double min_y,max_y; double min_z,max_z; - double volume1; + //double volume1; double volume2; - double l1,l2,l3,l4,l5; + //double l1,l2,l3,l4,l5; voronoicell_neighbor* pointer; voronoicell_neighbor cell; VoronoiVertex v1,v2,v3,v4; @@ -132,7 +132,7 @@ void clip::execute(std::vector<SPoint3>& vertices,std::vector<VoronoiElement>& c delta = 0.2*(max_x - min_x); container cont(min_x-delta,max_x+delta,min_y-delta,max_y+delta,min_z-delta,max_z+delta,6,6,6,false,false,false,vertices.size()); - volume1 = (max_x-min_x+2.0*delta)*(max_y-min_y+2.0*delta)*(max_z-min_z+2.0*delta); + //volume1 = (max_x-min_x+2.0*delta)*(max_y-min_y+2.0*delta)*(max_z-min_z+2.0*delta); for(i=0;i<vertices.size();i++){ cont.put(i,vertices[i].x(),vertices[i].y(),vertices[i].z()); @@ -244,7 +244,7 @@ void clip::execute(std::vector<SPoint3>& vertices,std::vector<VoronoiElement>& c volume2 = 0.0; for(i=0;i<clipped.size();i++){ - if(clipped[i].get_v2().get_category()==1){ + /*if(clipped[i].get_v2().get_category()==1){ l1 = (clipped[i].get_v2().get_point()).distance(clipped[i].get_v1().get_point()); l2 = (clipped[i].get_v2().get_point()).distance(generators[IDs[clipped[i].get_v2().get_index1()]]); l3 = (clipped[i].get_v2().get_point()).distance(generators[IDs[clipped[i].get_v2().get_index2()]]); @@ -267,7 +267,7 @@ void clip::execute(std::vector<SPoint3>& vertices,std::vector<VoronoiElement>& c l4 = (clipped[i].get_v4().get_point()).distance(generators[IDs[clipped[i].get_v4().get_index3()]]); l5 = (clipped[i].get_v4().get_point()).distance(generators[IDs[clipped[i].get_v4().get_index4()]]); //printf("%f %f %f %f %f %f %f %f %f\n",l1,l2,l3,l4,l5,l1-l2,l1-l3,l1-l4,l1-l5); - } + }*/ clipped[i].compute_jacobian(); volume2 = volume2 + fabs(clipped[i].get_jacobian())/6.0; } diff --git a/Mesh/meshGFaceBoundaryLayers.cpp b/Mesh/meshGFaceBoundaryLayers.cpp index 9b8bca7234..2ad482e13f 100644 --- a/Mesh/meshGFaceBoundaryLayers.cpp +++ b/Mesh/meshGFaceBoundaryLayers.cpp @@ -161,7 +161,7 @@ BoundaryLayerColumns* buildAdditionalPoints2D (GFace *gf) for (std::set<MVertex*>::iterator it = _vertices.begin(); it != _vertices.end() ; ++it){ std::vector<MVertex*> _connections; std::vector<SVector3> _dirs; - double LL; + //double LL; for (std::multimap<MVertex*,MVertex*>::iterator itm = _columns->_non_manifold_edges.lower_bound(*it); itm != _columns->_non_manifold_edges.upper_bound(*it); ++itm) @@ -223,7 +223,7 @@ BoundaryLayerColumns* buildAdditionalPoints2D (GFace *gf) if (_connections.size() == 2){ MEdge e1 (*it,_connections[0]); MEdge e2 (*it,_connections[1]); - LL = 0.5 * (e1.length() + e2.length()); + //LL = 0.5 * (e1.length() + e2.length()); std::vector<SVector3> N1,N2; for (std::multimap<MEdge,SVector3,Less_Edge>::iterator itm = _columns->_normals.lower_bound(e1); diff --git a/Mesh/meshGFaceOptimize.cpp b/Mesh/meshGFaceOptimize.cpp index f429184498..a18ea8b5b1 100644 --- a/Mesh/meshGFaceOptimize.cpp +++ b/Mesh/meshGFaceOptimize.cpp @@ -2093,10 +2093,10 @@ static std::vector<MVertex*> computeBoundingPoints (const std::vector<MElement*> } std::set<MEdge,Less_Edge>::iterator it = edges.begin(); std::list<MEdge> border; - bool closed = true; + //bool closed = true; for ( ; it != edges.end() ; ++it){ if (it->getVertex(0) == v || it->getVertex(1) == v){ - closed = false; + //closed = false; } else { border.push_back(*it); @@ -3104,7 +3104,7 @@ Temporary::~Temporary(){} SVector3 Temporary::compute_gradient(MElement*element) { - double x1,y1,z1; + /*double x1,y1,z1; double x2,y2,z2; double x3,y3,z3; double x,y,z; @@ -3122,7 +3122,7 @@ SVector3 Temporary::compute_gradient(MElement*element) z3 = vertex3->z(); x = (x1+x2+x3)/3.0; y = (y1+y2+y3)/3.0; - z = (z1+z2+z3)/3.0; + z = (z1+z2+z3)/3.0;*/ return SVector3(0.0,1.0,0.0); } @@ -3170,12 +3170,12 @@ SVector3 Temporary::compute_normal(MElement*element) SVector3 Temporary::compute_other_vector(MElement*element) { - int number; + //int number; double length; SVector3 normal; SVector3 gradient; SVector3 other_vector; - number = element->getNum(); + //number = element->getNum(); normal = Temporary::compute_normal(element); gradient = Temporary::compute_gradient(element);//gradients[number]; other_vector = crossprod(gradient,normal); @@ -3185,7 +3185,7 @@ SVector3 Temporary::compute_other_vector(MElement*element) double Temporary::compute_alignment(const MEdge&_edge, MElement*element1, MElement*element2) { - int number; + //int number; double scalar_productA,scalar_productB; double alignment; SVector3 gradient; @@ -3193,7 +3193,7 @@ double Temporary::compute_alignment(const MEdge&_edge, MElement*element1, MEleme SVector3 edge; MVertex*vertexA; MVertex*vertexB; - number = element1->getNum(); + //number = element1->getNum(); gradient = Temporary::compute_gradient(element1);//gradients[number]; other_vector = Temporary::compute_other_vector(element1); vertexA = _edge.getVertex(0); diff --git a/Mesh/meshGRegion.cpp b/Mesh/meshGRegion.cpp index 9d007953c8..be25549f3e 100644 --- a/Mesh/meshGRegion.cpp +++ b/Mesh/meshGRegion.cpp @@ -494,12 +494,12 @@ void TransferTetgenMesh(GRegion *gr, tetgenio &in, tetgenio &out, } // TODO: re-create 1D mesh - for(int i = 0; i < out.numberofedges; i++){ + /*for(int i = 0; i < out.numberofedges; i++){ MVertex *v[2]; v[0] = numberedV[out.edgelist[i * 2 + 0] - 1]; v[1] = numberedV[out.edgelist[i * 2 + 1] - 1]; //implement here the 1D mesh ... - } + }*/ bool needParam = (CTX::instance()->mesh.order > 1 && CTX::instance()->mesh.secondOrderExperimental); diff --git a/Mesh/qualityMeasures.cpp b/Mesh/qualityMeasures.cpp index a8d344ecc5..4b1a646757 100644 --- a/Mesh/qualityMeasures.cpp +++ b/Mesh/qualityMeasures.cpp @@ -518,10 +518,10 @@ double qmQuadrangleAngles (MQuadrangle *e) { // This matrix is used to "rotate" the triangle to get each vertex // as the "origin" of the mapping in turn - double rot[3][3]; - rot[0][0]=-1; rot[0][1]=1; rot[0][2]=0; - rot[1][0]=-1; rot[1][1]=0; rot[1][2]=0; - rot[2][0]= 0; rot[2][1]=0; rot[2][2]=1; + //double rot[3][3]; + //rot[0][0]=-1; rot[0][1]=1; rot[0][2]=0; + //rot[1][0]=-1; rot[1][1]=0; rot[1][2]=0; + //rot[2][0]= 0; rot[2][1]=0; rot[2][2]=1; //double tmp[3][3]; const double u[9] = {-1,-1, 1, 1, 0,0,1,-1,0}; diff --git a/Numeric/Numeric.cpp b/Numeric/Numeric.cpp index ae4b8b7c7b..363d175b7e 100644 --- a/Numeric/Numeric.cpp +++ b/Numeric/Numeric.cpp @@ -789,12 +789,12 @@ double minimize_grad_fd(double (*func)(fullVector<double> &, void *), fullVector<double> grad(N); fullVector<double> dir(N); - double f, feps, finit; + double f, feps;//, finit; for (int iter = 0; iter < MAXIT; iter++){ // compute gradient of func f = func(x, data); - if (iter == 0) finit = f; + //if (iter == 0) finit = f; // printf("Opti iter %d x = (%g %g) f = %g\n",iter,x(0),x(1),f); // printf("grad = ("); for (int j = 0; j < N; j++){ @@ -897,22 +897,22 @@ void signedDistancesPointsTriangle(std::vector<double> &distances, SVector3 pp2 = p - p2; const double t23 = dot(pp2, t3) / n2t3; d = 1.e10; - bool found = false; + //bool found = false; SPoint3 closePt; if (t12 >= 0 && t12 <= 1.){ d = sign * std::min(fabs(d), p.distance(p1 + (p2 - p1) * t12)); closePt = p1 + (p2 - p1) * t12; - found = true; + //found = true; } if (t13 >= 0 && t13 <= 1.){ if (p.distance(p1 + (p3 - p1) * t13) < fabs(d)) closePt = p1 + (p3 - p1) * t13; d = sign * std::min(fabs(d), p.distance(p1 + (p3 - p1) * t13)); - found = true; + //found = true; } if (t23 >= 0 && t23 <= 1.){ if (p.distance(p2 + (p3 - p2) * t23) < fabs(d)) closePt = p2 + (p3 - p2) * t23; d = sign * std::min(fabs(d), p.distance(p2 + (p3 - p2) * t23)); - found = true; + //found = true; } if (p.distance(p1) < fabs(d)){ closePt = p1; diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index 2f4849bc3a..45aeb4fcfb 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -4608,7 +4608,7 @@ int PrintListOfDouble(char *format, List_T *list, char *buffer) // if format does not contain formatting characters, dump the list (useful for // quick debugging of lists) int numFormats = 0; - for(int i = 0; i < strlen(format); i++) + for(unsigned int i = 0; i < strlen(format); i++) if(format[i] == '%') numFormats++; if(!numFormats){ strcpy(buffer, format); diff --git a/Solver/dofManager.cpp b/Solver/dofManager.cpp index aefd1b566e..3cc1d1479b 100644 --- a/Solver/dofManager.cpp +++ b/Solver/dofManager.cpp @@ -34,9 +34,9 @@ void dofManager<double>::scatterSolution() int index; while (MPI_Waitany (Msg::GetCommSize(), &reqRecv[0], &index, &status) == 0 && index != MPI_UNDEFINED) { if (status.MPI_TAG == 0) - for (int j = 0; j < recvBuf[index].size(); j++) { + for (unsigned int j = 0; j < recvBuf[index].size(); j++) { ghostValue[ghostByProc[index][j]] = recvBuf[index][j]; - const Dof &dof = ghostByProc[index][j]; + //const Dof &dof = ghostByProc[index][j]; } } MPI_Waitall (Msg::GetCommSize(), &reqSend[0], MPI_STATUS_IGNORE); diff --git a/contrib/onelab/OnelabClients.cpp b/contrib/onelab/OnelabClients.cpp index 1b115740af..eb20132063 100644 --- a/contrib/onelab/OnelabClients.cpp +++ b/contrib/onelab/OnelabClients.cpp @@ -1174,14 +1174,14 @@ std::string getUserHomedir(){ #include <direct.h> #endif -#ifndef MAXPATHLEN -#define MAXPATHLEN 1024 +#ifndef MAXPATHLEN +#define MAXPATHLEN 1024 #endif std::string getCurrentWorkdir(){ char path[MAXPATHLEN]; - getcwd(path, MAXPATHLEN); + if(!getcwd(path, MAXPATHLEN)) return ""; std::string str = path; return str; } -- GitLab