10#include <spdlog/fmt/bundled/ranges.h>
11#include <tclap/CmdLine.h>
30int main(
int argc,
char* argv[])
33 "Checks mesh properties.\n\n"
34 "OpenGeoSys-6 software, version " +
37 "Copyright (c) 2012-2024, OpenGeoSys Community "
38 "(http://www.opengeosys.org)",
40 TCLAP::UnlabeledValueArg<std::string> mesh_arg(
41 "mesh-file",
"input mesh file",
true,
"",
"string");
43 TCLAP::SwitchArg valid_arg(
"v",
"validation",
"validate the mesh");
45 TCLAP::SwitchArg print_properties_arg(
46 "p",
"print_properties",
"print properties stored in the mesh");
47 cmd.add(print_properties_arg);
49 cmd.parse(argc, argv);
59 mesh_arg.getValue(),
true ));
66 if (mem_with_mesh > 0)
68 INFO(
"Memory size: {} MiB",
69 (mem_with_mesh - mem_without_mesh) / (1024 * 1024));
72 INFO(
"Time for reading: {:g} s", run_time.
elapsed());
77 INFO(
"Axis aligned bounding box: {}", aabb);
79 auto const [min, max] = minMaxEdgeLength(mesh->getElements());
80 INFO(
"Min/max edge lengths: [{:g}, {:g}]", min, max);
86 if (print_properties_arg.isSet())
89 INFO(
"MaterialID-list: [{}]",
94 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 ...
GITINFOLIB_EXPORT const std::string ogs_version
MeshLib::Mesh * readMeshFromFile(const std::string &file_name, bool const compute_element_neighbors)
Definition of readMeshFromFile function.