- Copyright
- Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org) Distributed under a Modified BSD License. See accompanying file LICENSE.txt or http://www.opengeosys.org/project/license
Definition in file GocadSGridReader.cpp.
Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 28 of file GocadSGridReader.cpp.
31 "Reads a Gocad stratigraphic grid file (file ending sg) and writes the "
32 "data in the vtk unstructured grid file format. The documentation is "
34 "https://www.opengeosys.org/docs/tools/meshing/gocadsgridreader/.\n\n "
36 "software, version " +
39 "Copyright (c) 2012-2021, OpenGeoSys Community "
40 "(http://www.opengeosys.org)",
43 TCLAP::SwitchArg face_set_arg(
"f",
"generate-face-sets",
44 "Generate face sets.");
45 cmd.add(face_set_arg);
47 TCLAP::ValueArg<std::string> mesh_output_arg(
48 "o",
"output-mesh",
"vtk unstructured grid file name",
true,
"",
50 cmd.add(mesh_output_arg);
52 TCLAP::ValueArg<std::string> sg_file_arg(
53 "s",
"sg",
"Gocad stratigraphic grid file name",
true,
"",
57 cmd.parse(argc, argv);
60 INFO(
"Start reading Gocad SGrid.");
62 INFO(
"End reading Gocad SGrid.");
64 if (face_set_arg.getValue())
66 INFO(
"Generating a mesh for every face set.");
71 std::unique_ptr<MeshLib::Mesh> mesh(reader.getMesh());
74 INFO(
"Writing mesh to '{:s}'.", mesh_output_arg.getValue());
void INFO(char const *fmt, Args const &... args)
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, [[maybe_unused]] std::set< std::string > variable_output_names)
References BaseLib::extractPath(), FileIO::Gocad::generateFaceSets(), FileIO::Gocad::GocadSGridReader::getMesh(), INFO(), GitInfoLib::GitInfo::ogs_version, MeshLib::IO::writeMeshToFile(), and MeshLib::MeshInformation::writePropertyVectorInformation().