feat(meshIO): added basic mesh reading implimentation

also added basic unit sphere mesh file which can be rescaled
This commit is contained in:
2025-02-16 15:08:33 -05:00
parent 1713f6cb08
commit ea037cf996
6 changed files with 100 additions and 1 deletions

View File

@@ -0,0 +1,42 @@
#ifndef MESHIO_H
#define MESHIO_H
#include "mfem.hpp"
#include <string>
/**
* @brief Class for handling mesh input/output operations.
*/
class MeshIO
{
private:
bool loaded_; ///< Flag to indicate if the mesh is loaded
std::string mesh_file_; ///< Filename of the mesh file
mfem::Mesh mesh_; ///< The mesh object
public:
/**
* @brief Constructor that initializes the MeshIO object with a mesh file.
* @param mesh_file The name of the mesh file.
*/
MeshIO(const std::string &mesh_file);
/**
* @brief Destructor for the MeshIO class.
*/
~MeshIO();
/**
* @brief Get the mesh object.
* @return Reference to the mesh object.
*/
mfem::Mesh& GetMesh();
/**
* @brief Check if the mesh is loaded.
* @return True if the mesh is loaded, false otherwise.
*/
bool IsLoaded() const;
};
#endif // MESHIO_H