OGS
main.cpp
Go to the documentation of this file.
1
10#include <tclap/CmdLine.h>
11
12#include <QApplication>
13#include <clocale>
14
15#include "BaseLib/Logging.h"
17#include "InfoLib/GitInfo.h"
18#include "OGSFileConverter.h"
19
20int main(int argc, char* argv[])
21{
22 TCLAP::CmdLine cmd(
23 "A conversion tool for ogs5 and ogs6 files.\n\n"
24 "OpenGeoSys-6 software, version " +
26 ".\n"
27 "Copyright (c) 2012-2025, OpenGeoSys Community "
28 "(http://www.opengeosys.org)",
30 TCLAP::ValueArg<std::string> gmsh_path_arg(
31 "g", "gmsh-path",
32 "Input (.msh). The path to the input gmsh binary file", false, "",
33 "INPUT_FILE");
34 cmd.add(gmsh_path_arg);
35 auto log_level_arg = BaseLib::makeLogLevelArg();
36 cmd.add(log_level_arg);
37 cmd.parse(argc, argv);
38 BaseLib::initOGSLogger(log_level_arg.getValue());
39 QApplication app(argc, argv);
40 setlocale(LC_NUMERIC, "C");
41 auto* fc = new OGSFileConverter(gmsh_path_arg.getValue());
42 fc->setWindowTitle(fc->windowTitle());
43 fc->show();
44 int returncode = QApplication::exec();
45 delete fc;
46
47 return returncode;
48}
int main(int argc, char *argv[])
Definition main.cpp:21
Git information.
Definition of OGSFileConverter class.
TCLAP::ValueArg< std::string > makeLogLevelArg()
void initOGSLogger(std::string const &log_level)
Definition Logging.cpp:64
GITINFOLIB_EXPORT const std::string ogs_version