4#include <tclap/CmdLine.h>
20int main(
int argc,
char* argv[])
23 "Maps geometric objects to the surface of a given mesh. "
24 "The documentation is available at "
25 "https://docs.opengeosys.org/docs/tools/model-preparation/"
26 "map-geometric-object-to-the-surface-of-a-mesh.\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(
35 "Input (.vtu). The name of the input file containing the mesh",
true,
38 TCLAP::ValueArg<std::string> input_geometry_fname(
39 "i",
"input-geometry",
40 "Input (.gml). The name of the file containing the input geometry",
41 true,
"",
"INPUT_FILE");
42 cmd.add(input_geometry_fname);
43 TCLAP::SwitchArg additional_insert_mapping(
44 "a",
"additional-insert-mapping",
45 "Advanced mapping algorithm will be applied, i.e. a new geometry will "
46 "be created and possibly new points will be inserted.");
47 cmd.add(additional_insert_mapping);
48 TCLAP::ValueArg<std::string> output_geometry_fname(
49 "o",
"output-geometry",
50 "Output (.gml). The name of the file containing the output geometry",
51 true,
"",
"OUTPUT_FILE");
52 cmd.add(output_geometry_fname);
54 cmd.add(log_level_arg);
55 cmd.parse(argc, argv);
64 if (xml_io.
readFile(input_geometry_fname.getValue()))
66 INFO(
"Read geometry from file '{:s}'.",
67 input_geometry_fname.getValue());
81 mesh_in.getValue(),
true ));
83 if (additional_insert_mapping.getValue())
96 output_geometry_fname.getValue());
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
int main(int argc, char *argv[])
std::string writeToString()
Writes the object to a string.
Container class for geometric objects.
std::vector< std::string > getGeometryNames() const
Returns the names of all geometry vectors.
bool readFile(const std::string &fname) override
Reads an xml-file containing OGS geometry.
int writeStringToFile(std::string_view content, std::filesystem::path const &file_path)
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)