feat(meshIO): added basic mesh reading implimentation
also added basic unit sphere mesh file which can be rescaled
This commit is contained in:
42
src/meshIO/public/meshIO.h
Normal file
42
src/meshIO/public/meshIO.h
Normal 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
|
||||
Reference in New Issue
Block a user