Rodin::IO namespace

Module for dealing with I/O functionality.

Classes

template<FileFormat Fmt, class FES, class Data>
class GridFunctionLoader
Loader template for grid functions with specific file format.
template<class Range>
class GridFunctionLoader<FileFormat::MFEM, Variational::P1<Range, Geometry::Mesh<Context::Local>>, Math::Vector<typename FormLanguage::Traits<Range>::ScalarType>>
Specialization for loading P1 grid functions from MFEM format.
template<class FES, class Data>
class GridFunctionLoaderBase
Base class for loading grid functions from files or streams.
template<FileFormat Fmt, class FES, class Data>
class GridFunctionPrinter
Printer template for grid functions with specific file format.
template<class FES, class Scalar>
class GridFunctionPrinter<FileFormat::MFEM, FES, Math::Vector<Scalar>>
Final specialization for printing grid functions with vector data in MFEM format.
template<FileFormat Fmt, class FES, class Data>
class GridFunctionPrinterBase
Forward declaration of base class for printing grid functions.
template<class Range, class Context, class Data>
class GridFunctionPrinterBase<FileFormat::MFEM, Variational::P0<Range, Geometry::Mesh<Context>>, Data>
Base class for printing P0 (piecewise constant) grid functions in MFEM format.
template<class Range, class Context, class Data>
class GridFunctionPrinterBase<FileFormat::MFEM, Variational::P1<Range, Geometry::Mesh<Context>>, Data>
Base class for printing P1 (continuous Lagrange) grid functions in MFEM format.
template<class T>
class Loader
Base template for loading objects from files or streams.
template<FileFormat Fmt, class Trait>
class MeshLoader
Loader template for meshes with specific file format and context.
template<>
class MeshLoader<IO::FileFormat::MEDIT, Context::Local>
Specialization for loading Sequential meshes in the MEDIT file format.
template<>
class MeshLoader<IO::FileFormat::MFEM, Context::Local>
Specialization for loading sequential meshes in MFEM format.
template<class Context>
class MeshLoaderBase
Base class for loading meshes from files or streams.
template<FileFormat Fmt, class Trait>
class MeshPrinter
Printer template for meshes with specific file format and context.
template<>
class MeshPrinter<FileFormat::ENSIGHT6, Context::Local>
Specialization for printing sequential meshes in EnSight6 format.
template<>
class MeshPrinter<FileFormat::MFEM, Context::Local>
Specialization for printing sequential meshes in MFEM format.
template<class Context>
class MeshPrinterBase
Base class for printing meshes to streams or files.
template<class T>
class Printer
Base template for printing objects to streams.

Enums

enum class FileFormat { MFEM, GMSH, MEDIT, ENSIGHT6 }
Enumeration of supported file formats for mesh and grid function I/O.

Functions

auto toCharString(FileFormat fmt) -> const char* constexpr
Converts a FileFormat enum value to its string representation.
auto operator<<(std::ostream& os, FileFormat fmt) -> std::ostream&
Stream output operator for FileFormat enum.

Enum documentation

enum class Rodin::IO::FileFormat

Enumeration of supported file formats for mesh and grid function I/O.

This enum identifies the different file formats that can be used for reading and writing meshes and grid functions in Rodin.

Enumerators
MFEM

MFEM mesh format - native format for MFEM library.

GMSH

GMSH mesh format - popular open-source mesh generator format.

MEDIT

MEDIT mesh format - used by MMG remeshing software.

ENSIGHT6

EnSight6 format - widely used in post-processing and visualization.

Function documentation

const char* Rodin::IO::toCharString(FileFormat fmt) constexpr

Converts a FileFormat enum value to its string representation.

Parameters
fmt in File format enum value
Returns C-style string name of the format, or nullptr if invalid
Example
const char* name = toCharString(FileFormat::MFEM);  // Returns "MFEM"

std::ostream& Rodin::IO::operator<<(std::ostream& os, FileFormat fmt)

Stream output operator for FileFormat enum.

Parameters
os in/out Output stream
fmt in File format to output
Returns Reference to the output stream

Writes the string representation of the file format to the stream.

Example
std::cout << FileFormat::MEDIT;  // Outputs "MEDIT"