10#include <spdlog/fmt/ranges.h>
11#include <tclap/CmdLine.h>
32int main(
int argc,
char* argv[])
35 "Checks mesh properties.\n\n"
36 "OpenGeoSys-6 software, version " +
39 "Copyright (c) 2012-2025, OpenGeoSys Community "
40 "(http://www.opengeosys.org)",
42 TCLAP::UnlabeledValueArg<std::string> mesh_arg(
43 "mesh-file",
"Input (.vtu | .msh). Mesh file",
true,
"",
"INPUT_FILE");
45 TCLAP::SwitchArg valid_arg(
"v",
"validation",
"validate the mesh");
47 TCLAP::SwitchArg print_properties_arg(
48 "p",
"print_properties",
"print properties stored in the mesh");
49 cmd.add(print_properties_arg);
51 cmd.add(log_level_arg);
53 cmd.parse(argc, argv);
64 mesh_arg.getValue(),
true ));
71 if (mem_with_mesh > 0)
73 INFO(
"Memory size: {} MiB",
74 (mem_with_mesh - mem_without_mesh) / (1024 * 1024));
77 INFO(
"Time for reading: {:g} s", run_time.
elapsed());
82 INFO(
"Axis aligned bounding box: {}", aabb);
84 auto const [min, max] = minMaxEdgeLength(mesh->getElements());
85 INFO(
"Min/max edge lengths: [{:g}, {:g}]", min, max);
91 if (print_properties_arg.isSet())
94 INFO(
"MaterialID-list: [{}]",
99 if (valid_arg.isSet())
Definition of the AABB class.
Definition of the Element class.
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
Definition of the MemWatch class.
Definition of the MeshValidation class.
Definition of the Mesh class.
Definition of the Node class.
Definition of the RunTime class.
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)
Definition of readMeshFromFile function.