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