10#include <tclap/CmdLine.h>
27int main(
int argc,
char* argv[])
30 "Add element quality as a mesh property.\n\n"
31 "OpenGeoSys-6 software, version " +
34 "Copyright (c) 2012-2025, OpenGeoSys Community "
35 "(http://www.opengeosys.org)",
38 TCLAP::ValueArg<std::string> mesh_out_arg(
"o",
"output_mesh_file",
39 "Output (.vtu | .msh) mesh file ",
40 true,
"",
"OUTPUT_FILE");
41 cmd.add(mesh_out_arg);
42 std::vector<std::string> allowed_element_criterions{
43 "ElementSize",
"EdgeRatio",
"EquiAngleSkew",
"RadiusEdgeRatio",
45 TCLAP::ValuesConstraint<std::string> element_criterions{
46 allowed_element_criterions};
47 TCLAP::ValueArg<std::string> criterion_arg{
48 "c",
"quality_criterion",
"quality criterion",
true,
49 "", &element_criterions};
50 cmd.add(criterion_arg);
51 TCLAP::ValueArg<std::string> mesh_in_arg(
"i",
"input_mesh_file",
52 "Input (.vtu | .msh) mesh file",
53 true,
"",
"INPUT_FILE");
56 cmd.add(log_level_arg);
57 cmd.parse(argc, argv);
66 mesh_in_arg.getValue(),
true ));
71 INFO(
"Time for reading: {:g} s", run_time.
elapsed());
80 {element_quality_vector});
81 INFO(
"Writing mesh '{:s}' ... ", mesh_out_arg.getValue());
int main(int argc, char *argv[])
Definition of the ElementQualityInterface class.
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
Definition of mesh-related Enumerations.
Definition of the Mesh class.
Definition of the RunTime class.
double elapsed() const
Get the elapsed time in seconds.
void start()
Start the timer.
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)
int writeMeshToFile(const MeshLib::Mesh &mesh, std::filesystem::path const &file_path, std::set< std::string > variable_output_names)
MeshLib::MeshQualityType String2MeshQualityType(std::string const &s)
void addPropertyToMesh(Mesh &mesh, std::string_view name, MeshItemType item_type, std::size_t number_of_components, std::span< T const > values)
MeshQualityType
Describes a mesh quality metric.
Definition of readMeshFromFile function.