12#include <tclap/CmdLine.h>
23int main(
int argc,
char* argv[])
26 "Convert a non-linear mesh to a linear mesh.\n\n"
27 "OpenGeoSys-6 software, version " +
30 "Copyright (c) 2012-2024, OpenGeoSys Community "
31 "(http://www.opengeosys.org)",
33 TCLAP::ValueArg<std::string> input_arg(
34 "i",
"input-mesh-file",
"input mesh file",
true,
"",
"string");
36 TCLAP::ValueArg<std::string> output_arg(
37 "o",
"output-mesh-file",
"output mesh file",
true,
"",
"string");
40 cmd.parse(argc, argv);
44 std::unique_ptr<MeshLib::Mesh> mesh(
50 if (!mesh->hasNonlinearElement())
52 ERR(
"The input mesh is linear. Exit.");
56 INFO(
"Converting to a linear order mesh");
57 std::unique_ptr<MeshLib::Mesh> new_mesh(
60 INFO(
"Save the new mesh into a file");
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
Definition of the Mesh class.
int main(int argc, char *argv[])
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)
Definition of readMeshFromFile function.