OGS
GenerateFaceSetMeshes.cpp
Go to the documentation of this file.
1
11
14
15namespace FileIO
16{
17namespace Gocad
18{
19void generateFaceSets(GocadSGridReader const& reader, std::string const& path)
20{
21 for (std::size_t l(0); l < 128; l++)
22 {
23 std::unique_ptr<MeshLib::Mesh> face_set(reader.getFaceSetMesh(l));
24
25 if (!face_set)
26 {
27 continue;
28 }
29 INFO("Face set mesh created. #nodes: {:d}, #elements: {:d}",
30 face_set->getNumberOfNodes(),
31 face_set->getNumberOfElements());
32
33 std::string const mesh_out_fname(path + face_set->getName() + ".vtu");
34 INFO("Writing face set mesh to '{:s}'.", mesh_out_fname);
35 MeshLib::IO::writeMeshToFile(*face_set, mesh_out_fname);
36 }
37}
38
39} // namespace Gocad
40} // namespace FileIO
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:35
Definition of the Quad class.
std::unique_ptr< MeshLib::Mesh > getFaceSetMesh(std::size_t const face_set_number) const
void generateFaceSets(GocadSGridReader const &reader, std::string const &path)
int writeMeshToFile(const MeshLib::Mesh &mesh, std::filesystem::path const &file_path, std::set< std::string > variable_output_names)