GridFire 0.0.1a General Purpose Nuclear Network

Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Attributes | List of all members
gridfire::io::MESANetworkFileParser Class Referencefinal

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

`#include <network_file.h>`

Inheritance diagram for gridfire::io::MESANetworkFileParser:

## 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
Config & | m_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.

Definition at line 119 of file network_file.h.

## Member Typedef Documentation

## ◆ Config

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

Definition at line 144 of file network_file.h.

## ◆ LogManager

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

Definition at line 145 of file network_file.h.

## Constructor & Destructor Documentation

## ◆ MESANetworkFileParser()

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

Constructs a MESANetworkFileParser.

Parameters

  filename | The 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
| override virtual

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

  filename | The path to the MESA network file.

Returns
  A `ParsedNetworkData` struct containing the list of reaction names.

Exceptions

  std::runtime_error | If 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

Definition at line 146 of file network_file.h.

## ◆ m_filename

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

Definition at line 149 of file network_file.h.

## ◆ m_logger

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

Definition at line 147 of file network_file.h.

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

- src/include/gridfire/io/network_file.h