Skip to content
Snippets Groups Projects
Commit c64457a3 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

*** empty log message ***

parent 6b5a7c0d
No related branches found
No related tags found
No related merge requests found
// $Id: Main.cpp,v 1.62 2006-08-08 04:35:21 geuzaine Exp $ // $Id: Main.cpp,v 1.63 2006-08-10 15:55:23 geuzaine Exp $
// //
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
// //
...@@ -119,7 +119,7 @@ int GMSHBOX(int argc, char *argv[]) ...@@ -119,7 +119,7 @@ int GMSHBOX(int argc, char *argv[])
mai3d(THEM, CTX.batch); mai3d(THEM, CTX.batch);
CreateOutputFile(CTX.output_filename, CTX.mesh.format); CreateOutputFile(CTX.output_filename, CTX.mesh.format);
} }
else else if(CTX.batch == -1)
CreateOutputFile(CTX.output_filename, FORMAT_GEO); CreateOutputFile(CTX.output_filename, FORMAT_GEO);
ParUtil::Instance()->Barrier(__LINE__, __FILE__); ParUtil::Instance()->Barrier(__LINE__, __FILE__);
return 1; return 1;
......
// $Id: CommandLine.cpp,v 1.73 2006-08-07 13:57:13 geuzaine Exp $ // $Id: CommandLine.cpp,v 1.74 2006-08-10 15:55:23 geuzaine Exp $
// //
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
// //
...@@ -75,12 +75,12 @@ void Print_Usage(char *name){ ...@@ -75,12 +75,12 @@ void Print_Usage(char *name){
// the man page (doc/gmsh.1) // the man page (doc/gmsh.1)
Msg(DIRECT, "Usage: %s [options] [files]", name); Msg(DIRECT, "Usage: %s [options] [files]", name);
Msg(DIRECT, "Geometry options:"); Msg(DIRECT, "Geometry options:");
Msg(DIRECT, " -0 Parse input files, output unrolled geometry, and exit"); Msg(DIRECT, " -0 Output unrolled geometry, then exit");
Msg(DIRECT, "Mesh options:"); Msg(DIRECT, "Mesh options:");
Msg(DIRECT, " -1, -2, -3 Perform batch 1D, 2D and 3D mesh generation"); Msg(DIRECT, " -1, -2, -3 Perform 1D, 2D or 3D mesh generation, then exit");
Msg(DIRECT, " -saveall Save all elements (discard physical group definitions)"); Msg(DIRECT, " -saveall Save all elements (discard physical group definitions)");
Msg(DIRECT, " -o file Specify mesh output file name"); Msg(DIRECT, " -o file Specify mesh output file name");
Msg(DIRECT, " -format string Set output mesh format (msh, unv, gref, stl, p3d)"); Msg(DIRECT, " -format string Set output mesh format (msh, unv, mesh, stl, vrml)");
Msg(DIRECT, " -algo string Select mesh algorithm (iso, tri, aniso, netgen, tetgen)"); Msg(DIRECT, " -algo string Select mesh algorithm (iso, tri, aniso, netgen, tetgen)");
Msg(DIRECT, " -smooth int Set number of mesh smoothing steps"); Msg(DIRECT, " -smooth int Set number of mesh smoothing steps");
Msg(DIRECT, " -optimize Optimize quality of tetrahedral elements"); Msg(DIRECT, " -optimize Optimize quality of tetrahedral elements");
...@@ -92,7 +92,6 @@ void Print_Usage(char *name){ ...@@ -92,7 +92,6 @@ void Print_Usage(char *name){
Msg(DIRECT, " -rand float Set random perturbation factor"); Msg(DIRECT, " -rand float Set random perturbation factor");
Msg(DIRECT, " -bgm file Load background mesh from file"); Msg(DIRECT, " -bgm file Load background mesh from file");
Msg(DIRECT, " -constrain Constrain background mesh with characteristic lengths"); Msg(DIRECT, " -constrain Constrain background mesh with characteristic lengths");
Msg(DIRECT, " -histogram Print mesh quality histogram");
Msg(DIRECT, " -extrude Use old extrusion mesh generator"); Msg(DIRECT, " -extrude Use old extrusion mesh generator");
Msg(DIRECT, " -recombine Recombine meshes from old extrusion mesh generator"); Msg(DIRECT, " -recombine Recombine meshes from old extrusion mesh generator");
#if defined(HAVE_FLTK) #if defined(HAVE_FLTK)
...@@ -108,6 +107,7 @@ void Print_Usage(char *name){ ...@@ -108,6 +107,7 @@ void Print_Usage(char *name){
Msg(DIRECT, " -display string Specify display"); Msg(DIRECT, " -display string Specify display");
#endif #endif
Msg(DIRECT, "Other options:"); Msg(DIRECT, "Other options:");
Msg(DIRECT, " - Parse input files, then exit");
#if defined(HAVE_FLTK) #if defined(HAVE_FLTK)
Msg(DIRECT, " -a, -g, -m, -s, -p Start in automatic, geometry, mesh, solver or post-processing mode"); Msg(DIRECT, " -a, -g, -m, -s, -p Start in automatic, geometry, mesh, solver or post-processing mode");
#endif #endif
...@@ -117,7 +117,7 @@ void Print_Usage(char *name){ ...@@ -117,7 +117,7 @@ void Print_Usage(char *name){
Msg(DIRECT, " -nopopup Don't popup dialog windows in scripts"); Msg(DIRECT, " -nopopup Don't popup dialog windows in scripts");
Msg(DIRECT, " -string \"string\" Parse option string at startup"); Msg(DIRECT, " -string \"string\" Parse option string at startup");
Msg(DIRECT, " -option file Parse option file at startup"); Msg(DIRECT, " -option file Parse option file at startup");
Msg(DIRECT, " -convert file file Perform batch conversion of views and meshes into latest file formats"); Msg(DIRECT, " -convert file file Convert views and meshes into latest file formats, then exit");
Msg(DIRECT, " -version Show version number"); Msg(DIRECT, " -version Show version number");
Msg(DIRECT, " -info Show detailed version information"); Msg(DIRECT, " -info Show detailed version information");
Msg(DIRECT, " -help Show this message"); Msg(DIRECT, " -help Show this message");
...@@ -176,7 +176,27 @@ void Get_Options(int argc, char *argv[]) ...@@ -176,7 +176,27 @@ void Get_Options(int argc, char *argv[])
if(argv[i][0] == '-') { if(argv[i][0] == '-') {
if(!strcmp(argv[i] + 1, "pid")) { if(!strcmp(argv[i] + 1, "")) {
CTX.batch = -2;
i++;
}
else if(!strcmp(argv[i] + 1, "0")) {
CTX.batch = -1;
i++;
}
else if(!strcmp(argv[i] + 1, "1")) {
CTX.batch = 1;
i++;
}
else if(!strcmp(argv[i] + 1, "2")) {
CTX.batch = 2;
i++;
}
else if(!strcmp(argv[i] + 1, "3")) {
CTX.batch = 3;
i++;
}
else if(!strcmp(argv[i] + 1, "pid")) {
fprintf(stdout, "%d\n", GetProcessId()); fprintf(stdout, "%d\n", GetProcessId());
fflush(stdout); fflush(stdout);
i++; i++;
...@@ -201,22 +221,6 @@ void Get_Options(int argc, char *argv[]) ...@@ -201,22 +221,6 @@ void Get_Options(int argc, char *argv[])
CTX.initial_context = 4; CTX.initial_context = 4;
i++; i++;
} }
else if(!strcmp(argv[i] + 1, "0")) {
CTX.batch = -1;
i++;
}
else if(!strcmp(argv[i] + 1, "1")) {
CTX.batch = 1;
i++;
}
else if(!strcmp(argv[i] + 1, "2")) {
CTX.batch = 2;
i++;
}
else if(!strcmp(argv[i] + 1, "3")) {
CTX.batch = 3;
i++;
}
else if(!strcmp(argv[i] + 1, "saveall")) { else if(!strcmp(argv[i] + 1, "saveall")) {
CTX.mesh.save_all = 1; CTX.mesh.save_all = 1;
i++; i++;
...@@ -396,25 +400,16 @@ void Get_Options(int argc, char *argv[]) ...@@ -396,25 +400,16 @@ void Get_Options(int argc, char *argv[])
else if(!strcmp(argv[i] + 1, "format") || !strcmp(argv[i] + 1, "f")) { else if(!strcmp(argv[i] + 1, "format") || !strcmp(argv[i] + 1, "f")) {
i++; i++;
if(argv[i] != NULL) { if(argv[i] != NULL) {
if(!strcmp(argv[i], "msh") || if(!strcmp(argv[i], "msh"))
!strcmp(argv[i], "MSH") || !strcmp(argv[i], "gmsh")) {
CTX.mesh.format = FORMAT_MSH; CTX.mesh.format = FORMAT_MSH;
} else if(!strcmp(argv[i], "unv"))
else if(!strcmp(argv[i], "unv") ||
!strcmp(argv[i], "UNV") || !strcmp(argv[i], "ideas")) {
CTX.mesh.format = FORMAT_UNV; CTX.mesh.format = FORMAT_UNV;
} else if(!strcmp(argv[i], "mesh"))
else if(!strcmp(argv[i], "gref") || CTX.mesh.format = FORMAT_MESH;
!strcmp(argv[i], "GREF") || !strcmp(argv[i], "Gref")) { else if(!strcmp(argv[i], "stl"))
CTX.mesh.format = FORMAT_GREF;
}
else if(!strcmp(argv[i], "stl") || !strcmp(argv[i], "STL")) {
CTX.mesh.format = FORMAT_STL; CTX.mesh.format = FORMAT_STL;
} else if(!strcmp(argv[i], "vrml"))
else if(!strcmp(argv[i], "p3d") || CTX.mesh.format = FORMAT_VRML;
!strcmp(argv[i], "P3D") || !strcmp(argv[i], "Plot3D")) {
CTX.mesh.format = FORMAT_P3D;
}
else { else {
fprintf(stderr, ERROR_STR "Unknown mesh format\n"); fprintf(stderr, ERROR_STR "Unknown mesh format\n");
exit(1); exit(1);
......
// $Id: Main.cpp,v 1.95 2006-08-08 04:35:23 geuzaine Exp $ // $Id: Main.cpp,v 1.96 2006-08-10 15:55:23 geuzaine Exp $
// //
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
// //
...@@ -136,7 +136,7 @@ int main(int argc, char *argv[]) ...@@ -136,7 +136,7 @@ int main(int argc, char *argv[])
mai3d(CTX.batch); mai3d(CTX.batch);
CreateOutputFile(CTX.output_filename, CTX.mesh.format); CreateOutputFile(CTX.output_filename, CTX.mesh.format);
} }
else else if(CTX.batch == -1)
CreateOutputFile(CTX.output_filename, FORMAT_GEO); CreateOutputFile(CTX.output_filename, FORMAT_GEO);
exit(0); exit(0);
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
@ftable @code @ftable @code
@item -0 @item -0
Parse input files, output unrolled geometry, and exit Output unrolled geometry, then exit
@end ftable @end ftable
@sp 1 @sp 1
...@@ -11,15 +11,15 @@ Parse input files, output unrolled geometry, and exit ...@@ -11,15 +11,15 @@ Parse input files, output unrolled geometry, and exit
@ftable @code @ftable @code
@item -1, -2, -3 @item -1, -2, -3
Perform batch 1D, 2D and 3D mesh generation Perform 1D, 2D or 3D mesh generation, then exit
@item -saveall @item -saveall
Save all elements (discard physical group definitions) Save all elements (discard physical group definitions)
@item -o file @item -o file
Specify mesh output file name Specify mesh output file name
@item -format string @item -format string
Set output mesh format (msh, unv, gref, stl, p3d) Set output mesh format (msh, unv, mesh, stl, vrml)
@item -algo string @item -algo string
Select mesh algorithm (iso, tri, aniso, netgen) Select mesh algorithm (iso, tri, aniso, netgen, tetgen)
@item -smooth int @item -smooth int
Set number of mesh smoothing steps Set number of mesh smoothing steps
@item -optimize @item -optimize
...@@ -38,8 +38,6 @@ Set random perturbation factor ...@@ -38,8 +38,6 @@ Set random perturbation factor
Load background mesh from file Load background mesh from file
@item -constrain @item -constrain
Constrain background mesh with characteristic lengths Constrain background mesh with characteristic lengths
@item -histogram
Print mesh quality histogram
@item -extrude @item -extrude
Use old extrusion mesh generator Use old extrusion mesh generator
@item -recombine @item -recombine
...@@ -83,6 +81,8 @@ Specify display ...@@ -83,6 +81,8 @@ Specify display
@noindent Other options: @noindent Other options:
@ftable @code @ftable @code
@item -
Parse input files, then exit
@item -a, -g, -m, -s, -p @item -a, -g, -m, -s, -p
Start in automatic, geometry, mesh, solver or post-processing mode Start in automatic, geometry, mesh, solver or post-processing mode
@item -pid @item -pid
...@@ -98,7 +98,7 @@ Parse option string at startup ...@@ -98,7 +98,7 @@ Parse option string at startup
@item -option file @item -option file
Parse option file at startup Parse option file at startup
@item -convert file file @item -convert file file
Perform batch conversion of views and meshes into latest file formats Convert views and meshes into latest file formats, then exit
@item -version @item -version
Show version number Show version number
@item -info @item -info
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment