12#include <spdlog/spdlog.h>
13#include <tclap/CmdLine.h>
29int main(
int argc,
char* argv[])
32 "Reads a Gocad stratigraphic grid file (file ending sg) and writes the "
33 "data in the vtk unstructured grid file format. The documentation is "
35 "https://www.opengeosys.org/docs/tools/meshing/gocadsgridreader/."
38 "software, version " +
41 "Copyright (c) 2012-2024, OpenGeoSys Community "
42 "(http://www.opengeosys.org)",
45 TCLAP::SwitchArg face_set_arg(
"f",
"generate-face-sets",
46 "Generate face sets.");
47 cmd.add(face_set_arg);
49 TCLAP::ValueArg<std::string> mesh_output_arg(
50 "o",
"output-mesh",
"vtk unstructured grid file name",
true,
"",
52 cmd.add(mesh_output_arg);
54 TCLAP::ValueArg<std::string> sg_file_arg(
55 "s",
"sg",
"Gocad stratigraphic grid file name",
true,
"",
59 cmd.parse(argc, argv);
64 INFO(
"Start reading Gocad SGrid.");
66 INFO(
"End reading Gocad SGrid.");
68 if (face_set_arg.getValue())
70 INFO(
"Generating a mesh for every face set.");
75 std::unique_ptr<MeshLib::Mesh> mesh(reader.
getMesh());
78 INFO(
"Writing mesh to '{:s}'.", mesh_output_arg.getValue());
Definition of the Element class.
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
Definition of the Mesh class.
Definition of the Node class.
int main(int argc, char *argv[])
std::unique_ptr< MeshLib::Mesh > getMesh() const
std::string extractPath(std::string const &pathname)
void generateFaceSets(GocadSGridReader const &reader, std::string const &path)
GITINFOLIB_EXPORT const std::string ogs_version
int writeMeshToFile(const MeshLib::Mesh &mesh, std::filesystem::path const &file_path, std::set< std::string > variable_output_names)