36int main(
int argc,
char* argv[])
39 "Converting a mesh in FEFLOW file format (ASCII, version 5.4) to a vtk "
40 "unstructured grid file (new OGS file format) or to the old OGS file "
41 "format - see options.\n\n"
42 "OpenGeoSys-6 software, version " +
45 "Copyright (c) 2012-2024, OpenGeoSys Community "
46 "(http://www.opengeosys.org)",
49 TCLAP::ValueArg<std::string> ogs_mesh_arg(
52 "filename for output mesh (if extension is msh, old OGS fileformat is "
56 "filename as string");
57 cmd.add(ogs_mesh_arg);
59 TCLAP::ValueArg<std::string> feflow_mesh_arg(
60 "i",
"in",
"FEFLOW input file (*.fem)",
true,
"",
"filename as string");
61 cmd.add(feflow_mesh_arg);
63 cmd.parse(argc, argv);
66 MPI_Init(&argc, &argv);
70 INFO(
"Reading {:s}.", feflow_mesh_arg.getValue());
78 std::unique_ptr<MeshLib::Mesh const> mesh(
83 INFO(
"Could not read mesh from {:s}.", feflow_mesh_arg.getValue());
91 INFO(
"Mem for mesh: {} MiB",
92 (mem_with_mesh - mem_without_mesh) / (1024 * 1024));
94 INFO(
"Time for reading: {:f} seconds.", run_time.
elapsed());
95 INFO(
"Read {:d} nodes and {:d} elements.", mesh->getNumberOfNodes(),
96 mesh->getNumberOfElements());
98 std::string ogs_mesh_fname(ogs_mesh_arg.getValue());
99 INFO(
"Writing {:s}.", ogs_mesh_fname);