4#include <tclap/CmdLine.h>
23int main(
int argc,
char* argv[])
26 "Converts VTK mesh into TIN file.\n\n"
27 "OpenGeoSys-6 software, version " +
30 "Copyright (c) 2012-2026, OpenGeoSys Community "
31 "(http://www.opengeosys.org)",
33 TCLAP::ValueArg<std::string> mesh_in(
34 "i",
"mesh-input-file",
35 "Input (.vtk). The name of the file containing the input mesh",
true,
38 TCLAP::ValueArg<std::string> mesh_out(
39 "o",
"TIN-output-file",
40 "Output (.tin). The name of the file the TIN will be written to",
true,
44 cmd.add(log_level_arg);
45 cmd.parse(argc, argv);
49 std::unique_ptr<MeshLib::Mesh> mesh(
51 INFO(
"Mesh read: {:d} nodes, {:d} elements.", mesh->getNumberOfNodes(),
52 mesh->getNumberOfElements());
54 INFO(
"Converting the mesh to TIN");
58 INFO(
"Writing TIN into the file");
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
int main(int argc, char *argv[])
Container class for geometric objects.
const std::vector< Surface * > * getSurfaceVec(const std::string &name) const
Returns the surface vector with the given name as a const.
static void writeSurfaceAsTIN(GeoLib::Surface const &surface, std::string const &file_name)
static MeshLib::Mesh * readVTUFile(std::string const &file_name, bool const compute_element_neighbors=false)
TCLAP::ValueArg< std::string > makeLogLevelArg()
void initOGSLogger(std::string const &log_level)
GITINFOLIB_EXPORT const std::string ogs_version