OGS
MeshIO.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <string>
18#include <vector>
19
20#include "BaseLib/IO/Writer.h"
21#include "MeshLib/MeshEnums.h"
22
23namespace MeshLib
24{
25class Mesh;
26class Node;
27class Element;
28template <typename T>
29class PropertyVector;
30enum class MeshElemType;
31namespace IO
32{
33namespace Legacy
34{
37{
38public:
41
42 ~MeshIO() override = default;
43
45 MeshLib::Mesh* loadMeshFromFile(const std::string& file_name);
46
48 void setMesh(const MeshLib::Mesh* mesh);
49
50protected:
52 bool write() override;
53
54private:
55 const MeshLib::Mesh* _mesh{nullptr};
56
57}; /* class */
58
59} // end namespace Legacy
60} // end namespace IO
61} // end namespace MeshLib
Definition of mesh-related Enumerations.
Definition of the Writer class.
Base class which enables writing an object to string, stringstream or file.
Definition Writer.h:32
Interface for handling mesh files from OGS-5 and below. (*.msh files)
Definition MeshIO.h:37
bool write() override
Write mesh to stream.
Definition MeshIO.cpp:396
MeshLib::Mesh * loadMeshFromFile(const std::string &file_name)
Read mesh from file.
Definition MeshIO.cpp:273
const MeshLib::Mesh * _mesh
Definition MeshIO.h:55
~MeshIO() override=default
void setMesh(const MeshLib::Mesh *mesh)
Set mesh for writing.
Definition MeshIO.cpp:434
MeshElemType
Types of mesh elements supported by OpenGeoSys. Values are from VTKCellType enum.
Definition MeshEnums.h:27