10#include <tclap/CmdLine.h>
16#include <spdlog/fmt/bundled/ranges.h>
34int main(
int argc,
char* argv[])
37 "Checks mesh properties.\n\n"
38 "OpenGeoSys-6 software, version " +
41 "Copyright (c) 2012-2024, OpenGeoSys Community "
42 "(http://www.opengeosys.org)",
44 TCLAP::UnlabeledValueArg<std::string> mesh_arg(
45 "mesh-file",
"input mesh file",
true,
"",
"string");
47 TCLAP::SwitchArg valid_arg(
"v",
"validation",
"validate the mesh");
49 TCLAP::SwitchArg print_properties_arg(
50 "p",
"print_properties",
"print properties stored in the mesh");
51 cmd.add(print_properties_arg);
53 cmd.parse(argc, argv);
56 MPI_Init(&argc, &argv);
65 mesh_arg.getValue(),
true ));
75 if (mem_with_mesh > 0)
77 INFO(
"Memory size: {} MiB",
78 (mem_with_mesh - mem_without_mesh) / (1024 * 1024));
81 INFO(
"Time for reading: {:g} s", run_time.
elapsed());
86 INFO(
"Axis aligned bounding box: {}", aabb);
88 auto const [min, max] = minMaxEdgeLength(mesh->getElements());
89 INFO(
"Min/max edge lengths: [{:g}, {:g}]", min, max);
95 if (print_properties_arg.isSet())
98 INFO(
"MaterialID-list: [{}]",
103 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.