17int main(
int argc,
char* argv[])
20 "Converts OGS mesh into VTK mesh.\n\n"
21 "OpenGeoSys-6 software, version " +
24 "Copyright (c) 2012-2026, OpenGeoSys Community "
25 "(http://www.opengeosys.org)",
27 TCLAP::ValueArg<std::string> mesh_in(
28 "i",
"mesh-input-file",
29 "Input (.msh). The name of the file containing the input mesh",
true,
32 TCLAP::ValueArg<std::string> mesh_out(
33 "o",
"mesh-output-file",
34 "Output (.vtk), The name of the file the mesh will be written to",
true,
38 cmd.add(log_level_arg);
39 TCLAP::SwitchArg use_ascii_arg(
41 "Write VTU output in ASCII file. Due to possible rounding the ascii "
42 "output could result in lower accuracy");
43 cmd.add(use_ascii_arg);
44 cmd.parse(argc, argv);
49 std::unique_ptr<MeshLib::Mesh const> mesh(
55 INFO(
"Mesh read: {:d} nodes, {:d} elements.", mesh->getNumberOfNodes(),
56 mesh->getNumberOfElements());
58 auto const data_mode =
59 use_ascii_arg.getValue() ? vtkXMLWriter::Ascii : vtkXMLWriter::Binary;