26{
27 TCLAP::CmdLine cmd(
28 "Converts OGS geometry file into another file format. "
29 "Currently *.gml (OGS6 XML-based format) and *.gli (OGS5 format) "
30 "formats are supported.\n\n"
31 "OpenGeoSys-6 software, version " +
33 ".\n"
34 "Copyright (c) 2012-2024, OpenGeoSys Community "
35 "(http://www.opengeosys.org)",
37 TCLAP::ValueArg<std::string> argInputFileName(
38 "i", "input-file", "the name of the geometry file to be converted",
39 true, "", "file name");
40 cmd.add(argInputFileName);
41 TCLAP::ValueArg<std::string> argOutputFileName(
42 "o", "output-file",
43 "the name of the new geometry file whose file format is guessed from "
44 "its file extension",
45 true, "", "file name");
46 cmd.add(argOutputFileName);
47
48 TCLAP::ValueArg<std::string> gmsh_path_arg("g", "gmsh-path",
49 "the path to the gmsh binary",
50 false, "", "path as string");
51 cmd.add(gmsh_path_arg);
52 cmd.parse(argc, argv);
53
54#ifdef USE_PETSC
55 MPI_Init(&argc, &argv);
56#endif
57
60 gmsh_path_arg.getValue());
62 assert(geo_names.size() == 1);
63
65 argOutputFileName.getValue());
66
67#ifdef USE_PETSC
68 MPI_Finalize();
69#endif
70 return EXIT_SUCCESS;
71}
Container class for geometric objects.
std::vector< std::string > getGeometryNames() const
Returns the names of all geometry vectors.
void readGeometryFromFile(std::string const &fname, GeoLib::GEOObjects &geo_objs, std::string const &gmsh_path)
void writeGeometryToFile(std::string const &geo_name, GeoLib::GEOObjects &geo_objs, std::string const &fname)
GITINFOLIB_EXPORT const std::string ogs_version