From e5fdb7bd111c2dfadb4e37c1fdb4d43ca04f978d Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Tue, 4 Feb 2014 17:57:28 +0000 Subject: [PATCH] small fixes --- Common/DefaultOptions.h | 3 ++- Geo/GModel.cpp | 2 +- Mesh/meshGRegion.cpp | 8 ++++---- doc/texinfo/opt_solver.texi | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 310beb0e4a..979f5c7302 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -197,7 +197,8 @@ StringXString SolverOptions_String[] = { #endif "Base name of socket (UNIX socket if the name does not contain a colon, TCP/IP " "otherwise, in the form 'host:baseport'; the actual name/port is constructed " - "by appending the unique client id)"}, + "by appending the unique client id. If baseport is 0, the port is chosen " + "automatically (recommended))"}, { 0, 0 , 0 , "" , 0 } } ; diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index 466a04c8e1..690745ca42 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -542,7 +542,7 @@ bool GModel::setAllVolumesPositive() { bool ok = true; for(riter it = regions.begin(); it != regions.end(); ++it) - for (int i = 0; i < (*it)->getNumMeshElements(); ++i) + for (unsigned int i = 0; i < (*it)->getNumMeshElements(); ++i) if(!(*it)->getMeshElement(i)->setVolumePositive()) ok = false; return ok; diff --git a/Mesh/meshGRegion.cpp b/Mesh/meshGRegion.cpp index de8e2b762b..69b79a9692 100644 --- a/Mesh/meshGRegion.cpp +++ b/Mesh/meshGRegion.cpp @@ -718,7 +718,7 @@ static int getWedge (BoundaryLayerColumns* _columns, MVertex *v1, MVertex *v2, vert2End = it->second; - int INDEX1, count = 0; + int INDEX1 = 0, count = 0; for (int i=0;i<NW1;i++){ for (int j=i+1;j<NW1;j++){ if ((vert1Start == i && vert1End == j) || @@ -729,7 +729,7 @@ static int getWedge (BoundaryLayerColumns* _columns, MVertex *v1, MVertex *v2, count++; } } - int INDEX2; + int INDEX2 = 0; count = 0; for (int i=0;i<NW2;i++){ for (int j=i+1;j<NW2;j++){ @@ -884,13 +884,13 @@ static bool modifyInitialMeshForTakingIntoAccountBoundaryLayers(GRegion *gr) v13 = c22._column[l-1]; v14 = c21._column[l-1]; } - + if (l == 0){ MPrism *prism = new MPrism(v12,v21,v22,v13,v24,v23); // store the layer the element belongs prism->setPartition(l+1); myCol.push_back(prism); - + blPrisms.push_back(prism); } else { diff --git a/doc/texinfo/opt_solver.texi b/doc/texinfo/opt_solver.texi index f219e2637f..648c43bb56 100644 --- a/doc/texinfo/opt_solver.texi +++ b/doc/texinfo/opt_solver.texi @@ -155,7 +155,7 @@ Default value: @code{""}@* Saved in: @code{General.SessionFileName} @item Solver.SocketName -Base name of socket (UNIX socket if the name does not contain a colon, TCP/IP otherwise, in the form 'host:baseport'; the actual name/port is constructed by appending the unique client id)@* +Base name of socket (UNIX socket if the name does not contain a colon, TCP/IP otherwise, in the form 'host:baseport'; the actual name/port is constructed by appending the unique client id. If baseport is 0, the port is chosen automatically (recommended))@* Default value: @code{".gmshsock"}@* Saved in: @code{General.OptionsFileName} -- GitLab