diff --git a/Common/ListUtils.cpp b/Common/ListUtils.cpp index 9c0ea5aac363876e62ef1a854c8c18df4487e324..f9ef056c1820333eb2500f22be8a8463ea830971 100644 --- a/Common/ListUtils.cpp +++ b/Common/ListUtils.cpp @@ -12,7 +12,7 @@ #include <string.h> #include <errno.h> #include <sys/types.h> -#include <inttypes.h> +#include <stdint.h> #include "MallocUtils.h" #include "ListUtils.h" #include "TreeUtils.h" diff --git a/Common/avl.cpp b/Common/avl.cpp index 3ed44a41d9ee7036e536037182bc27977d6914e9..d49893c67195c3f2119bc2df060de0f513a57ab9 100644 --- a/Common/avl.cpp +++ b/Common/avl.cpp @@ -26,7 +26,7 @@ // Modified for Gmsh (C++ and 64 bit compatibility) #include <stdio.h> -#include <inttypes.h> +#include <stdint.h> #include "avl.h" #include "MallocUtils.h" diff --git a/Fltk/FlGui.cpp b/Fltk/FlGui.cpp index df0f8a5a1ca9d3f2ab94b55b80e205234b890a28..23892ba73935d19e2bef5d7533f4fa92ba28809f 100644 --- a/Fltk/FlGui.cpp +++ b/Fltk/FlGui.cpp @@ -5,7 +5,7 @@ #include <sstream> #include <string.h> -#include <inttypes.h> +#include <stdint.h> #include <FL/Fl.H> #include <FL/Fl_Tooltip.H> #include <FL/Fl_Shared_Image.H> diff --git a/Fltk/menuWindow.cpp b/Fltk/menuWindow.cpp index 609135a55880c580f86c8575ad44632f3018ab89..8678b78674541600397edf701c132be8e46e9fbd 100644 --- a/Fltk/menuWindow.cpp +++ b/Fltk/menuWindow.cpp @@ -6,7 +6,7 @@ #include <string.h> #include <stdlib.h> #include <stdio.h> -#include <inttypes.h> +#include <stdint.h> #include <time.h> #include <FL/Fl_Box.H> #include <FL/fl_ask.H> diff --git a/Fltk/optionWindow.cpp b/Fltk/optionWindow.cpp index 695721de509c9b7f7967f22ee7fb5eac07ee9396..93c11118850074aefbae79b74c7a272798b0c616 100644 --- a/Fltk/optionWindow.cpp +++ b/Fltk/optionWindow.cpp @@ -4,7 +4,7 @@ // bugs and problems to <gmsh@geuz.org>. #include <string.h> -#include <inttypes.h> +#include <stdint.h> #include <FL/Fl_Tabs.H> #include <FL/Fl_Scroll.H> #include <FL/Fl_Color_Chooser.H> diff --git a/Fltk/pluginWindow.cpp b/Fltk/pluginWindow.cpp index 7d4881571b03cb251fb22d56bb1cf2fa3d0795a2..1ca1a15819513231a5937ff1a210196ac870e26b 100644 --- a/Fltk/pluginWindow.cpp +++ b/Fltk/pluginWindow.cpp @@ -5,7 +5,7 @@ #include <vector> #include <string.h> -#include <inttypes.h> +#include <stdint.h> #include <FL/Fl_Return_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Value_Input.H> diff --git a/Fltk/solverWindow.cpp b/Fltk/solverWindow.cpp index 3f91ce387f3f3ec5b3cffefa7a6796c728b18165..2ef8edd82f36af50b3fe28b44237d69f2b5fed49 100644 --- a/Fltk/solverWindow.cpp +++ b/Fltk/solverWindow.cpp @@ -4,7 +4,7 @@ // bugs and problems to <gmsh@geuz.org>. #include <string.h> -#include <inttypes.h> +#include <stdint.h> #include <FL/Fl_Tabs.H> #include <FL/Fl_Box.H> #include <FL/Fl_Return_Button.H> diff --git a/Fltk/visibilityWindow.cpp b/Fltk/visibilityWindow.cpp index ead516741f41916a5f79caa507ae9b1b1932f899..f2033d87493cede2e4e0168cc501cb8735956005 100644 --- a/Fltk/visibilityWindow.cpp +++ b/Fltk/visibilityWindow.cpp @@ -7,7 +7,7 @@ #include <sstream> #include <map> #include <vector> -#include <inttypes.h> +#include <stdint.h> #include <string.h> #include <FL/Fl_Tabs.H> #include <FL/Fl_Box.H> diff --git a/Geo/CellComplex.cpp b/Geo/CellComplex.cpp index ffdf69bac958b0a4af29d3ebf0bc78987731fcad..c2c147c0125473fe41e516aff98279cd0d82415c 100644 --- a/Geo/CellComplex.cpp +++ b/Geo/CellComplex.cpp @@ -603,8 +603,8 @@ int CellComplex::saveComplex(std::string filename) printf("Wrote %d cells to '%s' \n", getSize(0)+getSize(1)+getSize(2)+getSize(3), filename.c_str()); - - return 1;*/ + */ + return 1; } int CellComplex::loadComplex(std::string filename) @@ -676,5 +676,6 @@ int CellComplex::loadComplex(std::string filename) } fclose(fp); - return 1;*/ +*/ + return 1; } diff --git a/Geo/GeomMeshMatcher.cpp b/Geo/GeomMeshMatcher.cpp index 2d524a234fa320ffc5a165718a04cc7512b5d452..5f85e178d11ac85441143fb5402885464412ebb5 100644 --- a/Geo/GeomMeshMatcher.cpp +++ b/Geo/GeomMeshMatcher.cpp @@ -588,10 +588,9 @@ int GeomMeshMatcher::forceTomatch(GModel *geom, GModel *mesh, const double TOL) } } geom->writeMSH("hopla.msh",2.2,false,false,true); + return 0; } - - int GeomMeshMatcher::match(GModel *geom, GModel *mesh) { mesh->createTopologyFromMesh(); diff --git a/Mesh/QuadTriExtruded3D.cpp b/Mesh/QuadTriExtruded3D.cpp index 2b6b0d2de400f17f9b397d0933e19eaa87e07695..b1dbb64fe63e3544a9e7ce618bfdf3f348c9173b 100644 --- a/Mesh/QuadTriExtruded3D.cpp +++ b/Mesh/QuadTriExtruded3D.cpp @@ -183,7 +183,7 @@ static int get2DExtrudedVertices( MElement *elem, ExtrudeParams *ep, unsigned in std::set<MVertex *, MVertexLessThanLexicographic>::iterator itp; int sz = source_verts.size(); - double x[sz], y[sz], z[sz]; + std::vector<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(); @@ -413,9 +413,9 @@ static std::map<std::string, std::vector<int> > getFaceTypes(GRegion *gr, MEleme } // create an array that holds info about whether a face touches a boundary - int touch_bnd[n_lat]; + std::vector<int> touch_bnd(n_lat); - fill_touch_bnd(touch_bnd, vert_bnd, n_lat); + fill_touch_bnd(&touch_bnd[0], vert_bnd, n_lat); // Classify the laterals of each little mesh volume: diff --git a/Mesh/meshGFaceLloyd.cpp b/Mesh/meshGFaceLloyd.cpp index 259efea9e393c47f7bae000abbae460eb1bc52e7..27aae49d74197288ef63bc8a12fd47094c0e683a 100644 --- a/Mesh/meshGFaceLloyd.cpp +++ b/Mesh/meshGFaceLloyd.cpp @@ -215,7 +215,7 @@ void smoothing::optimize_face(GFace* gf){ double epsf; double epsx; lpcvt obj; - double initial_conditions[2*triangulator.numPoints]; + std::vector<double> initial_conditions(2*triangulator.numPoints); alglib::ae_int_t maxits; alglib::minlbfgsstate state; alglib::minlbfgsreport rep; @@ -245,7 +245,7 @@ void smoothing::optimize_face(GFace* gf){ } } - x.setcontent(2*num_interior,initial_conditions); + x.setcontent(2*num_interior, &initial_conditions[0]); octree = backgroundMesh::current()->get_octree(); diff --git a/Plugin/NearToFarField.cpp b/Plugin/NearToFarField.cpp index 241806aa0b07c0827171951bb45901754328cfd1..08262a265c6f5e4cd1a405dad8a7e59dfdd89905 100644 --- a/Plugin/NearToFarField.cpp +++ b/Plugin/NearToFarField.cpp @@ -110,13 +110,17 @@ double GMSH_NearToFarFieldPlugin::getFarField(PViewData *eData, PViewData *hData int numComp = eData->getNumComponents(0, ent, ele); if(numComp != 3) continue ; int numNodes = eData->getNumNodes(0, ent, ele); - double x[numNodes], y[numNodes], z[numNodes] ; - int tag[numNodes]; + std::vector<double> x(numNodes), y(numNodes), z(numNodes); + std::vector<int> tag(numNodes); for(int nod = 0; nod < numNodes; nod++) tag[nod] = eData->getNode(0, ent, ele, nod, x[nod], y[nod], z[nod]); double n[3] = {0.,0.,0.}; normal3points(x[0], y[0], z[0], x[1], y[1], z[1], x[2], y[2], z[2], n); + + Msg::Error("FIXME JS and MS computation need to be recoded"); + // cannot allocate like this + fix numSteps + /* double Js[numSteps][numNodes*numComp], Ms[numSteps][numNodes*numComp] ; for(int step = 0; step < numSteps; step++){ @@ -159,6 +163,8 @@ double GMSH_NearToFarFieldPlugin::getFarField(PViewData *eData, PViewData *hData eData->tagNode(0, ent, ele, nod, 1); } + */ + } }