SERiF 0.0.1a
3+1D Stellar Structure and Evolution
Loading...
Searching...
No Matches
serif::mesh::MeshIO Class Reference

Class for handling mesh input/output operations. More...

#include <meshIO.h>

Public Member Functions

 MeshIO (const std::string &mesh_file, double scale_factor=1.0)
 Constructor that initializes the MeshIO object with a mesh file.
 
 ~MeshIO ()
 Destructor for the MeshIO class.
 
void LinearRescale (double scale_factor) const
 Rescale the mesh by a linear factor.
 
mfem::Mesh & GetMesh () const noexcept
 Get the mesh object.
 
bool IsLoaded () const
 Check if the mesh is loaded.
 

Private Attributes

bool loaded_
 Flag to indicate if the mesh is loaded.
 
std::string mesh_file_
 Filename of the mesh file.
 
std::unique_ptr< mfem::Mesh > m_mesh
 The mesh object.
 

Detailed Description

Class for handling mesh input/output operations.

Definition at line 30 of file meshIO.h.

Constructor & Destructor Documentation

◆ MeshIO()

serif::mesh::MeshIO::MeshIO ( const std::string & mesh_file,
double scale_factor = 1.0 )
explicit

Constructor that initializes the MeshIO object with a mesh file.

Parameters
mesh_fileThe name of the mesh file.
scale_factor

Definition at line 30 of file meshIO.cpp.

◆ ~MeshIO()

serif::mesh::MeshIO::~MeshIO ( )
default

Destructor for the MeshIO class.

Member Function Documentation

◆ GetMesh()

mfem::Mesh & serif::mesh::MeshIO::GetMesh ( ) const
nodiscardnoexcept

Get the mesh object.

Returns
Pointer to the mesh object.

Definition at line 79 of file meshIO.cpp.

◆ IsLoaded()

bool serif::mesh::MeshIO::IsLoaded ( ) const
nodiscard

Check if the mesh is loaded.

Returns
True if the mesh is loaded, false otherwise.

Definition at line 74 of file meshIO.cpp.

◆ LinearRescale()

void serif::mesh::MeshIO::LinearRescale ( double scale_factor) const

Rescale the mesh by a linear factor.

Parameters
scale_factorThe factor by which to scale the mesh.

Definition at line 51 of file meshIO.cpp.

Member Data Documentation

◆ loaded_

bool serif::mesh::MeshIO::loaded_
private

Flag to indicate if the mesh is loaded.

Definition at line 33 of file meshIO.h.

◆ m_mesh

std::unique_ptr<mfem::Mesh> serif::mesh::MeshIO::m_mesh
private

The mesh object.

Definition at line 35 of file meshIO.h.

◆ mesh_file_

std::string serif::mesh::MeshIO::mesh_file_
private

Filename of the mesh file.

Definition at line 34 of file meshIO.h.


The documentation for this class was generated from the following files: