25int main(
int argc,
char* argv[])
28 "Converts OGS mesh into VTK mesh.\n\n"
29 "OpenGeoSys-6 software, version " +
32 "Copyright (c) 2012-2024, OpenGeoSys Community "
33 "(http://www.opengeosys.org)",
35 TCLAP::ValueArg<std::string> mesh_in(
36 "i",
"mesh-input-file",
37 "the name of the file containing the input mesh",
true,
"",
38 "file name of input mesh");
40 TCLAP::ValueArg<std::string> mesh_out(
41 "o",
"mesh-output-file",
42 "the name of the file the mesh will be written to",
true,
"",
43 "file name of output mesh");
45 TCLAP::SwitchArg use_ascii_arg(
47 "Write VTU output in ASCII format. Due to possible rounding the ascii "
48 "output could result in lower accuracy.");
49 cmd.add(use_ascii_arg);
50 cmd.parse(argc, argv);
54 std::unique_ptr<MeshLib::Mesh const> mesh(
60 INFO(
"Mesh read: {:d} nodes, {:d} elements.", mesh->getNumberOfNodes(),
61 mesh->getNumberOfElements());
63 auto const data_mode =
64 use_ascii_arg.getValue() ? vtkXMLWriter::Ascii : vtkXMLWriter::Binary;