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 NetworkParser & | instance () |
Getter for the singleton instance. | |
This is the class that processes reaction networks and allows for interaction with the data contained in the network.
|
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
|
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
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.
file | the yaml file which contains the reaction network |
|
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
void prism::NetworkParser::setDelimiter | ( | const std::string & | delimiter | ) |
Sets the delimiter for the networks which have some tabulated data.
delimiter | the 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 |
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.
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.
|
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
|
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
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.
void prism::NetworkParser::writeSpeciesSummary | ( | const std::string & | file | ) |
Writes a summary of the species in the network to a file.
file | the file which you want to write the species summary to |
|
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