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