PRISM
 v0.0.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
prism::NetworkParser Class Reference

This is the class that processes reaction networks and allows for interaction with the data contained in the network. More...

#include <NetworkParser.h>

Public Member Functions

void clear ()
 Resets the parser to a fresh state, as if no networks have been processed.
 
void parseNetwork (const std::string &file)
 Method goes through all of the reactions in this network constructs Reaction objects and then puts the reactions in the correct lists for future use.
 
void setDelimiter (const std::string &delimiter)
 Sets the delimiter for the networks which have some tabulated data.
 
void writeSpeciesSummary (const std::string &file)
 Writes a summary of the species in the network to a file.
 
const std::vector< std::shared_ptr< Reaction > > & rateBasedReactions () const
 Gets all of the reactions in the xsec-based block that have cross section data in a file.
 
const std::vector< std::shared_ptr< Reaction > > & xsecBasedReactions () const
 Gets all of the reactions in the xsec-based block that have cross section data in a file.
 
const std::vector< std::shared_ptr< const Reaction > > & tabulatedXSecReactions () const
 Gets all of the reactions in the xsec-based block that have cross section data in a file.
 
const std::vector< std::shared_ptr< const Reaction > > & functionXSecReactions () const
 Gets all of the reactions in the xsec-based block that have cross section that can be represented with a functional form.
 
const std::vector< std::shared_ptr< const Reaction > > & tabulatedRateReactions () const
 Gets all of the reactions in the xsec-based block that have rate data in a file.
 
const std::vector< std::shared_ptr< const Reaction > > & functionRateReactions () const
 Gets all of the reactions in the xsec-based block that have rate data that can be represented with a functional form.
 
const std::vector< std::shared_ptr< const Species > > & transientSpecies () const
 Gets all of the species in the network that have a non-zero This function will also exist the program if there are any errors in the reaction networks that have been parsed Species are ordered based on their ids and will always be in id order.
 
const std::vector< std::string > & speciesNames () const
 Gets the names of all of the species in the network This function will also exist the program if there are any errors in the reaction networks that have been parsed Species are ordered based on their ids and will always be in id order.
 
const std::vector< std::shared_ptr< Species > > & species () const
 Gets all of the species in the network This function will also exist the program if there are any errors in the reaction networks that have been parsed Species are ordered based on their ids and will always be in id order.
 
void writeReactionTable (const std::string &file) const
 
void writeReactionTable (const std::string &file, TableWriterBase &writer) const
 
void writeSpeciesSummary (const std::string &file, SpeciesSummaryWriterBase &writer) const
 

Static Public Member Functions

static NetworkParserinstance ()
 Getter for the singleton instance.
 

Detailed Description

This is the class that processes reaction networks and allows for interaction with the data contained in the network.

Member Function Documentation

◆ functionRateReactions()

const std::vector< std::shared_ptr< const Reaction > > & prism::NetworkParser::functionRateReactions ( ) const
inline

Gets all of the reactions in the xsec-based block that have rate data that can be represented with a functional form.

This function will exist the program if there are any errors in the reaction networks that have been parsed

Returns
a vector of shared_ptr for all of the reactions of this type

◆ functionXSecReactions()

const std::vector< std::shared_ptr< const Reaction > > & prism::NetworkParser::functionXSecReactions ( ) const
inline

Gets all of the reactions in the xsec-based block that have cross section that can be represented with a functional form.

This function will exist the program if there are any errors in the reaction networks that have been parsed

Returns
a vector of shared_ptr for all of the reactions of this type

◆ parseNetwork()

void prism::NetworkParser::parseNetwork ( const std::string & file)

Method goes through all of the reactions in this network constructs Reaction objects and then puts the reactions in the correct lists for future use.

Parameters
filethe yaml file which contains the reaction network

◆ rateBasedReactions()

const std::vector< std::shared_ptr< Reaction > > & prism::NetworkParser::rateBasedReactions ( ) const
inline

Gets all of the reactions in the xsec-based block that have cross section data in a file.

This function will exist the program if there are any errors in the reaction networks that have been parsed

Returns
a vector of shared_ptr for all of the reactions of this type

◆ setDelimiter()

void prism::NetworkParser::setDelimiter ( const std::string & delimiter)

Sets the delimiter for the networks which have some tabulated data.

Parameters
delimiterthe delimiter that seperates the column of energy values and xsec/rate values in the file This function will exit the program if the delimiter is an empty string or if it contains numbers

◆ species()

const std::vector< std::shared_ptr< Species > > & prism::NetworkParser::species ( ) const

Gets all of the species in the network This function will also exist the program if there are any errors in the reaction networks that have been parsed Species are ordered based on their ids and will always be in id order.

Returns
a vector of shared_ptr for all unique species in the network

◆ speciesNames()

const std::vector< std::string > & prism::NetworkParser::speciesNames ( ) const

Gets the names of all of the species in the network This function will also exist the program if there are any errors in the reaction networks that have been parsed Species are ordered based on their ids and will always be in id order.

Returns
a vector of shared_ptr for all unique species in the network

◆ tabulatedRateReactions()

const std::vector< std::shared_ptr< const Reaction > > & prism::NetworkParser::tabulatedRateReactions ( ) const
inline

Gets all of the reactions in the xsec-based block that have rate data in a file.

This function will exist the program if there are any errors in the reaction networks that have been parsed

Returns
a vector of shared_ptr for all of the reactions of this type

◆ tabulatedXSecReactions()

const std::vector< std::shared_ptr< const Reaction > > & prism::NetworkParser::tabulatedXSecReactions ( ) const
inline

Gets all of the reactions in the xsec-based block that have cross section data in a file.

This function will exist the program if there are any errors in the reaction networks that have been parsed

Returns
a vector of shared_ptr for all of the reactions of this type

◆ transientSpecies()

const std::vector< std::shared_ptr< const Species > > & prism::NetworkParser::transientSpecies ( ) const

Gets all of the species in the network that have a non-zero This function will also exist the program if there are any errors in the reaction networks that have been parsed Species are ordered based on their ids and will always be in id order.

Returns
a vector of shared_ptr for all unique species in the network

◆ writeSpeciesSummary()

void prism::NetworkParser::writeSpeciesSummary ( const std::string & file)

Writes a summary of the species in the network to a file.

Parameters
filethe file which you want to write the species summary to

◆ xsecBasedReactions()

const std::vector< std::shared_ptr< Reaction > > & prism::NetworkParser::xsecBasedReactions ( ) const
inline

Gets all of the reactions in the xsec-based block that have cross section data in a file.

This function will exist the program if there are any errors in the reaction networks that have been parsed

Returns
a vector of shared_ptr for all of the reactions of this type

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