diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp index 61c3830bc1efcf9dd68793155bce8e10ba354f34..a2595f481b2efd48ae2fc696b8906b3960af4546 100644 --- a/Common/CommandLine.cpp +++ b/Common/CommandLine.cpp @@ -50,7 +50,7 @@ void Print_Usage(const char *name) Msg::Direct("Mesh options:"); Msg::Direct(" -1, -2, -3 Perform 1D, 2D or 3D mesh generation, then exit"); Msg::Direct(" -refine Perform uniform mesh refinement, then exit"); - Msg::Direct(" -part Partition after batch mesh generation"); + Msg::Direct(" -part int Partition after batch mesh generation"); Msg::Direct(" -saveall Save all elements (discard physical group definitions)"); Msg::Direct(" -o file Specify mesh output file name"); Msg::Direct(" -format string Set output mesh format (msh, msh1, msh2, unv, vrml, stl, mesh,"); @@ -217,8 +217,13 @@ void Get_Options(int argc, char *argv[]) i++; } else if(!strcmp(argv[i] + 1, "part")) { - CTX.batch_after_mesh = 1; i++; + if(argv[i] != NULL){ + CTX.batch_after_mesh = 1; + opt_mesh_partition_num(0, GMSH_SET, atoi(argv[i++])); + } + else + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "new")) { CTX.files.push_back("-new"); diff --git a/Plugin/Triangulate.cpp b/Plugin/Triangulate.cpp index 21eef2371d856be986f32879c535502d78949698..934734571af1f91f909993c4c61281347aea173c 100644 --- a/Plugin/Triangulate.cpp +++ b/Plugin/Triangulate.cpp @@ -139,7 +139,7 @@ PView *GMSH_TriangulatePlugin::execute(PView *v) PViewDataList *data1 = getDataList(v1); if(!data1) return v; - PView *v2 = new PView(true); + PView *v2 = new PView(true, data1->getNumElements()); PViewDataList *data2 = getDataList(v2); if(!data2) return v; diff --git a/doc/gmsh.1 b/doc/gmsh.1 index 551bd2caaf39e5b09d9a45ad1d943aed80cc6ff0..095e07413018be08aa2872c089bdfba0a5931dcc 100644 --- a/doc/gmsh.1 +++ b/doc/gmsh.1 @@ -1,4 +1,4 @@ -.\" $Id: gmsh.1,v 1.83 2008-04-17 21:05:52 geuzaine Exp $ +.\" $Id: gmsh.1,v 1.84 2008-12-17 21:14:48 geuzaine Exp $ .TH Gmsh 1 "23 February 2008" "Gmsh 2.2" "Gmsh Manual Pages" .UC 4 .\" ******************************************************************** @@ -42,6 +42,9 @@ the geometry. perform the three-dimensional mesh, i.e., discretize all the volumes in the geometry. .TP 4 +.B \-part int +partition the mesh after batch mesh generation. +.TP 4 .B \-saveall save all elements (and discard all physical group definitions). .TP 4 diff --git a/doc/texinfo/command_line.texi b/doc/texinfo/command_line.texi index 416264669f1bd7820c33c0a941a2ddf4418c2ede..48c274bcd80e1885b4c603467bb4404a9f9a85dc 100644 --- a/doc/texinfo/command_line.texi +++ b/doc/texinfo/command_line.texi @@ -14,6 +14,8 @@ Set geometrical tolerance @ftable @code @item -1, -2, -3 Perform 1D, 2D or 3D mesh generation, then exit +@item -part int +Partition the mesh after batch mesh generation. @item -saveall Save all elements (discard physical group definitions) @item -o file