4#include <spdlog/fmt/ranges.h>
5#include <tclap/CmdLine.h>
26int main(
int argc,
char* argv[])
29 "Checks mesh properties.\n\n"
30 "OpenGeoSys-6 software, version " +
33 "Copyright (c) 2012-2026, OpenGeoSys Community "
34 "(http://www.opengeosys.org)",
36 TCLAP::UnlabeledValueArg<std::string> mesh_arg(
37 "mesh-file",
"Input (.vtu | .msh). Mesh file",
true,
"",
"INPUT_FILE");
39 TCLAP::SwitchArg valid_arg(
"v",
"validation",
"validate the mesh");
41 TCLAP::SwitchArg print_properties_arg(
42 "p",
"print_properties",
"print properties stored in the mesh");
43 cmd.add(print_properties_arg);
45 cmd.add(log_level_arg);
47 cmd.parse(argc, argv);
58 mesh_arg.getValue(),
true ));
65 if (mem_with_mesh > 0)
67 INFO(
"Memory size: {} MiB",
68 (mem_with_mesh - mem_without_mesh) / (1024 * 1024));
71 INFO(
"Time for reading: {:g} s", run_time.
elapsed());
76 INFO(
"Axis aligned bounding box: {}", aabb);
78 auto const [min, max] = minMaxEdgeLength(mesh->getElements());
79 INFO(
"Min/max edge lengths: [{:g}, {:g}]", min, max);
85 if (print_properties_arg.isSet())
88 INFO(
"MaterialID-list: [{}]",
93 if (valid_arg.isSet())
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
int main(int argc, char *argv[])
unsigned long getVirtMemUsage()
double elapsed() const
Get the elapsed time in seconds.
void start()
Start the timer.
Class AABB is an axis aligned bounding box around a given set of geometric points of (template) type ...
TCLAP::ValueArg< std::string > makeLogLevelArg()
void initOGSLogger(std::string const &log_level)
GITINFOLIB_EXPORT const std::string ogs_version
MeshLib::Mesh * readMeshFromFile(const std::string &file_name, bool const compute_element_neighbors)