6#include <tclap/CmdLine.h>
20int main(
int argc,
char* argv[])
23 "Append line elements into a mesh.\n\n"
24 "OpenGeoSys-6 software, version " +
27 "Copyright (c) 2012-2026, OpenGeoSys Community "
28 "(http://www.opengeosys.org)",
30 TCLAP::ValueArg<std::string> mesh_in(
31 "i",
"mesh-input-file",
32 "Input (.vtu). The name of the file containing the input mesh",
true,
35 TCLAP::ValueArg<std::string> mesh_out(
36 "o",
"mesh-output-file",
37 "Output (.vtu | .msh). The name of the file the mesh will be written "
39 true,
"",
"OUTPUT_FILE");
41 TCLAP::ValueArg<std::string> geoFileArg(
43 "Input (.gml). The name of the input geometry file which contains "
45 true,
"",
"INPUT_FILE");
48 cmd.add(log_level_arg);
50 TCLAP::ValueArg<std::string> gmsh_path_arg(
51 "",
"gmsh-path",
"Input (.msh). The path to the input gmsh binary file",
52 false,
"",
"INPUT_FILE");
53 cmd.add(gmsh_path_arg);
56 cmd.parse(argc, argv);
64 gmsh_path_arg.getValue());
67 if (geo_names.empty())
69 ERR(
"No geometries found.");
76 ERR(
"Could not find polylines in geometry '{:s}'.", geo_names.front());
82 mesh_in.getValue(),
true ));
85 ERR(
"Mesh file '{:s}' not found", mesh_in.getValue());
92 std::unique_ptr<MeshLib::Mesh> new_mesh =
94 INFO(
"Mesh created: {:d} nodes, {:d} elements.",
95 new_mesh->getNumberOfNodes(), new_mesh->getNumberOfElements());
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
int main(int argc, char *argv[])
Container class for geometric objects.
std::vector< std::string > getGeometryNames() const
Returns the names of all geometry vectors.
const PolylineVec * getPolylineVecObj(const std::string &name) const
std::size_t getNumberOfNodes() const
Get the number of nodes.
std::size_t getNumberOfElements() const
Get the number of elements.
TCLAP::ValueArg< std::string > makeLogLevelArg()
void initOGSLogger(std::string const &log_level)
void readGeometryFromFile(std::string const &fname, GeoLib::GEOObjects &geo_objs, std::string const &gmsh_path)
TemplateVec< GeoLib::Polyline > PolylineVec
class PolylineVec encapsulate a std::vector of Polylines additional one can give the vector of polyli...
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)