32int main(
int argc,
char* argv[])
35 "Converting a mesh in FEFLOW file format (ASCII, version 5.4) to a vtk "
36 "unstructured grid file (new OGS file format) or to the old OGS file "
37 "format - see options.\n\n"
38 "OpenGeoSys-6 software, version " +
41 "Copyright (c) 2012-2025, OpenGeoSys Community "
42 "(http://www.opengeosys.org)",
45 TCLAP::ValueArg<std::string> ogs_mesh_arg(
48 "filename for output mesh (if extension is msh, old OGS fileformat is "
52 "filename as string");
53 cmd.add(ogs_mesh_arg);
55 TCLAP::ValueArg<std::string> feflow_mesh_arg(
56 "i",
"in",
"FEFLOW input file (*.fem)",
true,
"",
"filename as string");
57 cmd.add(feflow_mesh_arg);
59 cmd.parse(argc, argv);
64 INFO(
"Reading {:s}.", feflow_mesh_arg.getValue());
72 std::unique_ptr<MeshLib::Mesh const> mesh(
77 INFO(
"Could not read mesh from {:s}.", feflow_mesh_arg.getValue());
82 INFO(
"Mem for mesh: {} MiB",
83 (mem_with_mesh - mem_without_mesh) / (1024 * 1024));
85 INFO(
"Time for reading: {:f} seconds.", run_time.
elapsed());
86 INFO(
"Read {:d} nodes and {:d} elements.", mesh->getNumberOfNodes(),
87 mesh->getNumberOfElements());
89 std::string ogs_mesh_fname(ogs_mesh_arg.getValue());
90 INFO(
"Writing {:s}.", ogs_mesh_fname);