diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp index 0ded2015704fb0d9565d81767cc54b1db610e0f4..3ec33d7a0a462ee0bde0ed65c32882aed576d036 100644 --- a/Common/CommandLine.cpp +++ b/Common/CommandLine.cpp @@ -43,11 +43,10 @@ const char *GetGmshBuildOS(){ return GMSH_OS; } const char *GetGmshShortLicense(){ return GMSH_SHORT_LICENSE; } const char *GetGmshBuildOptions(){ return GMSH_CONFIG_OPTIONS; } -std::vector<std::pair<std::string, std::string> > GetUsage(const std::string &name) +std::vector<std::pair<std::string, std::string> > GetUsage() { typedef std::pair<std::string, std::string> mp; std::vector<mp> s; - s.push_back(mp("Usage: " + name + " [options] [files]", "")); s.push_back(mp("Geometry options:", "")); s.push_back(mp("-0", "Output unrolled geometry, then exit")); s.push_back(mp("-tol float", "Set geometrical tolerance")); @@ -236,7 +235,8 @@ std::vector<std::pair<std::string, std::string> > GetMouseUsage() void PrintUsage(const std::string &name) { - std::vector<std::pair<std::string, std::string> > s = GetUsage(name); + Msg::Direct("Usage: %s [options] [files]", name.c_str()); + std::vector<std::pair<std::string, std::string> > s = GetUsage(); for(unsigned int i = 0; i < s.size(); i++){ std::string a = s[i].first, b = s[i].second; if(b.empty()){ diff --git a/Common/CommandLine.h b/Common/CommandLine.h index d5f06d16f9d407bf29244204292003c262ec5127..8fb94c9ef11ec0dbb0715e403b0a0ec53a823319 100644 --- a/Common/CommandLine.h +++ b/Common/CommandLine.h @@ -20,7 +20,7 @@ const char *GetGmshBuildOS(); const char *GetGmshShortLicense(); const char *GetGmshBuildOptions(); -std::vector<std::pair<std::string, std::string> > GetUsage(const std::string &name); +std::vector<std::pair<std::string, std::string> > GetUsage(); std::vector<std::pair<std::string, std::string> > GetShortcutsUsage(const std::string &ctrl=""); std::vector<std::pair<std::string, std::string> > GetMouseUsage(); void PrintUsage(const std::string &name); diff --git a/Common/Options.cpp b/Common/Options.cpp index 5eccefbd8d46205d3b5daf4bad70036662cc0e15..c6011cf38a72d3014aa17f518fcca038edd21d2c 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -942,11 +942,13 @@ void PrintOptionsDoc() Msg::Error("Unable to open file 'commandline.texi'"); return; } - std::vector<std::pair<std::string, std::string> > s = GetUsage("gmsh"); + std::vector<std::pair<std::string, std::string> > s = GetUsage(); fprintf(file, "%s@ftable @code\n", warn); for(unsigned int i = 0; i < s.size(); i++) if(s[i].first.size() && s[i].second.size()) fprintf(file, "@item %s\n%s\n", s[i].first.c_str(), s[i].second.c_str()); + else if(s[i].first.size() && s[i].second.empty()) + fprintf(file, "@end ftable\n %s\n@ftable @code\n", s[i].first.c_str()); fprintf(file, "@end ftable\n"); fclose(file); } diff --git a/Fltk/helpWindow.cpp b/Fltk/helpWindow.cpp index 630c21a74bef1197c40401c3ded5056bcaa4cd61..2eb6f58e80d9ff76446f292c6c6605ba59b3977f 100644 --- a/Fltk/helpWindow.cpp +++ b/Fltk/helpWindow.cpp @@ -291,10 +291,12 @@ helpWindow::helpWindow() s += "<h3>Command Line Switches</h3>"; s += "<table border=1>"; { - std::vector<std::pair<std::string, std::string> > s0 = GetUsage("gmsh"); + std::vector<std::pair<std::string, std::string> > s0 = GetUsage(); for(unsigned int i = 0; i < s0.size(); i++) if(s0[i].first.size() && s0[i].second.size()) s += "<tr><td>" + s0[i].first + "</td><td>" + s0[i].second + "</td></tr>"; + else if(s0[i].first.size() && s0[i].second.empty()) + s += "</table>" + s0[i].first + "<table border=1>"; } s += "</table>"; diff --git a/doc/texinfo/commandline.texi b/doc/texinfo/commandline.texi index bc96fcfdc7c739dd893d8ccf9dd2caf038854939..13a55aae4e48a155b6b4b09ba20728cb1a525dfb 100644 --- a/doc/texinfo/commandline.texi +++ b/doc/texinfo/commandline.texi @@ -3,6 +3,9 @@ @c Do not edit by hand! @c +@ftable @code +@end ftable + Geometry options: @ftable @code @item -0 Output unrolled geometry, then exit @@ -10,6 +13,9 @@ Output unrolled geometry, then exit Set geometrical tolerance @item -match Match geometries and meshes +@end ftable + Mesh options: +@ftable @code @item -1, -2, -3 Perform 1D, 2D or 3D mesh generation, then exit @item -format string @@ -20,7 +26,7 @@ Select msh file version Perform uniform mesh refinement, then exit @item -part int Partition after batch mesh generation -@item -partWeight <tri|quad|tet|prism|hex> int +@item -partWeight tri|quad|tet|prism|hex int Weight of a triangle/quad/etc. during partitioning @item -renumber Renumber the mesh elements after batch mesh generation @@ -47,7 +53,7 @@ Min high-order element quality before optim (0.0->1.0) @item -hoNLayers int Number of high order element layers to optimize @item -hoElasticity float -Poisson ration for elasticity analogy (-1.0 < nu < 0.5) +Poisson ration for elasticity analogy (nu in [-1.0,0.5]) @item -optimize[_netgen] Optimize quality of tetrahedral elements @item -optimize_lloyd @@ -78,10 +84,16 @@ Perform various consistency checks on mesh Do several passes on the mesh for complex backround fields @item -ignorePartBound Ignore partitions boundaries +@end ftable + Post-processing options: +@ftable @code @item -link int Select link mode between views (0, 1, 2, 3, 4) @item -combine Combine views having identical names into multi-time-step views +@end ftable + Display options: +@ftable @code @item -n Hide all meshes and post-processing views on startup @item -nodb @@ -96,6 +108,9 @@ Specify display Use camera mode view; @item -stereo OpenGL quad-buffered stereo rendering (requires special graphic card) +@end ftable + Other options: +@ftable @code @item - Parse input files, then exit @item -a, -g, -m, -s, -p @@ -121,5 +136,5 @@ Show version number @item -info Show detailed version information @item -help -Show this message +Show command line usage @end ftable