GridFire v0.7.1_rc2
General Purpose Nuclear Network
Loading...
Searching...
No Matches
gridfire::io::MESANetworkFileParser Class Referencefinal

A parser for MESA-format network files. More...

#include <network_file.h>

Inheritance diagram for gridfire::io::MESANetworkFileParser:
[legend]
Collaboration diagram for gridfire::io::MESANetworkFileParser:
[legend]

Public Member Functions

 MESANetworkFileParser (const std::string &filename)
 Constructs a MESANetworkFileParser.
 
ParsedNetworkData parse (const std::string &filename) const override
 Parses a MESA-format network file.
 
- Public Member Functions inherited from gridfire::io::NetworkFileParser
virtual ~NetworkFileParser ()=default
 Virtual destructor for the base class.
 

Private Types

using Config = fourdst::config::Config
 
using LogManager = fourdst::logging::LogManager
 

Private Attributes

Configm_config = Config::getInstance()
 
quill::Logger * m_logger = LogManager::getInstance().getLogger("log")
 
std::string m_filename
 

Detailed Description

A parser for MESA-format network files.

This class is designed to parse reaction network files that follow the format used by the MESA stellar evolution code.

Member Typedef Documentation

◆ Config

using gridfire::io::MESANetworkFileParser::Config = fourdst::config::Config
private

◆ LogManager

using gridfire::io::MESANetworkFileParser::LogManager = fourdst::logging::LogManager
private

Constructor & Destructor Documentation

◆ MESANetworkFileParser()

gridfire::io::MESANetworkFileParser::MESANetworkFileParser ( const std::string &  filename)
explicit

Constructs a MESANetworkFileParser.

Parameters
filenameThe path to the MESA network file. This may be used to pre-configure the parser.
Postcondition
The parser is initialized with the context of the given file.

Member Function Documentation

◆ parse()

ParsedNetworkData gridfire::io::MESANetworkFileParser::parse ( const std::string &  filename) const
overridevirtual

Parses a MESA-format network file.

This method will read and interpret the structure of a MESA network file to extract the list of reactions.

Parameters
filenameThe path to the MESA network file.
Returns
A ParsedNetworkData struct containing the list of reaction names.
Exceptions
std::runtime_errorIf the file cannot be opened or if it contains formatting errors.

Implements gridfire::io::NetworkFileParser.

Member Data Documentation

◆ m_config

Config& gridfire::io::MESANetworkFileParser::m_config = Config::getInstance()
private

◆ m_filename

std::string gridfire::io::MESANetworkFileParser::m_filename
private

◆ m_logger

quill::Logger* gridfire::io::MESANetworkFileParser::m_logger = LogManager::getInstance().getLogger("log")
private

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